Пример #1
0
        public RemoteObject(int nForm, int nInternalForm, int nValue1, string strSampleID)
        {
            Process[] processes = Process.GetProcessesByName("PDLRT");
            foreach (Process p in processes)
            {
                IntPtr hwnd = p.MainWindowHandle;
                switch (nInternalForm)
                {
                    case 1:
                         InterfaceTest_Form interfaceTestForm = new InterfaceTest_Form();
                         interfaceTestForm.ShowDialog(new WindowWrapper(hwnd));
                         interfaceTestForm.Close();
                     break;

                    case 2:

                         Routing_Form routingForm = new Routing_Form(nValue1);
                         routingForm.ShowDialog(new WindowWrapper(hwnd));
                         routingForm.Close();
                    break;

                    case 3:
                         TimeForAlarmForm alarmForm = new TimeForAlarmForm();
                         alarmForm.ShowDialog(new WindowWrapper(hwnd));
                         alarmForm.Close();

                    break;

                    case 4:
                        SampleListTGA TGAListForm = new SampleListTGA();
                        TGAListForm.ShowDialog(new WindowWrapper(hwnd));
                        TGAListForm.Close();
                    break;

                    case 5:
                          _pipeClient = new PipeClient();
                          _pipeClient.Send("RobotRemoteForm", "LMPipe", 1000);
                          _pipeClient = null;
                    break;

                }
            }
        }
Пример #2
0
 private void menuItem_Routing_Click(object sender, EventArgs e)
 {
     Routing_Form routingForm = new Routing_Form();
     routingForm.ShowDialog();
     routingForm.Close();
 }