예제 #1
0
        /// <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);
        }
예제 #2
0
 /// <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;
 }