mirror of
https://github.com/DarthAffe/KeyboardAudioVisualizer.git
synced 2025-12-12 15:18:30 +00:00
Improved trayIcon handling
This commit is contained in:
parent
1cfc7a3b31
commit
13e66c6356
@ -33,6 +33,7 @@ namespace KeyboardAudioVisualizer
|
||||
try
|
||||
{
|
||||
_taskbarIcon = (TaskbarIcon)FindResource("TaskbarIcon");
|
||||
_taskbarIcon.DoubleClickCommand = ApplicationManager.Instance.OpenConfigurationCommand;
|
||||
|
||||
Settings settings = SerializationHelper.LoadObjectFromFile<Settings>(PATH_SETTINGS);
|
||||
if (settings == null)
|
||||
|
||||
@ -10,7 +10,7 @@ namespace KeyboardAudioVisualizer.Controls
|
||||
[TemplatePart(Name = "PART_CloseButton", Type = typeof(Button))]
|
||||
[TemplatePart(Name = "PART_MinimizeButton", Type = typeof(Button))]
|
||||
[TemplatePart(Name = "PART_IconButton", Type = typeof(Button))]
|
||||
public class BlurredDecorationWindow : System.Windows.Window
|
||||
public class BlurredDecorationWindow : Window
|
||||
{
|
||||
#region DependencyProperties
|
||||
// ReSharper disable InconsistentNaming
|
||||
@ -79,7 +79,7 @@ namespace KeyboardAudioVisualizer.Controls
|
||||
|
||||
Button minimizeButton = GetTemplateChild("PART_MinimizeButton") as Button;
|
||||
if (minimizeButton != null)
|
||||
minimizeButton.Click += (sender, args) => Application.Current.MainWindow.WindowState = WindowState.Minimized;
|
||||
minimizeButton.Click += (sender, args) => Hide();
|
||||
|
||||
Button iconButton = GetTemplateChild("PART_IconButton") as Button;
|
||||
if (iconButton != null)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user