Plugins - Added prerequisites system

This commit is contained in:
Robert committed 2021-04-25 23:18:00 +02:00
1 parent 77227b7e6e
commit 19679c0ba6
22 files changed
+1210 -13

No files matched your search

@@ -53,7 +53,7 @@ namespace Artemis.UI.Shared.Services
public LinkedList<Color> RecentColors => RecentColorsSetting.Value;
public Task<object> ShowGradientPicker(ColorGradient colorGradient, string dialogHost)
public Task<object?> ShowGradientPicker(ColorGradient colorGradient, string dialogHost)
{
if (!string.IsNullOrWhiteSpace(dialogHost))
return _dialogService.ShowDialogAt<GradientEditorViewModel>(dialogHost, new Dictionary<string, object> {{"colorGradient", colorGradient}});
@@ -6,7 +6,7 @@ namespace Artemis.UI.Shared.Services
/// <summary>
/// Represents the base class for a dialog view model
/// </summary>
public abstract class DialogViewModelBase : ValidatingModelBase
public abstract class DialogViewModelBase : Screen
{
private DialogViewModelHost? _dialogViewModelHost;
private DialogSession? _session;
@@ -47,6 +47,7 @@ namespace Artemis.UI.Shared.Services
/// </summary>
public virtual void OnDialogClosed(object sender, DialogClosingEventArgs e)
{
ScreenExtensions.TryClose(this);
}
/// <summary>
@@ -61,6 +62,7 @@ namespace Artemis.UI.Shared.Services
internal void OnDialogOpened(object sender, DialogOpenedEventArgs e)
{
Session = e.Session;
ScreenExtensions.TryActivate(this);
}
}
}
@@ -7,7 +7,7 @@ namespace Artemis.UI.Shared.Services
{
internal interface IColorPickerService : IArtemisSharedUIService
{
Task<object> ShowGradientPicker(ColorGradient colorGradient, string dialogHost);
Task<object?> ShowGradientPicker(ColorGradient colorGradient, string dialogHost);
PluginSetting<bool> PreviewSetting { get; }
LinkedList<Color> RecentColors { get; }