Exemplo n.º 1
0
 void CheckSave()
 {
     if (_settings.AutoSave == 0)
     {
         return;
     }
     if (Text.Contains("*"))
     {
         DialogResult dr;
         if (_settings.AutoSave == Settings.SaveSetting.AutoSave)
         {
             dr = DialogResult.Yes;
         }
         else
         {
             ConfirmSaveDialog save = new ConfirmSaveDialog();
             dr = save.ShowDialog();
         }
         if (dr == DialogResult.Yes)
         {
             Save();
         }
         else if (dr == DialogResult.OK)
         {
             Save();
             _settings.AutoSave = Settings.SaveSetting.AutoSave;
         }
         else if (dr == DialogResult.Ignore)
         {
             _settings.AutoSave = Settings.SaveSetting.NoSave;
         }
     }
 }
Exemplo n.º 2
0
 void CheckSave()
 {
     if (_settings.AutoSave == 0) return;
     if (Text.Contains("*"))
     {
         DialogResult dr;
         if (_settings.AutoSave == Settings.SaveSetting.AutoSave) dr = DialogResult.Yes;
         else
         {
             ConfirmSaveDialog save = new ConfirmSaveDialog();
             dr = save.ShowDialog();
         }
         if (dr == DialogResult.Yes) Save();
         else if (dr == DialogResult.OK)
         {
             Save();
             _settings.AutoSave = Settings.SaveSetting.AutoSave;
         }
         else if (dr == DialogResult.Ignore) _settings.AutoSave = Settings.SaveSetting.NoSave;
     }
 }