Exemplo n.º 1
0
 public void ControlViewChange(ControlViewName e)
 {
     if (controlViewChanged != null)
     {
         controlViewChanged(e);
     }
 }
Exemplo n.º 2
0
        private void ControlViewChange(ControlViewName e)
        {
            this.EndInvoke(this.BeginInvoke(new Action(() =>
            {
                this.pnlView.Controls.Clear();
                this.labTitle.Text = e.Desc;

                if (e.ID == BD.Common.ControlViewName.AssistSetting.ID)
                {
                    this.pnlView.Controls.Add(assistSettingCtrl);
                    assistSettingCtrl.Show();
                }
                else if (e.ID == BD.Common.ControlViewName.Edit.ID)
                {
                    this.pnlView.Controls.Add(editCtrl);
                    editCtrl.Show();
                }
                else if (e.ID == BD.Common.ControlViewName.FileManagement.ID)
                {
                    this.pnlView.Controls.Add(fileManagementCtrl);
                    fileManagementCtrl.Show();
                }
                else if (e.ID == BD.Common.ControlViewName.FileViewer.ID)
                {
                    this.pnlView.Controls.Add(fileViewerCtrl);
                    fileViewerCtrl.Show();
                }
                else if (e.ID == BD.Common.ControlViewName.MachinePramm.ID)
                {
                    this.pnlView.Controls.Add(machinePrammCtrl);
                    machinePrammCtrl.Show();
                }
                else if (e.ID == BD.Common.ControlViewName.MachineStatus.ID)
                {
                    this.pnlView.Controls.Add(machineStatusCtrl);
                    machineStatusCtrl.Show();
                }
                else if (e.ID == BD.Common.ControlViewName.Main.ID)
                {
                    this.pnlView.Controls.Add(mainCtrl);
                    mainCtrl.Show();
                }
                else if (e.ID == BD.Common.ControlViewName.Menu.ID)
                {
                    this.pnlView.Controls.Add(menuCtrl);
                    menuCtrl.Show();
                }
                else if (e.ID == BD.Common.ControlViewName.SystemPramm.ID)
                {
                    this.pnlView.Controls.Add(systemPrammCtrl);
                    systemPrammCtrl.Show();
                }
                else
                {
                    this.pnlView.Controls.Add(mainCtrl);
                    mainCtrl.Show();
                }
            })));
        }
 public ControlViewChangedEventArgs(ControlViewName actions)
 {
     this.view = actions;
 }