/// <summary> /// A method to invoke once an observable value is changed /// </summary> /// <param name="val">The observed value</param> public void OnObservedValueChange(IObservableNumericValue val) { if (currentInstructionEntry.instruction != null && currentInstructionEntry.observedValueLabels != null) { if (currentInstructionEntry.observedValueLabels.Contains(val.Label)) { currentInstructionEntry.instruction.feedbackStatus = val.Status(); Debug.Log("==============================="); Debug.Log("Observed " + val.Label + " as " + val.Status()); Debug.Log(val.Value + "," + val.Min + "," + val.Max); Debug.Log("==============================="); } } }
public void ObservedValueChanged(IObservableNumericValue val) { DataGridViewRow row = null; foreach (DataGridViewRow r in UIObservedValuesOuputGrid.Rows) { if (r.Tag.Equals(val.Label)) { row = r; break; } } if (row != null) { row.Cells["observedValue"].Value = val.Value; row.Cells["status"].Value = val.Status().ToString(); row.Cells["difference"].Value = val.Diff().ToString(); } }