mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Input - Polished up UI
Input - Added events to service
This commit is contained in:
1 parent
6ee5cbd09c
commit
f1f0abfec5
40 files changed
+552
-203
No files matched your search
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Windows.Documents;
|
||||
using Artemis.Core;
|
||||
using Artemis.Core.DataModelExpansions;
|
||||
using Artemis.UI.Shared.Services;
|
||||
|
||||
@@ -22,11 +22,5 @@ namespace Artemis.UI.Shared.Screens.Dialogs
|
||||
if (Session != null && !Session.IsEnded)
|
||||
Session.Close(true);
|
||||
}
|
||||
|
||||
public void Cancel()
|
||||
{
|
||||
if (Session != null && !Session.IsEnded)
|
||||
Session.Close(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -91,15 +91,14 @@ namespace Artemis.UI.Shared.Screens.GradientEditor
|
||||
Session.Close(true);
|
||||
}
|
||||
|
||||
public void Cancel()
|
||||
public override void Cancel()
|
||||
{
|
||||
// Restore the saved state
|
||||
ColorGradient.Stops.Clear();
|
||||
ColorGradient.Stops.AddRange(_originalStops);
|
||||
ColorGradient.OnColorValuesUpdated();
|
||||
|
||||
if (Session != null && !Session.IsEnded)
|
||||
Session.Close(false);
|
||||
base.Cancel();
|
||||
}
|
||||
|
||||
private void UpdateColorStopViewModels(object? sender, PropertyChangedEventArgs e)
|
||||
|
||||
@@ -49,6 +49,15 @@ namespace Artemis.UI.Shared.Services
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If not yet closed, closes the current session passing <see langword="false" />
|
||||
/// </summary>
|
||||
public virtual void Cancel()
|
||||
{
|
||||
if (Session != null && !Session.IsEnded)
|
||||
Session.Close(false);
|
||||
}
|
||||
|
||||
internal void OnDialogOpened(object sender, DialogOpenedEventArgs e)
|
||||
{
|
||||
Session = e.Session;
|
||||
|
||||
Reference in new issue
Block a user