private void SensorAdded(ISensor sensor) { foreach (TypeNode typeNode in _typeNodes) { if (typeNode.SensorType == sensor.SensorType) { InsertSorted(typeNode, sensor); UpdateNode(typeNode); } } PlotSelectionChanged?.Invoke(this, null); }
private void SensorRemoved(ISensor sensor) { foreach (TypeNode typeNode in _typeNodes) { if (typeNode.SensorType == sensor.SensorType) { SensorNode sensorNode = null; foreach (Node node in typeNode.Nodes) { if (node is SensorNode n && n.Sensor == sensor) { sensorNode = n; } } if (sensorNode != null) { sensorNode.PlotSelectionChanged -= SensorPlotSelectionChanged; typeNode.Nodes.Remove(sensorNode); UpdateNode(typeNode); } } } PlotSelectionChanged?.Invoke(this, null); }
private void SensorPlotSelectionChanged(object sender, EventArgs e) { PlotSelectionChanged?.Invoke(this, null); }