Esempio n. 1
0
 private void _frmSetImg_FormClosing(object sender, FormClosingEventArgs e)
 {
     //string configFile = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "DockPanel.config");
     //dockPanel.SaveAsXml(configFile);
     if (e.CloseReason == CloseReason.UserClosing)
     {
         this._frmSetImg.Activated   -= new EventHandler(_frmSetImg_Activated);
         this._frmSetImg.FormClosing -= new FormClosingEventHandler(_frmSetImg_FormClosing);
         this._frmSetImg              = null;
         this._frmToolBox.Close();
         this._frmToolBox = null;
         this.dockPanel.Refresh();
     }
 }
Esempio n. 2
0
        private void tsbSetImg_Click(object sender, EventArgs e)
        {
            if (this._frmSetImg == null)
            {
                this._frmSetImg              = new Modle.SetImg.frmSetImg();
                this._frmSetImg.FormClosing += new FormClosingEventHandler(_frmSetImg_FormClosing);
                this._frmSetImg.Activated   += new EventHandler(_frmSetImg_Activated);
                //this._frmSetImg.SetResourceCulture();
                this._frmSetImg.Show(this.dockPanel);

                this._frmToolBox = new Modle.SetImg.frmToolBox();
                SelectionLanguage.ResourceCulture.SetCurrentCulture(SelectionLanguage.ResourceCulture.CurrentLanguage);
                //this._frmToolBox.SetResourceCulture();
                this._frmToolBox.Show(this.dockPanel, DockState.DockLeft);
            }

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