public MainWindow() { InitializeComponent(); Acon = new AN_Console(DevConsoleOutput, this); this.KeyDown += Window_KeyDown; this.Closing += new System.ComponentModel.CancelEventHandler((object sender, System.ComponentModel.CancelEventArgs e) => { ConfigMgnr.I.Save(); System.Threading.Thread.Sleep(100); }); InitializeTrayIcon(); Set_SettingsUI(); DoStartupFunctions(); if (!ConfigMgnr.I.Color_MainPanel.Equals("0")) Resources["Color_MainPanel"] = (SolidColorBrush)(new BrushConverter().ConvertFrom(ConfigMgnr.I.Color_MainPanel)); if (!ConfigMgnr.I.Color_SubPanel.Equals("0")) Resources["Color_SubPanel"] = (SolidColorBrush)(new BrushConverter().ConvertFrom(ConfigMgnr.I.Color_SubPanel)); if (!ConfigMgnr.I.Color_DefaultText.Equals("0")) Resources["Color_DefaultText"] = (SolidColorBrush)(new BrushConverter().ConvertFrom(ConfigMgnr.I.Color_DefaultText)); if (!ConfigMgnr.I.Color_Highlight.Equals("0")) Resources["Color_Highlight"] = (SolidColorBrush)(new BrushConverter().ConvertFrom(ConfigMgnr.I.Color_Highlight)); if (!ConfigMgnr.I.Color_BtnBG.Equals("0")) Resources["Color_BtnBG"] = (SolidColorBrush)(new BrushConverter().ConvertFrom(ConfigMgnr.I.Color_BtnBG)); }
public MainWindow() { InitializeComponent(); Acon = new AN_Console(DevConsoleOutput, this); this.KeyDown += Window_KeyDown; InitializeTrayIcon(); Set_SettingsUI(); if (ConfigMgnr.I.StartMinimized) { this.WindowState = WindowState.Minimized; this.OnStateChanged(EventArgs.Empty); } }