示例#1
0
        private void ButtonCloseDialog_Click(object sender, EventArgs e)
        {
            this.ButtonCloseDialog.Enabled = false;
            this.m_Canceled = true;
            UserHitCancelEventHandler userHitCancelEvent = this.UserHitCancelEvent;

            if (userHitCancelEvent != null)
            {
                userHitCancelEvent();
            }
        }
示例#2
0
 private void ProgressDialog_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (((e.CloseReason == CloseReason.UserClosing) & !this.m_CloseDialogInvoked) && ((this.ProgressBarWork.Value < 100) & !this.m_Canceled))
     {
         e.Cancel        = true;
         this.m_Canceled = true;
         UserHitCancelEventHandler userHitCancelEvent = this.UserHitCancelEvent;
         if (userHitCancelEvent != null)
         {
             userHitCancelEvent();
         }
     }
 }