예제 #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 menuItem4_Click(object sender, EventArgs e)
 {
     InterfaceTest_Form interfaceForm = new InterfaceTest_Form();
     interfaceForm.ShowDialog();
     interfaceForm.Close();
 }