コード例 #1
0
 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);
         });
     }
 }
コード例 #2
0
 private void PinBox_OnCompleted(object sender, RoutedEventArgs e)
 {
     if (e.OriginalSource is PinBox pinBox)
     {
         Growl.Info(pinBox.Password);
     }
 }
コード例 #3
0
 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);
         });
     }
 }