Ejemplo n.º 1
0
 /// <summary>
 ///     取消按钮单击事件。
 /// </summary>
 /// <param name="sender">触发事件的控件对象。</param>
 /// <param name="e">事件的参数。</param>
 private void CancelButton_Click(object sender, EventArgs e)
 {
     if (this.GetNextOutMessage(_task) != Message.NoAvailableMessage)
     {
         Close();
     }
     else
     {
         MessagePipe.SendOutMessage(new KeyValuePair <Message, Thread>(Message.UserCancel, _task));
         Close();
     }
 }