private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (isModified) { Boolean result = CHelper.AskConfirmSave(); if (result) { //Yes, save it Boolean r = SaveData("N"); e.Cancel = !r; } } }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { cmdOK.Focus(); if (vw.IsModified) { Boolean result = CHelper.AskConfirmSave(); if (result) { Boolean r = SaveData(); e.Cancel = !r; } } }
private void rootElement_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (vw.IsModified) { Boolean result = CHelper.AskConfirmSave(); if (result) { Boolean r = SaveData(); if (r) { HasModified = true; CUtil.EnableForm(true, this); } } } }
private void rootElement_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (fc.IsModified) { Boolean result = CHelper.AskConfirmSave(); if (result) { //Yes, save it Boolean r = SaveData(); e.Cancel = !r; if (r) { IsOK = true; } } } }
private void DefaultItemWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (!isEditable()) { return; } if (vw.IsModified) { Boolean result = CHelper.AskConfirmSave(); if (result) { //Yes, save it Boolean r = saveDataItem(); e.Cancel = !r; } } }
private void RootElement_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (cfg.IsModified) { Boolean result = CHelper.AskConfirmSave(); if (result) { //Yes, save it Boolean r = ValidateData(); isOK = r; e.Cancel = !r; } else { isOK = false; } } }