private void ButtonLangs_OnClick(object sender, RoutedEventArgs e) { if (e.OriginalSource is Button button && button.Tag is string tag) { PopupConfig.IsOpen = false; if (tag.Equals(GlobalData.Config.Lang)) { return; } Growl.Ask(Properties.Langs.Lang.ChangeLangAsk, b => { if (!b) { return(true); } GlobalData.Config.Lang = tag; GlobalData.Save(); var processModule = Process.GetCurrentProcess().MainModule; if (processModule != null) { Process.Start(processModule.FileName); } Application.Current.Shutdown(); return(true); }); } }
private void PinBox_OnCompleted(object sender, RoutedEventArgs e) { if (e.OriginalSource is PinBox pinBox) { Growl.Info(pinBox.Password); } }
private void ButtonLangs_OnClick(object sender, RoutedEventArgs e) { if (e.OriginalSource is Button button && button.Tag is string tag) { PopupConfig.IsOpen = false; if (tag.Equals(GlobalData.Config.Lang)) { return; } Growl.Ask(Properties.Langs.Lang.ChangeLangAsk, b => { if (!b) { return(true); } GlobalData.Config.Lang = tag; GlobalData.Save(); Process.Start(Assembly.GetExecutingAssembly().Location); Environment.Exit(0); return(true); }); } }