コード例 #1
0
 private void CloseMachineSetting(object sender, EventArgs e)
 {
     if (_machineGroupSetting != null)
     {
         _machineGroupSetting.Dispose();
         _machineGroupSetting = null;
     }
 }
コード例 #2
0
        private void btnMachineGroupSetting_Click(object sender, EventArgs e)
        {
            if (_machineGroupSetting == null)
            {
                _machineGroupSetting = new MachineSignalStatusGroup();
                //WeifenLuo.WinFormsUI.Docking.DockPane dockPane = (WeifenLuo.WinFormsUI.Docking.DockPane)this.Parent;
                _machineGroupSetting.BaseDockPanel = this.DockPanel;
                _machineGroupSetting.Show(this.DockPanel, this.DockState);
                _machineGroupSetting.Disposed += new EventHandler(ActivateTab);
                _machineGroupSetting.Disposed += new EventHandler(CloseMachineSetting);
            }
            else
            {
                _machineGroupSetting.Show(this.DockPanel, this.DockState);
            }

            //_machineGroupSetting.TopLevel = false;
            //_machineGroupSetting.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            //this.Parent.Controls.Add(_machineGroupSetting);
            //_machineGroupSetting.Show();
        }