private void onArma3Clicked(object sender, RoutedEventArgs e) { var gameversion = Properties.Settings.Default.gameversion; if (arma3Button.Content as string == "Update ArmA 3" || arma3Button.Content as string == "Update ArmA 2") { if (!worker.IsBusy) { setBusy(true); worker.RunWorkerAsync(); } else { MessageBox.Show("Worker is Busy(You really must be dicking around or unlucky to make this pop up...)"); } } else if (gameversion == "ArmA3") { Launch.a3Launch(false, null, null); } else { Launch.a2Launch(false, null); } }
private void LaunchAndJoin(object sender, RoutedEventArgs e) { var gameversion = Properties.Settings.Default.gameversion; if (gameversion == "ArmA3") { var server = slickversion.repos[repomenu.SelectedIndex].server; var password = slickversion.repos[repomenu.SelectedIndex].password; Launch.a3Launch(true, server, password); } else { Launch.a2Launch(true, "PA Repo"); } }
private void LaunchAndJoin(object sender, RoutedEventArgs e) { if (CurrentGame == "Arma 2") { string gameversion = Settings.Default.gameversion; string server = Slickversion.repos[repomenu.SelectedIndex].server; string password = Slickversion.repos[repomenu.SelectedIndex].password; Launch.a2Launch(true, server, password); } else if (CurrentGame == "Arma 3") { string gameversion = Settings.Default.gameversion; string server = Slickversion.repos[repomenu.SelectedIndex].server; string password = Slickversion.repos[repomenu.SelectedIndex].password; Launch.a3Launch(true, server, password); } }
private void OnArma3Clicked(object sender, RoutedEventArgs e) { string gameversion = Settings.Default.gameversion; if (arma3Button.Content as string == "Update Arma 3" || arma3Button.Content as string == "Update Arma 2") { if (UpdateManager.TFRalert == true) { MessageBoxResult result = MessageBox.Show("Teamspeak needs to be closed before updating Task Force Radio. Would you like SU to close Teamspeak automatically when needed?\n\nPress No to get a warning before and Yes to get no warning.", "Teamspeak needs to be closed...", MessageBoxButton.YesNo, MessageBoxImage.Exclamation); if (result == MessageBoxResult.Yes) { UpdateManager.TFRalert = false; } } if (!Worker.IsBusy) { dlSpeedTimer = new Timer(10000); dlSpeedTimer.Elapsed += updateDlSpeed; dlSpeedTimer.Start(); SetBusy(true); Worker.RunWorkerAsync(); } else { MessageBox.Show( "Worker is Busy(You really must be dicking around or unlucky to make this pop up...)"); } } else if (CurrentGame == "Arma 3") { if (CheckProcess("arma3") == false) { Launch.a3Launch(false, null, null); } else { MessageBoxResult result = MessageBox.Show("Arma 3 is already running!\nDo you want to start Arma 3 anyway?", "Arma 3 already running!", MessageBoxButton.YesNo, MessageBoxImage.Exclamation); if (result == MessageBoxResult.Yes) { Launch.a3Launch(false, null, null); } } } else if (CurrentGame == "Arma 2") { if (CheckProcess("ArmA2OA") == false) { Launch.a2Launch(false, null, null); } else { MessageBoxResult result = MessageBox.Show("Arma 2 OA is already running!\nDo you want to start Arma 2 OA anyway?", "Arma 2 OA already running!", MessageBoxButton.YesNo, MessageBoxImage.Exclamation); if (result == MessageBoxResult.Yes) { Launch.a2Launch(false, null, null); } } } }