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