Beispiel #1
0
        public static void AssignZoomedValues(this ObservableDataSource <Point> source, List <double> newValues, LocalRange range)
        {
            source.SuspendUpdate();
            source.Collection.Clear();
            var length = newValues.Count;
            var skip   = (range.RightThreshold - range.LeftThreshold) / range.ZoomOptions.TargetNumberOfSamples;

            for (int i = 0; i < length; i += 5)
            {
                var x = range.LeftThreshold + i * skip;
                source.Collection.Add(new Point {
                    X = x, Y = newValues[i]
                });
            }
            source.ResumeUpdate();
        }
Beispiel #2
0
        public static void AssignFrequencyValues(this ObservableDataSource <Point> source, List <double> newValues, int sampleRate)
        {
            if (newValues == null)
            {
                return;
            }

            source.SuspendUpdate();
            source.Collection.Clear();
            var length = newValues.Count;

            for (int i = 0; i < length; i += 20)
            {
                var x = FrequencyHelpers.GetFrequency(length, i, sampleRate);
                source.Collection.Add(new Point {
                    X = x, Y = newValues[i]
                });
            }
            source.ResumeUpdate();
        }
 public void Begin()
 {
     try
     {
         for (int i = 0; i < MainViewModel.HotItemController.Queue.Count; i++)
         {
             var item = MainViewModel.HotItemController.Queue[i];
             if (!chartItems.ContainsKey(item.DataId))
             {
                 if (item.IsSelected) // Chart selection
                 {
                     ObservableDataSource <ItemProxy> items = new ObservableDataSource <ItemProxy>();
                     items.SuspendUpdate();
                     Register(item, items);
                     items.ResumeUpdate();
                 }
             }
         }
     }
     catch
     {
     }
 }
        public void Begin()
        {
            try
            {
                for (int i = 0; i < MainViewModel.HotItemController.Queue.Count; i++)
                {
                    var item = MainViewModel.HotItemController.Queue[i];
                    if (!chartItems.ContainsKey(item.DataId))
                    {
                        if (item.IsSelected) // Chart selection
                        {
                            ObservableDataSource<ItemProxy> items = new ObservableDataSource<ItemProxy>();
                            items.SuspendUpdate();
                            Register(item, items);
                            items.ResumeUpdate();
                        }
                    }
                }
            }
            catch
            {

            }
        }
Beispiel #5
0
 private void UpdateButton_Click(object sender, RoutedEventArgs e)
 {
     dscr.ResumeUpdate();
     dscr.SuspendUpdate();
 }