/// <summary> /// Launch BMS utilities. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Launch_Click(object sender, RoutedEventArgs e) { try { //if (!appReg.isNameDefined()) // if (CallsignWindow.ShowCallsignWindow(appReg)) // return; if (!appReg.isNameDefined()) { if (RecommendReboot.ShowRecommendReboot()) { appReg.getLauncher().execute(sender, true); } return; } appReg.getLauncher().execute(sender); } catch (FileNotFoundException ex) { Diagnostics.WriteLogFile(ex); Close(); } }
/// <summary> /// Launch BMS utilities. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Launch_Click(object sender, RoutedEventArgs e) { try { appReg.getLauncher().execute(sender); } catch (FileNotFoundException ex) { Console.WriteLine(ex.Message); StreamWriter sw = new StreamWriter(appReg.GetInstallDir() + "\\Error.txt", false, System.Text.Encoding.GetEncoding("shift_jis")); sw.Write(ex.Message); sw.Close(); MessageBox.Show("Error Log Saved To " + appReg.GetInstallDir() + "\\Error.txt", "WARNING", MessageBoxButton.OK, MessageBoxImage.Information); Close(); } }