private void StartMiningButton_Click(object sender, RoutedEventArgs e) { if (Settings.Server == null || Settings.Wallet == null || Settings.Worker == null) { Setup setupWindow = new Setup(); setupWindow.ShowDialog(); } if (!System.IO.File.Exists(exeName)) { MessageBox.Show(Application.Current.MainWindow, "You must add t-rex.exe to this folder before mining.", "You Suck", MessageBoxButton.OK, MessageBoxImage.Information); return; } string args = "-a ethash -o stratum+tcp://" + Settings.Server + ":4444 -u " + Settings.Wallet + " -p x -w " + Settings.Worker; if (state == MiningState.MINING) { myConsole.WriteOutput("Stopping Mining", Color.FromRgb(255, 255, 255)); StopTimer(); myConsole.StopProcess(); state = MiningState.STOPPED; } else { myConsole.WriteOutput("Starting Mining", Color.FromRgb(255, 255, 255)); myConsole.StartProcess(exeName, args); state = MiningState.MINING; StartTimer(); } ReloadUI(); }
private void SetupButton_Click(object sender, RoutedEventArgs e) { Setup setupWindow = new Setup(); setupWindow.ShowDialog(); }