protected virtual void OnEndEditing(CustomClosingEventArgs e) { EventHandler <CustomClosingEventArgs> handler = EndEditing; if (handler != null) { handler(this, e); } }
void qw_EndEditing(object sender, CustomClosingEventArgs e) { if (e.CloseMode == CloseMode.Cancel) { return; } QueryWrapper qw = sender as QueryWrapper; Queries.Add(qw); SelectedQuery = qw; }
void WizardDialog_EndEditing(object sender, CustomClosingEventArgs e) { this.Close(); if (e.CloseMode == CloseMode.Apply) { DataSourceWrapper dsw = WizardDataModel.SelectedDataSource; SqlDataSource ds = WizardDataModel.CreateDataSource(); string queryName = WizardDataModel.SelectedDataSource.SelectedQuery.Name; OnEndWizard(new CustomClosingEventArgs(ds, queryName, e.CloseMode)); } else { OnEndWizard(new CustomClosingEventArgs(CloseMode.Cancel)); } }