/// <summary> /// Execute when quiting this app. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Window_Closed(object sender, EventArgs e) { try { if (appReg == null) { return; } // Save UI Properties(Like Button Status). appProperties.SaveUISetup(); if (ApplicationOverride.IsChecked == false) { appReg.getOverrideWriter().Execute(inGameAxis, deviceControl, keyFile); } } 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(); } }
/// <summary> /// Execute when quiting this app. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Window_Closed(object sender, EventArgs e) { try { Torrent.status = false; if (appReg == null) { return; } // Save UI Properties(Like Button Status). appProperties.SaveUISetup(); if (ApplicationOverride.IsChecked == false) { appReg.getOverrideWriter().Execute(inGameAxis, deviceControl, keyFile); } } catch (Exception ex) { Diagnostics.WriteLogFile(ex); Close(); } }