From 529231af2e9541b65b18d3554b6e8688ec55e0c1 Mon Sep 17 00:00:00 2001
From: Betim Beja <11160171+BetimBeja@users.noreply.github.com>
Date: Fri, 4 Feb 2022 11:15:44 +0100
Subject: [PATCH] Added scrollbar for small screens
---
.../AlbanianXrm.SolutionPackager.Tool.csproj | 6 +-
.../CoreToolsDownloader.cs | 34 +++++-----
.../CrmSolutionDownloader.cs | 50 +++++++-------
.../CrmSolutionImporter.cs | 30 ++++----
.../Interfaces/IMyToolFactory.cs | 4 +-
.../MyToolFactory.cs | 9 +--
.../SolutionPackagerCaller.cs | 68 +++++++++----------
.../SolutionPackagerControl.cs | 13 ++--
.../SolutionPackagerControl.resx | 37 +++++++---
.../AlbanianXrm.SolutionPackager.csproj | 2 +-
.../AlbanianXrm.SolutionPackager.nuspec | 5 +-
.../ILMergeConfig.json | 8 +--
12 files changed, 134 insertions(+), 132 deletions(-)
diff --git a/AlbanianXrm.SolutionPackager.Tool/AlbanianXrm.SolutionPackager.Tool.csproj b/AlbanianXrm.SolutionPackager.Tool/AlbanianXrm.SolutionPackager.Tool.csproj
index 67500b9..e244ca0 100644
--- a/AlbanianXrm.SolutionPackager.Tool/AlbanianXrm.SolutionPackager.Tool.csproj
+++ b/AlbanianXrm.SolutionPackager.Tool/AlbanianXrm.SolutionPackager.Tool.csproj
@@ -44,9 +44,9 @@
$(OutputPath)$(AssemblyName).xml
-
-
-
+
+
+
diff --git a/AlbanianXrm.SolutionPackager.Tool/CoreToolsDownloader.cs b/AlbanianXrm.SolutionPackager.Tool/CoreToolsDownloader.cs
index b374d01..ac0c9e7 100644
--- a/AlbanianXrm.SolutionPackager.Tool/CoreToolsDownloader.cs
+++ b/AlbanianXrm.SolutionPackager.Tool/CoreToolsDownloader.cs
@@ -1,5 +1,6 @@
-using AlbanianXrm.SolutionPackager.Properties;
-using AlbanianXrm.XrmToolBox.Shared;
+using AlbanianXrm.BackgroundWorker;
+using AlbanianXrm.SolutionPackager.Properties;
+using AlbanianXrm.XrmToolBox.Shared.Extensions;
using NuGet.Common;
using NuGet.Packaging;
using NuGet.Protocol;
@@ -8,7 +9,6 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
-using System.Net;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -19,11 +19,11 @@ internal class CoreToolsDownloader
{
public const string coreToolsId = "Microsoft.CrmSdk.CoreTools";
public const string solutionPackagerName = "SolutionPackager.exe";
- private readonly BackgroundWorkHandler backgroundWorkHandler;
+ private readonly AlBackgroundWorkHandler backgroundWorkHandler;
private readonly SolutionPackagerControl solutionPackagerControl;
private readonly ToolViewModel toolViewModel;
- public CoreToolsDownloader(BackgroundWorkHandler backgroundWorkHandler, SolutionPackagerControl solutionPackagerControl, ToolViewModel toolViewModel)
+ public CoreToolsDownloader(AlBackgroundWorkHandler backgroundWorkHandler, SolutionPackagerControl solutionPackagerControl, ToolViewModel toolViewModel)
{
this.backgroundWorkHandler = backgroundWorkHandler ?? throw new ArgumentNullException(nameof(backgroundWorkHandler));
this.solutionPackagerControl = solutionPackagerControl ?? throw new ArgumentNullException(nameof(solutionPackagerControl));
@@ -32,12 +32,10 @@ public CoreToolsDownloader(BackgroundWorkHandler backgroundWorkHandler, Solution
public void DownloadCoreTools(string nuGetFeed)
{
- backgroundWorkHandler.EnqueueAsyncWork(
- Resources.DOWNLOADING_CORE_TOOLS,
- DownloadCoreToolsAsync,
- nuGetFeed,
- DownloadCoreToolsCompleted
- );
+ backgroundWorkHandler.EnqueueBackgroundWork(
+ AlBackgroundWorkerFactory.NewAsyncWorker(DownloadCoreToolsAsync, nuGetFeed, DownloadCoreToolsCompleted)
+ .WithViewModel(toolViewModel)
+ .WithMessage(solutionPackagerControl, Resources.DOWNLOADING_CORE_TOOLS));
}
public static Version GetSolutionPackagerVersion()
@@ -79,7 +77,7 @@ public async Task