private void OnNewGroupUpdate_(GroupUpdate groupUpdate) { var item = this.table[groupUpdate.GroupId]; if (groupUpdate.FieldName == "Pad") { int padNumber = item.PadNumber; string format = item.Format; int newPad = (int)groupUpdate.Value; string labelFormat = (string)groupUpdate.Value; foreach (var kv in item.Table) { this.chart.Pads[padNumber].Remove(kv.Value.Item2); this.EnsurePadExists(newPad, labelFormat); this.chart.Pads[newPad].Add(kv.Value.Item2); } item.PadNumber = newPad; item.Format = labelFormat; } if (groupUpdate.FieldName == "Color") { Color color = (Color)groupUpdate.Value; foreach (var kv in item.Table) { if (kv.Value.Item1 is TimeSeriesViewer) (kv.Value.Item1 as TimeSeriesViewer).Color = color; } this.chart.UpdatePads(); } }
public GroupUpdateEventAgrs(GroupUpdate groupUpdate) { this.GroupUpdate = groupUpdate; }
public void OnNewGroupUpdate(GroupUpdate groupUpdate) { #if GTK Gtk.Application.Invoke((sender, e) => OnNewGroupUpdate_(groupUpdate)); #else if (InvokeRequired) Invoke((System.Action)delegate { OnNewGroupUpdate(groupUpdate); }); else OnNewGroupUpdate_(groupUpdate); #endif }