Ejemplo n.º 1
0
 public void OnNewGroupEvent(GroupEvent groupEvent)
 {
     var item = this.table[groupEvent.Group.Id];
     Tuple<Viewer, object> tuple = null;
     item.Table.TryGetValue(groupEvent.Obj.TypeId, out tuple);
     switch (groupEvent.Obj.TypeId)
     {
         case DataObjectType.Bar:
             object obj1;
             if (tuple == null)
             {
                 obj1 = new BarSeries("", "", -1);
                 int padNumber = item.PadNumber;
                 this.EnsurePadExists(padNumber, item.Format);
                 int viewerIndex = this.GetViewerIndex(groupEvent.Group, padNumber);
                 Viewer viewer = this.chart.Pads[padNumber].Insert(viewerIndex, obj1 as BarSeries);
                 this.chart.Pads[padNumber].Legend.Add(groupEvent.Group.Name, Color.Black);
                 item.Table.Add(groupEvent.Obj.TypeId, new Tuple<Viewer, object>(viewer, obj1));
             }
             else
                 obj1 = tuple.Item2 as BarSeries;
             (obj1 as BarSeries).Add(groupEvent.Obj as Bar);
             break;
         case DataObjectType.Fill:
             object obj2;
             if (tuple == null)
             {
                 obj2 = new FillSeries("");
                 int padNumber = item.PadNumber;
                 this.EnsurePadExists(padNumber, item.Format);
                 int viewerIndex = this.GetViewerIndex(groupEvent.Group, padNumber);
                 Viewer viewer = this.chart.Pads[padNumber].Insert(viewerIndex, obj2);
                 item.Table.Add(groupEvent.Obj.TypeId, new Tuple<Viewer, object>(viewer, obj2));
             }
             else
                 obj2 = tuple.Item2 as FillSeries;
             (obj2 as FillSeries).Add(groupEvent.Obj as Fill);
             break;
         case DataObjectType.TimeSeriesItem:
             object obj3;
             if (tuple == null)
             {
                 obj3 = new TimeSeries();
                 int padNumber = item.PadNumber;
                 EnsurePadExists(padNumber, item.Format);
                 int viewerIndex = this.GetViewerIndex(groupEvent.Group, padNumber);
                 Viewer viewer = this.chart.Pads[padNumber].Insert(viewerIndex, obj3);
                 foreach (var kv in groupEvent.Group.Fields)
                     viewer.Set(obj3, kv.Value.Name, kv.Value.Value);
                 if (groupEvent.Group.Fields.ContainsKey("Color"))
                     this.chart.Pads[padNumber].Legend.Add(groupEvent.Group.Name, (Color)groupEvent.Group.Fields["Color"].Value);
                 else
                     this.chart.Pads[padNumber].Legend.Add(groupEvent.Group.Name, Color.Black);
                 item.Table.Add(groupEvent.Obj.TypeId, new Tuple<Viewer, object>(viewer, obj3));
             }
             else
                 obj3 = tuple.Item2 as TimeSeries;
             (obj3 as TimeSeries).Add((groupEvent.Obj as TimeSeriesItem).DateTime, (groupEvent.Obj as TimeSeriesItem).Value);
             break;
     }
 }
Ejemplo n.º 2
0
 public GroupEventEventAgrs(GroupEvent groupEvent)
 {
     this.GroupEvent = groupEvent;
 }
Ejemplo n.º 3
0
 private void ProcessEvent(GroupEvent groupEvent, bool lastEvent)
 {
     OnNewGroupEvent(groupEvent);
     if (this.firstDateTime == DateTime.MinValue)
         this.firstDateTime = groupEvent.Obj.DateTime;
     if (lastEvent)
         MoveWindow(groupEvent.Obj.DateTime);
 }
Ejemplo n.º 4
0
		internal void OnGroupEvent(GroupEvent groupEvent)
		{
		}
Ejemplo n.º 5
0
		public void OnNewGroupEvent(GroupEvent groupEvent)
		{
			this.Events.Add(groupEvent);
		}
Ejemplo n.º 6
0
 public void OnNewGroupEvent(GroupEvent groupEvent)
 {
     this.Events.Add(groupEvent);
 }
Ejemplo n.º 7
0
 public GroupEventEventAgrs(GroupEvent groupEvent)
 {
     this.GroupEvent = groupEvent;
 }
Ejemplo n.º 8
0
 internal void OnGroupEvent(GroupEvent groupEvent)
 {
 }