void Update()
        {
            dispatcherTimer.Stop();

            foreach (ChartModel cm in Data)
            {
                cm.ChartData.RemoveCollectionChangedSubscribersAll();
            }
            Data.Clear();
            int i = 0;

            foreach (ChannelInfo ch in _rule.Channels)
            {
                Data.Add(
                    new ChartModel(ch,
                                   ArchiveAccess.GetChannelData(_currentPos.AddMinutes(-_window), _currentPos, ch),
                                   _colors[i]));
                i++;
                if (i == _colors.Count())
                {
                    break;
                }
            }

            OnPropertyChanged("Data");
        }
Ejemplo n.º 2
0
 public ArchiveEventsSource( )
 {
     Events = new ObservableCollectionEx <IEvent>(ArchiveAccess.GetEvents(DateTime.Now.AddMonths(-2), DateTime.Now, this));
 }