예제 #1
0
        private void RefreshSearch()
        {
            controlers = RobComm.findControllers(true);

            if (controlers.Count > 0)
            {
                controlerListView.Items.Clear();
                fullCtrlList = new List <string[]>();

                ListViewItem itemsForList;
                foreach (var ctrl in controlers["robotController"])
                {
                    itemsForList         = new ListViewItem();
                    itemsForList.Content = $"RobotCtrl: {ctrl[0]}";
                    itemsForList.ToolTip = $"Availability: {ctrl[2]}\n Version: {ctrl[3]}\n IP:{ctrl[4]}";

                    controlerListView.Items.Add(itemsForList);
                    fullCtrlList.Add(ctrl);
                }
                foreach (var ctrl in controlers["virtualController"])
                {
                    itemsForList         = new ListViewItem();
                    itemsForList.Content = $"VirtualCtrl: {ctrl[0]}";
                    itemsForList.ToolTip = $"Availability: {ctrl[2]}\n Version: {ctrl[3]}\n IP:{ctrl[4]}";

                    controlerListView.Items.Add(itemsForList);
                    fullCtrlList.Add(ctrl);
                }
            }
            if (controlers.Count == 0)
            {
                tbSelectedCtrl.Text = "No Controlers found.";
                hasController       = false;
            }
        }
예제 #2
0
 internal void PlayFromPointer(object obj)
 {
     if (CustomUi.SetupPanel.hasController)
     {
         RobComm.playFromPointerLoc(true, CustomUi.SetupPanel.selectedControler);
     }
 }
예제 #3
0
 internal void StopSim(object obj)
 {
     if (CustomUi.SetupPanel.hasController)
     {
         RobComm.StopSim(true, CustomUi.SetupPanel.selectedControler);
     }
 }
예제 #4
0
 internal void SetProgramPointer(object obj)
 {
     if (CustomUi.SetupPanel.hasController)
     {
         RobComm.setProgramPointer(true, CustomUi.SetupPanel.selectedControler,
                                   CustomUi.ProgramPanel.selectecIndex + 1);
     }
 }