/// <summary>
 /// Raises the <see cref="PopupCancel"/> event.
 /// </summary>
 /// <param name="e"><see cref="PopupCancelEventArgs"/> describing the
 /// popup form that about to be cancelled.</param>
 protected virtual void OnPopupCancel(PopupCancelEventArgs e)
 {
     if (this.PopupCancel != null)
     {
         this.PopupCancel(this, e);
         if (!e.Cancel)
         {
             skipClose = true;
         }
     }
 }
 /// <summary>
 /// Raises the <see cref="PopupCancel"/> event.
 /// </summary>
 /// <param name="e">The <see cref="PopupCancelEventArgs"/> associated
 /// with the cancel event.</param>
 protected virtual void OnCancelPopup(PopupCancelEventArgs e)
 {
     if (this.PopupCancel != null)
     {
         this.PopupCancel(this, e);
     }
     if (!e.Cancel)
     {
         owner.ClosePopup();
         // Clear reference for GC
         popup = null;
     }
 }
 private void popup_Cancel(object sender, PopupCancelEventArgs e)
 {
     OnPopupCancel(e);
 }