private void SaveSettingsButton_Click(object sender, RoutedEventArgs e)
        {
            SettingsManager.AddUpdateAppSettings("NormalMiningHotKey", normalHotKeyTextBox.Text ?? "3");
            SettingsManager.AddUpdateAppSettings("TunnelMiningHotKey", tunnelHotKeyTextBox.Text ?? "6");
            SettingsManager.AddUpdateAppSettings("UpMiningHotKey", upHotKeyTextBox.Text ?? "5");
            SettingsManager.AddUpdateAppSettings("DownMiningHotKey", downHotKeyTextBox.Text ?? "4");
            SettingsManager.AddUpdateAppSettings("InitialDelayValue", initialDelayTextBox.Text ?? "5");


            Mining.NormalMiningModeHotKey = normalHotKeyTextBox.Text;
            Mining.TunnelMiningModeHotKey = tunnelHotKeyTextBox.Text;
            Mining.UpMiningModeHotKey     = upHotKeyTextBox.Text;
            Mining.DownMiningModeHotKey   = downHotKeyTextBox.Text;

            MessageBox.Show("Settings Saved Successfully!", "Success", MessageBoxButton.OK, MessageBoxImage.Exclamation);

            MainWindow mainWindow = new MainWindow();

            mainWindow.Show();
            Close();
        }
Beispiel #2
0
 private void SaveTimerButton_Click(object sender, RoutedEventArgs e)
 {
     SettingsManager.AddUpdateAppSettings("SaveTimerValue", timerTextBox.Text);
     MessageBox.Show("Settings Saved Successfully!", "Success", MessageBoxButton.OK, MessageBoxImage.Exclamation);
 }