Exemple #1
0
        private void AnimatedPlot()// private void AnimatedPlot(object sender, EventArgs e)
        {
            double x = i;
            double y = current;

            Point point = new Point(x, y);

            dataSource.AppendAsync(base.Dispatcher, point);
            dataSource.ResumeUpdate();
            cpuUsageText.Text = string.Format("{0:0}V", y);//数值显示,非曲线!
            i++;
        }
Exemple #2
0
 /// <summary>
 /// The Vm_PropertyChanged function gets as parameters
 /// an object sender and PropertyChangedEventArgs e
 /// and handles the property changed event.
 /// <param name="sender">object sender of the event which caused
 /// the call of this function.</para>
 /// <param name="e">PropertyChangedEventArgs e of the information
 /// on the property which changed.</param>
 /// </summary>
 private void Vm_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (e.PropertyName.Equals("Lat") || e.PropertyName.Equals("Lon"))
     {
         MainWindowViewModel mwvm = sender as MainWindowViewModel;
         if (mwvm == null)
         {
             throw new Exception("Not Valid Sender!!!!");
         }
         Point p1 = new Point(mwvm.Lat, mwvm.Lon);            // Fill here!
         planeLocations.AppendAsync(Dispatcher, p1);
         planeLocations.ResumeUpdate();
     }
 }
Exemple #3
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();
        }
Exemple #4
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
            {

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