|
@@ -1,13 +1,6 @@
|
|
|
-using Aitex.Core.RT.DataCenter;
|
|
|
-using Aitex.Core.RT.Log;
|
|
|
-using Aitex.Core.UI.ControlDataContext;
|
|
|
-using ControlzEx.Standard;
|
|
|
-using LiveCharts.Wpf;
|
|
|
-using MECF.Framework.Common.CommonData;
|
|
|
-using MECF.Framework.Common.ControlDataContext;
|
|
|
+using Aitex.Core.UI.ControlDataContext;
|
|
|
using MECF.Framework.Common.DataCenter;
|
|
|
using Newtonsoft.Json;
|
|
|
-using OpenSEMI.ClientBase;
|
|
|
using Prism.Commands;
|
|
|
using Prism.Mvvm;
|
|
|
using System;
|
|
@@ -16,18 +9,12 @@ using System.Collections.Generic;
|
|
|
using System.Collections.ObjectModel;
|
|
|
using System.Data;
|
|
|
using System.Linq;
|
|
|
-using System.Text;
|
|
|
-using System.Threading.Tasks;
|
|
|
using System.Windows;
|
|
|
-using System.Windows.Forms;
|
|
|
-using System.Windows.Input;
|
|
|
using System.Windows.Media;
|
|
|
using System.Windows.Threading;
|
|
|
-using System.Xml;
|
|
|
using Venus_MainPages.Unity;
|
|
|
using Venus_MainPages.Views;
|
|
|
using WPF.Themes.UserControls;
|
|
|
-using Xceed.Wpf.DataGrid;
|
|
|
|
|
|
namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
@@ -37,8 +24,8 @@ namespace Venus_MainPages.ViewModels
|
|
|
private DataHistoryView DataHistoryView;
|
|
|
private ObservableCollection<ParameterNode> _ParameterNodes;
|
|
|
RealtimeProvider _provider = new RealtimeProvider();
|
|
|
- private object _lockSelection = new object();
|
|
|
- ConcurrentBag<QueryIndexer> _lstTokenTimeData = new ConcurrentBag<QueryIndexer>();
|
|
|
+ //private object _lockSelection = new object();
|
|
|
+ //ConcurrentBag<QueryIndexer> _lstTokenTimeData = new ConcurrentBag<QueryIndexer>();
|
|
|
ObservableCollection<string> m_Keys=new ObservableCollection<string> ();
|
|
|
ObservableCollection<KeyData> m_KeyDataObservableCollection = new ObservableCollection<KeyData>();
|
|
|
DispatcherTimer timer = new DispatcherTimer();
|
|
@@ -228,8 +215,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
}
|
|
|
|
|
|
public void OnStart()
|
|
|
- {
|
|
|
-
|
|
|
+ {
|
|
|
if (Keys.Count > 10)
|
|
|
{
|
|
|
WPFMessageBox.ShowWarning("最多显示10个数据");
|
|
@@ -253,11 +239,12 @@ namespace Venus_MainPages.ViewModels
|
|
|
});
|
|
|
cls.Add(points);
|
|
|
}
|
|
|
- for (int i = 0; i < KeyDataObservableCollection.Count(); i++)
|
|
|
- {
|
|
|
- var _color = KeyDataObservableCollection[i].Color.Color;
|
|
|
- this.DataHistoryView.MyDrawGraphicsControl.m_PenCollencteions[i] = new System.Drawing.Pen(System.Drawing.Color.FromArgb(_color.A, _color.R, _color.G, _color.B), 2);
|
|
|
- }
|
|
|
+ //for (int i = 0; i < KeyDataObservableCollection.Count(); i++)
|
|
|
+ //{
|
|
|
+ // var _color = KeyDataObservableCollection[i].Color.Color;
|
|
|
+ // this.DataHistoryView.MyDrawGraphicsControl.m_PenCollencteions[i] = new System.Drawing.Pen(System.Drawing.Color.FromArgb(_color.A, _color.R, _color.G, _color.B), 2);
|
|
|
+ //}
|
|
|
+ //ColorChanged();
|
|
|
this.DataHistoryView.MyDrawGraphicsControl.PointCollections = cls;
|
|
|
this.DataHistoryView.MyDrawGraphicsControl.FitControl();
|
|
|
this.DataHistoryView.MyDrawGraphicsControl.YPoints.Clear();
|
|
@@ -290,6 +277,8 @@ namespace Venus_MainPages.ViewModels
|
|
|
this.DataHistoryView.MyDrawGraphicsControl.YPoints = new List<Venus_Core.StepItem>();
|
|
|
KeyDataObservableCollection.Clear();
|
|
|
CloseAll(ParameterNodes);
|
|
|
+ Keys.Clear();
|
|
|
+ this.DataHistoryView.MyDrawGraphicsControl.InitPens();
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
@@ -497,6 +486,15 @@ namespace Venus_MainPages.ViewModels
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ public void ColorChanged()
|
|
|
+ {
|
|
|
+ for (int i = 0; i < KeyDataObservableCollection.Count(); i++)
|
|
|
+ {
|
|
|
+ var _color = KeyDataObservableCollection[i].Color.Color;
|
|
|
+ this.DataHistoryView.MyDrawGraphicsControl.m_PenCollencteions[i] = new System.Drawing.Pen(System.Drawing.Color.FromArgb(_color.A, _color.R, _color.G, _color.B), 2);
|
|
|
+ }
|
|
|
+ }
|
|
|
#endregion
|
|
|
|
|
|
}
|