예제 #1
0
 public void CmdFormShow(ICommand sender)
 {
     Common.CommonGui gui = null;
     //发现是否已经打开
     if (this._wm.Contains(sender.ID))
     {
         this.ActiveChild = _wm[sender.ID];
         return;
     }
 }
예제 #2
0
        public void CmdLoadChild(ICommand sender)
        {
            this.ShowMessage("当前状态:  .....加载飞轮测试板卡.....");

            Common.CommonGui gui = null;
            if (this._wm.Contains(sender.ID))
            {
                this.ActiveChild = _wm[sender.ID];
                return;
            }

            switch (sender.ID)
            {
            case "cmdMakeCustomCard":
                gui         = new FlyWheel1.FlyWheel1(sender.ID, "");
                gui.Caption = "飞轮1状态";
                this.ShowMessage("当前状态:  .....飞轮1控制面板加载结束.....");
                break;

            case "cmdFillMoneyCard":
                gui         = new FlyWheel2.FlyWheel2(sender.ID, "");
                gui.Caption = "飞轮2状态";
                this.ShowMessage("当前状态:  .....飞轮2控制面板加载结束.....");
                break;

            case "cmdReplaceCustomCard":
                gui         = new FlyWheel3.FlyWheel3(sender.ID, "");
                gui.Caption = "飞轮3状态";
                this.ShowMessage("当前状态:  .....飞轮3控制面板加载结束.....");
                break;

            case "cmdMakeParameterCard":
                gui         = new FlyWheel4.FlyWheel4(sender.ID, "");
                gui.Caption = "飞轮4状态";
                this.ShowMessage("当前状态:  .....飞轮4控制面板加载结束.....");
                break;

            case "cmdMakeTimeCard":
                gui         = new FlyWheel5.FlyWheel5(sender.ID, "");
                gui.Caption = "飞轮5状态";
                this.ShowMessage("当前状态:  .....飞轮5控制面板加载结束.....");
                break;

            case "cmdMakeGasCard":
                gui         = new FlyWheel6.FlyWheel6(sender.ID, "");
                gui.Caption = "飞轮6状态";
                this.ShowMessage("当前状态:  .....飞轮6控制面板加载结束.....");
                break;

            case "cmdFlyWheel7":
                gui         = new FlyWheel7.FlyWheel7(sender.ID, "");
                gui.Caption = "飞轮7状态";
                this.ShowMessage("当前状态:  .....飞轮7控制面板加载结束.....");
                break;

            case "cmdFlyWheel8":
                gui         = new FlyWheel8.FlyWheel8(sender.ID, "");
                gui.Caption = "飞轮8状态";
                this.ShowMessage("当前状态:  .....飞轮8控制面板加载结束.....");
                break;
            }

            if (gui != null)
            {
                gui.Dock         = DockStyle.Fill;
                gui.Visible      = true;
                this.ActiveChild = gui;
                gui.SetFocus();

                this._wm.Add(gui);
            }

            this.panel1.Visible = false;
        }