Browse Source

Add PlatType selectedItem in SequenceRecipeView;

niuyx 1 month ago
parent
commit
df512361d7

+ 37 - 7
CyberX8_MainPages/ViewModels/SequenceRecipeViewModel.cs

@@ -1,11 +1,7 @@
-using Aitex.Core.RT.Log;
-using Aitex.Core.UI.Dialog;
-using Aitex.Core.UI.MVVM;
+using Aitex.Core.UI.MVVM;
 using Aitex.Core.Utilities;
-using Caliburn.Micro.Core;
 using MECF.Framework.Common.DataCenter;
 using MECF.Framework.Common.RecipeCenter;
-using CyberX8_Core;
 using CyberX8_MainPages.PMs;
 using CyberX8_Themes.UserControls;
 using Prism.Mvvm;
@@ -14,8 +10,6 @@ using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.ComponentModel;
 using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows;
 using System.Windows.Input;
 
@@ -26,6 +20,11 @@ namespace CyberX8_MainPages.ViewModels
         #region 常量
         private const string ENGINEERING = "Engineering";
         private const string SEQUENCE = "seq";
+        public enum PlatType 
+        {
+            notch,
+            flat
+        }
         #endregion
         #region 内部变量
         /// <summary>
@@ -94,6 +93,11 @@ namespace CyberX8_MainPages.ViewModels
         /// </summary>
         private List<string> _crsTypeLst = null;
         /// <summary>
+        /// <summary>
+        /// PlatType类型集合
+        /// </summary>
+        private List<PlatType> _platTypeLst = null;
+        /// <summary>
         /// Wafer尺寸集合
         /// </summary>
         private List<int> _waferSizeLst = null;
@@ -113,6 +117,10 @@ namespace CyberX8_MainPages.ViewModels
         /// 属性检验结果字典
         /// </summary>
         private Dictionary<string, bool> _propertyValidResultDic = new Dictionary<string, bool>();
+        /// <summary>
+        /// Selected Flat Type
+        /// </summary>
+        private PlatType _selectedPlatType;
         #endregion
         #region 属性
         public ObservableCollection<RecipeNode> RecipeNodes
@@ -221,6 +229,14 @@ namespace CyberX8_MainPages.ViewModels
             set { SetProperty(ref _crsTypeLst, value); }
         }
         /// <summary>
+        /// PlatType集合
+        /// </summary>
+        public List<PlatType> PlatTypeLst
+        {
+            get { return _platTypeLst; }
+            set { SetProperty(ref _platTypeLst, value); }
+        }
+        /// <summary>
         /// Wafer 尺寸集合
         /// </summary>
         public List<int> WaferSizeLst
@@ -244,6 +260,15 @@ namespace CyberX8_MainPages.ViewModels
             get { return _propertyValidResultDic; }
             set { SetProperty(ref _propertyValidResultDic, value); }
         }
+        /// <summary>
+        /// Selected Plat Type
+        /// </summary>
+        public PlatType SelectedPlatType 
+        {
+            get { return _selectedPlatType; }
+            set { SetProperty(ref _selectedPlatType, value); }
+        }
+
         #endregion
 
         #region 指令
@@ -312,6 +337,9 @@ namespace CyberX8_MainPages.ViewModels
             {
                 CrsTypeLst = crstypeContent.Split(',').ToList();
             }
+            PlatTypeLst = new List<PlatType>();
+            PlatTypeLst.Add(PlatType.notch);
+            PlatTypeLst.Add(PlatType.flat);
         }
         /// <summary>
         /// 加载数据
@@ -371,6 +399,7 @@ namespace CyberX8_MainPages.ViewModels
                     {
                         ProcessRecipes.AddRange(Recipe.Recipes);
                     }
+                    SelectedPlatType = (PlatType)Recipe.PlatType;
                 }
                 else
                 {
@@ -516,6 +545,7 @@ namespace CyberX8_MainPages.ViewModels
                 Recipe.Recipes = new List<string>();
                 Recipe.Recipes.AddRange(ProcessRecipes);
                 Recipe.SaveDate = DateTime.Now;
+                Recipe.PlatType = (int)SelectedPlatType;
                 try
                 {
                     _uiRecipeManager.SaveRecipe<SequenceRecipe>(ENGINEERING, Recipe.Ppid, "seq",Recipe);

+ 6 - 2
CyberX8_MainPages/Views/SequenceRecipeView.xaml

@@ -134,7 +134,11 @@
                     <ComboBox Height="30" Margin="0,0,20,0" ItemsSource="{Binding CrsTypeLst}" SelectedItem="{Binding Recipe.CrsType}">
                     </ComboBox>
                 </GroupBox>
-                <GroupBox Grid.Row="2" Header="Single Wafer shuttle Side" IsEnabled="{Binding Enable}">
+                <GroupBox Grid.Row="2" Header="Plat Type" IsEnabled="{Binding Enable}">
+                    <ComboBox Height="30" Margin="0,0,20,0" ItemsSource="{Binding PlatTypeLst}" SelectedItem="{Binding SelectedPlatType}">
+                    </ComboBox>
+                </GroupBox>
+                <GroupBox Grid.Row="3" Header="Single Wafer shuttle Side" IsEnabled="{Binding Enable}">
                     <Grid>
                         <Grid.ColumnDefinitions>
                             <ColumnDefinition Width="23*"/>
@@ -144,7 +148,7 @@
                         <RadioButton Content="SideA" Height="35" Width="100" VerticalContentAlignment="Center" Margin="207,6,135,7" IsChecked="{Binding Recipe.LastSingleWaferToSideB,Converter={StaticResource boolReverseConverter}}" Grid.Column="1"></RadioButton>
                     </Grid>
                 </GroupBox>
-                <UserControls:GroupTextBoxControl Grid.Row="3" Title="Alignment Angle" MinValue="0" MaxValue="360" IntValue="{Binding Recipe.AlignmentAngle,Mode=TwoWay}" ValidResult="{Binding PropertyValidResultDic[AlignmentAngle],Mode=TwoWay}" Unit="deg" />
+                <UserControls:GroupTextBoxControl Grid.Row="4" Title="Alignment Angle" MinValue="0" MaxValue="360" IntValue="{Binding Recipe.AlignmentAngle,Mode=TwoWay}" ValidResult="{Binding PropertyValidResultDic[AlignmentAngle],Mode=TwoWay}" Unit="deg" Margin="0,0,0,40" />
 
             </Grid>
         </Grid>