private void Manual_Click(object sender, EventArgs e) { MidScreen form = new MidScreen("手动操作", 3); form.BtArray[0].Text = "半自动划切"; form.BtArray[1].Text = "手动划切"; form.BtArray[2].Text = "测 量"; form.BtArray[0].Click += delegate(Object se, System.EventArgs arg) { //if (!Globals.DebugMode) //{ // if (!Globals.IsInit)//确保系统进行初始化操作 // { // Common.ReportCmdKeyProgress(CmdKey.S0104); // return; // } // if (!Globals.TestedHeight) // { // Common.ReportCmdKeyProgress(CmdKey.H0010); // return;u // } // if (!Globals.BladeData.ReadyTest) // { // Common.ReportCmdKeyProgress(CmdKey.B0015); // return; // } //} ParentForm.ReplaceChildForm(new CutAlignManager()); }; ParentForm.PushChildForm(form, true); }
private void AutoManual_Click(object sender, EventArgs e) { MidScreen form = new MidScreen("全自动", 3); form.BtArray[0].Text = "全自动划切"; form.BtArray[1].Text = "教 学"; form.BtArray[2].Text = "对 准"; ParentForm.PushChildForm(form); }
private void SysMaintain_Click(object sender, EventArgs e) { if (Globals.UserLeave != 2) { Globals.UserLeave = 2; tBb1.SelectedIndex = 0; Common.ReportCmdKeyProgress(CmdKey.S0031); } else { if (CheckMaskIsValid(Globals.UserLeave)) { MidScreen form = new MidScreen("系统维护", 6); form.Load += delegate(Object se, System.EventArgs arg)//计时开始 { }; form.FormClosing += delegate(object se, FormClosingEventArgs arg) //用时结束 { }; form.BtArray[0].Text = "运动控制"; form.BtArray[1].Text = "系统参数"; form.BtArray[2].Text = "输入输出"; form.BtArray[3].Text = "后台管理"; form.BtArray[0].Click += delegate(Object se, System.EventArgs arg) { ParentForm.PushChildForm(new SystemAxisCtrManger()); }; form.BtArray[1].Click += delegate(Object se, System.EventArgs arg) { ParentForm.PushChildForm(new SystemDataManager()); }; form.BtArray[2].Click += delegate(Object se, System.EventArgs arg) { ParentForm.PushChildForm(new SystemIOControlManager()); }; form.BtArray[3].Click += delegate(Object se, System.EventArgs arg) { Common.SystemExit(false, true); }; form.BtArray[4].Text = "远程终端"; form.BtArray[5].Text = "产品信息"; ParentForm.PushChildForm(form); } else { Common.ReportCmdKeyProgress(CmdKey.S0032); } } managerLable.Text = manager[Globals.UserLeave]; passwordEdit.Text = String.Empty; }
private void OperMaintain_Click(object sender, EventArgs e) { int n = Globals.AutoFource ? 4 : 3; MidScreen form = new MidScreen("操作维护", n); form.BtArray[0].Text = "功能参数"; form.BtArray[1].Text = "工程维护"; form.BtArray[2].Text = "外部存储"; form.BtArray[3].Text = "焦距维护"; form.BtArray[2].Click += delegate(Object se, System.EventArgs arg) { bool flag = ProcessCmd.HasMoveHardDisk(); if (flag) { } else { Common.ReportCmdKeyProgress(CmdKey.F0049); } }; ParentForm.PushChildForm(form); }
private void DevCfgButton_Click(object sender, EventArgs e) { if (Globals.UserLeave != 1) { Globals.UserLeave = 1; tBb1.SelectedIndex = 0; Common.ReportCmdKeyProgress(CmdKey.S0030); } else { //需要检验设备参数密码 if (CheckMaskIsValid(Globals.UserLeave)) { int n = Globals.AutoFource ? 7 : 6; MidScreen form = new MidScreen("设备维护", n); form.BtArray[0].Text = "移除工作台"; form.BtArray[1].Text = "设备参数"; form.BtArray[2].Text = "电气复位"; form.BtArray[3].Text = "关 机"; form.BtArray[4].Text = "像素测量"; form.BtArray[5].Text = "旋转中心校正"; form.BtArray[6].Text = "焦距维护"; form.BtArray[0].UsedLed = true; form.BtArray[0].LED = false; if (Common.DI != null) { form.CycTime = 5;//500ms刷新一次 form.AutoUpdateEventHander += delegate(object s, EventArgs arg) { form.BtArray[0].LED = Common.DI[HW.DiDefine.TAB_AIR]; }; } form.BtArray[0].Click += delegate(Object se, System.EventArgs arg) { Common.DO[HW.DoDefine.TAB_AIR] = !form.BtArray[0].LED; }; form.BtArray[1].Click += delegate(Object se, System.EventArgs arg) { ParentForm.PushChildForm(new DevDataManager()); }; form.BtArray[2].Click += delegate(Object se, System.EventArgs arg) { if (Globals.Load) { bool flag = true; if (Common.SPD.ResetSpd()) { Common.ReportCmdKeyProgress(CmdKey.S0618); } else { flag = false; Common.ReportCmdKeyProgress(CmdKey.S0619); } if (Common.X_Axis.ResetAmpC()) { Common.ReportCmdKeyProgress(CmdKey.S0212); } else { flag = false; Common.ReportCmdKeyProgress(CmdKey.S0213); } if (Common.Y_Axis.ResetAmpC()) { Common.ReportCmdKeyProgress(CmdKey.S0312); } else { flag = false; Common.ReportCmdKeyProgress(CmdKey.S0313); } if (Common.Z_Axis.ResetAmpC()) { Common.ReportCmdKeyProgress(CmdKey.S0412); } else { flag = false; Common.ReportCmdKeyProgress(CmdKey.S0413); } if (Common.T_Axis.ResetAmpC()) { Common.ReportCmdKeyProgress(CmdKey.S0512); } else { flag = false; Common.ReportCmdKeyProgress(CmdKey.S0513); } Globals.IsInit = false;//初始化标志清除 if (flag) { Common.ReportCmdKeyProgress(CmdKey.S0028); } else { Common.ReportCmdKeyProgress(CmdKey.S0027); } } else { Common.ReportCmdKeyProgress(CmdKey.S0090); } }; form.BtArray[3].Click += delegate(Object se, System.EventArgs arg) { Common.ReportCmdKeyProgress(CmdKey.S0021); Common.SystemExit(true, true);//正确关机 }; form.BtArray[4].Click += delegate(Object se, System.EventArgs arg) { ParentForm.PushChildForm(new PixelFactorManager()); }; form.BtArray[5].Click += delegate(Object se, System.EventArgs arg) { ParentForm.PushChildForm(new AlignedCenterManager()); }; ParentForm.PushChildForm(form); } else { Common.ReportCmdKeyProgress(CmdKey.S0032); } } managerLable.Text = manager[Globals.UserLeave]; passwordEdit.Text = String.Empty; }
private void BladeMaintain_Click(object sender, EventArgs e) { int n = Globals.BladeCheck ? 7 : 6;//是否支持刀破检测 MidScreen form = new MidScreen("刀具管理", n); form.BtArray[0].Text = "刀具信息"; form.BtArray[1].Text = "换 刀"; form.BtArray[2].Text = "测 高"; form.BtArray[3].Text = "测高参数"; form.BtArray[4].Text = "基准线调整"; form.BtArray[5].Text = "刀具管理"; form.BtArray[6].Text = "刀破检测"; form.BtArray[0].Click += delegate(Object se, System.EventArgs arg) { ParentForm.PushChildForm(new BladeMessageForm()); }; form.BtArray[1].Click += delegate(Object se, System.EventArgs arg) { if (Common.SPD != null) { if (Common.SPD.SpeedZore) { ParentForm.PushChildForm(new BladeRepalceManager()); } else { Common.SPD.StopSpd();//关闭主轴 Common.ReportCmdKeyProgress(CmdKey.S0607); if (!Globals.DevData.ReplaceBldXNoMove) { Common.X_Axis.AxisJogAbsWork(Globals.DevData.ReplaceBldXPos); } Common.Y_Axis.AxisJogAbsWork(Globals.DevData.ReplaceBldYPos); Common.Z_Axis.AxisJogAbsWork(Globals.DevData.ReplaceBldZPos); //判断是否开启主轴锁 } } }; form.BtArray[2].Click += delegate(Object se, System.EventArgs arg) { if (Globals.NoTouchTest) { MidScreen f = new MidScreen("测 高", 3); f.BtArray[0].Text = "接触式测高"; f.BtArray[1].Text = "非接触测高"; f.BtArray[2].Text = "NCS 校正"; f.BtArray[0].Click += delegate(Object s, System.EventArgs a) { ParentForm.PushChildForm(new BladeTestHeightManager(0)); }; f.BtArray[1].Click += delegate(Object s, System.EventArgs a) { ParentForm.PushChildForm(new BladeTestHeightManager(1)); }; f.BtArray[2].Click += delegate(Object s, System.EventArgs a) { ParentForm.PushChildForm(new BladeTestHeightManager(2)); }; ParentForm.PushChildForm(f); } else { ParentForm.PushChildForm(new BladeTestHeightManager()); } }; form.BtArray[3].Click += delegate(Object se, System.EventArgs arg) { ParentForm.PushChildForm(new BladeTestDataManager()); }; form.BtArray[5].Click += delegate(Object se, System.EventArgs arg) { ParentForm.PushChildForm(new BladeFileManager()); }; ParentForm.PushChildForm(form); }