예제 #1
0
 void CloseForm(object sender, EventArg <bool> e)
 {
     if (_repository.dirty && _view.AskMessage("Exit before saving?", "Exit"))
     {
         e.Data = true;
     }
 }
예제 #2
0
 void CloseForm(object sender, FormClosingEventArgs e)
 {
     if (_repository.dirty && _view.AskMessage("Exit before saving", "Exit"))
     {
         e.Cancel = true;
     }
 }