/// <summary> /// Listeners have ability to cancel. Therefore, iterate through listeners /// and execute, with option to break early if listeners choose to cancel. /// </summary> /// <param name="e"></param> /// <returns></returns> bool FireListViewSubItemChangeEvent(ListViewSubItemChangeEventArgs e) { bool cancel = false; if (ListViewSubItemChanging != null) { foreach (ListViewSubItemChangeHandler de in ListViewSubItemChanging.GetInvocationList()) { de(this, e); cancel = e.Cancel; if (cancel) { break; } } } Console.WriteLine("Cancel " + (cancel)); return(cancel); }
/// <summary> /// Listeners have ability to cancel. Therefore, iterate through listeners /// and execute, with option to break early if listeners choose to cancel. /// </summary> /// <param name="e"></param> /// <returns></returns> bool FireListViewSubItemChangeEvent(ListViewSubItemChangeEventArgs e) { bool cancel = false; if (ListViewSubItemChanging != null) { foreach (ListViewSubItemChangeHandler de in ListViewSubItemChanging.GetInvocationList()) { de(this, e); cancel = e.Cancel; if (cancel) break; } } Console.WriteLine("Cancel " + (cancel)); return cancel; }