コード例 #1
0
 private void _frmSetMatch_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (e.CloseReason == CloseReason.UserClosing)
     {
         this._frmSetMatch.Activated   -= new EventHandler(_frmSetMatch_Activated);
         this._frmSetMatch.FormClosing -= new FormClosingEventHandler(_frmSetMatch_FormClosing);
         this._frmSetMatch              = null;
         this.dockPanel.Refresh();
     }
 }
コード例 #2
0
        private void tsmMatch_Click(object sender, EventArgs e)
        {
            if (this._frmSetMatch == null)
            {
                this._frmSetMatch              = new VisionTools.Match.frmSetMatch();
                this._frmSetMatch.FormClosing += new FormClosingEventHandler(_frmSetMatch_FormClosing);
                this._frmSetMatch.Activated   += new EventHandler(_frmSetMatch_Activated);
                this._frmSetMatch.Show(this.dockPanel, DockState.Document);
            }

            this._frmSetMatch.BringToFront();
            this._frmSetMatch.Activate();
        }