소스 검색

1.优化数据分析界面颜色选择bug
2.vatperformance与partitalpressure界面添加mtorr与pa切换

lixiang 1 년 전
부모
커밋
08ec6feef2

+ 0 - 12
Venus/Venus_Core/PMVATPerformance.cs

@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Venus_Core
-{
-    internal class PMVATPerformance
-    {
-    }
-}

+ 0 - 1
Venus/Venus_Core/Venus_Core.csproj

@@ -64,7 +64,6 @@
     <Compile Include="MFCCalibrationData.cs" />
     <Compile Include="PartialPressureResult.cs" />
     <Compile Include="PMLeakCheckResult.cs" />
-    <Compile Include="PMVATPerformance.cs" />
     <Compile Include="PressureType.cs" />
     <Compile Include="RecipeResult.cs" />
     <Compile Include="RecipeToleranceChecker.cs" />

+ 31 - 31
Venus/Venus_MainPages/Unity/VATPerformanceResult.cs

@@ -1,36 +1,36 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.Serialization;
-using System.Text;
-using System.Threading.Tasks;
+//using System;
+//using System.Collections.Generic;
+//using System.Linq;
+//using System.Runtime.Serialization;
+//using System.Text;
+//using System.Threading.Tasks;
 
-namespace Venus_MainPages.Unity
-{
-    [DataContract]
-    internal class VATPerformanceResult
-    {
-        [DataMember(Name = "StartTime")]
-        public string StartTime { get; set; }
-        [DataMember(Name = "EndTime")]
-        public string EndTime { get; set; }
-        [DataMember(Name = "FlowTime")]
-        public int FlowTime { get; set; }
-        [DataMember(Name = "GasName")]
+//namespace Venus_MainPages.Unity
+//{
+//    [DataContract]
+//    internal class VATPerformanceResult
+//    {
+//        [DataMember(Name = "StartTime")]
+//        public string StartTime { get; set; }
+//        [DataMember(Name = "EndTime")]
+//        public string EndTime { get; set; }
+//        [DataMember(Name = "FlowTime")]
+//        public int FlowTime { get; set; }
+//        [DataMember(Name = "GasName")]
 
-        public string GasName { get; set; }
-        [DataMember(Name = "ValuePairs")]
+//        public string GasName { get; set; }
+//        [DataMember(Name = "ValuePairs")]
 
-        public List<double> ValuePairs { get; set; } = new List<double>();
-        [DataMember(Name = "Result")]
+//        public List<double> ValuePairs { get; set; } = new List<double>();
+//        [DataMember(Name = "Result")]
 
-        public string Result { get; set; } = "Fail";
-    }
+//        public string Result { get; set; } = "Fail";
+//    }
 
-    //[DataContract]
-    //public class VATPerformanceValue
-    //{
-    //    public string Position { get; set; }
-    //    public double Value { get; set; }
-    //}
-}
+//    //[DataContract]
+//    //public class VATPerformanceValue
+//    //{
+//    //    public string Position { get; set; }
+//    //    public double Value { get; set; }
+//    //}
+//}

+ 21 - 23
Venus/Venus_MainPages/ViewModels/DataHistoryViewModel.cs

@@ -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
 
     }

+ 3 - 0
Venus/Venus_MainPages/ViewModels/OverKepler2200AViewModel.cs

@@ -1081,6 +1081,8 @@ namespace Venus_MainPages.ViewModels
         private DelegateCommand<object> _AbortRecipeCommnad;
         public DelegateCommand<object> AbortRecipeCommnad =>
             _AbortRecipeCommnad ?? (_AbortRecipeCommnad = new DelegateCommand<object>(OnAbortRecipe));
+
+       
         #endregion
 
         #region 构造函数
@@ -1107,6 +1109,7 @@ namespace Venus_MainPages.ViewModels
         #endregion
 
         #region 命令方法
+        
         private void OnControlValve(object obj)
         {
             CommonValveControl commonValveControl = (CommonValveControl)obj;

+ 19 - 1
Venus/Venus_MainPages/ViewModels/PartialPressureViewModel.cs

@@ -40,10 +40,16 @@ namespace Venus_MainPages.ViewModels
         private bool m_MFC7IsEnable;
         private bool m_MFC8IsEnable;
         private bool m_IsAutoMode;
+        private PressureType m_PressureType;
 
         #endregion
 
         #region 属性
+        public PressureType PressureType
+        {
+            get { return m_PressureType; }
+            set { SetProperty(ref m_PressureType, value); }
+        }
         public ObservableCollection<string> ReferenceFlow
         {
             get { return m_ReferenceFlow; }
@@ -111,6 +117,10 @@ namespace Venus_MainPages.ViewModels
         private DelegateCommand _AbortCommand;
         public DelegateCommand AbortCommand =>
             _AbortCommand ?? (_AbortCommand = new DelegateCommand(OnAbort));
+
+        private DelegateCommand _LoadCommand;
+        public DelegateCommand LoadCommand =>
+            _LoadCommand ?? (_LoadCommand = new DelegateCommand(OnLoad));
         #endregion
 
         #region 构造函数
@@ -121,10 +131,18 @@ namespace Venus_MainPages.ViewModels
             timer.Interval = TimeSpan.FromSeconds(1);
             timer.Tick += Timer_Tick;           
         }
-       
+
         #endregion
 
         #region 命令方法
+        private void OnLoad()
+        {
+            var jetChamber = (JetChamber)Enum.Parse(typeof(JetChamber), QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.ChamberType").ToString());
+            if (jetChamber == JetChamber.Kepler2200A || jetChamber == JetChamber.Kepler2200B)
+            {
+                PressureType = PressureType.Pa;
+            }
+        }
         private void OnSelectGas(object obj)
         {
             Dictionary<int, object> CurrentGasFlows = new Dictionary<int, object>();

+ 19 - 1
Venus/Venus_MainPages/ViewModels/VATPerformanceViewModel.cs

@@ -8,6 +8,7 @@ using System;
 using System.IO;
 using System.Linq;
 using System.Windows.Threading;
+using Venus_Core;
 using Venus_MainPages.Unity;
 using Venus_Unity;
 
@@ -28,11 +29,16 @@ namespace Venus_MainPages.ViewModels
         private bool m_MFC7IsEnable;
         private bool m_MFC8IsEnable;
         private bool m_IsAutoMode;
+        private PressureType m_PressureType;
 
         #endregion
 
         #region 属性
-
+        public PressureType PressureType
+        {
+            get { return m_PressureType; }
+            set { SetProperty(ref m_PressureType, value); }
+        }
         public int GasFlow
         {
             get { return m_GasFlow; }
@@ -95,6 +101,10 @@ namespace Venus_MainPages.ViewModels
         private DelegateCommand _SaveCommand;
         public DelegateCommand SaveCommand =>
             _SaveCommand ?? (_SaveCommand = new DelegateCommand(OnSave));
+
+        private DelegateCommand _LoadCommand;
+        public DelegateCommand LoadCommand =>
+            _LoadCommand ?? (_LoadCommand = new DelegateCommand(OnLoad));
         #endregion
 
         #region 构造函数
@@ -110,6 +120,14 @@ namespace Venus_MainPages.ViewModels
         #endregion
 
         #region 命令方法
+        private void OnLoad()
+        {
+            var jetChamber = (JetChamber)Enum.Parse(typeof(JetChamber), QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.ChamberType").ToString());
+            if (jetChamber == JetChamber.Kepler2200A || jetChamber == JetChamber.Kepler2200B)
+            {
+                PressureType = PressureType.Pa;
+            }
+        }
         private void OnSelectGas()
         {
            var value=Convert.ToInt32( QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.MfcGas{(GasSelectedIndex+1).ToString()}.MfcN2Scale"));

+ 4 - 4
Venus/Venus_MainPages/Views/DataHistoryView.xaml.cs

@@ -41,12 +41,12 @@ namespace Venus_MainPages.Views
                     _viewModel = (DataHistoryViewModel)DataContext;
                     var item = _viewModel.KeyDataObservableCollection.ToList().Find(t => t.UniqueId == dataId);
                     item.Color = new SolidColorBrush(newColor);
-                    //for (int i = 0; i < _viewModel.KeyDataObservableCollection.Count(); i++)
+                    _viewModel.ColorChanged();
+                    //if (TimeDataCheckBox.IsChecked == false)
                     //{
-                    //    var _color = _viewModel.KeyDataObservableCollection[i].Color.Color;
-                    //    MyDrawGraphicsControl.m_PenCollencteions[i] = new System.Drawing.Pen(System.Drawing.Color.FromArgb(_color.A, _color.R, _color.G, _color.B), 3);
+                    //    //_viewModel.OnStart();
                     //}
-                    _viewModel.OnStart();
+                    
                 }
             }
         }

+ 6 - 1
Venus/Venus_MainPages/Views/PartialPressureView.xaml

@@ -13,6 +13,11 @@
              xmlns:customControls="clr-namespace:Venus_Themes.CustomControls;assembly=Venus_Themes"
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800">
+    <i:Interaction.Triggers>
+        <i:EventTrigger EventName="Loaded">
+            <i:InvokeCommandAction Command="{Binding LoadCommand}"/>
+        </i:EventTrigger>
+    </i:Interaction.Triggers>
     <UserControl.Resources>
         <sys:String x:Key="Module">PMA</sys:String>
     </UserControl.Resources>
@@ -210,7 +215,7 @@
                     </lvc:Axis>
                 </lvc:CartesianChart.AxisX>
                 <lvc:CartesianChart.AxisY>
-                    <lvc:Axis Title="Pressure(mTorr)"  FontSize="15" Foreground="Black">
+                    <lvc:Axis Title="{Binding PressureType, StringFormat=Pressure({0})}"  FontSize="15" Foreground="Black">
 
                     </lvc:Axis>
                 </lvc:CartesianChart.AxisY>

+ 6 - 1
Venus/Venus_MainPages/Views/VATPerformanceView.xaml

@@ -12,6 +12,11 @@
              prism:ViewModelLocator.AutoWireViewModel="True"
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800">
+    <i:Interaction.Triggers>
+        <i:EventTrigger EventName="Loaded">
+            <i:InvokeCommandAction Command="{Binding LoadCommand}"/>
+        </i:EventTrigger>
+    </i:Interaction.Triggers>
     <Grid>
         <Grid.ColumnDefinitions>
             <ColumnDefinition />
@@ -203,7 +208,7 @@
                 </lvc:Axis>
             </lvc:CartesianChart.AxisX>
             <lvc:CartesianChart.AxisY>
-                <lvc:Axis Title="sccm/mT"  FontSize="15" Foreground="Black">
+                <lvc:Axis Title="{Binding PressureType, StringFormat=sccm/{0}}"  FontSize="15" Foreground="Black">
 
                 </lvc:Axis>
             </lvc:CartesianChart.AxisY>

+ 1 - 1
Venus/Venus_Themes/Styles/Button.xaml

@@ -347,7 +347,7 @@
         <Setter Property="VerticalContentAlignment" Value="Center"/>
         <Setter Property="Padding" Value="1"/>
         <Setter Property="SnapsToDevicePixels" Value="True"/>
-        <Setter Property="Focusable" Value="False"/>
+        <!--<Setter Property="Focusable" Value="False"/>-->
         <!--<Setter Property="Border.CornerRadius" Value="15"/>-->
         <Setter Property="Template">
             <Setter.Value>

+ 12 - 13
Venus/Venus_Themes/UserControls/DrawGraphicsControl.xaml.cs

@@ -185,8 +185,18 @@ namespace Venus_Themes.UserControls
             m_PenData = new System.Drawing.Pen(System.Drawing.Brushes.Green, 1);
             m_PenSData = new System.Drawing.Pen(System.Drawing.Brushes.Blue, 1);
             m_PenASData = new System.Drawing.Pen(System.Drawing.Brushes.Red, 1);
+
+            InitPens();
+            IsHorizontalNavigationEnabled = false;
+            IsVerticalNavigationEnabled = false;
+        }
+
+        #region Public
+
+        public void InitPens()
+        {
             m_PenCollencteions = new System.Drawing.Pen[]
-            {
+               {
                 new System.Drawing.Pen(System.Drawing.Brushes.Green,LineThickness),
                 new System.Drawing.Pen(System.Drawing.Brushes.Red,LineThickness),
                 new System.Drawing.Pen(System.Drawing.Brushes.Blue,LineThickness),
@@ -197,19 +207,8 @@ namespace Venus_Themes.UserControls
                 new System.Drawing.Pen(System.Drawing.Brushes.Chocolate,LineThickness),
                 new System.Drawing.Pen(System.Drawing.Brushes.Cyan,LineThickness),
                 new System.Drawing.Pen(System.Drawing.Brushes.DarkGreen,LineThickness),
-                //new System.Drawing.Pen(System.Drawing.Brushes.LightBlue,LineThickness),
-                //new System.Drawing.Pen(System.Drawing.Brushes.DarkBlue,LineThickness),
-                //new System.Drawing.Pen(System.Drawing.Brushes.Pink,LineThickness),
-                //new System.Drawing.Pen(System.Drawing.Brushes.DarkViolet,LineThickness),
-                //new System.Drawing.Pen(System.Drawing.Brushes.Cyan,LineThickness),
-                //new System.Drawing.Pen(System.Drawing.Brushes.HotPink,LineThickness),
-            };
-
-            IsHorizontalNavigationEnabled = false;
-            IsVerticalNavigationEnabled = false;
+               };
         }
-
-        #region Public
         public void ResetCoordinate()
         {
             m_WavePlotX = WavePlotOriginX;