示例#1
0
 private void SetupPlot()
 {
     CompositionTarget.Rendering += CompositionTarget_Rendering;
     PlotModel  = new PlotModel();
     BottomAxis = new BottomLinearAxis(this);
     PlotModel.Axes.Add(BottomAxis);
     LeftAxis = new LeftLinearAxis(this);
     PlotModel.Axes.Add(LeftAxis);
     PlotModel.MouseDown += PlotMouseDown;
     PlotModel.MouseMove += PlotMouseMove;
     PlotModel.MouseUp   += PlotMouseUp;
     SeriesNames          = new Dictionary <int, string>();
     IsRealTime           = true;
     IsYZoom              = true;
     IsGrid                    = false;
     IsNormalise               = false;
     NumSeries                 = 0;
     NumPointsPerPlot          = 200;
     CurrentRelativeCacheIndex = 0;
     CurrentFileName           = null;
     BaseTitle                 = "";
     MovingSeries              = null;
     PointCache                = null;
     Task          = new Thread(new ThreadStart(Run));
     Task.Name     = "PlotServiceThread:" + OwnerShellId;
     Task.Priority = ThreadPriority.Normal; // XXX was AboveNormal.
     Task.Start();
 }
示例#2
0
 public override void Close()
 {
     base.Close();
     if (Task != null)
     {
         Primitives.Interrupt(Task);
         Task = null;
     }
     if (PointCache != null)
     {
         PointCache.Close();
         PointCache = null;
     }
     PlotModel    = null;
     BottomAxis   = null;
     LeftAxis     = null;
     MovingSeries = null;
     SeriesNames  = null;
 }