Browse Source

优化SequenceView界面
去除窗体关闭按钮,改为Logout登出界面
优化Log与eap交互

lixiang 10 months ago
parent
commit
5e9ddc918f

+ 35 - 41
Venus/Framework/Common/Event/EventManager.cs

@@ -1,11 +1,8 @@
 using System;
 using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using Aitex.Core.Util;
 using Aitex.Core.Util;
 using System.IO;
 using System.IO;
 using System.ServiceModel;
 using System.ServiceModel;
-using Aitex.Core.RT.DataCenter;
 using Aitex.Core.WCF;
 using Aitex.Core.WCF;
 using Aitex.Core.RT.Log;
 using Aitex.Core.RT.Log;
 using Aitex.Core.RT.OperationCenter;
 using Aitex.Core.RT.OperationCenter;
@@ -28,8 +25,8 @@ namespace Aitex.Core.RT.Event
         PeriodicJob _eventJob;
         PeriodicJob _eventJob;
 
 
         EventDBWriter _eventDB;
         EventDBWriter _eventDB;
-        EventLogWriter _writerToLog;
-        EventMailWriter _writerToMail;
+        //EventLogWriter _writerToLog;
+        //EventMailWriter _writerToMail;
         EventService _eventService;
         EventService _eventService;
         ServiceHost _eventServiceHost;
         ServiceHost _eventServiceHost;
 
 
@@ -59,12 +56,12 @@ namespace Aitex.Core.RT.Event
                     LOG.WriteExeption(ex);
                     LOG.WriteExeption(ex);
                 }
                 }
             }
             }
-            _writerToLog = new EventLogWriter();
+            //_writerToLog = new EventLogWriter();
 
 
-            if (needMailOut)
-            {
-                _writerToMail = new EventMailWriter();
-            }
+            //if (needMailOut)
+            //{
+            //    _writerToMail = new EventMailWriter();
+            //}
 
 
             _eventService = new EventService();
             _eventService = new EventService();
             if (needCreateService)
             if (needCreateService)
@@ -170,19 +167,19 @@ namespace Aitex.Core.RT.Event
             WriteEvent(_eventDic[eventName].Source, eventName);
             WriteEvent(_eventDic[eventName].Source, eventName);
         }
         }
 
 
-        public void WriteEvent(string module, string eventName, string message)
+        public void WriteEvent(string module, EventLevel level, string message)
         {
         {
-            if (!_eventDic.ContainsKey(eventName))
-            {
-                //LOG.Write("Event name not registered, " + eventName);
-                return;
-            }
+            //if (!_eventDic.ContainsKey(eventName))
+            //{
+            //    //LOG.Write("Event name not registered, " + eventName);
+            //    return;
+            //}
 
 
-            EventItem item = _eventDic[eventName].Clone();
+            EventItem item = new EventItem();
             item.Source = module;
             item.Source = module;
             item.Description = message;
             item.Description = message;
             item.OccuringTime = DateTime.Now;
             item.OccuringTime = DateTime.Now;
-            
+            item.Level = level;
             if (!string.IsNullOrWhiteSpace(item.Source))
             if (!string.IsNullOrWhiteSpace(item.Source))
             {
             {
                 //item.Description = item.Source + "  " + item.Description;
                 //item.Description = item.Source + "  " + item.Description;
@@ -205,21 +202,18 @@ namespace Aitex.Core.RT.Event
                 OnEvent(item);
                 OnEvent(item);
             }
             }
 
 
-            _writerToLog.WriteEvent(item);
+            //_writerToLog.WriteEvent(item);
 
 
             //WriteEvent(eventName);
             //WriteEvent(eventName);
         }
         }
-        public void WriteEvent(string module, eEvent id, string eventName, string message)
+        public void WriteEvent(string module, eEvent id, EventLevel level, string message)
         {
         {
-            if (!_eventDic.ContainsKey(eventName))
-            {
-                return;
-            }
 
 
             EventItem item = new EventItem();
             EventItem item = new EventItem();
             item.Id = (int)id;
             item.Id = (int)id;
             item.EventEnum = id.ToString();
             item.EventEnum = id.ToString();
             item.Source = module;
             item.Source = module;
+            item.Level = level;
             item.Description = message;
             item.Description = message;
             item.OccuringTime = DateTime.Now;
             item.OccuringTime = DateTime.Now;
 
 
@@ -245,7 +239,7 @@ namespace Aitex.Core.RT.Event
                 OnEvent(item);
                 OnEvent(item);
             }
             }
 
 
-            _writerToLog.WriteEvent(item);
+            //_writerToLog.WriteEvent(item);
 
 
             //WriteEvent(eventName);
             //WriteEvent(eventName);
         }
         }
@@ -253,10 +247,10 @@ namespace Aitex.Core.RT.Event
         {
         {
             if (!_eventDic.ContainsKey(eventName))
             if (!_eventDic.ContainsKey(eventName))
             {
             {
-                //LOG.Write("Event name not registered, " + eventName);
+                //LOG.Error("Event name not registered, " + eventName);
                 return;
                 return;
             }
             }
-            WriteEvent(_eventDic[eventName].Source, eventName, dvid);
+            WriteEvent(_eventDic[eventName].Source, dvid);
         }
         }
 
 
         public void WriteEvent(string eventName, SerializableDictionary<string, object> dvid)
         public void WriteEvent(string eventName, SerializableDictionary<string, object> dvid)
@@ -306,7 +300,7 @@ namespace Aitex.Core.RT.Event
                 OnEvent(item);
                 OnEvent(item);
             }
             }
 
 
-            _writerToLog.WriteEvent(item);
+            //_writerToLog.WriteEvent(item);
         }
         }
 
 
         public void WriteEvent(string module, string eventName, SerializableDictionary<string, string> dvid, params object[] args)
         public void WriteEvent(string module, string eventName, SerializableDictionary<string, string> dvid, params object[] args)
@@ -340,7 +334,7 @@ namespace Aitex.Core.RT.Event
                 OnEvent(item);
                 OnEvent(item);
             }
             }
 
 
-            _writerToLog.WriteEvent(item);
+            //_writerToLog.WriteEvent(item);
         }
         }
 
 
         private void ProceedReceivedEvent(EventItem item)
         private void ProceedReceivedEvent(EventItem item)
@@ -365,7 +359,7 @@ namespace Aitex.Core.RT.Event
                 OnEvent(item);
                 OnEvent(item);
             }
             }
 
 
-            _writerToLog.WriteEvent(item);
+            //_writerToLog.WriteEvent(item);
         }
         }
 
 
         public void PostNotificationMessage(string message)
         public void PostNotificationMessage(string message)
@@ -383,7 +377,7 @@ namespace Aitex.Core.RT.Event
 
 
             _eventQueue.Enqueue(eventItem);
             _eventQueue.Enqueue(eventItem);
 
 
-            _writerToLog.WriteEvent(eventItem);
+            //_writerToLog.WriteEvent(eventItem);
         }
         }
 
 
         public void PostPopDialogMessage(EventLevel level, string title, string message)
         public void PostPopDialogMessage(EventLevel level, string title, string message)
@@ -401,7 +395,7 @@ namespace Aitex.Core.RT.Event
                 eventItem.Description = eventItem.Source + "  " + eventItem.Description;
                 eventItem.Description = eventItem.Source + "  " + eventItem.Description;
             }
             }
             _eventQueue.Enqueue(eventItem);
             _eventQueue.Enqueue(eventItem);
-            _writerToLog.WriteEvent(eventItem);
+            //_writerToLog.WriteEvent(eventItem);
         }
         }
 
 
         public void PostKickoutMessage(string message)
         public void PostKickoutMessage(string message)
@@ -417,7 +411,7 @@ namespace Aitex.Core.RT.Event
                 eventItem.Description = eventItem.Source + "  " + eventItem.Description;
                 eventItem.Description = eventItem.Source + "  " + eventItem.Description;
             }
             }
             _eventQueue.Enqueue(eventItem);
             _eventQueue.Enqueue(eventItem);
-            _writerToLog.WriteEvent(eventItem);
+            //_writerToLog.WriteEvent(eventItem);
         }
         }
 
 
         public void PostSoundMessage(string message)
         public void PostSoundMessage(string message)
@@ -433,7 +427,7 @@ namespace Aitex.Core.RT.Event
                 eventItem.Description = eventItem.Source + "  " + eventItem.Description;
                 eventItem.Description = eventItem.Source + "  " + eventItem.Description;
             }
             }
             _eventQueue.Enqueue(eventItem);
             _eventQueue.Enqueue(eventItem);
-            _writerToLog.WriteEvent(eventItem);
+            //_writerToLog.WriteEvent(eventItem);
         }
         }
 
 
 
 
@@ -450,8 +444,8 @@ namespace Aitex.Core.RT.Event
 
 
                     //_writerToLog.WriteEvent(ev);
                     //_writerToLog.WriteEvent(ev);
 
 
-                    if (_writerToMail != null)
-                        _writerToMail.WriteEvent(ev);
+                    //if (_writerToMail != null)
+                    //    _writerToMail.WriteEvent(ev);
 
 
                     if (_eventService != null)
                     if (_eventService != null)
                         _eventService.FireEvent(ev);
                         _eventService.FireEvent(ev);
@@ -498,12 +492,12 @@ namespace Aitex.Core.RT.Event
 
 
         public void PostInfoLog(string module, string message)
         public void PostInfoLog(string module, string message)
         {
         {
-            WriteEvent(module, INFORMATION_EVENT, message);
+            WriteEvent(module, EventLevel.Information, message);
         }
         }
 
 
         public void PostInfoLog(string module, eEvent id, string message)
         public void PostInfoLog(string module, eEvent id, string message)
         {
         {
-            WriteEvent(module,id, INFORMATION_EVENT, message);
+            WriteEvent(module,id, EventLevel.Information, message);
         }
         }
 
 
         public void PostWarningLog(string module, string message)
         public void PostWarningLog(string module, string message)
@@ -512,16 +506,16 @@ namespace Aitex.Core.RT.Event
         }
         }
         public void PostWarningLog(string module, eEvent id, string message)
         public void PostWarningLog(string module, eEvent id, string message)
         {
         {
-            WriteEvent(module,id, WARNING_EVENT, message);
+            WriteEvent(module,id, EventLevel.Warning, message);
         }
         }
 
 
         public void PostAlarmLog(string module, string message)
         public void PostAlarmLog(string module, string message)
         {
         {
-            WriteEvent(module, ALARM_EVENT, message);
+            WriteEvent(module, EventLevel.Alarm, message);
         }
         }
         public void PostAlarmLog(string module, eEvent id, string message)
         public void PostAlarmLog(string module, eEvent id, string message)
         {
         {
-            WriteEvent(module,id, ALARM_EVENT, message);
+            WriteEvent(module,id, EventLevel.Alarm, message);
         }
         }
 
 
     }
     }

+ 0 - 2
Venus/Framework/Common/Log/LOG.cs

@@ -156,9 +156,7 @@ namespace Aitex.Core.RT.Log
                         Debug(message);
                         Debug(message);
                         break;
                         break;
                     case Level.Info:
                     case Level.Info:
-                         //EV.PostInfoLog(module.ToString(), id, string.Format(((int)item1).ToString().PadRight(6)+ logItem.GlobalDescription_zh, values));
                         EV.PostInfoLog(module.ToString(), id, logWithoutControlChar);
                         EV.PostInfoLog(module.ToString(), id, logWithoutControlChar);
-
                         Info(message);
                         Info(message);
                         break;
                         break;
                     case Level.Warning:
                     case Level.Warning:

+ 1 - 5
Venus/Framework/Common/Log/LogManager.cs

@@ -12,15 +12,11 @@ namespace Aitex.Core.RT.Log
         private static Timer deleteTimer;//定义定时器,定时删除log
         private static Timer deleteTimer;//定义定时器,定时删除log
         public void Initialize()
         public void Initialize()
         {
         {
-
-
             deleteTimer = new Timer(1);
             deleteTimer = new Timer(1);
             deleteTimer.Elapsed += OnDeleteLog;
             deleteTimer.Elapsed += OnDeleteLog;
             deleteTimer.AutoReset = true;
             deleteTimer.AutoReset = true;
             deleteTimer.Enabled = true;
             deleteTimer.Enabled = true;
             LOG.InnerLogger = this;
             LOG.InnerLogger = this;
-
-
         }
         }
         public void Debug(string message)
         public void Debug(string message)
         { 
         { 
@@ -62,7 +58,7 @@ namespace Aitex.Core.RT.Log
                 fileInfos = curFolderInfo.GetFiles();
                 fileInfos = curFolderInfo.GetFiles();
                 foreach (FileInfo info in fileInfos)
                 foreach (FileInfo info in fileInfos)
                 {
                 {
-                    if (info.Name.Contains("log") && info.Extension == ".txt")
+                    if (info.Name.Contains("log") && (info.Extension == ".txt" || info.Extension == ".log"))
                     {
                     {
                         DateTime lastWriteTime = DateTime.Parse(info.LastWriteTime.ToShortDateString());
                         DateTime lastWriteTime = DateTime.Parse(info.LastWriteTime.ToShortDateString());
                         DateTime intervalTime = DateTime.Now.AddMonths(-MaxLogsMonth);
                         DateTime intervalTime = DateTime.Now.AddMonths(-MaxLogsMonth);

+ 11 - 41
Venus/Framework/UICore/Style/ButtonStyle.xaml

@@ -13,6 +13,7 @@
         <GradientStop Color="#3c6982" Offset="1" />
         <GradientStop Color="#3c6982" Offset="1" />
     </LinearGradientBrush>
     </LinearGradientBrush>
     <SolidColorBrush x:Key="buttonPressed" Color="#ffffff"></SolidColorBrush>
     <SolidColorBrush x:Key="buttonPressed" Color="#ffffff"></SolidColorBrush>
+    
     <Style TargetType="Button">
     <Style TargetType="Button">
         <Setter Property="Background" Value="{StaticResource buttonNormal}"></Setter>
         <Setter Property="Background" Value="{StaticResource buttonNormal}"></Setter>
         <Setter Property="Foreground" Value="{StaticResource buttonForground}"></Setter>
         <Setter Property="Foreground" Value="{StaticResource buttonForground}"></Setter>
@@ -45,51 +46,20 @@
                             <Setter Property="Background" TargetName="border" Value="{StaticResource buttonPressed}"/>
                             <Setter Property="Background" TargetName="border" Value="{StaticResource buttonPressed}"/>
                         </Trigger>
                         </Trigger>
                         <Trigger Property="IsEnabled" Value="false">
                         <Trigger Property="IsEnabled" Value="false">
-                            <Setter Property="Opacity" Value="0.5" TargetName="border"/>
-							<Setter Property="Background" TargetName="border" Value="Gray" />
+                            <!--<Setter Property="Opacity" Value="0.5" TargetName="border"/>-->
+							<Setter Property="Background" TargetName="border" Value="Silver" />
 						</Trigger>
 						</Trigger>
                     </ControlTemplate.Triggers>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
                 </ControlTemplate>
             </Setter.Value>
             </Setter.Value>
         </Setter>
         </Setter>
     </Style>
     </Style>
-    <!--<Style TargetType="Button">
-        <Setter Property="FontWeight" Value="Bold"/>
-        <Setter Property="Cursor" Value="Hand"/>
-        <Setter Property="Foreground" Value="#FF181C1F" />
-        <Setter Property="Background" Value="CadetBlue" />
-        <Setter Property="BorderBrush" Value="Blue" />
-        <Setter Property="Margin" Value="5"/>
-        <Setter Property="FontFamily" Value="Arial,SimSun" />
-        <Setter Property="FontSize" Value="15"/>
-        <Setter Property="VerticalAlignment" Value="Top" />
-        <Setter Property="Height" Value="40"></Setter>
-        <Setter Property="Width" Value="100"></Setter>
-        <Setter Property="BitmapEffect" >
-            <Setter.Value>
-                <BevelBitmapEffect BevelWidth="2" />
-            </Setter.Value>
-        </Setter>
-        <Style.Triggers>
-            <Trigger Property="IsMouseOver" Value="True">
-                <Setter Property="Foreground" Value="Green" />
-            </Trigger>
-            --><!-- When the mouse is pressed, apply a bevel with a narrower BevelWidth to make the button appear to get pressed. --><!--
-            <Trigger Property="IsPressed" Value="true">
-                <Setter Property="Background" Value="#FFEEFDFC" />
-                <Setter Property="BitmapEffect" >
-                    <Setter.Value>
-                        <BevelBitmapEffect BevelWidth="3" />
-                    </Setter.Value>
-                </Setter>
-            </Trigger>
-        </Style.Triggers>
-    </Style>-->
+
 
 
     <!--主窗口样式-->
     <!--主窗口样式-->
    
    
     <!--右下角-->
     <!--右下角-->
-    <Style TargetType="Button" x:Key="NavUpButton">
+    <!--<Style TargetType="Button" x:Key="NavUpButton">
         <Setter Property="Height" Value="37"></Setter>
         <Setter Property="Height" Value="37"></Setter>
         <Setter Property="Width" Value="34"></Setter>
         <Setter Property="Width" Value="34"></Setter>
         <Setter Property="Cursor" Value="Hand"></Setter>
         <Setter Property="Cursor" Value="Hand"></Setter>
@@ -221,7 +191,7 @@
 
 
     </Style>
     </Style>
 
 
-    <!--右上角-->
+    --><!--右上角--><!--
     <Style TargetType="Button" x:Key="MainMiddleButton">
     <Style TargetType="Button" x:Key="MainMiddleButton">
         <Setter Property="FontWeight" Value="Bold"/>
         <Setter Property="FontWeight" Value="Bold"/>
         <Setter Property="Cursor" Value="Hand"/>
         <Setter Property="Cursor" Value="Hand"/>
@@ -258,7 +228,7 @@
             </Trigger>
             </Trigger>
         </Style.Triggers>
         </Style.Triggers>
 
 
-    </Style>
+    </Style>-->
     
     
     <!--登录窗口样式-->
     <!--登录窗口样式-->
     <Style TargetType="Button" x:Key="LoginButton">
     <Style TargetType="Button" x:Key="LoginButton">
@@ -309,7 +279,7 @@
     </Style>
     </Style>
     
     
     <!--按钮缩放,多用于PM气流图等界面-->
     <!--按钮缩放,多用于PM气流图等界面-->
-    <Style TargetType="Button" x:Key="SmallButton">
+    <!--<Style TargetType="Button" x:Key="SmallButton">
         <Setter Property="FontWeight" Value="Bold"/>
         <Setter Property="FontWeight" Value="Bold"/>
         <Setter Property="Cursor" Value="Hand"/>
         <Setter Property="Cursor" Value="Hand"/>
         <Setter Property="Foreground" Value="#FF181C1F" />
         <Setter Property="Foreground" Value="#FF181C1F" />
@@ -338,12 +308,12 @@
                 </Setter>
                 </Setter>
             </Trigger>
             </Trigger>
         </Style.Triggers>
         </Style.Triggers>
-    </Style>
+    </Style>-->
     
     
     <!--反应腔盖-->
     <!--反应腔盖-->
-    <Style TargetType="Button" x:Key="ReactorMiniButtonStyle">
+    <!--<Style TargetType="Button" x:Key="ReactorMiniButtonStyle">
         <Setter Property="FontSize" Value="15" />
         <Setter Property="FontSize" Value="15" />
         <Setter Property="Focusable" Value="False" />
         <Setter Property="Focusable" Value="False" />
         <Setter Property="Cursor" Value="Hand" />
         <Setter Property="Cursor" Value="Hand" />
-    </Style>
+    </Style>-->
 </ResourceDictionary>
 </ResourceDictionary>

+ 6 - 6
Venus/Venus_MainPages/Venus_MainPages.csproj

@@ -296,8 +296,8 @@
     <Compile Include="Views\ProcessView.xaml.cs">
     <Compile Include="Views\ProcessView.xaml.cs">
       <DependentUpon>ProcessView.xaml</DependentUpon>
       <DependentUpon>ProcessView.xaml</DependentUpon>
     </Compile>
     </Compile>
-    <Compile Include="Views\NewRecipeSequenceSelectView.xaml.cs">
-      <DependentUpon>NewRecipeSequenceSelectView.xaml</DependentUpon>
+    <Compile Include="Views\KeplerRecipeSequenceSelectView.xaml.cs">
+      <DependentUpon>KeplerRecipeSequenceSelectView.xaml</DependentUpon>
     </Compile>
     </Compile>
     <Compile Include="Views\RecipeSequenceSelectView.xaml.cs">
     <Compile Include="Views\RecipeSequenceSelectView.xaml.cs">
       <DependentUpon>RecipeSequenceSelectView.xaml</DependentUpon>
       <DependentUpon>RecipeSequenceSelectView.xaml</DependentUpon>
@@ -374,8 +374,8 @@
     <Compile Include="Views\WaferAssociationSEUnit.xaml.cs">
     <Compile Include="Views\WaferAssociationSEUnit.xaml.cs">
       <DependentUpon>WaferAssociationSEUnit.xaml</DependentUpon>
       <DependentUpon>WaferAssociationSEUnit.xaml</DependentUpon>
     </Compile>
     </Compile>
-    <Compile Include="Views\NewWaferAssociationUnit.xaml.cs">
-      <DependentUpon>NewWaferAssociationUnit.xaml</DependentUpon>
+    <Compile Include="Views\KeplerWaferAssociationUnit.xaml.cs">
+      <DependentUpon>KeplerWaferAssociationUnit.xaml</DependentUpon>
     </Compile>
     </Compile>
     <Compile Include="Views\WaferAssociationUnit.xaml.cs">
     <Compile Include="Views\WaferAssociationUnit.xaml.cs">
       <DependentUpon>WaferAssociationUnit.xaml</DependentUpon>
       <DependentUpon>WaferAssociationUnit.xaml</DependentUpon>
@@ -537,7 +537,7 @@
       <SubType>Designer</SubType>
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
       <Generator>MSBuild:Compile</Generator>
     </Page>
     </Page>
-    <Page Include="Views\NewRecipeSequenceSelectView.xaml">
+    <Page Include="Views\KeplerRecipeSequenceSelectView.xaml">
       <Generator>MSBuild:Compile</Generator>
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
       <SubType>Designer</SubType>
     </Page>
     </Page>
@@ -641,7 +641,7 @@
       <SubType>Designer</SubType>
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
       <Generator>MSBuild:Compile</Generator>
     </Page>
     </Page>
-    <Page Include="Views\NewWaferAssociationUnit.xaml">
+    <Page Include="Views\KeplerWaferAssociationUnit.xaml">
       <Generator>MSBuild:Compile</Generator>
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
       <SubType>Designer</SubType>
     </Page>
     </Page>

+ 18 - 22
Venus/Venus_MainPages/ViewModels/DataHistoryViewModel.cs

@@ -37,10 +37,10 @@ namespace Venus_MainPages.ViewModels
         private DateTime startTime = DateTime.Now;
         private DateTime startTime = DateTime.Now;
         private bool m_IsShowStep;
         private bool m_IsShowStep;
 
 
-        private bool m_IsPMAChecked=true;
-        private bool m_IsPMBChecked=true;
+        private bool m_IsPMAChecked = true;
+        private bool m_IsPMBChecked = true;
         private bool m_IsPMCChecked = true;
         private bool m_IsPMCChecked = true;
-        private bool m_IsPMDChecked=true;
+        private bool m_IsPMDChecked = true;
 
 
 
 
         private bool m_PMAIsInstalled;
         private bool m_PMAIsInstalled;
@@ -279,22 +279,29 @@ namespace Venus_MainPages.ViewModels
             timer.Stop();
             timer.Stop();
         }
         }
 
 
-        public void OnStart()
+        public async void OnStart()
         {
         {
             if (Keys.Count > 10)
             if (Keys.Count > 10)
             {
             {
                 WPFMessageBox.ShowWarning("最多显示10个数据");
                 WPFMessageBox.ShowWarning("最多显示10个数据");
                 return;
                 return;
             }
             }
-
+            TimeSpan sp = this.DataHistoryView.wfTimeTo.Value.Subtract(this.DataHistoryView.wfTimeFrom.Value);
+            if (sp.TotalHours > 24)
+            {
+                WPFMessageBox.ShowWarning("数据差不能超过24小时");
+                return;
+            }
             this.DataHistoryView.MyDrawGraphicsControl.ClearPlotPoints();
             this.DataHistoryView.MyDrawGraphicsControl.ClearPlotPoints();
 
 
-            Dispatcher dispatcher = Dispatcher.CurrentDispatcher;
-            Task.Run(() =>
+            //Dispatcher dispatcher = Dispatcher.CurrentDispatcher;
+
+            await Task.Run(() =>
             {
             {
-                dispatcher.Invoke(new Action(() => 
+                var result = GetData(Keys.Distinct().ToList(), this.DataHistoryView.wfTimeFrom.Value, this.DataHistoryView.wfTimeTo.Value);
+
+                DataHistoryView.Dispatcher.Invoke(new Action(() =>
                 {
                 {
-                    var result = GetData(Keys.Distinct().ToList(), this.DataHistoryView.wfTimeFrom.Value, this.DataHistoryView.wfTimeTo.Value);
                     if (result == null)
                     if (result == null)
                     {
                     {
                         return;
                         return;
@@ -311,12 +318,6 @@ namespace Venus_MainPages.ViewModels
                         });
                         });
                         cls.Add(points);
                         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);
-                    //}
-                    //ColorChanged();
                     this.DataHistoryView.MyDrawGraphicsControl.PointCollections = cls;
                     this.DataHistoryView.MyDrawGraphicsControl.PointCollections = cls;
                     this.DataHistoryView.MyDrawGraphicsControl.FitControl();
                     this.DataHistoryView.MyDrawGraphicsControl.FitControl();
                     this.DataHistoryView.MyDrawGraphicsControl.YPoints.Clear();
                     this.DataHistoryView.MyDrawGraphicsControl.YPoints.Clear();
@@ -354,7 +355,7 @@ namespace Venus_MainPages.ViewModels
                 }));
                 }));
             });
             });
 
 
-           
+
         }
         }
         private void CloseAll(ObservableCollection<ParameterNode> parameterNodes)
         private void CloseAll(ObservableCollection<ParameterNode> parameterNodes)
         {
         {
@@ -442,12 +443,7 @@ namespace Venus_MainPages.ViewModels
 
 
         private Dictionary<string, List<HistoryDataItem>> GetData(List<string> keys, DateTime from, DateTime to)
         private Dictionary<string, List<HistoryDataItem>> GetData(List<string> keys, DateTime from, DateTime to)
         {
         {
-            TimeSpan sp = to.Subtract(from);
-            if (sp.TotalHours > 24)
-            {
-                WPFMessageBox.ShowWarning("数据差不能超过24小时");
-                return null;
-            }
+            
             string sql = "";
             string sql = "";
             if (from.ToString("yyyyMMdd") == to.ToString("yyyyMMdd"))
             if (from.ToString("yyyyMMdd") == to.ToString("yyyyMMdd"))
             {
             {

+ 3 - 16
Venus/Venus_MainPages/ViewModels/KeplerSequenceViewModel.cs

@@ -1,30 +1,17 @@
-using Aitex.Core.RT.Log;
-using Aitex.Core.UI.View.Common;
-using Caliburn.Micro.Core;
-using MECF.Framework.Common.DataCenter;
-using MECF.Framework.Common.Equipment;
-using Microsoft.VisualBasic;
-using Microsoft.Win32;
+using Caliburn.Micro.Core;
 using Prism.Commands;
 using Prism.Commands;
 using Prism.Mvvm;
 using Prism.Mvvm;
-using Prism.Regions;
-using Prism.Services.Dialogs;
 using RecipeEditorLib.DGExtension.CustomColumn;
 using RecipeEditorLib.DGExtension.CustomColumn;
 using RecipeEditorLib.RecipeModel.Params;
 using RecipeEditorLib.RecipeModel.Params;
 using System;
 using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.Collections.ObjectModel;
-using System.IO;
 using System.Linq;
 using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Controls;
 using System.Windows.Input;
 using System.Windows.Input;
 using System.Windows.Media;
 using System.Windows.Media;
 using System.Xml;
 using System.Xml;
-using Venus_Core;
-using Venus_MainPages.PMs;
 using Venus_MainPages.Sequence;
 using Venus_MainPages.Sequence;
 using Venus_MainPages.Views;
 using Venus_MainPages.Views;
 using WPF.Themes.UserControls;
 using WPF.Themes.UserControls;
@@ -469,7 +456,7 @@ namespace Venus_MainPages.ViewModels
         public void SelectRecipe(object select)
         public void SelectRecipe(object select)
         {
         {
             PathFileParam param = (PathFileParam)select;
             PathFileParam param = (PathFileParam)select;
-            NewRecipeSequenceSelectView dialog = new NewRecipeSequenceSelectView(param.Value)
+            KeplerRecipeSequenceSelectView dialog = new KeplerRecipeSequenceSelectView(param.Value)
             {
             {
                 Owner = Application.Current.MainWindow
                 Owner = Application.Current.MainWindow
             };
             };
@@ -493,7 +480,7 @@ namespace Venus_MainPages.ViewModels
             var Clean = provider.GetRecipesByPath($"{param.PrefixPath}").Where(x => x.Split('\\')[0] == moduleName && x.Split('\\')[1] == "Clean").ToList();//m_uiSequenceManager.GetRecipesByPath($"{param.PrefixPath}");
             var Clean = provider.GetRecipesByPath($"{param.PrefixPath}").Where(x => x.Split('\\')[0] == moduleName && x.Split('\\')[1] == "Clean").ToList();//m_uiSequenceManager.GetRecipesByPath($"{param.PrefixPath}");
             Clean.Add($"{moduleName}\\Clean\\");
             Clean.Add($"{moduleName}\\Clean\\");
             var Process = provider.GetRecipesByPath($"{param.PrefixPath}").Where(x => x.Split('\\')[0] == moduleName && x.Split('\\')[1] == "Process").ToList();
             var Process = provider.GetRecipesByPath($"{param.PrefixPath}").Where(x => x.Split('\\')[0] == moduleName && x.Split('\\')[1] == "Process").ToList();
-            //Process.Add($"{moduleName}\\Process\\");
+            Process.Add($"{moduleName}\\Process\\");
             dataContext.Files.AddRange(new ObservableCollection<FileNode>(RecipeSequenceTreeBuilder.GetFiles("", Clean)));
             dataContext.Files.AddRange(new ObservableCollection<FileNode>(RecipeSequenceTreeBuilder.GetFiles("", Clean)));
             dataContext.Files.AddRange(new ObservableCollection<FileNode>(RecipeSequenceTreeBuilder.GetFiles("", Process)));
             dataContext.Files.AddRange(new ObservableCollection<FileNode>(RecipeSequenceTreeBuilder.GetFiles("", Process)));
             //if (param.Name.Contains("PMA"))
             //if (param.Name.Contains("PMA"))

+ 2 - 2
Venus/Venus_MainPages/Views/DataHistoryView.xaml

@@ -42,8 +42,8 @@
                     </wfi:WindowsFormsHost>
                     </wfi:WindowsFormsHost>
 
 
                     <StackPanel Orientation="Horizontal">
                     <StackPanel Orientation="Horizontal">
-                        <Button Content="Search" Command="{Binding StartCommand}" Width="80" Height="20" HorizontalAlignment="Left" Margin="5,10,0,0" IsEnabled="{Binding ElementName=TimeDataCheckBox,Path=IsChecked,Converter={StaticResource BoolToBool}}"/>
-                        <Button Content="Clear" Command="{Binding  ClearCommand}" Width="80" Height="20" HorizontalAlignment="Left" Margin="5,10,0,0"/>
+                        <Button x:Name="searchButton" Content="Search" Command="{Binding StartCommand}" Width="80" Height="20" HorizontalAlignment="Left" Margin="5,10,0,0" IsEnabled="{Binding ElementName=TimeDataCheckBox,Path=IsChecked,Converter={StaticResource BoolToBool}}"/>
+                        <Button  Content="Clear" Command="{Binding  ClearCommand}" Width="80" Height="20" HorizontalAlignment="Left" Margin="5,10,0,0"/>
                     </StackPanel>
                     </StackPanel>
                 </StackPanel>
                 </StackPanel>
                 <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
                 <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">

+ 152 - 0
Venus/Venus_MainPages/Views/KeplerRecipeSequenceSelectView.xaml

@@ -0,0 +1,152 @@
+<Window x:Class="Venus_MainPages.Views.KeplerRecipeSequenceSelectView"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+        mc:Ignorable="d"
+        WindowStartupLocation="CenterOwner"
+        WindowStyle="SingleBorderWindow" ResizeMode="NoResize" ShowInTaskbar="False"
+        Background="LightSkyBlue" Width="1200" Height="500" Name="recipeSequenceSelect" Loaded="Window_Loaded">
+    <Window.Resources>
+        <HierarchicalDataTemplate x:Key="FileTemplate" ItemsSource="{Binding Files}">
+            <StackPanel>
+                <TextBlock Text="{Binding Name}" />
+            </StackPanel>
+        </HierarchicalDataTemplate>
+    </Window.Resources>
+    <Border BorderBrush="Gray" BorderThickness="0,1,0,0" >
+        <Grid Margin="20,10">
+            <Grid.RowDefinitions>
+                <RowDefinition />
+                <RowDefinition Height="auto"/>
+            </Grid.RowDefinitions>
+            <Grid>
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition/>
+                    <ColumnDefinition/>
+                    <ColumnDefinition/>
+                    <ColumnDefinition/>
+
+                </Grid.ColumnDefinitions>
+                <GroupBox Header="Pre Lot Clean" FontSize="14" Grid.Column="0">
+                    <Grid>
+                        <Grid.RowDefinitions>
+                            <RowDefinition Height="30"/>
+                            <RowDefinition/>
+                        </Grid.RowDefinitions>
+                        <Border BorderBrush="Black" BorderThickness="1 1 1 0" Background="White">
+                            <StackPanel Orientation="Horizontal">
+                                <TextBlock Text="Recipe:" VerticalAlignment="Center" FontSize="14" Padding="5 0 0 0"/>
+                                <TextBlock x:Name="preLotSelectedRecipeTextBlock" Width="Auto" VerticalAlignment="Center" FontSize="14"/>
+                            </StackPanel>
+                        </Border>
+
+                        <Border Grid.Row="1" BorderBrush="Black" BorderThickness="1" Background="White" MouseDown="PreLotBorder_MouseDown">
+                            <TreeView x:Name="PreLotTreeView"  Margin="5" ItemsSource="{Binding Files[0].Files}" ItemTemplate="{StaticResource FileTemplate}"
+                       VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" SelectedItemChanged="PreClean_PART_TREE_SelectedItemChanged"
+                       Height="{Binding Path=ActualHeight,ElementName=PART_BORDER, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}">
+                                <!--Height should add for VirtualizingPanel, otherwise the App will be slow-->
+                                <TreeView.ItemContainerStyle>
+                                    <Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource ResourceKey={x:Type TreeViewItem}}">
+                                        <Setter Property="IsExpanded" Value="True"></Setter>
+                                    </Style>
+                                </TreeView.ItemContainerStyle>
+                            </TreeView>
+                        </Border>
+                    </Grid>
+                </GroupBox>
+                <GroupBox Header="Process" FontSize="14" Grid.Column="1">
+                    <Grid>
+                        <Grid.RowDefinitions>
+                            <RowDefinition Height="30"/>
+                            <RowDefinition/>
+                        </Grid.RowDefinitions>
+                        <Border BorderBrush="Black" BorderThickness="1 1 1 0" Background="White">
+                            <StackPanel Orientation="Horizontal">
+                                <TextBlock Text="Recipe:" VerticalAlignment="Center" FontSize="14" Padding="5 0 0 0"/>
+                                <TextBlock x:Name="processSelectedRecipeTextBlock" Width="Auto" VerticalAlignment="Center"  FontSize="14"/>
+                            </StackPanel>
+                        </Border>
+
+                        <Border Grid.Row="1" BorderBrush="Black" BorderThickness="1" Background="White" MouseDown="ProcessBorder_MouseDown">
+                            <TreeView  x:Name="ProcessTreeView" Margin="5" ItemsSource="{Binding Files[1].Files}" ItemTemplate="{StaticResource FileTemplate}"
+                       VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" SelectedItemChanged="Process_PART_TREE_SelectedItemChanged"
+                       Height="{Binding Path=ActualHeight,ElementName=PART_BORDER, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}">
+                                <!--Height should add for VirtualizingPanel, otherwise the App will be slow-->
+                                <TreeView.ItemContainerStyle>
+                                    <Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource ResourceKey={x:Type TreeViewItem}}">
+                                        <Setter Property="IsExpanded" Value="True"></Setter>
+                                    </Style>
+                                </TreeView.ItemContainerStyle>
+                            </TreeView>
+                        </Border>
+                    </Grid>
+
+                </GroupBox>
+                <GroupBox Header="WTW Clean" FontSize="14" Grid.Column="2" >
+                    <Grid>
+                        <Grid.RowDefinitions>
+                            <RowDefinition Height="30"/>
+                            <RowDefinition/>
+                        </Grid.RowDefinitions>
+                        <Border BorderBrush="Black" BorderThickness="1 1 1 0" Background="White" >
+                            <StackPanel Orientation="Horizontal">
+                                <TextBlock Text="Recipe:" VerticalAlignment="Center" FontSize="14" Padding="5 0 0 0"/>
+                                <TextBlock x:Name="wtwSelectedRecipeTextBlock" Width="Auto" VerticalAlignment="Center"  FontSize="14"/>
+                            </StackPanel>
+                        </Border>
+
+                        <Border  Grid.Row="1" BorderBrush="Black" BorderThickness="1" Background="White" MouseDown="WTWBorder_MouseDown">
+                            <TreeView  x:Name="WTWTreeView" Margin="5" ItemsSource="{Binding Files[0].Files}" ItemTemplate="{StaticResource FileTemplate}"
+                       VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" SelectedItemChanged="WTWClean_PART_TREE_SelectedItemChanged"
+                       Height="{Binding Path=ActualHeight,ElementName=PART_BORDER, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}">
+                                <!--Height should add for VirtualizingPanel, otherwise the App will be slow-->
+                                <TreeView.ItemContainerStyle>
+                                    <Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource ResourceKey={x:Type TreeViewItem}}">
+                                        <Setter Property="IsExpanded" Value="True"></Setter>
+                                    </Style>
+                                </TreeView.ItemContainerStyle>
+                            </TreeView>
+                        </Border>
+                    </Grid>
+
+                </GroupBox>
+
+                <GroupBox Header="Post Lot Clean" FontSize="14" Grid.Column="3">
+                    <Grid>
+                        <Grid.RowDefinitions>
+                            <RowDefinition Height="30"/>
+                            <RowDefinition/>
+                        </Grid.RowDefinitions>
+                        <Border BorderBrush="Black" BorderThickness="1 1 1 0" Background="White">
+                            <StackPanel Orientation="Horizontal">
+                                <TextBlock Text="Recipe:" VerticalAlignment="Center" FontSize="14" Padding="5 0 0 0"/>
+                                <TextBlock x:Name="postLotSelectedRecipeTextBlock" Width="Auto" VerticalAlignment="Center"  FontSize="14"/>
+                            </StackPanel>
+                        </Border>
+
+                        <Border  Grid.Row="1" BorderBrush="Black" BorderThickness="1" Background="White" MouseDown="PostLotBorder_MouseDown">
+                            <TreeView  x:Name="PostLotTreeView" Margin="5" ItemsSource="{Binding Files[0].Files}" ItemTemplate="{StaticResource FileTemplate}"
+                       VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" SelectedItemChanged="PostClean_PART_TREE_SelectedItemChanged"
+                       Height="{Binding Path=ActualHeight,ElementName=PART_BORDER, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}">
+                                <!--Height should add for VirtualizingPanel, otherwise the App will be slow-->
+                                <TreeView.ItemContainerStyle>
+                                    <Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource ResourceKey={x:Type TreeViewItem}}">
+                                        <Setter Property="IsExpanded" Value="True"></Setter>
+                                    </Style>
+                                </TreeView.ItemContainerStyle>
+                            </TreeView>
+                        </Border>
+                    </Grid>
+
+                </GroupBox>
+
+
+            </Grid>
+            <StackPanel Grid.Row="1" Margin="0,10,0,0" Orientation="Horizontal" HorizontalAlignment="Center">
+                <Button Content="OK" Width="90" Height="30" Click="buttonOK_Click" x:Name="buttonOK"/>
+                <Button Content="Cancel" Margin="10,0,0,0" Width="90" Height="30" Click="buttonCancel_Click" x:Name="buttonCancel"/>
+            </StackPanel>
+        </Grid>
+    </Border>
+</Window>

+ 80 - 16
Venus/Venus_MainPages/Views/NewRecipeSequenceSelectView.xaml.cs

@@ -14,7 +14,7 @@ namespace Venus_MainPages.Views
     /// <summary>
     /// <summary>
     /// UserControl1.xaml 的交互逻辑
     /// UserControl1.xaml 的交互逻辑
     /// </summary>
     /// </summary>
-    public partial class NewRecipeSequenceSelectView : Window
+    public partial class KeplerRecipeSequenceSelectView : Window
     {
     {
         private FileNode pre_currentFileNode;
         private FileNode pre_currentFileNode;
         private FileNode process_currentFileNode;
         private FileNode process_currentFileNode;
@@ -26,10 +26,9 @@ namespace Venus_MainPages.Views
         public string FullPath { get; private set; }
         public string FullPath { get; private set; }
 
 
         string value;
         string value;
-        public NewRecipeSequenceSelectView(string path)
+        public KeplerRecipeSequenceSelectView(string path)
         {
         {
             InitializeComponent();
             InitializeComponent();
-            //this.buttonOK.IsEnabled = false;
 
 
             value = path;
             value = path;
         }
         }
@@ -42,15 +41,7 @@ namespace Venus_MainPages.Views
         private void buttonOK_Click(object sender, RoutedEventArgs e)
         private void buttonOK_Click(object sender, RoutedEventArgs e)
         {
         {
             this.DialogResult = true;
             this.DialogResult = true;
-            //if (this.currentFileNode != null)
-            //{
-            //    if (this.currentFileNode.IsFile)
-            //    {
-            //        this.FullPath = this.currentFileNode.FullPath.Trim();
-            //    }
-            //}
-            //StringBuilder recipeInfo = new StringBuilder(); ;
-            if (pre_currentFileNode != null)
+            if (pre_currentFileNode != null && pre_currentFileNode.Parent.Name=="Clean")
             {
             {
                 recipeDictionary.Add("PreLotClean", pre_currentFileNode.Name);
                 recipeDictionary.Add("PreLotClean", pre_currentFileNode.Name);
             }
             }
@@ -58,7 +49,7 @@ namespace Venus_MainPages.Views
             {
             {
                 recipeDictionary.Add("PreLotClean", "");
                 recipeDictionary.Add("PreLotClean", "");
             }
             }
-            if (process_currentFileNode != null)
+            if (process_currentFileNode != null && process_currentFileNode.Parent.Name=="Process")
             {
             {
                 recipeDictionary.Add("Process", process_currentFileNode.Name);
                 recipeDictionary.Add("Process", process_currentFileNode.Name);
             }
             }
@@ -66,7 +57,7 @@ namespace Venus_MainPages.Views
             {
             {
                 recipeDictionary.Add("Process", "");
                 recipeDictionary.Add("Process", "");
             }
             }
-            if (wtw_currentFileNode != null)
+            if (wtw_currentFileNode != null && wtw_currentFileNode.Parent.Name=="Clean")
             {
             {
                 recipeDictionary.Add("WTWClean", wtw_currentFileNode.Name);
                 recipeDictionary.Add("WTWClean", wtw_currentFileNode.Name);
             }
             }
@@ -74,7 +65,7 @@ namespace Venus_MainPages.Views
             {
             {
                 recipeDictionary.Add("WTWClean", "");
                 recipeDictionary.Add("WTWClean", "");
             }
             }
-            if (post_currentFileNode != null)
+            if (post_currentFileNode != null && post_currentFileNode.Parent.Name == "Clean")
             {
             {
                 recipeDictionary.Add("PostLotClean", post_currentFileNode.Name);
                 recipeDictionary.Add("PostLotClean", post_currentFileNode.Name);
             }
             }
@@ -88,18 +79,53 @@ namespace Venus_MainPages.Views
         private void PreClean_PART_TREE_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
         private void PreClean_PART_TREE_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
         {
         {
             pre_currentFileNode = (FileNode)(sender as TreeView).SelectedItem;
             pre_currentFileNode = (FileNode)(sender as TreeView).SelectedItem;
+
+            if (pre_currentFileNode.Parent.Name == "Clean")
+            {
+                preLotSelectedRecipeTextBlock.Text = pre_currentFileNode.Name;
+            }
+            else
+            {
+                preLotSelectedRecipeTextBlock.Text = "";
+            }
+
         }
         }
         private void Process_PART_TREE_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
         private void Process_PART_TREE_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
         {
         {
             process_currentFileNode = (FileNode)(sender as TreeView).SelectedItem;
             process_currentFileNode = (FileNode)(sender as TreeView).SelectedItem;
+            if (process_currentFileNode.Parent.Name == "Process")
+            {
+                processSelectedRecipeTextBlock.Text = process_currentFileNode.Name;
+            }
+            else
+            {
+                processSelectedRecipeTextBlock.Text = "";
+            }
         }
         }
         private void WTWClean_PART_TREE_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
         private void WTWClean_PART_TREE_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
         {
         {
             wtw_currentFileNode = (FileNode)(sender as TreeView).SelectedItem;
             wtw_currentFileNode = (FileNode)(sender as TreeView).SelectedItem;
+
+            if (wtw_currentFileNode.Parent.Name == "Clean")
+            {
+                wtwSelectedRecipeTextBlock.Text = wtw_currentFileNode.Name;
+            }
+            else
+            {
+                wtwSelectedRecipeTextBlock.Text = "";
+            }
         }
         }
         private void PostClean_PART_TREE_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
         private void PostClean_PART_TREE_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
         {
         {
             post_currentFileNode = (FileNode)(sender as TreeView).SelectedItem;
             post_currentFileNode = (FileNode)(sender as TreeView).SelectedItem;
+            if (post_currentFileNode.Parent.Name == "Clean")
+            {
+                postLotSelectedRecipeTextBlock.Text = post_currentFileNode.Name;
+            }
+            else
+            {
+                postLotSelectedRecipeTextBlock.Text = "";
+            }
         }
         }
 
 
         private void Window_Loaded(object sender, RoutedEventArgs e)
         private void Window_Loaded(object sender, RoutedEventArgs e)
@@ -109,6 +135,7 @@ namespace Venus_MainPages.Views
 
 
             if (dictionary.Keys.Contains("PreLotClean"))
             if (dictionary.Keys.Contains("PreLotClean"))
             {
             {
+                preLotSelectedRecipeTextBlock.Text = dictionary["PreLotClean"];
                 foreach (var item in PreLotTreeView.Items)
                 foreach (var item in PreLotTreeView.Items)
                 {
                 {
                     var tvi = (TreeViewItem)PreLotTreeView.ItemContainerGenerator.ContainerFromItem(item);
                     var tvi = (TreeViewItem)PreLotTreeView.ItemContainerGenerator.ContainerFromItem(item);
@@ -118,6 +145,8 @@ namespace Venus_MainPages.Views
 
 
             if (dictionary.Keys.Contains("Process"))
             if (dictionary.Keys.Contains("Process"))
             {
             {
+                processSelectedRecipeTextBlock.Text = dictionary["Process"];
+
                 foreach (var item in ProcessTreeView.Items)
                 foreach (var item in ProcessTreeView.Items)
                 {
                 {
                     var tvi = (TreeViewItem)ProcessTreeView.ItemContainerGenerator.ContainerFromItem(item);
                     var tvi = (TreeViewItem)ProcessTreeView.ItemContainerGenerator.ContainerFromItem(item);
@@ -127,6 +156,8 @@ namespace Venus_MainPages.Views
 
 
             if (dictionary.Keys.Contains("WTWClean"))
             if (dictionary.Keys.Contains("WTWClean"))
             {
             {
+                wtwSelectedRecipeTextBlock.Text = dictionary["WTWClean"];
+
                 foreach (var item in WTWTreeView.Items)
                 foreach (var item in WTWTreeView.Items)
                 {
                 {
                     var tvi = (TreeViewItem)WTWTreeView.ItemContainerGenerator.ContainerFromItem(item);
                     var tvi = (TreeViewItem)WTWTreeView.ItemContainerGenerator.ContainerFromItem(item);
@@ -136,6 +167,7 @@ namespace Venus_MainPages.Views
 
 
             if (dictionary.Keys.Contains("PostLotClean"))
             if (dictionary.Keys.Contains("PostLotClean"))
             {
             {
+                postLotSelectedRecipeTextBlock.Text= dictionary["PostLotClean"];
                 foreach (var item in PostLotTreeView.Items)
                 foreach (var item in PostLotTreeView.Items)
                 {
                 {
                     var tvi = (TreeViewItem)PostLotTreeView.ItemContainerGenerator.ContainerFromItem(item);
                     var tvi = (TreeViewItem)PostLotTreeView.ItemContainerGenerator.ContainerFromItem(item);
@@ -164,8 +196,40 @@ namespace Venus_MainPages.Views
                     }
                     }
                 }
                 }
             }
             }
-            else
+        }
+
+        
+
+        private void PreLotBorder_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
+        {
+            foreach (var item in PreLotTreeView.Items)
+            {
+                var tvi = (TreeViewItem)PreLotTreeView.ItemContainerGenerator.ContainerFromItem(item);
+                SetSelect(tvi, "");
+            }
+        }
+        private void ProcessBorder_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
+        {
+            foreach (var item in ProcessTreeView.Items)
+            {
+                var tvi = (TreeViewItem)ProcessTreeView.ItemContainerGenerator.ContainerFromItem(item);
+                SetSelect(tvi, "");
+            }
+        }
+        private void WTWBorder_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
+        {
+            foreach (var item in WTWTreeView.Items)
+            {
+                var tvi = (TreeViewItem)WTWTreeView.ItemContainerGenerator.ContainerFromItem(item);
+                SetSelect(tvi, "");
+            }
+        }
+        private void PostLotBorder_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
+        {
+            foreach (var item in PostLotTreeView.Items)
             {
             {
+                var tvi = (TreeViewItem)PostLotTreeView.ItemContainerGenerator.ContainerFromItem(item);
+                SetSelect(tvi, "");
             }
             }
         }
         }
     }
     }

+ 2 - 2
Venus/Venus_MainPages/Views/KeplerSequenceView.xaml

@@ -115,10 +115,10 @@
                                             <ColumnDefinition/>
                                             <ColumnDefinition/>
                                             <ColumnDefinition/>
                                             <ColumnDefinition/>
                                         </Grid.ColumnDefinitions>
                                         </Grid.ColumnDefinitions>
-                                        <Border  BorderThickness="1 .5 0 .5" BorderBrush="Black"  Width="50" Height="25">
+                                        <Border  BorderThickness="1 .5 0 .5" BorderBrush="gray"  Width="50" Height="25">
                                             <TextBlock Text="{Binding Key,Converter={StaticResource SequenceKeyConverter}}"  FontSize="13" VerticalAlignment="Center" Padding="1 0 0 0"/>
                                             <TextBlock Text="{Binding Key,Converter={StaticResource SequenceKeyConverter}}"  FontSize="13" VerticalAlignment="Center" Padding="1 0 0 0"/>
                                         </Border>
                                         </Border>
-                                        <Border Grid.Column="1" BorderThickness="1 .5 1 .5" BorderBrush="Black"  Width="185" Height="25">
+                                        <Border Grid.Column="1" BorderThickness="1 .5 1 .5" BorderBrush="Gray"  Width="185" Height="25">
                                             <TextBlock Text="{Binding Value}" VerticalAlignment="Center"  FontSize="13" Padding="1 0 0 0"/>
                                             <TextBlock Text="{Binding Value}" VerticalAlignment="Center"  FontSize="13" Padding="1 0 0 0"/>
                                         </Border>
                                         </Border>
                                     </Grid>
                                     </Grid>

+ 1 - 1
Venus/Venus_MainPages/Views/NewWaferAssociationUnit.xaml

@@ -1,4 +1,4 @@
-<UserControl x:Class="Venus_MainPages.Views.NewWaferAssociationUnit"
+<UserControl x:Class="Venus_MainPages.Views.KeplerWaferAssociationUnit"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 

+ 8 - 8
Venus/Venus_MainPages/Views/NewWaferAssociationUnit.xaml.cs

@@ -16,9 +16,9 @@ namespace Venus_MainPages.Views
     /// <summary>
     /// <summary>
     /// WaferAssociationUnit.xaml 的交互逻辑
     /// WaferAssociationUnit.xaml 的交互逻辑
     /// </summary>
     /// </summary>
-    public partial class NewWaferAssociationUnit : UserControl
+    public partial class KeplerWaferAssociationUnit : UserControl
     {
     {
-        public NewWaferAssociationUnit()
+        public KeplerWaferAssociationUnit()
         {
         {
             InitializeComponent();
             InitializeComponent();
         }
         }
@@ -27,14 +27,14 @@ namespace Venus_MainPages.Views
             get { return (WaferAssociationInfo)GetValue(WAInfoProperty); }
             get { return (WaferAssociationInfo)GetValue(WAInfoProperty); }
             set { SetValue(WAInfoProperty, value); }
             set { SetValue(WAInfoProperty, value); }
         }
         }
-        public static readonly DependencyProperty WAInfoProperty = DependencyProperty.Register("WAInfo", typeof(WaferAssociationInfo), typeof(NewWaferAssociationUnit));
+        public static readonly DependencyProperty WAInfoProperty = DependencyProperty.Register("WAInfo", typeof(WaferAssociationInfo), typeof(KeplerWaferAssociationUnit));
 
 
         public string SequenceName
         public string SequenceName
         {
         {
             get { return (string)GetValue(SequenceNameProperty); }
             get { return (string)GetValue(SequenceNameProperty); }
             set { SetValue(SequenceNameProperty, value); }
             set { SetValue(SequenceNameProperty, value); }
         }
         }
-        public static readonly DependencyProperty SequenceNameProperty = DependencyProperty.Register("SequenceName", typeof(string), typeof(NewWaferAssociationUnit));
+        public static readonly DependencyProperty SequenceNameProperty = DependencyProperty.Register("SequenceName", typeof(string), typeof(KeplerWaferAssociationUnit));
 
 
 
 
         public string CarrierId
         public string CarrierId
@@ -42,13 +42,13 @@ namespace Venus_MainPages.Views
             get { return (string)GetValue(CarrierIdProperty); }
             get { return (string)GetValue(CarrierIdProperty); }
             set { SetValue(CarrierIdProperty, value); }
             set { SetValue(CarrierIdProperty, value); }
         }
         }
-        public static readonly DependencyProperty CarrierIdProperty = DependencyProperty.Register("CarrierId", typeof(string), typeof(NewWaferAssociationUnit));
+        public static readonly DependencyProperty CarrierIdProperty = DependencyProperty.Register("CarrierId", typeof(string), typeof(KeplerWaferAssociationUnit));
         public int SelectedIndex
         public int SelectedIndex
         {
         {
             get { return (int)GetValue(SelectedIndexProperty); }
             get { return (int)GetValue(SelectedIndexProperty); }
             set { SetValue(SelectedIndexProperty, value); }
             set { SetValue(SelectedIndexProperty, value); }
         }
         }
-        public static readonly DependencyProperty SelectedIndexProperty = DependencyProperty.Register("SelectedIndex", typeof(int), typeof(NewWaferAssociationUnit),new PropertyMetadata(1));
+        public static readonly DependencyProperty SelectedIndexProperty = DependencyProperty.Register("SelectedIndex", typeof(int), typeof(KeplerWaferAssociationUnit),new PropertyMetadata(1));
 
 
 
 
         public string CycleInfo
         public string CycleInfo
@@ -56,7 +56,7 @@ namespace Venus_MainPages.Views
             get { return (string)GetValue(CycleInfoProperty); }
             get { return (string)GetValue(CycleInfoProperty); }
             set { SetValue(CycleInfoProperty, value); }
             set { SetValue(CycleInfoProperty, value); }
         }
         }
-        public static readonly DependencyProperty CycleInfoProperty = DependencyProperty.Register("CycleInfo", typeof(string), typeof(NewWaferAssociationUnit));
+        public static readonly DependencyProperty CycleInfoProperty = DependencyProperty.Register("CycleInfo", typeof(string), typeof(KeplerWaferAssociationUnit));
 
 
 
 
 
 
@@ -65,7 +65,7 @@ namespace Venus_MainPages.Views
             get { return (bool)GetValue(ButtonIsEnableProperty); }
             get { return (bool)GetValue(ButtonIsEnableProperty); }
             set { SetValue(ButtonIsEnableProperty, value); }
             set { SetValue(ButtonIsEnableProperty, value); }
         }
         }
-        public static readonly DependencyProperty ButtonIsEnableProperty = DependencyProperty.Register("ButtonIsEnable", typeof(bool), typeof(NewWaferAssociationUnit), new PropertyMetadata(true));
+        public static readonly DependencyProperty ButtonIsEnableProperty = DependencyProperty.Register("ButtonIsEnable", typeof(bool), typeof(KeplerWaferAssociationUnit), new PropertyMetadata(true));
 
 
         private void cb_DropDownOpened(object sender, EventArgs e)
         private void cb_DropDownOpened(object sender, EventArgs e)
         {
         {

+ 9 - 6
Venus/Venus_MainPages/Views/LoginView.xaml

@@ -32,7 +32,7 @@
                     <TextBlock Grid.Row="1" Text="Login"                                       FontSize="42" FontFamily="D-DIN" Foreground="#222222" FontWeight="Bold"/>
                     <TextBlock Grid.Row="1" Text="Login"                                       FontSize="42" FontFamily="D-DIN" Foreground="#222222" FontWeight="Bold"/>
                     <TextBlock Grid.Row="2" Text="Welcome back! Please login to your account." FontSize="16" FontFamily="D-DIN" Foreground="#999999"/>
                     <TextBlock Grid.Row="2" Text="Welcome back! Please login to your account." FontSize="16" FontFamily="D-DIN" Foreground="#999999"/>
                     <TextBlock Grid.Row="3" Text="UserName"                                    FontSize="16" FontFamily="D-DIN" Foreground="#666666"/>
                     <TextBlock Grid.Row="3" Text="UserName"                                    FontSize="16" FontFamily="D-DIN" Foreground="#666666"/>
-                    <TextBox  x:Name="UserTextBox" Grid.Row="4" Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Center"  FontSize="16" VerticalContentAlignment="Center" Padding="20 0 0 0" Foreground="Gray" Text="admin" KeyDown="UserTextBox_KeyDown">
+                    <TextBox  x:Name="UserTextBox" Grid.Row="4" Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Center"  FontSize="16" VerticalContentAlignment="Center" Padding="20 0 0 0" Foreground="Gray"  KeyDown="UserTextBox_KeyDown" LostFocus="UserTextBox_LostFocus">
                         <TextBox.Resources>
                         <TextBox.Resources>
                             <VisualBrush x:Key="WaterText" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Center" AlignmentY="Center">
                             <VisualBrush x:Key="WaterText" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Center" AlignmentY="Center">
                                 <VisualBrush.Visual>
                                 <VisualBrush.Visual>
@@ -60,7 +60,7 @@
                         </TextBox.Style>
                         </TextBox.Style>
                     </TextBox>
                     </TextBox>
                     <TextBlock Grid.Row="5" Text="Password"                                    FontSize="16" FontFamily="D-DIN" Foreground="#666666"/>
                     <TextBlock Grid.Row="5" Text="Password"                                    FontSize="16" FontFamily="D-DIN" Foreground="#666666"/>
-                    <customControls:CustomPasswordBox  x:Name="PassWordTextBox" Grid.Row="6" Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Center"  FontSize="16" VerticalContentAlignment="Center" Padding="20 5 0 0" Foreground="Gray" KeyDown="PassWordTextBox_KeyDown">
+                    <customControls:CustomPasswordBox  x:Name="PassWordTextBox"  Grid.Row="6" Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Center"  FontSize="16" VerticalContentAlignment="Center" Padding="20 5 0 0" Foreground="Gray" KeyDown="PassWordTextBox_KeyDown">
                         <customControls:CustomPasswordBox.Resources>
                         <customControls:CustomPasswordBox.Resources>
                             <VisualBrush x:Key="WaterText" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Center" AlignmentY="Center">
                             <VisualBrush x:Key="WaterText" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Center" AlignmentY="Center">
                                 <VisualBrush.Visual>
                                 <VisualBrush.Visual>
@@ -87,18 +87,21 @@
                         </customControls:CustomPasswordBox.Style>
                         </customControls:CustomPasswordBox.Style>
                     </customControls:CustomPasswordBox>
                     </customControls:CustomPasswordBox>
                     <TextBlock Grid.Row="7" Text="Role"                                    FontSize="16" FontFamily="D-DIN" Foreground="#666666"/>
                     <TextBlock Grid.Row="7" Text="Role"                                    FontSize="16" FontFamily="D-DIN" Foreground="#666666"/>
-                    <customControls:CustomComBobox x:Name="MangerComboBox" Grid.Row="8" Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Top"  CustomCornerRadius="4" Margin="0 -30 0 0" SelectedIndex="0" FontSize="16" BorderBrush="Silver" BorderThickness="1">
+                    <!--<customControls:CustomComBobox x:Name="MangerComboBox" Grid.Row="8" Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Top"  CustomCornerRadius="4" Margin="0 -30 0 0" SelectedIndex="0" FontSize="16" BorderBrush="Silver" BorderThickness="1">
                         <ComboBoxItem>Manager</ComboBoxItem>
                         <ComboBoxItem>Manager</ComboBoxItem>
                         <ComboBoxItem>Engineer</ComboBoxItem>
                         <ComboBoxItem>Engineer</ComboBoxItem>
                         <ComboBoxItem>Technician</ComboBoxItem>
                         <ComboBoxItem>Technician</ComboBoxItem>
                         <ComboBoxItem>Operator</ComboBoxItem>
                         <ComboBoxItem>Operator</ComboBoxItem>
-                    </customControls:CustomComBobox>
-                    <customControls:PathButton Grid.Row="9" Width="400" Height="40" x:Name="logButton"         Command="{Binding LoginCommand}"   HorizontalAlignment="Left"    VerticalAlignment="Top"   Click="Login_Click" />
+                    </customControls:CustomComBobox>-->
+                    <Border Grid.Row="8" Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Top"  CornerRadius="8" Margin="0 -30 0 0"   BorderBrush="Silver" BorderThickness="1" Background="White">
+                        <TextBlock FontSize="16" x:Name="roleTextBlock" Text="UnKnow" VerticalAlignment="Center" Padding="20 0 0 0" Foreground="Gray"/>
+                    </Border>
+                    <customControls:PathButton x:Name="loginButton" Grid.Row="9" Width="400" Height="40" Content="Login"        Command="{Binding LoginCommand}"   HorizontalAlignment="Left"    VerticalAlignment="Top"   Click="Login_Click" />
 
 
                 </Grid>
                 </Grid>
             </Border>
             </Border>
 
 
-            <userControl:PathButton Width="15" Height="15" Cursor="Hand"
+            <userControl:PathButton x:Name="closeButton" Width="15" Height="15" Cursor="Hand"
                                 PathData="{StaticResource Icon_Close}" 
                                 PathData="{StaticResource Icon_Close}" 
                                 Margin="1880 -1000 0 0" 
                                 Margin="1880 -1000 0 0" 
                                 DefaultFillBrush="DimGray"
                                 DefaultFillBrush="DimGray"

+ 33 - 56
Venus/Venus_MainPages/Views/LoginView.xaml.cs

@@ -3,6 +3,7 @@ using System;
 using System.Drawing;
 using System.Drawing;
 using System.IO;
 using System.IO;
 using System.Linq;
 using System.Linq;
+using System.Threading.Tasks;
 using System.Windows;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Controls;
 using System.Windows.Input;
 using System.Windows.Input;
@@ -23,27 +24,11 @@ namespace Venus_MainPages.Views
 
 
         public bool IsLoginSuccess { get; set; }
         public bool IsLoginSuccess { get; set; }
         public User CurrentUser { get; set; }
         public User CurrentUser { get; set; }
-        private bool _isLogin;
-        public LoginView(bool isLogin = true)
+        //private bool _isLogin;
+        public LoginView()
         {
         {
             InitializeComponent();
             InitializeComponent();
-            _isLogin = isLogin;
-            if (isLogin)
-            {
-                logButton.Content = "Login";
-            }
-            else
-            {
-                logButton.Content = "Logout";
-                //MangerComboBox.IsEnabled = false;
-            }
-
-            //var converter = new ImageSourceConverter();
-            //image1.Source= GetImage("Pack://application:,,,/Venus_Themes;Component/Resources/Login.png");
-            //image1.Source= GetImage("Config/Login.png");
-            //image1.Source = NewBitmapImage("Config/Login.png");
-
-
+            UserTextBox.Focus();
         }
         }
 
 
         private void Close_Click(object sender, RoutedEventArgs e)
         private void Close_Click(object sender, RoutedEventArgs e)
@@ -60,15 +45,7 @@ namespace Venus_MainPages.Views
         {
         {
             if (e.Key == Key.Return)
             if (e.Key == Key.Return)
             {
             {
-                if (_isLogin)
-                {
-                    Login();
-
-                }
-                else
-                {
-                    Logout();
-                }
+                Login();
             }
             }
         }
         }
         private void UserTextBox_KeyDown(object sender, KeyEventArgs e)
         private void UserTextBox_KeyDown(object sender, KeyEventArgs e)
@@ -80,6 +57,7 @@ namespace Venus_MainPages.Views
         }
         }
         private void Login()
         private void Login()
         {
         {
+
             var items = QueryDataClient.Instance.Service.QueryAllUsers();
             var items = QueryDataClient.Instance.Service.QueryAllUsers();
             var item = items.Where(x => x.Name == UserTextBox.Text).FirstOrDefault();
             var item = items.Where(x => x.Name == UserTextBox.Text).FirstOrDefault();
             if (item != null)
             if (item != null)
@@ -98,39 +76,12 @@ namespace Venus_MainPages.Views
                 return;
                 return;
             }
             }
             IsLoginSuccess = true;
             IsLoginSuccess = true;
-            //if (UserTextBox.Text != "admin")
-            //{
-            //    IsLoginSuccess = false;
-            //    WPFMessageBox.ShowError("用户名错误");
-            //    return;
-            //}
-            //if (PassWordTextBox.Password != "admin")
-            //{
-            //    IsLoginSuccess = false;
-            //    WPFMessageBox.ShowError("密码错误");
-            //    return;
-            //}
             CurrentUser = new User(UserTextBox.Text, PassWordTextBox.Password, (Role)Enum.Parse(typeof(Role), item.Role.ToString(), true));
             CurrentUser = new User(UserTextBox.Text, PassWordTextBox.Password, (Role)Enum.Parse(typeof(Role), item.Role.ToString(), true));
+            roleTextBlock.Text = CurrentUser.Role.ToString();
             GlobalUser.Instance.User = CurrentUser;
             GlobalUser.Instance.User = CurrentUser;
             this.Close();
             this.Close();
 
 
         }
         }
-        private void Logout()
-        {
-            if (UserTextBox.Text != "admin")
-            {
-                IsLoginSuccess = false;
-                WPFMessageBox.ShowError("用户名错误");
-                return;
-            }
-            if (PassWordTextBox.Password != "admin")
-            {
-                IsLoginSuccess = false;
-                WPFMessageBox.ShowError("密码错误");
-                return;
-            }
-            Environment.Exit(0); // 0 表示正常退出
-        }
 
 
         private void Window_Closed(object sender, EventArgs e)
         private void Window_Closed(object sender, EventArgs e)
         {
         {
@@ -141,6 +92,32 @@ namespace Venus_MainPages.Views
             GC.WaitForPendingFinalizers(); // Doesn't help either
             GC.WaitForPendingFinalizers(); // Doesn't help either
             this.grid1.Children.Remove(image1);
             this.grid1.Children.Remove(image1);
             image1 = null;
             image1 = null;
+
+            this.Closed -= Window_Closed;
+            this.loginButton.Click -= Login_Click;
+            this.closeButton.Click -= Close_Click;
+            this.UserTextBox.LostFocus -= UserTextBox_LostFocus;
+        }
+
+
+        private async void UserTextBox_LostFocus(object sender, RoutedEventArgs e)
+        {
+            await Task.Run(() =>
+              {
+                  var items = QueryDataClient.Instance.Service.QueryAllUsers();
+                  this.Dispatcher.Invoke(() =>
+                  {
+                      var item = items.Where(x => x.Name == UserTextBox.Text).FirstOrDefault();
+                      if (item != null)
+                      {
+                          roleTextBlock.Text = item.Role.ToString();
+                      }
+                      else
+                      {
+                          roleTextBlock.Text = "";
+                      }
+                  });
+              });
         }
         }
     }
     }
 }
 }

+ 18 - 65
Venus/Venus_MainPages/Views/LogoutView.xaml

@@ -10,7 +10,7 @@
              xmlns:userControl="clr-namespace:Venus_Themes.UserControls;assembly=Venus_Themes"
              xmlns:userControl="clr-namespace:Venus_Themes.UserControls;assembly=Venus_Themes"
              xmlns:customControls="clr-namespace:Venus_Themes.CustomControls;assembly=Venus_Themes"
              xmlns:customControls="clr-namespace:Venus_Themes.CustomControls;assembly=Venus_Themes"
              WindowStartupLocation="CenterScreen"           
              WindowStartupLocation="CenterScreen"           
-             Width="500" Height="550">
+             Width="500" Height="550" Closed="Window_Closed">
 
 
     <Grid x:Name="grid1">
     <Grid x:Name="grid1">
         <Border Width="500" Height="550" Background="#FFFFFF"  HorizontalAlignment="Left" VerticalAlignment="Top" BorderThickness="1" BorderBrush="Silver" CornerRadius="15,15,15,15">
         <Border Width="500" Height="550" Background="#FFFFFF"  HorizontalAlignment="Left" VerticalAlignment="Top" BorderThickness="1" BorderBrush="Silver" CornerRadius="15,15,15,15">
@@ -18,10 +18,10 @@
                 <Grid.RowDefinitions>
                 <Grid.RowDefinitions>
                     <RowDefinition/>
                     <RowDefinition/>
                     <RowDefinition/>
                     <RowDefinition/>
-                    <RowDefinition Height="30"/>
-                    <RowDefinition Height="20"/>
+                    <RowDefinition />
+                    <RowDefinition />
+                    <RowDefinition/>
                     <RowDefinition/>
                     <RowDefinition/>
-                    <RowDefinition Height="20"/>
                     <RowDefinition/>
                     <RowDefinition/>
                     <RowDefinition />
                     <RowDefinition />
                     <RowDefinition/>
                     <RowDefinition/>
@@ -30,74 +30,27 @@
                 <Image Source="Pack://application:,,,/Venus_Themes;Component/Resources/JetLogo.png" HorizontalAlignment="Left" Width="154" Height="14"></Image>
                 <Image Source="Pack://application:,,,/Venus_Themes;Component/Resources/JetLogo.png" HorizontalAlignment="Left" Width="154" Height="14"></Image>
                 <TextBlock Grid.Row="1" Text="Logout"                                       FontSize="42" FontFamily="D-DIN" Foreground="#222222" FontWeight="Bold"/>
                 <TextBlock Grid.Row="1" Text="Logout"                                       FontSize="42" FontFamily="D-DIN" Foreground="#222222" FontWeight="Bold"/>
                 <TextBlock Grid.Row="2" Text="Please logout to your account." FontSize="16" FontFamily="D-DIN" Foreground="#999999"/>
                 <TextBlock Grid.Row="2" Text="Please logout to your account." FontSize="16" FontFamily="D-DIN" Foreground="#999999"/>
-                <TextBlock Grid.Row="3" Text="UserName"                                    FontSize="16" FontFamily="D-DIN" Foreground="#666666"/>
-                <TextBox   Grid.Row="4" x:Name="UserTextBox"  Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Center"  FontSize="16" VerticalContentAlignment="Center" Padding="20 0 0 0" Foreground="Gray" Text="admin" KeyDown="UserTextBox_KeyDown">
-                    <TextBox.Resources>
-                        <VisualBrush x:Key="WaterText" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Center" AlignmentY="Center">
-                            <VisualBrush.Visual>
-                                <TextBlock  Text="please enter your name"/>
-                            </VisualBrush.Visual>
-                        </VisualBrush>
-                        <Style TargetType="{x:Type Border}">
-                            <Setter Property="CornerRadius" Value="8"/>
-                            <Setter Property="BorderBrush" Value="#c1d0dc"/>
-                        </Style>
-
-                    </TextBox.Resources>
-                    <TextBox.Style>
+                <TextBlock Grid.Row="3" Text="UserName"                                    FontSize="16"  Foreground="#666666" Padding="10 0 0 0"/>
+                <Border Grid.Row="4" Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Top"  CornerRadius="8" Margin="0 -30 0 0"   BorderBrush="Silver" BorderThickness="1" Background="White">
+                    <TextBlock FontSize="16" x:Name="userTextBlock" VerticalAlignment="Center" Padding="20 0 0 0" Foreground="Gray"/>
+                </Border>
+                
+                <TextBlock Grid.Row="5" Text="Password"    FontSize="16"  Foreground="#666666" Padding="10 0 0 0"/>
+                <Border Grid.Row="6" Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Top"  CornerRadius="8" Margin="0 -30 0 0"   BorderBrush="Silver" BorderThickness="1" Background="White">
+                    <TextBlock FontSize="16" x:Name="passwordTextBlock" VerticalAlignment="Center" Padding="20 5 0 0" Foreground="Gray"/>
+                </Border>
 
 
-                        <Style TargetType="TextBox">
-                            <Style.Triggers>
-                                <Trigger Property="Text" Value="{x:Null}">
-                                    <Setter Property="Background" Value="{StaticResource WaterText}"/>
-                                </Trigger>
-                                <Trigger Property="Text" Value="">
-                                    <Setter Property="Background" Value="{StaticResource WaterText}"/>
-                                </Trigger>
-                            </Style.Triggers>
-                        </Style>
-                    </TextBox.Style>
-                </TextBox>
-                <TextBlock Grid.Row="5" Text="Password"                                    FontSize="16" FontFamily="D-DIN" Foreground="#666666"/>
-                <customControls:CustomPasswordBox  x:Name="PassWordTextBox" Grid.Row="6" Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Center"  FontSize="16" VerticalContentAlignment="Center" Padding="20 5 0 0" Text="admin" Foreground="Gray" KeyDown="PassWordTextBox_KeyDown">
-                    <customControls:CustomPasswordBox.Resources>
-                        <VisualBrush x:Key="WaterText" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Center" AlignmentY="Center">
-                            <VisualBrush.Visual>
-                                <TextBlock  Text="please enter your password"/>
-                            </VisualBrush.Visual>
-                        </VisualBrush>
-                        <Style TargetType="{x:Type Border}">
-                            <Setter Property="CornerRadius" Value="8"/>
-                            <Setter Property="BorderBrush" Value="#c1d0dc"/>
-                        </Style>
-                    </customControls:CustomPasswordBox.Resources>
-                    <customControls:CustomPasswordBox.Style>
+                <TextBlock Grid.Row="7" Text="Role"   FontSize="16"  Foreground="#666666" Padding="10 0 0 0"/>
 
 
-                        <Style TargetType="TextBox">
-                            <Style.Triggers>
-                                <Trigger Property="Text" Value="{x:Null}">
-                                    <Setter Property="Background" Value="{StaticResource WaterText}"/>
-                                </Trigger>
-                                <Trigger Property="Text" Value="">
-                                    <Setter Property="Background" Value="{StaticResource WaterText}"/>
-                                </Trigger>
-                            </Style.Triggers>
-                        </Style>
-                    </customControls:CustomPasswordBox.Style>
-                </customControls:CustomPasswordBox>
-                <TextBlock Grid.Row="7" Text="Role"                                    FontSize="16" FontFamily="D-DIN" Foreground="#666666"/>
-                <customControls:CustomComBobox x:Name="MangerComboBox" Grid.Row="8" Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Top"  CustomCornerRadius="4" Margin="0 -30 0 0" SelectedIndex="0" FontSize="16" BorderBrush="Silver" BorderThickness="1">
-                    <ComboBoxItem>Manager</ComboBoxItem>
-                    <ComboBoxItem>Engineer</ComboBoxItem>
-                    <ComboBoxItem>Technician</ComboBoxItem>
-                    <ComboBoxItem>Operator</ComboBoxItem>
-                </customControls:CustomComBobox>
+                <Border Grid.Row="8" Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Top"  CornerRadius="8" Margin="0 -30 0 0"   BorderBrush="Silver" BorderThickness="1" Background="White">
+                    <TextBlock FontSize="16" x:Name="roleTextBlock" VerticalAlignment="Center" Padding="20 0 0 0" Foreground="Gray"/>
+                </Border>
                 <Button Grid.Row="9" Width="400" Height="40" x:Name="logButton"  Content="Logout"        HorizontalAlignment="Left"    VerticalAlignment="Top"   Click="Login_Click" FontSize="18" Margin="0 -10 0 0"/>
                 <Button Grid.Row="9" Width="400" Height="40" x:Name="logButton"  Content="Logout"        HorizontalAlignment="Left"    VerticalAlignment="Top"   Click="Login_Click" FontSize="18" Margin="0 -10 0 0"/>
 
 
             </Grid>
             </Grid>
         </Border>
         </Border>
 
 
-        <userControl:PathButton Width="15" Height="15" Cursor="Hand"
+        <userControl:PathButton x:Name="closeButton" Width="15" Height="15" Cursor="Hand"
                                 PathData="{StaticResource Icon_Close}" 
                                 PathData="{StaticResource Icon_Close}" 
                                 Margin="450 -500 0 0" 
                                 Margin="450 -500 0 0" 
                                 DefaultFillBrush="DimGray"                               
                                 DefaultFillBrush="DimGray"                               

+ 25 - 26
Venus/Venus_MainPages/Views/LogoutView.xaml.cs

@@ -7,6 +7,7 @@ using System.Windows.Input;
 using System.Windows.Media;
 using System.Windows.Media;
 using System.Windows.Media.Imaging;
 using System.Windows.Media.Imaging;
 using Venus_MainPages.Roles;
 using Venus_MainPages.Roles;
+using Venus_MainPages.Unity;
 using WPF.Themes.UserControls;
 using WPF.Themes.UserControls;
 
 
 namespace Venus_MainPages.Views
 namespace Venus_MainPages.Views
@@ -16,19 +17,17 @@ namespace Venus_MainPages.Views
     /// </summary>
     /// </summary>
     public partial class LogoutView : Window
     public partial class LogoutView : Window
     {
     {
-
-        public bool IsLoginSuccess { get; set; }
-        public User CurrentUser { get; set; }
-        //private bool _isLogin;
         public LogoutView()
         public LogoutView()
         {
         {
             InitializeComponent();
             InitializeComponent();
-            PassWordTextBox.Password = "admin";
+
+            userTextBlock.Text = GlobalUser.Instance.User.Name;
+            passwordTextBlock.Text = "******";
+            roleTextBlock.Text= GlobalUser.Instance.User.Role.ToString();
         }
         }
 
 
         private void Close_Click(object sender, RoutedEventArgs e)
         private void Close_Click(object sender, RoutedEventArgs e)
         {
         {
-            IsLoginSuccess = false;
             this.Close();
             this.Close();
         }
         }
         private void Login_Click(object sender, RoutedEventArgs e)
         private void Login_Click(object sender, RoutedEventArgs e)
@@ -42,30 +41,30 @@ namespace Venus_MainPages.Views
             {
             {
                 Logout();
                 Logout();
             }
             }
-        }
-        private void UserTextBox_KeyDown(object sender, KeyEventArgs e)
-        {
-            if (e.Key == Key.Return)
-            {
-                PassWordTextBox.Focus();
-            }
-        }
+        }     
        
        
         private void Logout()
         private void Logout()
         {
         {
-            if (UserTextBox.Text != "admin")
-            {
-                IsLoginSuccess = false;
-                WPFMessageBox.ShowError("用户名错误");
-                return;
-            }
-            if (PassWordTextBox.Password != "admin")
-            {
-                IsLoginSuccess = false;
-                WPFMessageBox.ShowError("密码错误");
-                return;
-            }
+            //if (UserTextBox.Text != "admin")
+            //{
+            //    IsLoginSuccess = false;
+            //    WPFMessageBox.ShowError("用户名错误");
+            //    return;
+            //}
+            //if (PassWordTextBox.Password != "admin")
+            //{
+            //    IsLoginSuccess = false;
+            //    WPFMessageBox.ShowError("密码错误");
+            //    return;
+            //}
             Environment.Exit(0); // 0 表示正常退出
             Environment.Exit(0); // 0 表示正常退出
         }
         }
+
+        private void Window_Closed(object sender, EventArgs e)
+        {
+            this.Closed -= Window_Closed;
+            this.logButton.Click -= Login_Click;
+            this.closeButton.Click -= Close_Click;
+        }
     }
     }
 }
 }

+ 0 - 98
Venus/Venus_MainPages/Views/NewRecipeSequenceSelectView.xaml

@@ -1,98 +0,0 @@
-<Window x:Class="Venus_MainPages.Views.NewRecipeSequenceSelectView"
-        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-        mc:Ignorable="d"
-        WindowStartupLocation="CenterOwner"
-        WindowStyle="SingleBorderWindow" ResizeMode="NoResize" ShowInTaskbar="False"
-        Background="LightSkyBlue" Width="1200" Height="500" Name="recipeSequenceSelect" Loaded="Window_Loaded">
-    <Window.Resources>
-        <HierarchicalDataTemplate x:Key="FileTemplate" ItemsSource="{Binding Files}">
-            <StackPanel>
-                <TextBlock Text="{Binding Name}" />
-            </StackPanel>
-        </HierarchicalDataTemplate>
-    </Window.Resources>
-    <Border BorderBrush="Gray" BorderThickness="0,1,0,0" >
-        <Grid Margin="20,30">
-            <Grid.RowDefinitions>
-                <RowDefinition />
-                <RowDefinition Height="auto"/>
-            </Grid.RowDefinitions>
-            <Grid>
-                <Grid.ColumnDefinitions>
-                    <ColumnDefinition/>
-                    <ColumnDefinition/>
-                    <ColumnDefinition/>
-                    <ColumnDefinition/>
-
-                </Grid.ColumnDefinitions>
-                <GroupBox Header="Pre Lot Clean" Grid.Column="0">
-                    <Border  BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="White">
-                        <TreeView x:Name="PreLotTreeView"  Margin="5" ItemsSource="{Binding Files[0].Files}" ItemTemplate="{StaticResource FileTemplate}"
-                       VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" SelectedItemChanged="PreClean_PART_TREE_SelectedItemChanged"
-                       Height="{Binding Path=ActualHeight,ElementName=PART_BORDER, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}">
-                            <!--Height should add for VirtualizingPanel, otherwise the App will be slow-->
-                            <TreeView.ItemContainerStyle>
-                                <Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource ResourceKey={x:Type TreeViewItem}}">
-                                    <Setter Property="IsExpanded" Value="True"></Setter>
-                                </Style>
-                            </TreeView.ItemContainerStyle>
-                        </TreeView>
-                    </Border>
-
-                </GroupBox>
-                <GroupBox Header="Process" Grid.Column="1">
-                    <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="White">
-                        <TreeView  x:Name="ProcessTreeView" Margin="5" ItemsSource="{Binding Files[1].Files}" ItemTemplate="{StaticResource FileTemplate}"
-                       VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" SelectedItemChanged="Process_PART_TREE_SelectedItemChanged"
-                       Height="{Binding Path=ActualHeight,ElementName=PART_BORDER, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}">
-                            <!--Height should add for VirtualizingPanel, otherwise the App will be slow-->
-                            <TreeView.ItemContainerStyle>
-                                <Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource ResourceKey={x:Type TreeViewItem}}">
-                                    <Setter Property="IsExpanded" Value="True"></Setter>
-                                </Style>
-                            </TreeView.ItemContainerStyle>
-                        </TreeView>
-                    </Border>
-                </GroupBox>
-                <GroupBox Header="WTW Clean" Grid.Column="2">
-                    <Border  BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="White">
-                        <TreeView  x:Name="WTWTreeView" Margin="5" ItemsSource="{Binding Files[0].Files}" ItemTemplate="{StaticResource FileTemplate}"
-                       VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" SelectedItemChanged="WTWClean_PART_TREE_SelectedItemChanged"
-                       Height="{Binding Path=ActualHeight,ElementName=PART_BORDER, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}">
-                            <!--Height should add for VirtualizingPanel, otherwise the App will be slow-->
-                            <TreeView.ItemContainerStyle>
-                                <Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource ResourceKey={x:Type TreeViewItem}}">
-                                    <Setter Property="IsExpanded" Value="True"></Setter>
-                                </Style>
-                            </TreeView.ItemContainerStyle>
-                        </TreeView>
-                    </Border>
-                </GroupBox>
-
-                <GroupBox Header="Post Lot Clean" Grid.Column="3">
-                    <Border  BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="White">
-                        <TreeView  x:Name="PostLotTreeView" Margin="5" ItemsSource="{Binding Files[0].Files}" ItemTemplate="{StaticResource FileTemplate}"
-                       VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" SelectedItemChanged="PostClean_PART_TREE_SelectedItemChanged"
-                       Height="{Binding Path=ActualHeight,ElementName=PART_BORDER, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}">
-                            <!--Height should add for VirtualizingPanel, otherwise the App will be slow-->
-                            <TreeView.ItemContainerStyle>
-                                <Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource ResourceKey={x:Type TreeViewItem}}">
-                                    <Setter Property="IsExpanded" Value="True"></Setter>
-                                </Style>
-                            </TreeView.ItemContainerStyle>
-                        </TreeView>
-                    </Border>
-                </GroupBox>
-
-
-            </Grid>
-            <StackPanel Grid.Row="1" Margin="0,10,0,0" Orientation="Horizontal" HorizontalAlignment="Center">
-                <Button Content="OK" Width="90" Height="30" Click="buttonOK_Click" x:Name="buttonOK"/>
-                <Button Content="Cancel" Margin="10,0,0,0" Width="90" Height="30" Click="buttonCancel_Click" x:Name="buttonCancel"/>
-            </StackPanel>
-        </Grid>
-    </Border>
-</Window>

+ 12 - 12
Venus/Venus_MainPages/Views/OperationOverView.xaml

@@ -474,16 +474,16 @@
 
 
                         <StackPanel Margin="2">
                         <StackPanel Margin="2">
                             <TextBox Background="{StaticResource titleColor}"  Text="LP1" Width="Auto" Height="30" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Foreground="White" FontSize="16"/>
                             <TextBox Background="{StaticResource titleColor}"  Text="LP1" Width="Auto" Height="30" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Foreground="White" FontSize="16"/>
-                            <local:NewWaferAssociationUnit WAInfo="{Binding LP1WaferAssociation}" ButtonIsEnable="{Binding ButtonIsEnableLP1}" CarrierId="{Binding RtDataValues[LP1.CarrierId]}">
-                                <local:NewWaferAssociationUnit.CycleInfo>
+                            <local:KeplerWaferAssociationUnit WAInfo="{Binding LP1WaferAssociation}" ButtonIsEnable="{Binding ButtonIsEnableLP1}" CarrierId="{Binding RtDataValues[LP1.CarrierId]}">
+                                <local:KeplerWaferAssociationUnit.CycleInfo>
                                     <MultiBinding StringFormat="{}{0}/{1}      Wafer Count:  {2}">
                                     <MultiBinding StringFormat="{}{0}/{1}      Wafer Count:  {2}">
                                         <Binding Path="RtDataValues[LP1.CycleSetPoint]"></Binding>
                                         <Binding Path="RtDataValues[LP1.CycleSetPoint]"></Binding>
                                         <Binding Path="RtDataValues[LP1.CycledCount]"></Binding>
                                         <Binding Path="RtDataValues[LP1.CycledCount]"></Binding>
                                         <Binding Path="RtDataValues[LP1.CycledWafer]"></Binding>
                                         <Binding Path="RtDataValues[LP1.CycledWafer]"></Binding>
 
 
                                     </MultiBinding>
                                     </MultiBinding>
-                                </local:NewWaferAssociationUnit.CycleInfo>
-                            </local:NewWaferAssociationUnit>
+                                </local:KeplerWaferAssociationUnit.CycleInfo>
+                            </local:KeplerWaferAssociationUnit>
 
 
 
 
                             <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" IsEnabled="{Binding ButtonIsEnableLP1}">
                             <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" IsEnabled="{Binding ButtonIsEnableLP1}">
@@ -495,16 +495,16 @@
                         </StackPanel>
                         </StackPanel>
                         <StackPanel Margin="2">
                         <StackPanel Margin="2">
                             <TextBox Background="{StaticResource titleColor}" Text="LP2" Width="Auto" Height="30" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Foreground="White" FontSize="16"/>
                             <TextBox Background="{StaticResource titleColor}" Text="LP2" Width="Auto" Height="30" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Foreground="White" FontSize="16"/>
-                            <local:NewWaferAssociationUnit WAInfo="{Binding LP2WaferAssociation}" ButtonIsEnable="{Binding ButtonIsEnableLP2}" CarrierId="{Binding RtDataValues[LP2.CarrierId]}">
-                                <local:NewWaferAssociationUnit.CycleInfo>
+                            <local:KeplerWaferAssociationUnit WAInfo="{Binding LP2WaferAssociation}" ButtonIsEnable="{Binding ButtonIsEnableLP2}" CarrierId="{Binding RtDataValues[LP2.CarrierId]}">
+                                <local:KeplerWaferAssociationUnit.CycleInfo>
                                     <MultiBinding StringFormat="{}{0}/{1}      Wafer Count:  {2}">
                                     <MultiBinding StringFormat="{}{0}/{1}      Wafer Count:  {2}">
                                         <Binding Path="RtDataValues[LP2.CycleSetPoint]"></Binding>
                                         <Binding Path="RtDataValues[LP2.CycleSetPoint]"></Binding>
                                         <Binding Path="RtDataValues[LP2.CycledCount]"></Binding>
                                         <Binding Path="RtDataValues[LP2.CycledCount]"></Binding>
                                         <Binding Path="RtDataValues[LP2.CycledWafer]"></Binding>
                                         <Binding Path="RtDataValues[LP2.CycledWafer]"></Binding>
 
 
                                     </MultiBinding>
                                     </MultiBinding>
-                                </local:NewWaferAssociationUnit.CycleInfo>
-                            </local:NewWaferAssociationUnit>
+                                </local:KeplerWaferAssociationUnit.CycleInfo>
+                            </local:KeplerWaferAssociationUnit>
 
 
                             <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" IsEnabled="{Binding ButtonIsEnableLP2}">
                             <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" IsEnabled="{Binding ButtonIsEnableLP2}">
                                 <Button Content="Load"   HorizontalAlignment="Center" Margin="0,15,0,0" Width="85" Height="25" Command="{Binding LoadWaferCommand}" CommandParameter="LP2"      IsEnabled="{Binding RtDataValues[LP2.IsLoaded],Converter={StaticResource BoolToBool}}" FontSize="14"/>
                                 <Button Content="Load"   HorizontalAlignment="Center" Margin="0,15,0,0" Width="85" Height="25" Command="{Binding LoadWaferCommand}" CommandParameter="LP2"      IsEnabled="{Binding RtDataValues[LP2.IsLoaded],Converter={StaticResource BoolToBool}}" FontSize="14"/>
@@ -515,16 +515,16 @@
                         </StackPanel>
                         </StackPanel>
                         <StackPanel Margin="2">
                         <StackPanel Margin="2">
                             <TextBox Background="{StaticResource titleColor}" Text="LP3" Width="Auto" Height="30" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Foreground="White" FontSize="16"/>
                             <TextBox Background="{StaticResource titleColor}" Text="LP3" Width="Auto" Height="30" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Foreground="White" FontSize="16"/>
-                            <local:NewWaferAssociationUnit WAInfo="{Binding LP3WaferAssociation}" ButtonIsEnable="{Binding ButtonIsEnableLP3}" CarrierId="{Binding RtDataValues[LP3.CarrierId]}">
-                                <local:NewWaferAssociationUnit.CycleInfo>
+                            <local:KeplerWaferAssociationUnit WAInfo="{Binding LP3WaferAssociation}" ButtonIsEnable="{Binding ButtonIsEnableLP3}" CarrierId="{Binding RtDataValues[LP3.CarrierId]}">
+                                <local:KeplerWaferAssociationUnit.CycleInfo>
                                     <MultiBinding StringFormat="{}{0}/{1}      Wafer Count:  {2}">
                                     <MultiBinding StringFormat="{}{0}/{1}      Wafer Count:  {2}">
                                         <Binding Path="RtDataValues[LP3.CycleSetPoint]"></Binding>
                                         <Binding Path="RtDataValues[LP3.CycleSetPoint]"></Binding>
                                         <Binding Path="RtDataValues[LP3.CycledCount]"></Binding>
                                         <Binding Path="RtDataValues[LP3.CycledCount]"></Binding>
                                         <Binding Path="RtDataValues[LP3.CycledWafer]"></Binding>
                                         <Binding Path="RtDataValues[LP3.CycledWafer]"></Binding>
 
 
                                     </MultiBinding>
                                     </MultiBinding>
-                                </local:NewWaferAssociationUnit.CycleInfo>
-                            </local:NewWaferAssociationUnit>
+                                </local:KeplerWaferAssociationUnit.CycleInfo>
+                            </local:KeplerWaferAssociationUnit>
 
 
                             <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" IsEnabled="{Binding ButtonIsEnableLP3}">
                             <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" IsEnabled="{Binding ButtonIsEnableLP3}">
                                 <Button Content="Load"    HorizontalAlignment="Center" Margin="0,15,0,0" Width="85" Height="25" Command="{Binding LoadWaferCommand}" CommandParameter="LP3"      IsEnabled="{Binding RtDataValues[LP3.IsLoaded],Converter={StaticResource BoolToBool}}" FontSize="14"/>
                                 <Button Content="Load"    HorizontalAlignment="Center" Margin="0,15,0,0" Width="85" Height="25" Command="{Binding LoadWaferCommand}" CommandParameter="LP3"      IsEnabled="{Binding RtDataValues[LP3.IsLoaded],Converter={StaticResource BoolToBool}}" FontSize="14"/>

File diff suppressed because it is too large
+ 14 - 14
Venus/Venus_MainPages/Views/TopView.xaml


+ 4 - 4
Venus/Venus_Themes/Styles/CustomWindowStyle.xaml

@@ -21,14 +21,14 @@
                                         <Path Data="{StaticResource Icon_Auto}" Stretch="Fill" Stroke="Gray" Width="12" Height="12"></Path>
                                         <Path Data="{StaticResource Icon_Auto}" Stretch="Fill" Stroke="Gray" Width="12" Height="12"></Path>
                                         <TextBlock Text="{TemplateBinding Title}" Foreground="Gray" Margin="5 2" HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="12"></TextBlock>
                                         <TextBlock Text="{TemplateBinding Title}" Foreground="Gray" Margin="5 2" HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="12"></TextBlock>
                                     </StackPanel>
                                     </StackPanel>
-                                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
+                                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,10,0">
                                         
                                         
                                         <ui:WindowButtonMin Background="Transparent" BorderThickness="0">
                                         <ui:WindowButtonMin Background="Transparent" BorderThickness="0">
-                                            <TextBlock Text="➖" Foreground="Silver"  Width="16" Height="16"/>
+                                            <TextBlock Text="➖" Foreground="Silver"  Width="16" Height="16" Cursor="Hand"/>
                                         </ui:WindowButtonMin>
                                         </ui:WindowButtonMin>
-                                        <ui:WindowButtonClose>
+                                        <!--<ui:WindowButtonClose>
                                             <TextBlock Text="✖" Foreground="Silver"  Width="16" Height="16"/>
                                             <TextBlock Text="✖" Foreground="Silver"  Width="16" Height="16"/>
-                                        </ui:WindowButtonClose>
+                                        </ui:WindowButtonClose>-->
 
 
                                     </StackPanel>
                                     </StackPanel>
                                 </Grid>
                                 </Grid>

+ 1 - 1
Venus/Venus_Themes/UserControls/StateTitle.xaml

@@ -27,7 +27,7 @@
                     <ContextMenu Visibility="{Binding IsNeedContextMenu,Converter={StaticResource bool2VisibilityConverter}}">
                     <ContextMenu Visibility="{Binding IsNeedContextMenu,Converter={StaticResource bool2VisibilityConverter}}">
                         <MenuItem Header="Home"        Click="Initialize_Click" IsEnabled="{Binding IsOnline,Converter={StaticResource BoolToBool}}" Cursor="Hand"/>
                         <MenuItem Header="Home"        Click="Initialize_Click" IsEnabled="{Binding IsOnline,Converter={StaticResource BoolToBool}}" Cursor="Hand"/>
 
 
-                        <MenuItem Header="Abort"       Click="Abort_Click" IsEnabled="{Binding IsOnline,Converter={StaticResource BoolToBool}}" Cursor="Hand"/>
+                        <MenuItem Header="Abort"       Click="Abort_Click" IsEnabled="{Binding IsCanAbort}" Cursor="Hand"/>
 
 
                         <Separator Background="Gray"/>
                         <Separator Background="Gray"/>
                         <MenuItem Header="{Binding UpItem}"       IsChecked="{Binding IsOnline}"                                       IsEnabled="{Binding IsOnline,Converter={StaticResource BoolToBool}}"  Click="Online_Click" Cursor="Hand"/>
                         <MenuItem Header="{Binding UpItem}"       IsChecked="{Binding IsOnline}"                                       IsEnabled="{Binding IsOnline,Converter={StaticResource BoolToBool}}"  Click="Online_Click" Cursor="Hand"/>

+ 15 - 0
Venus/Venus_Themes/UserControls/StateTitle.xaml.cs

@@ -125,6 +125,21 @@ namespace Venus_Themes.UserControls
             }
             }
         }
         }
 
 
+        public static readonly DependencyProperty IsCanAbortProperty = DependencyProperty.Register(
+        "IsCanAbort", typeof(bool), typeof(StateTitle));
+
+        public bool IsCanAbort
+        {
+            get
+            {
+                return (bool)this.GetValue(IsCanAbortProperty);
+            }
+            set
+            {
+                this.SetValue(IsCanAbortProperty, value);
+            }
+        }
+
         private void Initialize_Click(object sender, RoutedEventArgs e)
         private void Initialize_Click(object sender, RoutedEventArgs e)
         {
         {
             UIEvents.OnInitRaiseChanged(Title);
             UIEvents.OnInitRaiseChanged(Title);

+ 1 - 1
Venus/Venus_UI/App.xaml

@@ -25,7 +25,7 @@
                 <ResourceDictionary Source="pack://application:,,,/Venus_Themes;component/Themes/Generic.xaml"/>
                 <ResourceDictionary Source="pack://application:,,,/Venus_Themes;component/Themes/Generic.xaml"/>
                 <!--<ResourceDictionary Source="/Venus_Themes;component/Languages/StringResources.en-US.xaml"/>
                 <!--<ResourceDictionary Source="/Venus_Themes;component/Languages/StringResources.en-US.xaml"/>
                 <ResourceDictionary Source="/Venus_Themes;component/Languages/StringResources.zh-CN.xaml"/>-->
                 <ResourceDictionary Source="/Venus_Themes;component/Languages/StringResources.zh-CN.xaml"/>-->
-                <ResourceDictionary Source="pack://application:,,,/Venus_Themes;component/Styles/WindowElementStyle.xaml"></ResourceDictionary>
+                <!--<ResourceDictionary Source="pack://application:,,,/Venus_Themes;component/Styles/WindowElementStyle.xaml"></ResourceDictionary>-->
                 <ResourceDictionary Source="pack://application:,,,/Venus_Themes;component/Styles/CustomWindowStyle.xaml"></ResourceDictionary>
                 <ResourceDictionary Source="pack://application:,,,/Venus_Themes;component/Styles/CustomWindowStyle.xaml"></ResourceDictionary>
                 <ResourceDictionary Source="pack://application:,,,/OpenSEMI.Ctrlib;component/generic.xaml"/>
                 <ResourceDictionary Source="pack://application:,,,/OpenSEMI.Ctrlib;component/generic.xaml"/>
 
 

+ 5 - 5
Venus/Venus_UI/Views/ShellView.xaml.cs

@@ -762,12 +762,12 @@ namespace Venus_UI.Views
         }
         }
         #endregion
         #endregion
 
 
-        private void Window_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
+        private async void Window_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
         {
         {
-            //this.buttonList[1].IsChecked = true;
-            //await System.Threading.Tasks.Task.Delay(10);
-            //SaveWindowContent(this, "test.jpg");
-            //this.buttonList[0].IsChecked = true;
+            this.buttonList[1].IsChecked = true;
+            await System.Threading.Tasks.Task.Delay(1);
+            SaveWindowContent(this, "test.jpg");
+            this.buttonList[0].IsChecked = true;
         }
         }
 
 
     }
     }