Пример #1
0
 private void exitToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Util.Preset preset = new Util.Preset();
     preset.savePreset(this.PresetPath, this.AppName, this.PresetName);
     Application.ExitThread();
     Environment.Exit(0);
 }
Пример #2
0
 private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     try
     {
         if (sp.IsOpen)
         {
             sp.Close();
         }
         Util.Preset preset = new Util.Preset();
         preset.savePreset(this.PresetPath, this.AppName, this.PresetName);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }