Răsfoiți Sursa

暂时取消保压曲线

KWD 5 luni în urmă
părinte
comite
bde7298f8e
1 a modificat fișierele cu 25 adăugiri și 25 ștergeri
  1. 25 25
      TeamAAS-VM/ViewModels/HomeViewModel.cs

+ 25 - 25
TeamAAS-VM/ViewModels/HomeViewModel.cs

@@ -665,31 +665,31 @@ namespace TeamAAS_VP.ViewModels
         {
             //更新对应传感器的曲线图
 
-            App.Current.Dispatcher.BeginInvoke(new Action(() =>
-            {
-                var model = PressurePlotModel;
-                var series = model.Series[0] as LineSeries;
-                series.Points.Clear();
-                //第一个点的时间作为X轴起点
-                DateTime xAxisStart = tuple.values[0].Timestamp;
-                foreach (var dataPoint in tuple.values)
-                {
-                    // 计算相对于起点的秒数作为X轴坐标
-                    double xValue = (dataPoint.Timestamp - xAxisStart).TotalSeconds;
-                    series.Points.Add(new OxyPlot.DataPoint(xValue, dataPoint.Value));
-                }
-                // 重置所有轴的范围以适应新数据
-                model.ResetAllAxes();
-                model.InvalidatePlot(true);
-                if (!string.IsNullOrEmpty(tuple.SavePath))
-                {
-                    if (!Directory.Exists(Path.GetDirectoryName(tuple.SavePath)))
-                    {
-                        Directory.CreateDirectory(Path.GetDirectoryName(tuple.SavePath));
-                    }
-                   PngExporter.Export(model, tuple.SavePath, (int)model.Width, (int)model.Height);
-                }
-            }));
+            //App.Current.Dispatcher.BeginInvoke(new Action(() =>
+            //{
+            //    var model = PressurePlotModel;
+            //    var series = model.Series[0] as LineSeries;
+            //    series.Points.Clear();
+            //    //第一个点的时间作为X轴起点
+            //    DateTime xAxisStart = tuple.values[0].Timestamp;
+            //    foreach (var dataPoint in tuple.values)
+            //    {
+            //        // 计算相对于起点的秒数作为X轴坐标
+            //        double xValue = (dataPoint.Timestamp - xAxisStart).TotalSeconds;
+            //        series.Points.Add(new OxyPlot.DataPoint(xValue, dataPoint.Value));
+            //    }
+            //    // 重置所有轴的范围以适应新数据
+            //    model.ResetAllAxes();
+            //    model.InvalidatePlot(true);
+            //    if (!string.IsNullOrEmpty(tuple.SavePath))
+            //    {
+            //        if (!Directory.Exists(Path.GetDirectoryName(tuple.SavePath)))
+            //        {
+            //            Directory.CreateDirectory(Path.GetDirectoryName(tuple.SavePath));
+            //        }
+            //       PngExporter.Export(model, tuple.SavePath, (int)model.Width, (int)model.Height);
+            //    }
+            //}));
         }