Project cleanup

This commit is contained in:
Robert committed 2020-02-13 15:17:58 +01:00
1 parent f5e95e43be
commit 3aa9a632ea
51 files changed
+440 -490

No files matched your search

+29 -29
View File
@@ -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));
}
}
}