//设置 private void navBarSetForm_LinkClicked(object sender, NavBarLinkEventArgs e) { using (SetForm SetForm = new SetForm()) { SetForm.ShowDialog(); } }
private void labelControl3_Click(object sender, EventArgs e) { using (var sf = new SetForm()) { sf.ShowDialog(); } }
//设置 private void pictureBox1_Click(object sender, EventArgs e) { using (var setform = new SetForm()) { setform.ShowDialog(); } }
private void navBarItem7_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { using (SetForm setForm = new SetForm()) { setForm.ShowDialog(); } }
private void barSetup_ItemClick(object sender, ItemClickEventArgs e) { using (SetForm SetForm = new SetForm()) { SetForm.ShowDialog(); } }
private void treeView1_DoubleClick(object sender, EventArgs e) //从光标所在的位置得到该位置上的节点 { TreeNode node = this.treeView1.GetNodeAt(pi); if (pi.X < node.Bounds.Left || pi.X > node.Bounds.Right) { //不触发事件; } else if (node.Parent != null) { int parent = int.Parse(node.Parent.Name); //传感器 if (node.Index == (int.Parse(AGV.Sensor.Key) - 1)) { try { sensorForm[parent].WindowState = FormWindowState.Normal; sensorForm[parent].Show(); //弹出这个窗口 sensorForm[parent].Activate(); //激活显示 } catch (Exception) { sensorForm[parent] = new SensorForm(int.Parse(node.Parent.Name)); sensorForm[parent].Show();//弹出这个窗口 } } //运行状态 else if (node.Index == (int.Parse(AGV.State.Key) - 1)) { try { stateForm[parent].WindowState = FormWindowState.Normal; stateForm[parent].Show(); //弹出这个窗口 stateForm[parent].Activate(); //激活显示 } catch (Exception) { stateForm[parent] = new StateForm(int.Parse(node.Parent.Name)); stateForm[parent].Show();//弹出这个窗口 } } //远程操作 else if (node.Index == (int.Parse(AGV.Control.Key) - 1)) { try { controlForm[parent].WindowState = FormWindowState.Normal; controlForm[parent].Show(); //弹出这个窗口 controlForm[parent].Activate(); //激活显示 } catch (Exception) { controlForm[parent] = new ControlForm(int.Parse(node.Parent.Name)); controlForm[parent].Show();//弹出这个窗口 } } //参数设置 else if (node.Index == (int.Parse(AGV.Set.Key) - 1)) { try { setForm[parent].WindowState = FormWindowState.Normal; setForm[parent].Show(); //弹出这个窗口 setForm[parent].Activate(); //激活显示 } catch (Exception) { setForm[parent] = new SetForm(int.Parse(node.Parent.Name)); setForm[parent].Show();//弹出这个窗口 } } //寄存器 else if (node.Index == (int.Parse(AGV.Register.Key) - 1)) { try { registerForm[parent].WindowState = FormWindowState.Normal; registerForm[parent].Show(); //弹出这个窗口 registerForm[parent].Activate(); //激活显示 } catch (Exception) { registerForm[parent] = new RegisterForm(int.Parse(node.Parent.Name)); registerForm[parent].Show();//弹出这个窗口 } } } }
private void labelControl3_Click(object sender, EventArgs e) { SetForm sf = new SetForm(); sf.ShowDialog(); }