mirror of
https://github.com/ckaczor/FloatingStatusWindow.git
synced 2026-01-14 01:25:36 -05:00
Move appearance menu to tray icon
This commit is contained in:
@@ -20,6 +20,16 @@ namespace FloatingStatusWindowLibrary
|
||||
var contextMenu = new ContextMenu();
|
||||
contextMenu.Opened += HandleContextMenuOpened;
|
||||
|
||||
var menuItem = new MenuItem
|
||||
{
|
||||
Name = "contextMenuChangeAppearance",
|
||||
Header = Properties.Resources.ContextMenuChangeAppearance
|
||||
};
|
||||
menuItem.Click += HandleChangeAppearancemMenuItemClick;
|
||||
contextMenu.Items.Add(menuItem);
|
||||
|
||||
contextMenu.Items.Add(new Separator());
|
||||
|
||||
_lockMenuItem = new MenuItem
|
||||
{
|
||||
Name = "contextMenuItemLocked",
|
||||
@@ -31,7 +41,7 @@ namespace FloatingStatusWindowLibrary
|
||||
|
||||
contextMenu.Items.Add(new Separator());
|
||||
|
||||
var menuItem = new MenuItem
|
||||
menuItem = new MenuItem
|
||||
{
|
||||
Name = "contextMenuItemExit",
|
||||
Header = Properties.Resources.ContextMenuExit
|
||||
@@ -52,6 +62,12 @@ namespace FloatingStatusWindowLibrary
|
||||
_mainWindow.Show();
|
||||
}
|
||||
|
||||
void HandleChangeAppearancemMenuItemClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var appearanceWindow = new AppearanceWindow(_mainWindow.WindowSettings);
|
||||
appearanceWindow.ShowDialog();
|
||||
}
|
||||
|
||||
private void HandleMainWindowClosed(object sender, EventArgs e)
|
||||
{
|
||||
_taskbarIcon.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user