Browse Source

1.添加CarrierId
2.优化Sequence功能

lixiang 7 months ago
parent
commit
477c4954ad

+ 33 - 0
Venus/Venus_MainPages/Converters/SequenceKeyConverter.cs

@@ -0,0 +1,33 @@
+using Aitex.Core.Common.DeviceData;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace Venus_MainPages.Converters
+{
+    public class SequenceKeyConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            switch (value.ToString())
+            {
+                case "PreLotClean":
+                    return "PreLot";
+                case "PostLotClean":
+                    return "PostLot";
+                case "WTWClean":
+                    return "WTW";
+                default:
+                    return value.ToString();
+            }
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            return null;
+        }
+    }
+}

+ 1 - 0
Venus/Venus_MainPages/Venus_MainPages.csproj

@@ -124,6 +124,7 @@
     <Compile Include="Converters\MFCErrorConverters.cs" />
     <Compile Include="Converters\MultiBindingConverter.cs" />
     <Compile Include="Converters\PMStateConverter.cs" />
+    <Compile Include="Converters\SequenceKeyConverter.cs" />
     <Compile Include="Converters\StringToDictionary.cs" />
     <Compile Include="Converters\SystemStateConverter.cs" />
     <Compile Include="Converters\TMStateConverter.cs" />

+ 12 - 12
Venus/Venus_MainPages/ViewModels/EfemViewModel.cs

@@ -649,60 +649,60 @@ namespace Venus_MainPages.ViewModels
         }
         private void OnLPHome(object obj)
         {
-            InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Home");
+            InvokeClient.Instance.Service.DoOperation($"{obj}.Home");
         }
         private void OnLPAbort(object obj)
         {
-            InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Abort");
+            InvokeClient.Instance.Service.DoOperation($"{obj}.Abort");
 
         }
         private void OnLPReset(object obj)
         {
-            InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.ReSet");
+            InvokeClient.Instance.Service.DoOperation($"{obj}.ReSet");
 
         }
         private void OnLPLoad(object obj)
         { 
-            InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Load");
+            InvokeClient.Instance.Service.DoOperation($"{obj}.Load");
 
         }
         private void OnLPUnLoad(object obj)
         {
-            InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Unload");
+            InvokeClient.Instance.Service.DoOperation($"{obj}.Unload");
 
         }
         private void OnLPReadID(object obj)
         {
-            InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.ReadCarrierId");
+            InvokeClient.Instance.Service.DoOperation($"{obj}.ReadCarrierId");
 
         }
         private void OnLPClamp(object obj)
         {
-            InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Clamp");
+            InvokeClient.Instance.Service.DoOperation($"{obj}.Clamp");
 
         }
         private void OnLPUnClamp(object obj)
         {
-            InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Unclamp");
+            InvokeClient.Instance.Service.DoOperation($"{obj}.Unclamp");
 
         }
         private void OnLPDock(object obj)
         {
-            InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Dock");
+            InvokeClient.Instance.Service.DoOperation($"{obj}.Dock");
 
         }
         private void OnLPUnDock(object obj)
         {
-            InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Undock");
+            InvokeClient.Instance.Service.DoOperation($"{obj}.Undock");
         }
         private void OnLPOpenDoor(object obj)
         {
-            InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.OpenDoor");
+            InvokeClient.Instance.Service.DoOperation($"{obj}.OpenDoor");
 
         }
         private void OnLPCloseDoor(object obj)
         {
-            InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.CloseDoor");
+            InvokeClient.Instance.Service.DoOperation($"{obj}.CloseDoor");
 
         }
         private void OnOnline()

+ 74 - 26
Venus/Venus_MainPages/ViewModels/OperationOverViewModel.cs

@@ -1,4 +1,5 @@
 using Aitex.Core.RT.Log;
+using ExcelLibrary.BinaryFileFormat;
 using MECF.Framework.Common.CommonData;
 using MECF.Framework.Common.DataCenter;
 using MECF.Framework.Common.Equipment;
@@ -119,10 +120,51 @@ namespace Venus_MainPages.ViewModels
         private string m_PMCChamberType;
         private string m_PMDChamberType;
 
+
+        private bool m_LP1Loaded;
+        private bool m_LP2Loaded;
+        private bool m_LP3Loaded;
+
         #endregion
 
         #region  属性
 
+        public bool LP1Loaded
+        {
+            get { return m_LP1Loaded; }
+            set 
+            {
+                if (m_LP1Loaded != value)
+                {
+                    InvokeClient.Instance.Service.DoOperation($"LP1.ReadCarrierId");
+                }
+                SetProperty(ref m_LP1Loaded, value); 
+            }
+        }
+        public bool LP2Loaded
+        {
+            get { return m_LP2Loaded; }
+            set 
+            {
+                if (m_LP2Loaded != value)
+                {
+                    InvokeClient.Instance.Service.DoOperation($"LP2.ReadCarrierId");
+                }
+                SetProperty(ref m_LP2Loaded, value); 
+            }
+        }
+        public bool LP3Loaded
+        {
+            get { return m_LP3Loaded; }
+            set 
+            {
+                if (m_LP3Loaded != value)
+                {
+                    InvokeClient.Instance.Service.DoOperation($"LP3.ReadCarrierId");
+                }
+                SetProperty(ref m_LP3Loaded, value); 
+            }
+        }
         public string PMAChamberType
         {
             get { return m_PMAChamberType; }
@@ -250,9 +292,9 @@ namespace Venus_MainPages.ViewModels
         public NiceGuangChuanWaferRobotTAction BladeNiceGuangChuanWaferRobotTAction
         {
             get { return m_BladeNiceGuangChuanWaferRobotTAction; }
-            set 
-            { 
-                SetProperty(ref m_BladeNiceGuangChuanWaferRobotTAction, value); 
+            set
+            {
+                SetProperty(ref m_BladeNiceGuangChuanWaferRobotTAction, value);
             }
         }
         //public NiceGuangChuanWaferRobotTAction Blade2NiceGuangChuanWaferRobotTAction
@@ -404,33 +446,33 @@ namespace Venus_MainPages.ViewModels
         public bool ButtonIsEnableLP1
         {
             get { return m_ButtonIsEnableLP1; }
-            set 
+            set
             {
-                if (m_ButtonIsEnableLP1 == false && value == true && LP1WaferAssociation!=null)
+                if (m_ButtonIsEnableLP1 == false && value == true && LP1WaferAssociation != null)
                 {
                     LP1WaferAssociation.IsEnableCycle = false;
                     LP1WaferAssociation.CycleNumber = 1;
                 }
-                SetProperty(ref m_ButtonIsEnableLP1, value); 
+                SetProperty(ref m_ButtonIsEnableLP1, value);
             }
         }
         public bool ButtonIsEnableLP2
         {
             get { return m_ButtonIsEnableLP2; }
-            set 
+            set
             {
                 if (m_ButtonIsEnableLP2 == false && value == true && LP2WaferAssociation != null)
                 {
                     LP2WaferAssociation.IsEnableCycle = false;
                     LP2WaferAssociation.CycleNumber = 1;
                 }
-                SetProperty(ref m_ButtonIsEnableLP2, value); 
+                SetProperty(ref m_ButtonIsEnableLP2, value);
             }
         }
         public bool ButtonIsEnableLP3
         {
             get { return m_ButtonIsEnableLP3; }
-            set 
+            set
             {
                 if (m_ButtonIsEnableLP3 == false && value == true && LP3WaferAssociation != null)
                 {
@@ -663,7 +705,7 @@ namespace Venus_MainPages.ViewModels
             RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
             timer.Tick += Timer_Tick;
             timer.Start();
-            
+
 
             if (PMAIsInstalled)
             {
@@ -875,7 +917,7 @@ namespace Venus_MainPages.ViewModels
             Dictionary<string, object> param = new Dictionary<string, object>()
             {
                 {"JobId", info.JobID},
-                {"LotId", info.LotId},         
+                {"LotId", info.LotId},
                 {"Module", info.ModuleData.ModuleID},
                 {"SlotSequence", slotSequence.ToArray()},
                 {"AutoStart", true},
@@ -915,7 +957,7 @@ namespace Venus_MainPages.ViewModels
             EfemRobotMoveInfo = (RobotMoveInfo)QueryDataClient.Instance.Service.GetData("EFEM.RobotMoveAction");
 
             RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
-            if (RtDataValues == null || RtDataValues.Count==0)
+            if (RtDataValues == null || RtDataValues.Count == 0)
             {
                 return;
             }
@@ -927,7 +969,10 @@ namespace Venus_MainPages.ViewModels
             BladeAWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0];
             BladeBWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[1];
 
-            
+            LP1Loaded = CommonFunction.GetValue<bool>(RtDataValues, $"LP1.CassettePlaced");
+            LP2Loaded = CommonFunction.GetValue<bool>(RtDataValues, $"LP2.CassettePlaced");
+            LP3Loaded = CommonFunction.GetValue<bool>(RtDataValues, $"LP3.CassettePlaced");
+
 
             if (LLAIsInstalled == true)
             {
@@ -982,7 +1027,7 @@ namespace Venus_MainPages.ViewModels
                 }
                 else
                 {
-                    ButtonIsEnableLP1= false;
+                    ButtonIsEnableLP1 = false;
                     UPdateWaferAssociation(LP1WaferAssociation, lp1Cj);
                 }
                 ControlJobInfo lp2Cj = CommonFunction.GetValue<ControlJobInfo>(RtDataValues, "LP2.CurrentControlJob");
@@ -1007,7 +1052,7 @@ namespace Venus_MainPages.ViewModels
                 }
             }
 
-            
+
             //LP1WaferCount = LP1ModuleInfo.WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count();
             //LP2WaferCount = LP2ModuleInfo.WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count();
             //LP3WaferCount = LP3ModuleInfo.WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count();
@@ -1027,9 +1072,9 @@ namespace Venus_MainPages.ViewModels
         /// <param name="cjInfo"></param>
         private void UPdateWaferAssociation(WaferAssociationInfo info, ControlJobInfo cjInfo)
         {
-            if(info==null)
+            if (info == null)
             {
-                return; 
+                return;
             }
             if (cjInfo != null)
             {
@@ -1061,7 +1106,7 @@ namespace Venus_MainPages.ViewModels
         }
         private async void TMRobotMoveInfoChanged(RobotMoveInfo oldValue, RobotMoveInfo newValue)
         {
-            
+
             string RobotTarget;
             if (oldValue == null || newValue == null)
             {
@@ -1090,7 +1135,7 @@ namespace Venus_MainPages.ViewModels
                 {
                     return;
                 }
-             
+
                 //if (arm == "ArmA")
                 //{        
                 //}
@@ -1158,13 +1203,13 @@ namespace Venus_MainPages.ViewModels
                     //if (waferRobotTAction != Blade2NiceXinSongWaferRobotTAction)
                     //{
                     //}
-                    await Task.Delay(600);                  
+                    await Task.Delay(600);
                     Blade2NiceXinSongWaferRobotXAction = NiceXinSongWaferRobotXAction.Extend2;
 
                     while ((newValue.Action == RobotAction.Placing && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1].WaferStatus != 0) || (newValue.Action == RobotAction.Picking && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1].WaferStatus == 0))
                     {
                         await Task.Delay(100);
-                    }                    
+                    }
                     Blade2NiceXinSongWaferRobotXAction = NiceXinSongWaferRobotXAction.Retract2;
 
                 }
@@ -1196,12 +1241,12 @@ namespace Venus_MainPages.ViewModels
                 //var waferRobotTAction = (NiceXinSongWaferRobotTAction)Enum.Parse(typeof(NiceXinSongWaferRobotTAction), module, true);
                 //BladeNiceXinSongWaferRobotTAction = waferRobotTAction;
                 if (arm == "ArmA")
-                {                                                      
+                {
                     await Task.Delay(600);
                     Blade1NiceXinSongWaferRobotXAction = NiceXinSongWaferRobotXAction.Extend1;
                 }
                 else if (arm == "ArmB")
-                {                                                        
+                {
                     await Task.Delay(600);
                     Blade2NiceXinSongWaferRobotXAction = NiceXinSongWaferRobotXAction.Extend2;
                 }
@@ -1239,9 +1284,9 @@ namespace Venus_MainPages.ViewModels
                 Blade1NiceXinSongWaferRobotXAction = NiceXinSongWaferRobotXAction.Retract1;
                 Blade2NiceXinSongWaferRobotXAction = NiceXinSongWaferRobotXAction.Retract2;
 
-                await Task.Delay(2000);  
+                await Task.Delay(2000);
                 BladeNiceXinSongWaferRobotTAction = NiceXinSongWaferRobotTAction.T_Origin;
-                
+
             }
 
             #endregion
@@ -1270,7 +1315,7 @@ namespace Venus_MainPages.ViewModels
                 var values = RobotTarget.Split('.');
                 var arm = values[0];
                 var module = values[1];
-               
+
                 if (arm == "ArmA")
                 {
 
@@ -1437,6 +1482,9 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add("LLA.CoolingTime");
             m_RtDataKeys.Add("LLB.CoolingTime");
 
+            m_RtDataKeys.Add("LP1.CarrierId");
+            m_RtDataKeys.Add("LP2.CarrierId");
+            m_RtDataKeys.Add("LP3.CarrierId");
 
         }
         private void AssociateSequence(WaferAssociationInfo info, bool flag, int slot = -1)

+ 7 - 5
Venus/Venus_MainPages/ViewModels/SequenceViewModel.cs

@@ -202,7 +202,7 @@ namespace Venus_MainPages.ViewModels
                 {
                     SequenceData sequence = new SequenceData();
                     sequence.Name = fullpath;
-                    sequence.Creator = "Admin";
+                    sequence.Creator = Venus_MainPages.Unity.GlobalUser.Instance.User.Name; ;
                     sequence.CreateTime = DateTime.Now;
                     sequence.Revisor = sequence.Creator;
                     sequence.ReviseTime = DateTime.Now;
@@ -259,7 +259,7 @@ namespace Venus_MainPages.ViewModels
                     }
                     else
                     {
-                        this.CurrentSequence.Revisor = "Admin";
+                        this.CurrentSequence.Revisor = Venus_MainPages.Unity.GlobalUser.Instance.User.Name; ;
                         this.CurrentSequence.ReviseTime = DateTime.Now;
                         if (this.provider.Rename(this.CurrentSequence.Name, fullpath))
                         {
@@ -309,7 +309,7 @@ namespace Venus_MainPages.ViewModels
                     }
                     else
                     {
-                        this.CurrentSequence.Revisor = "Admin";
+                        this.CurrentSequence.Revisor = Venus_MainPages.Unity.GlobalUser.Instance.User.Name; ;
                         this.CurrentSequence.ReviseTime = DateTime.Now;
                         string tempname = this.CurrentSequence.Name;
                         this.CurrentSequence.Name = fullpath;
@@ -469,7 +469,7 @@ namespace Venus_MainPages.ViewModels
         public void SelectRecipe(object select)
         {
             PathFileParam param = (PathFileParam)select;
-            NewRecipeSequenceSelectView dialog = new NewRecipeSequenceSelectView()
+            NewRecipeSequenceSelectView dialog = new NewRecipeSequenceSelectView(param.Value)
             {
                 Owner = Application.Current.MainWindow
             };
@@ -491,7 +491,9 @@ namespace Venus_MainPages.ViewModels
             string moduleName=param.Name.Substring(0,3);
 
             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\\");
             var Process = provider.GetRecipesByPath($"{param.PrefixPath}").Where(x => x.Split('\\')[0] == moduleName && x.Split('\\')[1] == "Process").ToList();
+            //Process.Add($"{moduleName}\\Process\\");
             dataContext.Files.AddRange(new ObservableCollection<FileNode>(RecipeSequenceTreeBuilder.GetFiles("", Clean)));
             dataContext.Files.AddRange(new ObservableCollection<FileNode>(RecipeSequenceTreeBuilder.GetFiles("", Process)));
             //if (param.Name.Contains("PMA"))
@@ -609,7 +611,7 @@ namespace Venus_MainPages.ViewModels
                 return false;
             }
 
-            seq.Revisor = "Admin";
+            seq.Revisor = Venus_MainPages.Unity.GlobalUser.Instance.User.Name;
             seq.ReviseTime = DateTime.Now;
             result = this.provider.Save(seq);
 

+ 9 - 9
Venus/Venus_MainPages/Views/NewRecipeSequenceSelectView.xaml

@@ -6,7 +6,7 @@
         mc:Ignorable="d"
         WindowStartupLocation="CenterOwner"
         WindowStyle="SingleBorderWindow" ResizeMode="NoResize" ShowInTaskbar="False"
-        Background="LightSkyBlue" Width="1200" Height="500" Name="recipeSequenceSelect">
+        Background="LightSkyBlue" Width="1200" Height="500" Name="recipeSequenceSelect" Loaded="Window_Loaded">
     <Window.Resources>
         <HierarchicalDataTemplate x:Key="FileTemplate" ItemsSource="{Binding Files}">
             <StackPanel>
@@ -30,9 +30,9 @@
                 </Grid.ColumnDefinitions>
                 <GroupBox Header="Pre Lot Clean" Grid.Column="0">
                     <Border  BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="White">
-                        <TreeView  Margin="5" ItemsSource="{Binding Files[0].Files}" ItemTemplate="{StaticResource FileTemplate}"
+                        <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}" MouseDoubleClick="PART_TREE_MouseDoubleClick">
+                       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}}">
@@ -45,9 +45,9 @@
                 </GroupBox>
                 <GroupBox Header="Process" Grid.Column="1">
                     <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="White">
-                        <TreeView  Margin="5" ItemsSource="{Binding Files[1].Files}" ItemTemplate="{StaticResource FileTemplate}"
+                        <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}" MouseDoubleClick="PART_TREE_MouseDoubleClick">
+                       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}}">
@@ -59,9 +59,9 @@
                 </GroupBox>
                 <GroupBox Header="WTW Clean" Grid.Column="2">
                     <Border  BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="White">
-                        <TreeView  Margin="5" ItemsSource="{Binding Files[0].Files}" ItemTemplate="{StaticResource FileTemplate}"
+                        <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}" MouseDoubleClick="PART_TREE_MouseDoubleClick">
+                       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}}">
@@ -74,9 +74,9 @@
 
                 <GroupBox Header="Post Lot Clean" Grid.Column="3">
                     <Border  BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="White">
-                        <TreeView  Margin="5" ItemsSource="{Binding Files[0].Files}" ItemTemplate="{StaticResource FileTemplate}"
+                        <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}" MouseDoubleClick="PART_TREE_MouseDoubleClick">
+                       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}}">

+ 71 - 35
Venus/Venus_MainPages/Views/NewRecipeSequenceSelectView.xaml.cs

@@ -1,20 +1,12 @@
-using Aitex.Core.Util;
-using System;
+using Aitex.Core.RT.DataCenter;
+using Aitex.Core.Util;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows;
 using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
 using Venus_MainPages.Sequence;
+using Venus_MainPages.ViewModels;
 using Venus_Unity;
 
 namespace Venus_MainPages.Views
@@ -31,13 +23,16 @@ namespace Venus_MainPages.Views
 
         SerializableDictionary<string, string> recipeDictionary = new SerializableDictionary<string, string>();
 
-        
+
         public string FullPath { get; private set; }
 
-        public NewRecipeSequenceSelectView()
+        string value;
+        public NewRecipeSequenceSelectView(string path)
         {
             InitializeComponent();
             //this.buttonOK.IsEnabled = false;
+
+            value = path;
         }
 
         private void buttonCancel_Click(object sender, RoutedEventArgs e)
@@ -59,44 +54,40 @@ namespace Venus_MainPages.Views
             if (pre_currentFileNode != null)
             {
                 recipeDictionary.Add("PreLotClean", pre_currentFileNode.Name);
-                //recipeInfo.Append($"PreLotClean:{pre_currentFileNode.Name}");
+            }
+            else
+            {
+                recipeDictionary.Add("PreLotClean", "");
             }
             if (process_currentFileNode != null)
             {
-                //if (recipeInfo.Length > 0)
-                //{
-                //    recipeInfo.Append(";");
-                //}
-                //recipeInfo.Append($"Process:{pre_currentFileNode.Name}");
                 recipeDictionary.Add("Process", process_currentFileNode.Name);
             }
+            else
+            {
+                recipeDictionary.Add("Process", "");
+            }
             if (wtw_currentFileNode != null)
             {
-                //if (recipeInfo.Length > 0)
-                //{
-                //    recipeInfo.Append(";");
-                //}
                 recipeDictionary.Add("WTWClean", wtw_currentFileNode.Name);
-                //recipeInfo.Append($"WTWClean:{wtw_currentFileNode.Name}");
-
+            }
+            else
+            {
+                recipeDictionary.Add("WTWClean", "");
             }
             if (post_currentFileNode != null)
             {
-                //if (recipeInfo.Length > 0)
-                //{
-                //    recipeInfo.Append(";");
-                //}
                 recipeDictionary.Add("PostLotClean", post_currentFileNode.Name);
-
-                //recipeInfo.Append($"PostLotClean:{post_currentFileNode.Name}");
-
+            }
+            else
+            {
+                recipeDictionary.Add("PostLotClean", "");
             }
 
             this.FullPath = SerializeHelper.Instance.DictionaryToString(recipeDictionary);
         }
         private void PreClean_PART_TREE_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
         {
-
             pre_currentFileNode = (FileNode)(sender as TreeView).SelectedItem;
         }
         private void Process_PART_TREE_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
@@ -112,9 +103,54 @@ namespace Venus_MainPages.Views
             post_currentFileNode = (FileNode)(sender as TreeView).SelectedItem;
         }
 
-        private void PART_TREE_MouseDoubleClick(object sender, MouseButtonEventArgs e)
+        private void Window_Loaded(object sender, RoutedEventArgs e)
+        {
+
+            var dictionary = SerializeHelper.Instance.StringToDictionary(value);
+            foreach (var item in PreLotTreeView.Items)
+            {
+                var tvi = (TreeViewItem)PreLotTreeView.ItemContainerGenerator.ContainerFromItem(item);
+                SetSelect(tvi, dictionary["PreLotClean"]);
+            }
+            foreach (var item in ProcessTreeView.Items)
+            {
+                var tvi = (TreeViewItem)ProcessTreeView.ItemContainerGenerator.ContainerFromItem(item);
+                SetSelect(tvi, dictionary["Process"]);
+            }
+            foreach (var item in WTWTreeView.Items)
+            {
+                var tvi = (TreeViewItem)WTWTreeView.ItemContainerGenerator.ContainerFromItem(item);
+                SetSelect(tvi, dictionary["WTWClean"]);
+            }
+            foreach (var item in PostLotTreeView.Items)
+            {
+                var tvi = (TreeViewItem)PostLotTreeView.ItemContainerGenerator.ContainerFromItem(item);
+                SetSelect(tvi, dictionary["PostLotClean"]);
+            }
+        }
+
+        void SetSelect(TreeViewItem tvi, string value)
         {
-            buttonOK_Click(null, null);
+            if (tvi.Items.Count > 0)
+            {
+                foreach (var item in tvi.Items)
+                {
+                    var tviChild = (TreeViewItem)tvi.ItemContainerGenerator.ContainerFromItem(item);
+                    var model = (FileNode)item;
+                    if (model.Name == value)
+                    {
+                        tviChild.IsSelected = true;
+                        break;
+                    }
+                    else
+                    {
+                        SetSelect(tviChild, value);
+                    }
+                }
+            }
+            else
+            {
+            }
         }
     }
 }

+ 17 - 5
Venus/Venus_MainPages/Views/NewWaferAssociationUnit.xaml

@@ -26,7 +26,7 @@
                     <RowDefinition Height="27"></RowDefinition>
                     <RowDefinition Height="27"></RowDefinition>
                     <RowDefinition Height="27"></RowDefinition>
-                    <RowDefinition Height="27"></RowDefinition>
+                    <RowDefinition Height="0"></RowDefinition>
                     <RowDefinition Height="27"></RowDefinition>
                     <RowDefinition Height="27"></RowDefinition>
                     <RowDefinition Height="27"></RowDefinition>
@@ -37,25 +37,37 @@
                 </Grid.RowDefinitions>
 
                 <StackPanel Grid.Row="0" Orientation="Horizontal">
-                    <TextBlock Text="Lot ID:" TextWrapping="Wrap"  Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" Width="58"></TextBlock>
+                    <TextBlock Text="Lot ID:" TextWrapping="Wrap"  Foreground="Black" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" Width="58"></TextBlock>
                     <TextBox Text="{Binding WAInfo.LotId, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"   Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial"  VerticalContentAlignment="Center" Width="200"  Height="19" Margin="6 0 0 0" IsEnabled="{Binding ElementName=WaferUnit,Path=ButtonIsEnable}"></TextBox>
                 </StackPanel>
+
                 <StackPanel Grid.Row="1" Orientation="Horizontal">
+                    <TextBlock Text="Carrier ID:"  TextWrapping="Wrap" Foreground="Black" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" Width="65"></TextBlock>
+                    <Border BorderThickness="1" BorderBrush="Gray"  Width="199" Margin="0 2 0 2" VerticalAlignment="Center">
+                        <TextBlock Text="{Binding ElementName=WaferUnit,Path=CarrierId}"/>
+                    </Border>
+                    <!--<ComboBox Style="{StaticResource customeComboBoxStyle}" Width="200" x:Name="preComboBox"  DropDownOpened="preComboBox_DropDownOpened"  SelectionChanged="preComboBox_SelectionChanged" Margin="0 2 0 2" SelectedValue="{Binding ElementName=WaferUnit,Path=WAInfo.PreCleanRecipeName}" IsEnabled="{Binding ElementName=WaferUnit,Path=ButtonIsEnable}"/>-->
+                </StackPanel>
+                
+                <StackPanel Grid.Row="2" Orientation="Horizontal">
 
-                    <TextBlock Text="Sequence:"  TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" Width="65"></TextBlock>
+                    <TextBlock Text="Sequence:"  TextWrapping="Wrap" Foreground="Black" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" Width="65"></TextBlock>
 
                     <ComboBox Style="{StaticResource customeComboBoxStyle}" Width="200" FontSize="12" x:Name="cb"  DropDownOpened="cb_DropDownOpened"  SelectionChanged="cb_SelectionChanged" Margin="0 2 0 2" SelectedValue="{Binding ElementName=WaferUnit,Path=SequenceName}" IsEnabled="{Binding ElementName=WaferUnit,Path=ButtonIsEnable}"/>
 
 
                 </StackPanel>
-                <StackPanel Grid.Row="2" Orientation="Horizontal">
+
+               
+                
+                <!--<StackPanel Grid.Row="2" Orientation="Horizontal">
                     <TextBlock Text="Pre Clean:"  TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" Width="65"></TextBlock>
                     <ComboBox Style="{StaticResource customeComboBoxStyle}" Width="200" x:Name="preComboBox"  DropDownOpened="preComboBox_DropDownOpened"  SelectionChanged="preComboBox_SelectionChanged" Margin="0 2 0 2" SelectedValue="{Binding ElementName=WaferUnit,Path=WAInfo.PreCleanRecipeName}" IsEnabled="{Binding ElementName=WaferUnit,Path=ButtonIsEnable}"/>
                 </StackPanel>
                 <StackPanel Grid.Row="3" Orientation="Horizontal">
                     <TextBlock Text="Post Clean:"  TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" Width="65"></TextBlock>
                     <ComboBox Style="{StaticResource customeComboBoxStyle}" Width="200" x:Name="postComboBox" DropDownOpened="postComboBox_DropDownOpened"  SelectionChanged="postComboBox_SelectionChanged" Margin="0 3 0 3" SelectedValue="{Binding ElementName=WaferUnit,Path=WAInfo.PostCleanRecipeName}" IsEnabled="{Binding ElementName=WaferUnit,Path=ButtonIsEnable}"/>
-                </StackPanel>
+                </StackPanel>-->
                 <StackPanel Grid.Row="4" Orientation="Horizontal">
                     <TextBlock Text="Cycle Set:"  TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" Width="65"></TextBlock>
                     <CheckBox x:Name="IsEnableCycleCheckBox" Content="IsEnable" VerticalAlignment="Center" Padding="0 1 0 0"  IsChecked="{Binding ElementName=WaferUnit,Path=WAInfo.IsEnableCycle}" Unchecked="IsEnableCycleCheckBox_Unchecked" Checked="IsEnableCycleCheckBox_Checked" IsEnabled="{Binding ElementName=WaferUnit,Path=ButtonIsEnable}"/>

+ 64 - 57
Venus/Venus_MainPages/Views/NewWaferAssociationUnit.xaml.cs

@@ -36,6 +36,13 @@ namespace Venus_MainPages.Views
         }
         public static readonly DependencyProperty SequenceNameProperty = DependencyProperty.Register("SequenceName", typeof(string), typeof(NewWaferAssociationUnit));
 
+
+        public string CarrierId
+        {
+            get { return (string)GetValue(CarrierIdProperty); }
+            set { SetValue(CarrierIdProperty, value); }
+        }
+        public static readonly DependencyProperty CarrierIdProperty = DependencyProperty.Register("CarrierId", typeof(string), typeof(NewWaferAssociationUnit));
         public int SelectedIndex
         {
             get { return (int)GetValue(SelectedIndexProperty); }
@@ -70,63 +77,63 @@ namespace Venus_MainPages.Views
             WAInfo.SequenceName = cb.SelectedValue.ToString();
         }
 
-        private void preComboBox_DropDownOpened(object sender, EventArgs e)
-        {
-            List<string> cleanRecipes=new List<string>();
-            string installModules = (string)QueryDataClient.Instance.Service.GetConfig("System.InstalledModules");
-            if (installModules.Contains("PMA"))
-            {
-                cleanRecipes.AddRange(CommonFunction.GetFilesNames(System.IO.Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", "PMA","Clean")).ToList());
-            }
-            if (installModules.Contains("PMB"))
-            {
-                cleanRecipes.AddRange(CommonFunction.GetFilesNames(System.IO.Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", "PMB", "Clean")).ToList());
-            }
-            if (installModules.Contains("PMC"))
-            {
-                cleanRecipes.AddRange(CommonFunction.GetFilesNames(System.IO.Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", "PMC", "Clean")).ToList());
-            }
-            if (installModules.Contains("PMD"))
-            {
-                cleanRecipes.AddRange(CommonFunction.GetFilesNames(System.IO.Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", "PMD", "Clean")).ToList());
-            }
-            cleanRecipes.Add("");
-            preComboBox.ItemsSource = cleanRecipes.Distinct();
-        }
-
-        private void preComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
-        {
-            WAInfo.PreCleanRecipeName= preComboBox.SelectedValue.ToString();
-        }
-        private void postComboBox_DropDownOpened(object sender, EventArgs e)
-        {
-            List<string> cleanRecipes = new List<string>();
-            string installModules = (string)QueryDataClient.Instance.Service.GetConfig("System.InstalledModules");
-            if (installModules.Contains("PMA"))
-            {
-                cleanRecipes.AddRange(CommonFunction.GetFilesNames(System.IO.Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", "PMA", "Clean")).ToList());
-            }
-            if (installModules.Contains("PMB"))
-            {
-                cleanRecipes.AddRange(CommonFunction.GetFilesNames(System.IO.Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", "PMB", "Clean")).ToList());
-            }
-            if (installModules.Contains("PMC"))
-            {
-                cleanRecipes.AddRange(CommonFunction.GetFilesNames(System.IO.Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", "PMC", "Clean")).ToList());
-            }
-            if (installModules.Contains("PMD"))
-            {
-                cleanRecipes.AddRange(CommonFunction.GetFilesNames(System.IO.Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", "PMD", "Clean")).ToList());
-            }
-            cleanRecipes.Add("");
-            postComboBox.ItemsSource = cleanRecipes.Distinct();
-        }
-
-        private void postComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
-        {
-            WAInfo.PostCleanRecipeName = postComboBox.SelectedValue.ToString();
-
-        }
+        //private void preComboBox_DropDownOpened(object sender, EventArgs e)
+        //{
+        //    List<string> cleanRecipes=new List<string>();
+        //    string installModules = (string)QueryDataClient.Instance.Service.GetConfig("System.InstalledModules");
+        //    if (installModules.Contains("PMA"))
+        //    {
+        //        cleanRecipes.AddRange(CommonFunction.GetFilesNames(System.IO.Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", "PMA","Clean")).ToList());
+        //    }
+        //    if (installModules.Contains("PMB"))
+        //    {
+        //        cleanRecipes.AddRange(CommonFunction.GetFilesNames(System.IO.Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", "PMB", "Clean")).ToList());
+        //    }
+        //    if (installModules.Contains("PMC"))
+        //    {
+        //        cleanRecipes.AddRange(CommonFunction.GetFilesNames(System.IO.Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", "PMC", "Clean")).ToList());
+        //    }
+        //    if (installModules.Contains("PMD"))
+        //    {
+        //        cleanRecipes.AddRange(CommonFunction.GetFilesNames(System.IO.Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", "PMD", "Clean")).ToList());
+        //    }
+        //    cleanRecipes.Add("");
+        //    //preComboBox.ItemsSource = cleanRecipes.Distinct();
+        //}
+
+        //private void preComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        //{
+        //    WAInfo.PreCleanRecipeName= preComboBox.SelectedValue.ToString();
+        //}
+        //private void postComboBox_DropDownOpened(object sender, EventArgs e)
+        //{
+        //    List<string> cleanRecipes = new List<string>();
+        //    string installModules = (string)QueryDataClient.Instance.Service.GetConfig("System.InstalledModules");
+        //    if (installModules.Contains("PMA"))
+        //    {
+        //        cleanRecipes.AddRange(CommonFunction.GetFilesNames(System.IO.Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", "PMA", "Clean")).ToList());
+        //    }
+        //    if (installModules.Contains("PMB"))
+        //    {
+        //        cleanRecipes.AddRange(CommonFunction.GetFilesNames(System.IO.Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", "PMB", "Clean")).ToList());
+        //    }
+        //    if (installModules.Contains("PMC"))
+        //    {
+        //        cleanRecipes.AddRange(CommonFunction.GetFilesNames(System.IO.Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", "PMC", "Clean")).ToList());
+        //    }
+        //    if (installModules.Contains("PMD"))
+        //    {
+        //        cleanRecipes.AddRange(CommonFunction.GetFilesNames(System.IO.Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", "PMD", "Clean")).ToList());
+        //    }
+        //    cleanRecipes.Add("");
+        //    //postComboBox.ItemsSource = cleanRecipes.Distinct();
+        //}
+
+        //private void postComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        //{
+        //    //WAInfo.PostCleanRecipeName = postComboBox.SelectedValue.ToString();
+
+        //}
         private IEnumerable<string> GetFilesNames(string path)
         {
             if (Directory.Exists(path))

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

@@ -452,7 +452,7 @@
         </Canvas>
         <Canvas    Grid.Column="1" Background="#C7D2DF">
 
-                <TabPanel Margin="14 0 0 0"  >
+                <TabPanel Margin="14 10 0 0">
 
                 <StackPanel>
                     <Border BorderThickness="0,0,0,0" BorderBrush="#076DB6"  Canvas.Left="10" Width="810" Margin="0 2 0 0" Background="#FAFAFA" HorizontalAlignment="Center" VerticalAlignment="Center" Height="35">
@@ -474,7 +474,7 @@
 
                         <StackPanel Margin="2">
                             <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}">
+                            <local:NewWaferAssociationUnit WAInfo="{Binding LP1WaferAssociation}" ButtonIsEnable="{Binding ButtonIsEnableLP1}" CarrierId="{Binding RtDataValues[LP1.CarrierId]}">
                                 <local:NewWaferAssociationUnit.CycleInfo>
                                     <MultiBinding StringFormat="{}{0}/{1}      Wafer Count:  {2}">
                                         <Binding Path="RtDataValues[LP1.CycleSetPoint]"></Binding>
@@ -487,15 +487,15 @@
 
 
                             <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" IsEnabled="{Binding ButtonIsEnableLP1}">
-                                <Button Content="Load"    HorizontalAlignment="Center" Margin="0,5,0,0" Width="85" Height="26" Command="{Binding LoadWaferCommand}" CommandParameter="LP1"      IsEnabled="{Binding RtDataValues[LP1.IsLoaded],Converter={StaticResource BoolToBool}}" FontSize="14"/>
-                                <Button Content="UnLoad"  HorizontalAlignment="Center" Margin="10,5,0,0" Width="85" Height="26" Command="{Binding UnLoadWaferCommand}" CommandParameter="LP1"   IsEnabled="{Binding RtDataValues[LP1.IsLoaded]}" FontSize="14"/>
+                                <Button Content="Load"    HorizontalAlignment="Center" Margin="0,15,0,0" Width="85" Height="26" Command="{Binding LoadWaferCommand}" CommandParameter="LP1"      IsEnabled="{Binding RtDataValues[LP1.IsLoaded],Converter={StaticResource BoolToBool}}" FontSize="14"/>
+                                <Button Content="UnLoad"  HorizontalAlignment="Center" Margin="10,15,0,0" Width="85" Height="26" Command="{Binding UnLoadWaferCommand}" CommandParameter="LP1"   IsEnabled="{Binding RtDataValues[LP1.IsLoaded]}" FontSize="14"/>
                             </StackPanel>
 
 
                         </StackPanel>
                         <StackPanel Margin="2">
                             <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}">
+                            <local:NewWaferAssociationUnit WAInfo="{Binding LP2WaferAssociation}" ButtonIsEnable="{Binding ButtonIsEnableLP2}" CarrierId="{Binding RtDataValues[LP2.CarrierId]}">
                                 <local:NewWaferAssociationUnit.CycleInfo>
                                     <MultiBinding StringFormat="{}{0}/{1}      Wafer Count:  {2}">
                                         <Binding Path="RtDataValues[LP2.CycleSetPoint]"></Binding>
@@ -507,15 +507,15 @@
                             </local:NewWaferAssociationUnit>
 
                             <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" IsEnabled="{Binding ButtonIsEnableLP2}">
-                                <Button Content="Load"   HorizontalAlignment="Center" Margin="0,5,0,0" Width="85" Height="25" Command="{Binding LoadWaferCommand}" CommandParameter="LP2"      IsEnabled="{Binding RtDataValues[LP2.IsLoaded],Converter={StaticResource BoolToBool}}" FontSize="14"/>
-                                <Button Content="UnLoad"  HorizontalAlignment="Center" Margin="10,5,0,0" Width="85" Height="25" Command="{Binding UnLoadWaferCommand}" CommandParameter="LP2"  IsEnabled="{Binding RtDataValues[LP2.IsLoaded]}" 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"/>
+                                <Button Content="UnLoad"  HorizontalAlignment="Center" Margin="10,15,0,0" Width="85" Height="25" Command="{Binding UnLoadWaferCommand}" CommandParameter="LP2"  IsEnabled="{Binding RtDataValues[LP2.IsLoaded]}" FontSize="14"/>
                             </StackPanel>
 
 
                         </StackPanel>
                         <StackPanel Margin="2">
                             <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}">
+                            <local:NewWaferAssociationUnit WAInfo="{Binding LP3WaferAssociation}" ButtonIsEnable="{Binding ButtonIsEnableLP3}" CarrierId="{Binding RtDataValues[LP3.CarrierId]}">
                                 <local:NewWaferAssociationUnit.CycleInfo>
                                     <MultiBinding StringFormat="{}{0}/{1}      Wafer Count:  {2}">
                                         <Binding Path="RtDataValues[LP3.CycleSetPoint]"></Binding>
@@ -527,8 +527,8 @@
                             </local:NewWaferAssociationUnit>
 
                             <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" IsEnabled="{Binding ButtonIsEnableLP3}">
-                                <Button Content="Load"    HorizontalAlignment="Center" Margin="0,5,0,0" Width="85" Height="25" Command="{Binding LoadWaferCommand}" CommandParameter="LP3"      IsEnabled="{Binding RtDataValues[LP3.IsLoaded],Converter={StaticResource BoolToBool}}" FontSize="14"/>
-                                <Button Content="UnLoad"  HorizontalAlignment="Center" Margin="10,5,0,0" Width="85" Height="25" Command="{Binding UnLoadWaferCommand}" CommandParameter="LP3"   IsEnabled="{Binding RtDataValues[LP3.IsLoaded]}" 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"/>
+                                <Button Content="UnLoad"  HorizontalAlignment="Center" Margin="10,15,0,0" Width="85" Height="25" Command="{Binding UnLoadWaferCommand}" CommandParameter="LP3"   IsEnabled="{Binding RtDataValues[LP3.IsLoaded]}" FontSize="14"/>
                             </StackPanel>
                         </StackPanel>
                     </StackPanel>

+ 12 - 69
Venus/Venus_MainPages/Views/RecipeSequenceSelectView.xaml

@@ -6,7 +6,7 @@
         mc:Ignorable="d"
         WindowStartupLocation="CenterOwner"
         WindowStyle="SingleBorderWindow" ResizeMode="NoResize" ShowInTaskbar="False"
-        Background="LightSkyBlue" Width="1200" Height="500" Name="recipeSequenceSelect">
+        Background="LightSkyBlue" Width="350" Height="500" Name="recipeSequenceSelect">
     <Window.Resources>
         <HierarchicalDataTemplate x:Key="FileTemplate" ItemsSource="{Binding Files}">
             <StackPanel>
@@ -20,75 +20,18 @@
                 <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  Margin="5" ItemsSource="{Binding Files[0].Files}" ItemTemplate="{StaticResource FileTemplate}"
-                       VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" SelectedItemChanged="PreClean_PART_TREE_SelectedItemChanged"
+            <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="White">
+                <TreeView x:Name="PART_TREE" Margin="5" ItemsSource="{Binding Files[0].Files}" ItemTemplate="{StaticResource FileTemplate}"
+                       VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" SelectedItemChanged="PART_TREE_SelectedItemChanged"
                        Height="{Binding Path=ActualHeight,ElementName=PART_BORDER, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" MouseDoubleClick="PART_TREE_MouseDoubleClick">
-                            <!--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  Margin="5" ItemsSource="{Binding Files[0].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}" MouseDoubleClick="PART_TREE_MouseDoubleClick">
-                            <!--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  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}" MouseDoubleClick="PART_TREE_MouseDoubleClick">
-                            <!--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  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}" MouseDoubleClick="PART_TREE_MouseDoubleClick">
-                            <!--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>
+                    <!--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>
             <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"/>

+ 24 - 68
Venus/Venus_MainPages/Views/RecipeSequenceSelectView.xaml.cs

@@ -1,11 +1,19 @@
-using Aitex.Core.Util;
-using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
 using System.Text;
+using System.Threading.Tasks;
 using System.Windows;
 using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
 using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
 using Venus_MainPages.Sequence;
-using Venus_Unity;
 
 namespace Venus_MainPages.Views
 {
@@ -14,19 +22,13 @@ namespace Venus_MainPages.Views
     /// </summary>
     public partial class RecipeSequenceSelectView : Window
     {
-        private FileNode pre_currentFileNode;
-        private FileNode process_currentFileNode;
-        private FileNode wtw_currentFileNode;
-        private FileNode post_currentFileNode;
-
-        SerializableDictionary<string,string> recipeDictionary = new SerializableDictionary<string,string>();
-
+        private FileNode currentFileNode;
         public string FullPath { get; private set; }
 
         public RecipeSequenceSelectView()
         {
             InitializeComponent();
-            //this.buttonOK.IsEnabled = false;
+            this.buttonOK.IsEnabled = false;
         }
 
         private void buttonCancel_Click(object sender, RoutedEventArgs e)
@@ -37,68 +39,22 @@ namespace Venus_MainPages.Views
         private void buttonOK_Click(object sender, RoutedEventArgs e)
         {
             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 (this.currentFileNode != null)
             {
-                recipeDictionary.Add("PreLotClean", pre_currentFileNode.Name);
-                //recipeInfo.Append($"PreLotClean:{pre_currentFileNode.Name}");
+                if (this.currentFileNode.IsFile)
+                {
+                    this.FullPath = this.currentFileNode.FullPath.Trim();
+                }
             }
-            if (process_currentFileNode != null)
-            {
-                //if (recipeInfo.Length > 0)
-                //{
-                //    recipeInfo.Append(";");
-                //}
-                //recipeInfo.Append($"Process:{pre_currentFileNode.Name}");
-                recipeDictionary.Add("Process", process_currentFileNode.Name);
-            }
-            if (wtw_currentFileNode != null)
-            {
-                //if (recipeInfo.Length > 0)
-                //{
-                //    recipeInfo.Append(";");
-                //}
-                recipeDictionary.Add("WTWClean", wtw_currentFileNode.Name);
-                //recipeInfo.Append($"WTWClean:{wtw_currentFileNode.Name}");
+        }
 
-            }
-            if (post_currentFileNode != null)
+        private void PART_TREE_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
+        {
+            currentFileNode = (FileNode)PART_TREE.SelectedItem;
+            if (currentFileNode != null)
             {
-                //if (recipeInfo.Length > 0)
-                //{
-                //    recipeInfo.Append(";");
-                //}
-                recipeDictionary.Add("PostLotClean", post_currentFileNode.Name);
-
-                //recipeInfo.Append($"PostLotClean:{post_currentFileNode.Name}");
-
+                this.buttonOK.IsEnabled = true;
             }
-
-            this.FullPath = SerializeHelper.Instance.DictionaryToString(recipeDictionary);
-        }
-        private void PreClean_PART_TREE_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
-        {
-            
-            pre_currentFileNode = (FileNode)(sender as TreeView).SelectedItem;   
-        }
-        private void Process_PART_TREE_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
-        {
-            process_currentFileNode = (FileNode)(sender as TreeView).SelectedItem;
-        }
-        private void WTWClean_PART_TREE_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
-        {
-            wtw_currentFileNode = (FileNode)(sender as TreeView).SelectedItem;
-        }
-        private void PostClean_PART_TREE_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
-        {
-            post_currentFileNode = (FileNode)(sender as TreeView).SelectedItem;
         }
 
         private void PART_TREE_MouseDoubleClick(object sender, MouseButtonEventArgs e)

+ 21 - 28
Venus/Venus_MainPages/Views/SequenceView.xaml

@@ -17,8 +17,9 @@
 
     <UserControl.Resources>
         <converters:StringToDictionary x:Key="StringToDictionary"/>
+        <converters:SequenceKeyConverter x:Key="SequenceKeyConverter"/>
         <DataTemplate x:Key="ParamTemplate">
-            <Grid Width="250" Margin="0,5">
+            <Grid Width="270" Margin="0,5">
                 <Grid.LayoutTransform>
                     <TransformGroup>
                         <RotateTransform Angle="-90"/>
@@ -37,7 +38,7 @@
                         <ScaleTransform ScaleX="1" ScaleY="-1" />
                     </TransformGroup>
                 </Grid.LayoutTransform>
-                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Padding="5,1" Width="250" Height="30">
+                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Padding="5,1" Width="270" Height="30">
                     <TextBlock Visibility="{Binding Visible}" Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="14" Width="Auto" />
                 </Border>
             </Grid>
@@ -51,7 +52,7 @@
                         <ScaleTransform ScaleX="1" ScaleY="-1" />
                     </TransformGroup>
                 </Grid.LayoutTransform>
-                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Padding="5,1" Width="250" Height="30">
+                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Padding="5,1" Width="270" Height="30">
                     <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                         <ctrl:CheckBoxExt IsChecked="{Binding Checked}" CheckBoxSaved="{Binding IsSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="0,4"/>
                         <TextBlock Visibility="{Binding Visible}" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="14"/>
@@ -68,7 +69,7 @@
                         <ScaleTransform ScaleX="1" ScaleY="-1" />
                     </TransformGroup>
                 </Grid.LayoutTransform>
-                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Padding="5,1" Width="250" Height="30">
+                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Padding="5,1" Width="270" Height="30">
                     <ctrl:TextBoxEx Visibility="{Binding Visible}" IsEnabled="{Binding IsEnabled}" TextSaved="{Binding IsSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="14" Width="Auto" />
                 </Border>
             </Grid>
@@ -82,7 +83,7 @@
                         <ScaleTransform ScaleX="1" ScaleY="-1" />
                     </TransformGroup>
                 </Grid.LayoutTransform>
-                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Padding="5,1" Width="250">
+                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Padding="5,1" Width="270">
                     <ctrl:TextBoxEx Visibility="{Binding Visible}" EditBoxMode="SignInteger" TextSaved="{Binding IsSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding IsEnabled}" Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="14" Width="Auto" />
                 </Border>
             </Grid>
@@ -96,7 +97,7 @@
                         <ScaleTransform ScaleX="1" ScaleY="-1" />
                     </TransformGroup>
                 </Grid.LayoutTransform>
-                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Padding="5,1" Width="250" Height="Auto">
+                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Padding="5,1" Width="270" Height="Auto">
                     <Grid >
                         <Grid.ColumnDefinitions>
                             <ColumnDefinition />
@@ -110,30 +111,22 @@
                             <ListBox.ItemTemplate>
                                 <DataTemplate>
                                     <Grid>
-                                        <Grid.RowDefinitions>
-                                            <RowDefinition/>
-                                            <RowDefinition/>
-
-                                        </Grid.RowDefinitions>
-                                        <TextBlock Text="{Binding Key}" Padding="5 0 0 0" FontSize="13"/>
-                                        <Border Grid.Row="1" BorderThickness="1" BorderBrush="Black" Margin="2" Width="200" Height="25" CornerRadius="1">
-                                            <TextBlock Text="{Binding Value}" VerticalAlignment="Center" Padding="5 0 0 0" FontSize="13"/>
+                                        <Grid.ColumnDefinitions>
+                                            <ColumnDefinition/>
+                                            <ColumnDefinition/>
+                                        </Grid.ColumnDefinitions>
+                                        <Border  BorderThickness="1 .5 0 .5" BorderBrush="Black"  Width="50" Height="25">
+                                            <TextBlock Text="{Binding Key,Converter={StaticResource SequenceKeyConverter}}"  FontSize="13" VerticalAlignment="Center" Padding="1 0 0 0"/>
+                                        </Border>
+                                        <Border Grid.Column="1" BorderThickness="1 .5 1 .5" BorderBrush="Black"  Width="185" Height="25">
+                                            <TextBlock Text="{Binding Value}" VerticalAlignment="Center"  FontSize="13" Padding="1 0 0 0"/>
                                         </Border>
                                     </Grid>
-                                   
-                                    <!--<TextBlock Margin="0 0 0 1">
-                                        <TextBlock.Text>
-                                            <MultiBinding StringFormat="{}{0} : {1}">
-                                                <Binding Path="Key"/>
-                                                <Binding Path="Value" />
-                                            </MultiBinding>
-                                        </TextBlock.Text>
-                                    </TextBlock>-->
-                                    
+
                                 </DataTemplate>
                             </ListBox.ItemTemplate>
                         </ListBox>
-                        <Button  Command="{Binding Path=DataContext.SelectRecipeCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" CommandParameter="{Binding }" Grid.Column="1"  Content="..." Foreground="White" FontSize="20" Visibility="{Binding Visible}" Width="30" Height="20" Margin="5,0,0,0"/>
+                        <Button  Command="{Binding Path=DataContext.SelectRecipeCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" CommandParameter="{Binding }" Grid.Column="1"  Content="..." Foreground="White" FontSize="20" Visibility="{Binding Visible}" Width="20" Height="20"/>
                     </Grid>
                 </Border>
             </Grid>
@@ -147,7 +140,7 @@
                         <ScaleTransform ScaleX="1" ScaleY="-1" />
                     </TransformGroup>
                 </Grid.LayoutTransform>
-                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Padding="5,1" Width="250">
+                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Padding="5,1" Width="270">
                     <ctrl:ComboBoxExt Style="{StaticResource ResourceKey={x:Type ComboBox}}" 
                                       Visibility="{Binding Visible}" 
                                       ComboBoxSaved="{Binding IsSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
@@ -363,9 +356,9 @@
             </Grid.RowDefinitions>
             <Grid Width="1600" HorizontalAlignment="Left" Margin="10,0,0,0" IsEnabled="{Binding IsPermission}">
                 <Grid.ColumnDefinitions>
-                    <ColumnDefinition Width="250"/>
+                    <ColumnDefinition Width="270"/>
                     <ColumnDefinition Width="10*"/>
-                    <ColumnDefinition Width="250"/>
+                    <ColumnDefinition Width="270"/>
                     <ColumnDefinition Width="8*"/>
                     <ColumnDefinition Width="8*"/>
                     <ColumnDefinition Width="Auto"/>

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

@@ -50,7 +50,7 @@
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsSelected" Value="true">
-                            <Setter Property="Stroke" TargetName="Highlight" Value="Yellow"/>
+                            <Setter Property="Stroke" TargetName="Highlight" Value="Black"/>
                             <Setter Property="Opacity" TargetName="Highlight" Value="1"/>
                             <Setter Property="Foreground" Value="{DynamicResource FG_Black}"/>
                         </Trigger>