|
|
@ -1,4 +1,5 @@ |
|
|
|
using System; |
|
|
|
using System; |
|
|
|
|
|
|
|
using System.Collections.Immutable; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.Linq; |
|
|
|
using System.Linq; |
|
|
|
using System.Reactive.Linq; |
|
|
|
using System.Reactive.Linq; |
|
|
@ -121,13 +122,23 @@ public partial class PackageExtensionBrowserViewModel : ViewModelBase |
|
|
|
.Cast<IPackageStep>() |
|
|
|
.Cast<IPackageStep>() |
|
|
|
.ToArray(); |
|
|
|
.ToArray(); |
|
|
|
|
|
|
|
|
|
|
|
var runner = new PackageModificationRunner { ShowDialogOnStart = true, HideCloseButton = true }; |
|
|
|
var runner = new PackageModificationRunner { ShowDialogOnStart = true }; |
|
|
|
EventManager.Instance.OnPackageInstallProgressAdded(runner); |
|
|
|
EventManager.Instance.OnPackageInstallProgressAdded(runner); |
|
|
|
await runner.ExecuteSteps(steps); |
|
|
|
await runner.ExecuteSteps(steps); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ClearSelection(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
|
|
|
|
|
public override async Task OnLoadedAsync() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
await base.OnLoadedAsync(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await Refresh(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[RelayCommand] |
|
|
|
[RelayCommand] |
|
|
|
private async Task Refresh() |
|
|
|
public async Task Refresh() |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (PackagePair is null) |
|
|
|
if (PackagePair is null) |
|
|
|
return; |
|
|
|
return; |
|
|
@ -170,6 +181,14 @@ public partial class PackageExtensionBrowserViewModel : ViewModelBase |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void ClearSelection() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
foreach (var item in SelectedAvailableItems.ToImmutableArray()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
item.IsSelected = false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void OnSelectedItemsUpdate(Change<SelectableItem<PackageExtension>, string> change) |
|
|
|
private void OnSelectedItemsUpdate(Change<SelectableItem<PackageExtension>, string> change) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Debug.WriteLine($"{change}"); |
|
|
|
Debug.WriteLine($"{change}"); |
|
|
|