コード例 #1
0
 private void _frmCam_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (e.CloseReason == CloseReason.UserClosing)
     {
         this._frmCam.Activated   -= new EventHandler(_frmSetImg_Activated);
         this._frmCam.FormClosing -= new FormClosingEventHandler(_frmSetImg_FormClosing);
         this._frmCam              = null;
         this.dockPanel.Refresh();
     }
 }
コード例 #2
0
        private void tsmCam_Click(object sender, EventArgs e)
        {
            if (this._frmCam == null)
            {
                this._frmCam              = new Modle.Cam.frmCam();
                this._frmCam.FormClosing += new FormClosingEventHandler(_frmCam_FormClosing);
                this._frmCam.Activated   += new EventHandler(_frmCam_Activated);
                this._frmCam.Show(this.dockPanel);
            }

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