mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Project cleanup
This commit is contained in:
1 parent
f5e95e43be
commit
3aa9a632ea
51 files changed
+440
-490
No files matched your search
@@ -33,6 +33,35 @@ namespace Artemis.UI.Screens
|
||||
public bool IsSidebarVisible { get; set; }
|
||||
public bool ActiveItemReady { get; set; }
|
||||
|
||||
public void WindowDeactivated()
|
||||
{
|
||||
var windowState = ((Window) View).WindowState;
|
||||
if (windowState == WindowState.Minimized)
|
||||
return;
|
||||
|
||||
_lostFocus = true;
|
||||
_eventAggregator.Publish(new MainWindowFocusChangedEvent(false));
|
||||
}
|
||||
|
||||
public void WindowActivated()
|
||||
{
|
||||
if (!_lostFocus)
|
||||
return;
|
||||
|
||||
_lostFocus = false;
|
||||
_eventAggregator.Publish(new MainWindowFocusChangedEvent(true));
|
||||
}
|
||||
|
||||
public void WindowKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
_eventAggregator.Publish(new MainWindowKeyEvent(true, e));
|
||||
}
|
||||
|
||||
public void WindowKeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
_eventAggregator.Publish(new MainWindowKeyEvent(false, e));
|
||||
}
|
||||
|
||||
private void SidebarViewModelOnPropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
if (e.PropertyName == nameof(SidebarViewModel.SelectedItem))
|
||||
@@ -63,34 +92,5 @@ namespace Artemis.UI.Screens
|
||||
extensionsPaletteHelper.SetLightDark(windowsTheme == ThemeWatcher.WindowsTheme.Dark);
|
||||
#pragma warning restore 612
|
||||
}
|
||||
|
||||
public void WindowDeactivated()
|
||||
{
|
||||
var windowState = ((Window) View).WindowState;
|
||||
if (windowState == WindowState.Minimized)
|
||||
return;
|
||||
|
||||
_lostFocus = true;
|
||||
_eventAggregator.Publish(new MainWindowFocusChangedEvent(false));
|
||||
}
|
||||
|
||||
public void WindowActivated()
|
||||
{
|
||||
if (!_lostFocus)
|
||||
return;
|
||||
|
||||
_lostFocus = false;
|
||||
_eventAggregator.Publish(new MainWindowFocusChangedEvent(true));
|
||||
}
|
||||
|
||||
public void WindowKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
_eventAggregator.Publish(new MainWindowKeyEvent(true, e));
|
||||
}
|
||||
|
||||
public void WindowKeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
_eventAggregator.Publish(new MainWindowKeyEvent(false, e));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user