Noise brush - Added default values

Color brush - Added default values
UI - Replaced OnActivate overrides in screens with the more appropriate OnInitialActivate
Tray icon - Fixed empty window appearing for half a second on startup
This commit is contained in:
SpoinkyNL committed 2020-02-23 22:28:56 +01:00
1 parent 3ec90766aa
commit 8b95243a7c
10 files changed
+54 -45

No files matched your search

@@ -120,19 +120,19 @@ namespace Artemis.UI.Screens.Module.ProfileEditor
_profileEditorService.RedoUpdateProfile(Module);
}
protected override void OnActivate()
protected override void OnInitialActivate()
{
LoadWorkspaceSettings();
_profileEditorService.StopRegularRender();
Task.Run(LoadProfiles);
base.OnActivate();
base.OnInitialActivate();
}
protected override void OnDeactivate()
protected override void OnClose()
{
SaveWorkspaceSettings();
_profileEditorService.ResumeRegularRender();
base.OnDeactivate();
base.OnClose();
}
private void ChangeSelectedProfile(Profile profile)
@@ -114,7 +114,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
}
}
protected override void OnActivate()
protected override void OnInitialActivate()
{
HighlightSelectedLayer = _settingsService.GetSetting("ProfileEditor.HighlightSelectedLayer", true);
PauseRenderingOnFocusLoss = _settingsService.GetSetting("ProfileEditor.PauseRenderingOnFocusLoss", true);
@@ -122,10 +122,10 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
HighlightSelectedLayer.SettingChanged += HighlightSelectedLayerOnSettingChanged;
_updateTrigger.Start();
base.OnActivate();
base.OnInitialActivate();
}
protected override void OnDeactivate()
protected override void OnClose()
{
HighlightSelectedLayer.Save();
PauseRenderingOnFocusLoss.Save();
@@ -139,7 +139,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
// TODO: Remove when fixed in RGB.NET, or avoid double stopping
}
base.OnDeactivate();
base.OnClose();
}
private void CreateUpdateTrigger()
@@ -36,18 +36,18 @@ namespace Artemis.UI.Screens.Settings.Debug
GC.WaitForPendingFinalizers();
}
protected override void OnActivate()
protected override void OnInitialActivate()
{
_coreService.FrameRendered += CoreServiceOnFrameRendered;
_coreService.FrameRendering += CoreServiceOnFrameRendering;
base.OnActivate();
base.OnInitialActivate();
}
protected override void OnDeactivate()
protected override void OnClose()
{
_coreService.FrameRendered -= CoreServiceOnFrameRendered;
_coreService.FrameRendering -= CoreServiceOnFrameRendering;
base.OnDeactivate();
base.OnClose();
}
private void CoreServiceOnFrameRendered(object sender, FrameRenderedEventArgs e)
@@ -142,17 +142,17 @@ namespace Artemis.UI.Screens.SurfaceEditor
#region Overrides of Screen
protected override void OnActivate()
protected override void OnInitialActivate()
{
LoadSurfaceConfigurations();
LoadWorkspaceSettings();
base.OnActivate();
base.OnInitialActivate();
}
protected override void OnDeactivate()
protected override void OnClose()
{
SaveWorkspaceSettings();
base.OnDeactivate();
base.OnClose();
}
#endregion
+3 -2
View File
@@ -1,4 +1,4 @@
<Window x:Class="Artemis.UI.Screens.TrayView"
<controls:MaterialWindow x:Class="Artemis.UI.Screens.TrayView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
@@ -6,6 +6,7 @@
xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:s="https://github.com/canton7/Stylet"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:controls="clr-namespace:MaterialDesignExtensions.Controls;assembly=MaterialDesignExtensions"
mc:Ignorable="d"
Title="Artemis"
Height="1"
@@ -33,4 +34,4 @@
</ContextMenu>
</tb:TaskbarIcon.ContextMenu>
</tb:TaskbarIcon>
</Window>
</controls:MaterialWindow>