Пример #1
0
 public MainWindow()
 {
     InitializeComponent();
     refreshSettings();
     SetLanguageDictionary();
     playerNameTextField.Text = playerName;
     if (playerName == "")
     {
         javaVM = javaAutoDetect();
         if (javaVM == string.Empty)
         {
             MessageBox.Show(this.Resources["notFundMessageLine1"].ToString() + "\r\n" + this.Resources["notFundMessageLine2"].ToString(), this.Resources["errorMessageTitle"].ToString(), MessageBoxButton.OK, MessageBoxImage.Error);
             javaVM = Properties.Settings.Default.javaVM;
             this.Hide();
             Preference prefer = new Preference();
             prefer.setParent(this);
             prefer.Show();
         }
         else
         {
             Properties.Settings.Default.javaVM = javaVM;
             Properties.Settings.Default.Save();
         }
     }
     selfUpdate();
 }
Пример #2
0
 private void preference_Click(object sender, RoutedEventArgs e)
 {
     this.Hide();
     Preference prefer = new Preference();
     prefer.setParent(this);
     prefer.Show();
 }