Beispiel #1
0
 private void OracleDataSourceWizard_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (_floatingMessage != null)
     {
         _floatingMessage.Close();
     }
 }
Beispiel #2
0
 private void OneInstanceDialog_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (_floatingMessage != null)
     {
         _floatingMessage.Close();
     }
 }
Beispiel #3
0
 public void CloseFloatingMessage()
 {
     if (_floatingMessage != null)
     {
         _floatingMessage.Close();
         _floatingMessage.Dispose();
         _floatingMessage = null;
     }
 }
Beispiel #4
0
        private void AmazonSearchForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (_floatingMessage != null)
            {
                _floatingMessage.Close();
            }

            StopThread();
            DeleteTempFiles();
        }
Beispiel #5
0
        // 在 base.OnFormClosed(e); 之前调用
        /// <summary>
        /// 窗口 Closed 时被触发。在 base.OnFormClosed(e) 之前被调用
        /// </summary>
        public virtual void OnMyFormClosed()
        {
            if (this.Channel != null)
            {
                this.Channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
                this.Channel.AfterLogin  -= new AfterLoginEventHandle(Channel_AfterLogin);
                this.Channel.Idle        -= Channel_Idle;

                this.Channel.Close();   // TODO: 最好限制一个时间,超过这个时间则Abort()
            }

            if (stop != null)      // 脱离关联
            {
                stop.Unregister(); // 和容器关联
                stop = null;
            }

            // 原来

            if (this.MainForm != null)
            {
                this.MainForm.Move -= new EventHandler(MainForm_Move);
            }

#if NO
            if (_floatingMessage != null)
            {
                _floatingMessage.Close();
            }
#endif
            CloseFloatingMessage();

            /*
             * // 如果MDI子窗口不是MainForm刚刚准备退出时的状态,恢复它。为了记忆尺寸做准备
             * if (this.WindowState != this.MainForm.MdiWindowState)
             *  this.WindowState = this.MainForm.MdiWindowState;
             * */
        }