protected override void OnExit(ExitEventArgs e) { try { AppPreferences.Save(App.AppName); } catch (Exception ex) { Console.WriteLine(ex); Console.WriteLine(ex.StackTrace); } try { RecycleBin.Instance.DeleteContent(); } catch (Exception ex) { Console.WriteLine(ex); Console.WriteLine(ex.StackTrace); } try { BatchAction.DeleteUndoFiles(); } catch (Exception ex) { Console.WriteLine(ex); Console.WriteLine(ex.StackTrace); } base.OnExit(e); }
private void BtnSave_Click(object sender, EventArgs e) { if (!_prefTempLocationError && !_prefRecordingLocationError) { AppPreferences.RecordingLocation = prefRecordingLocation.Text; AppPreferences.TempLocation = prefTempLocation.Text; AppPreferences.RecordingDevice = prefRecordingDevice.Text; AppPreferences.RecordingRate = Convert.ToInt32(prefRecordingRate.Text); AppPreferences.RecordingDepth = Convert.ToInt32(prefRecordingDepth.Text); AppPreferences.RecordingChannels = Convert.ToInt32(prefRecordingChannels.Text); AppPreferences.Save(); btnSave.Enabled = false; AudioDevice.Open(); } }