private void OnTestQueueComplete(InstructionEntry instructionEntry) { ThreadHelper.UI_Invoke(Program.app, null, UITestConfigIntructionListGrid, (data) => { Instruction instruction = instructionEntry.instruction; UITestConfigIntructionListGrid.Rows[last_instruction_index].Cells[2].Value = "Finished"; UITestConfigIntructionListGrid.Rows[last_instruction_index].Cells[3].Value = instruction.feedbackStatus.ToString(); UITestConfigParameterTemplateSelect.Enabled = true; }, null); }
public void OnStreamConnected(DataStream stream) { ThreadHelper.UI_Invoke(this, null, TestConfigTab.UITestDeviceSelect, (data) => { TestConfigTab.AddDeviceToList(stream); if (stream == Program.serial) { if (comSettings != null) { comSettings.Close(); } } }, null); }
private void ReceiveSensorList(object _sensor_list, string attribute, string label) { Debug.Log("Receive sensor list " + attribute); JObject sensor_list = (JObject)_sensor_list; ThreadHelper.UI_Invoke(this, null, UISensorCheckboxList, (data) => { autoObservableValues = new ObservableNumericValueCollection(); foreach (var elem in (JObject)data["sensor_list"]) { if (!sensor_information.ContainsKey(elem.Key)) { //string sensor_name = label + ": " + elem.Key; string sensor_name = elem.Key; sensor_information.Add(sensor_name, elem.Value.ToString()); UISensorCheckboxList.Items.Add(sensor_name); if (DataReceiver.Observe) { AddParameterControlRow(new ObservedDataRow { name = elem.Key, value = "" } ); IObservableNumericValue o = autoObservableValues.AddWithType(elem.Key, elem.Value.ToString()); o.OnUpdate(ObservedValueChanged); } } } if (autoObservableValues.Count > 0) { autoParamControlTemplate.SetCollection(autoObservableValues); DataReceiver.SetObservableNumericValues(autoObservableValues); } }, new Hashtable { { "form", this }, { "panel", null }, { "control", UISensorCheckboxList }, { "sensor_list", sensor_list } }); }
public void ReceiveInstructionList(object payload, string attribute, string label) { ThreadHelper.UI_Invoke(this, null, TestConfigTab.UITestConfigInstructionParameterGrid, (Hashtable d) => { instruction_list = (JObject)payload; foreach (KeyValuePair <string, JToken> instruction in instruction_list) { InstructionUIEntry entry = new InstructionUIEntry { label = instruction.Key, parameters = instruction.Value as JObject }; TestConfigTab.AddInstructionUIEntry(entry); } }, null); }
public void OnStreamDisconnected(DataStream stream) { if (isClosing) { return; } ThreadHelper.UI_Invoke(this, null, TestConfigTab.UITestDeviceSelect, (data) => { TestConfigTab.RemoveDeviceFromList(stream); if (stream == Program.serial) { SetCOMConnectionStatus("Serial disconnected"); } if (stream == Program.socketHandler) { SetNetworkConnectionStatus("Network disconnected"); } }, null); }