Browse Source

1 add vpw cell create Wafer
2 add vpw recipe rinse step limit

chenzk 1 week ago
parent
commit
265900f343

+ 31 - 2
Framework/Common/RecipeCenter/VpwRinseStep.cs

@@ -2,13 +2,14 @@
 using Newtonsoft.Json;
 using System;
 using System.Collections.Generic;
+using System.ComponentModel;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 
 namespace MECF.Framework.Common.RecipeCenter
 {
-    public class VpwRinseStep : NotifiableItem
+    public class VpwRinseStep : NotifiableItem,IDataErrorInfo, INotifyPropertyChanged
     {
         #region 内部变量
         private int _durationSeconds;
@@ -22,12 +23,40 @@ namespace MECF.Framework.Common.RecipeCenter
         public int DurationSeconds { get { return _durationSeconds; } set { _durationSeconds = value; InvokePropertyChanged(nameof(DurationSeconds)); } }
         [JsonProperty]
         public int RotationSpeed { get { return _rotationSpeed; } set { _rotationSpeed = value; InvokePropertyChanged(nameof(RotationSpeed)); } }
+        
         [JsonProperty]
         public int Index { get { return _index; } 
             set { _index = value;_step = _index + 1; InvokePropertyChanged(nameof(Index)); InvokePropertyChanged(nameof(Step)); } }
 
         [JsonProperty]
-        public int Step { get { return _step; } set { _step = value; InvokePropertyChanged(nameof(Step)); } }
+        public int Step { get { return _step; } set { _step = value; InvokePropertyChanged(nameof(Step)); } }
         #endregion
+
+        // IDataErrorInfo 实现
+        public string Error => null;
+        public string this[string columnName]
+        {
+            get
+            {
+                switch (columnName)
+                {
+                    case nameof(DurationSeconds):
+                        if (DurationSeconds < 0 || DurationSeconds > 200)
+                            return "Time must be between 0 and 200 seconds!";
+                        break;
+
+                    case nameof(RotationSpeed):
+                        if (RotationSpeed < 0 || RotationSpeed > 800)
+                            return "Speed must be between 0 and 800 rpm!";
+                        break;
+                }
+                return null;
+            }
+        }
+
+        // INotifyPropertyChanged 实现
+        public event PropertyChangedEventHandler PropertyChanged;
+        protected void OnPropertyChanged(string name) =>
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
     }
 }

+ 1 - 1
PunkHPX8_MainPages/Unity/ModuleManager.cs

@@ -19,7 +19,7 @@ namespace PunkHPX8_MainPages.Unity
         /// </summary>
         public static readonly List<string> ModulesID = new List<string>()
         {
-             "LP1","LP2","LP3","EfemRobot","Aligner1","SRD1","SRD2","PUF1","PUF2","Dummy1","Dummy2","Loader1"
+             "LP1","LP2","LP3","EfemRobot","Aligner1","SRD1","SRD2","PUF1","PUF2","Dummy1","Dummy2","Loader1","VPW1","VPW2"
         };
 
         public static Dictionary<string, ModuleInfo> ModuleInfos { get; private set; } = new Dictionary<string, ModuleInfo>();

+ 53 - 0
PunkHPX8_MainPages/ViewModels/VPWCellViewModel.cs

@@ -6,6 +6,7 @@ using MECF.Framework.Common.Persistent.VpwCell;
 using MECF.Framework.Common.Persistent.VpwMain;
 using MECF.Framework.Common.Utilities;
 using Prism.Mvvm;
+using PunkHPX8_MainPages.Unity;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -13,6 +14,7 @@ using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Input;
 using System.Windows.Threading;
+using WaferInfo = OpenSEMI.ClientBase.WaferInfo;
 
 namespace PunkHPX8_MainPages.ViewModels
 {
@@ -102,6 +104,8 @@ namespace PunkHPX8_MainPages.ViewModels
         private string _recipeMode;
         #endregion
 
+       
+
 
         #region UI
 
@@ -300,6 +304,50 @@ namespace PunkHPX8_MainPages.ViewModels
         }
         #endregion
 
+        #region wafer
+        /// <summary>
+        /// WaferID
+        /// </summary>
+        private string _waferID = "";
+        /// <summary>
+        /// SeqRecipe
+        /// </summary>
+        private string _seqRecipe;
+        /// <summary>
+        /// Wafer信息
+        /// </summary>
+        private WaferInfo _waferInfo;
+        #endregion
+
+
+        #region wafer
+        /// <summary>
+        /// WaferID
+        /// </summary>
+        public string WaferID
+        {
+            get { return _waferID; }
+            set { SetProperty(ref _waferID, value); }
+        }
+        /// <summary>
+        /// SeqRecipe
+        /// </summary>
+        public string SeqRecipe
+        {
+            get { return _seqRecipe; }
+            set { SetProperty(ref _seqRecipe, value); }
+        }
+        /// <summary>
+        /// Wafer信息
+        /// </summary>
+        public WaferInfo WaferInfo
+        {
+            get { return _waferInfo; }
+            set { SetProperty(ref _waferInfo, value); }
+        }
+        #endregion
+
+
         #endregion
 
         #region Command指令
@@ -358,6 +406,11 @@ namespace PunkHPX8_MainPages.ViewModels
                     VpwMainCommonData = CommonFunction.GetValue<VpwMainCommonData>(_rtDataValueDic, $"VPWMain1.{COMMONDATA}");
                     VpwCellPersistent = CommonFunction.GetValue<VpwCellPersistentValue>(_rtDataValueDic, $"{Module}.{PERSISTENT_VALUE}");
                     StateMachine = CommonFunction.GetValue<string>(_rtDataValueDic, $"{Module}.FsmState");
+                    //VPW Wafer信息
+                    if (ModuleManager.ModuleInfos[Module].WaferManager.Wafers.Count != 0)
+                    {
+                        WaferInfo = ModuleManager.ModuleInfos[Module].WaferManager.Wafers[0];
+                    }
                     if ("Manual".Equals(VpwCellPersistent.OperatingMode))
                     {
                         IsEnabled = true;

+ 2 - 1
PunkHPX8_MainPages/Views/VPWCellView.xaml

@@ -64,7 +64,8 @@
                                            VacuumValve="{Binding VpwCellCommonData.VacuumValve}"
                                            DIWFlow ="{Binding VpwCellCommonData.DiwFlow}"
                                            DIWLoopDo="{Binding DiwLoopDo}"
-                                           CellVacuum="{Binding VpwCellCommonData.VacuumPressure}"                                   
+                                           CellVacuum="{Binding VpwCellCommonData.VacuumPressure}"
+                                           WaferInfo="{Binding WaferInfo}" 
           
          ></UserControls:VPWCellUIControl>
         </Grid>

+ 84 - 10
PunkHPX8_MainPages/Views/VpwRecipeView.xaml

@@ -20,7 +20,6 @@
     </UserControl.Resources>
     <Grid>
         <Grid.RowDefinitions>
-            <RowDefinition Height="100"></RowDefinition>
             <RowDefinition Height="210"></RowDefinition>
             <RowDefinition Height="*"/>
         </Grid.RowDefinitions>
@@ -30,10 +29,10 @@
 
             <ColumnDefinition></ColumnDefinition>
         </Grid.ColumnDefinitions>
-        <UserControls:RecipeFileLoadControl Grid.Row="1" Grid.RowSpan="2" Grid.Column="1" Title="VPW Recipe" RecipeNodes="{Binding RecipeNodes}" OperationCommand="{Binding OperationCommand}"
+        <UserControls:RecipeFileLoadControl Grid.Row="0" Grid.RowSpan="2" Grid.Column="1" Title="VPW Recipe" RecipeNodes="{Binding RecipeNodes}" OperationCommand="{Binding OperationCommand}"
                                      RecipeLocation="{Binding CurrentNode.RecipeLocation}" EditEnable="{Binding EditEnable}" CreateEnable="{Binding CreateEnable}" RecipeFileName="{Binding CurrentNode.FileName}"
                                      CreateCommand="{Binding CreateCommand}" EditCommand="{Binding EditCommand}"/>
-        <Grid Grid.Row="1" Grid.Column="2" Margin="10 0 0 0">
+        <Grid Grid.Row="0" Grid.Column="2" Margin="10 0 0 0">
             <Grid.RowDefinitions>
                 <RowDefinition Height="70"></RowDefinition>
                 <RowDefinition Height="70"></RowDefinition>
@@ -177,7 +176,7 @@ Command="{Binding AutoCurrentBasedFalseCommand}"  IsChecked="{Binding Recipe.Vac
  Command="{Binding AutoCurrentBasedTrueCommand}"  IsChecked="{Binding Recipe.VacuumPrewetLargeEnable,Mode=TwoWay,Converter={StaticResource boolReverseConverter}}" Margin="220,-1,0,-6" ></RadioButton>
                         </Grid>
                     </GroupBox>
-                    <DataGrid x:Name="VacuumPrewetRinseGrid" Width="215" MinRowHeight="27" Grid.Row="6" AutoGenerateColumns="False"  CanUserAddRows="False"  FontFamily="Arial" FontSize="14" Margin="12,88,73,-78" 
+                    <DataGrid x:Name="VacuumPrewetRinseGrid"  Width="215" MinRowHeight="27" Grid.Row="6" AutoGenerateColumns="False"  CanUserAddRows="False"  FontFamily="Arial" FontSize="14" Margin="12,88,73,-78" 
           ItemsSource="{Binding Recipe.VacuumRinseStep}" SelectionMode="Single" IsEnabled="{Binding Enable}" SelectedIndex="{Binding SelectedVacuumPrewetIndex,Mode=TwoWay}"
                               ScrollViewer.HorizontalScrollBarVisibility="Disabled"  ScrollViewer.VerticalScrollBarVisibility="Auto">
                         <DataGrid.Resources>
@@ -185,9 +184,34 @@ Command="{Binding AutoCurrentBasedFalseCommand}"  IsChecked="{Binding Recipe.Vac
                         </DataGrid.Resources>
                         <DataGrid.Columns>
                             <DataGridTextColumn Header="Step" IsReadOnly="True" Width="50"  Binding="{Binding Step,Mode=TwoWay}" CanUserSort="false" CanUserReorder="False" CanUserResize="False"/>
-                            <DataGridTextColumn Header="Time(sec)" Width="80"  Binding="{Binding DurationSeconds,Mode=TwoWay}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" >
+                            <DataGridTextColumn Header="Time(sec)" Width="80"  Binding="{Binding DurationSeconds,Mode=TwoWay,ValidatesOnDataErrors=True}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" >
+                                <DataGridTextColumn.ElementStyle>
+                                    <Style TargetType="TextBlock">
+                                        <Setter Property="ToolTip" 
+                   Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
+                                    </Style>
+                                </DataGridTextColumn.ElementStyle>
+                                <DataGridTextColumn.EditingElementStyle>
+                                    <Style TargetType="TextBox">
+                                        <Setter Property="ToolTip" 
+                   Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
+                                    </Style>
+                                </DataGridTextColumn.EditingElementStyle>
+                            </DataGridTextColumn>
+                            <DataGridTextColumn Header="Speed(rpm)" Width="85"  Binding="{Binding RotationSpeed,Mode=TwoWay,ValidatesOnDataErrors=True}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" >
+                                <DataGridTextColumn.ElementStyle>
+                                    <Style TargetType="TextBlock">
+                                        <Setter Property="ToolTip" 
+                   Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
+                                    </Style>
+                                </DataGridTextColumn.ElementStyle>
+                                <DataGridTextColumn.EditingElementStyle>
+                                    <Style TargetType="TextBox">
+                                        <Setter Property="ToolTip" 
+                   Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
+                                    </Style>
+                                </DataGridTextColumn.EditingElementStyle>
                             </DataGridTextColumn>
-                            <DataGridTextColumn Header="Speed(rpm)" Width="85"  Binding="{Binding RotationSpeed,Mode=TwoWay}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" />
                         </DataGrid.Columns>
                     </DataGrid>
                 </Grid>
@@ -300,9 +324,34 @@ Command="{Binding AutoCurrentBasedFalseCommand}"  IsChecked="{Binding Recipe.Ven
                         </DataGrid.Resources>
                         <DataGrid.Columns>
                             <DataGridTextColumn Header="Step" Width="50"  IsReadOnly="True" Binding="{Binding Step,Mode=TwoWay}" CanUserSort="false" CanUserReorder="False" CanUserResize="False"/>
-                            <DataGridTextColumn Header="Time(sec)" Width="80"  Binding="{Binding DurationSeconds,Mode=TwoWay}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" >
+                            <DataGridTextColumn Header="Time(sec)" Width="80"  Binding="{Binding DurationSeconds,Mode=TwoWay,ValidatesOnDataErrors=True}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" >
+                                <DataGridTextColumn.ElementStyle>
+                                    <Style TargetType="TextBlock">
+                                        <Setter Property="ToolTip" 
+Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
+                                    </Style>
+                                </DataGridTextColumn.ElementStyle>
+                                <DataGridTextColumn.EditingElementStyle>
+                                    <Style TargetType="TextBox">
+                                        <Setter Property="ToolTip" 
+Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
+                                    </Style>
+                                </DataGridTextColumn.EditingElementStyle>
+                            </DataGridTextColumn>
+                            <DataGridTextColumn Header="Speed(rpm)" Width="85"  Binding="{Binding RotationSpeed,Mode=TwoWay,ValidatesOnDataErrors=True}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" >
+                                <DataGridTextColumn.ElementStyle>
+                                    <Style TargetType="TextBlock">
+                                        <Setter Property="ToolTip" 
+Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
+                                    </Style>
+                                </DataGridTextColumn.ElementStyle>
+                                <DataGridTextColumn.EditingElementStyle>
+                                    <Style TargetType="TextBox">
+                                        <Setter Property="ToolTip" 
+Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
+                                    </Style>
+                                </DataGridTextColumn.EditingElementStyle>
                             </DataGridTextColumn>
-                            <DataGridTextColumn Header="Speed(rpm)" Width="85"  Binding="{Binding RotationSpeed,Mode=TwoWay}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" />
                         </DataGrid.Columns>
                     </DataGrid>
                 </Grid>
@@ -368,9 +417,34 @@ Command="{Binding AutoCurrentBasedFalseCommand}"  IsChecked="{Binding Recipe.Ext
                         </DataGrid.Resources>
                         <DataGrid.Columns>
                             <DataGridTextColumn Header="Step" Width="50"  IsReadOnly="True" Binding="{Binding Step,Mode=TwoWay}" CanUserSort="false" CanUserReorder="False" CanUserResize="False"/>
-                            <DataGridTextColumn Header="Time(sec)" Width="80"  Binding="{Binding DurationSeconds,Mode=TwoWay}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" >
+                            <DataGridTextColumn Header="Time(sec)" Width="80"  Binding="{Binding DurationSeconds,Mode=TwoWay,ValidatesOnDataErrors=True}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" >
+                                <DataGridTextColumn.ElementStyle>
+                                    <Style TargetType="TextBlock">
+                                        <Setter Property="ToolTip" 
+Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
+                                    </Style>
+                                </DataGridTextColumn.ElementStyle>
+                                <DataGridTextColumn.EditingElementStyle>
+                                    <Style TargetType="TextBox">
+                                        <Setter Property="ToolTip" 
+Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
+                                    </Style>
+                                </DataGridTextColumn.EditingElementStyle>
+                            </DataGridTextColumn>
+                            <DataGridTextColumn Header="Speed(rpm)" Width="85"  Binding="{Binding RotationSpeed,Mode=TwoWay,ValidatesOnDataErrors=True}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" >
+                                <DataGridTextColumn.ElementStyle>
+                                    <Style TargetType="TextBlock">
+                                        <Setter Property="ToolTip" 
+Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
+                                    </Style>
+                                </DataGridTextColumn.ElementStyle>
+                                <DataGridTextColumn.EditingElementStyle>
+                                    <Style TargetType="TextBox">
+                                        <Setter Property="ToolTip" 
+Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
+                                    </Style>
+                                </DataGridTextColumn.EditingElementStyle>
                             </DataGridTextColumn>
-                            <DataGridTextColumn Header="Speed(rpm)" Width="85"  Binding="{Binding RotationSpeed,Mode=TwoWay}" CanUserSort="false" CanUserReorder="False" CanUserResize="False" />
                         </DataGrid.Columns>
                     </DataGrid>
                 </Grid>

+ 2 - 0
PunkHPX8_RT/Modules/VpwCell/VpwCellEntity.cs

@@ -200,6 +200,8 @@ namespace PunkHPX8_RT.Modules.VpwMain
         /// </summary>
         private void InitializeParameter()
         {
+            WaferManager.Instance.SubscribeLocation(Module, 1);
+            
             _persistentValue = VpwCellPersistentManager.Instance.GetPersistentValue(Module.ToString());
             if (_persistentValue == null)
             {

+ 7 - 0
PunkHPX8_Themes/PunkHPX8_Themes.csproj

@@ -510,6 +510,9 @@
     <Compile Include="UserControls\VPWStationPositionControl.xaml.cs">
       <DependentUpon>VPWStationPositionControl.xaml</DependentUpon>
     </Compile>
+    <Compile Include="UserControls\VPWWaferCtrl.xaml.cs">
+      <DependentUpon>VPWWaferCtrl.xaml</DependentUpon>
+    </Compile>
     <Compile Include="UserControls\WaferCtrl.xaml.cs">
       <DependentUpon>WaferCtrl.xaml</DependentUpon>
     </Compile>
@@ -1089,6 +1092,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="UserControls\VPWWaferCtrl.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="UserControls\WaferCtrl.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 187 - 152
PunkHPX8_Themes/UserControls/VPWCellUIControl.xaml

@@ -41,177 +41,212 @@
             <MenuItem Header="Close" Click="CloseCellVacuumValve_Click"/>
         </ContextMenu>
     </UserControl.Resources>
+
     <Canvas>
-        <Grid Height="50" Width="100" Canvas.Left="149" Canvas.Top="110"  >
-            <Grid.RowDefinitions>
-                <RowDefinition Height="30"></RowDefinition>
-                <RowDefinition Height="20"></RowDefinition>
-            </Grid.RowDefinitions>
-            <Grid Grid.Row="0">
-                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
-                           Status="{Binding ElementName=self,Path=DripValve}"  
-                           IsCanEdit="True" 
-                           ContextMenu="{StaticResource DripValve}"/>
-            </Grid>
-            <Grid Grid.Row="1">
-                <Label Margin="62,-18,-8,8" Height="30" FontSize="10"  FontWeight="Bold" Content="Drip" />
+            <Grid Height="50" Width="100" Canvas.Left="149" Canvas.Top="110"  >
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="30"></RowDefinition>
+                    <RowDefinition Height="20"></RowDefinition>
+                </Grid.RowDefinitions>
+                <Grid Grid.Row="0">
+                    <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
+                       Status="{Binding ElementName=self,Path=DripValve}"  
+                       IsCanEdit="True" 
+                       ContextMenu="{StaticResource DripValve}" RenderTransformOrigin="0.5,0.5">
+                        <customControls:CommonValveControl.RenderTransform>
+                            <TransformGroup>
+                                <ScaleTransform/>
+                                <SkewTransform/>
+                                <RotateTransform Angle="90"/>
+                                <TranslateTransform/>
+                            </TransformGroup>
+                        </customControls:CommonValveControl.RenderTransform>
+                    </customControls:CommonValveControl>
+                </Grid>
+                <Grid Grid.Row="1">
+                    <Label Margin="62,-18,-8,8" Height="30" FontSize="10"  FontWeight="Bold" Content="Drip" />
+                </Grid>
             </Grid>
-        </Grid>
 
-        <Grid Height="50" Width="100" Canvas.Left="258" Canvas.Top="109" >
-            <Grid.RowDefinitions>
-                <RowDefinition Height="30"></RowDefinition>
-                <RowDefinition Height="20"></RowDefinition>
-            </Grid.RowDefinitions>
-            <Grid Grid.Row="0">
-                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
-                           Status="{Binding ElementName=self,Path=SmallValve}"  
-                           IsCanEdit="True" 
-                           ContextMenu="{StaticResource SmallValve}"/>
+            <Grid Height="50" Width="100" Canvas.Left="258" Canvas.Top="109" >
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="30"></RowDefinition>
+                    <RowDefinition Height="20"></RowDefinition>
+                </Grid.RowDefinitions>
+                <Grid Grid.Row="0">
+                    <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
+                       Status="{Binding ElementName=self,Path=SmallValve}"  
+                       IsCanEdit="True" 
+                       ContextMenu="{StaticResource SmallValve}" RenderTransformOrigin="0.5,0.5">
+                        <customControls:CommonValveControl.RenderTransform>
+                            <TransformGroup>
+                                <ScaleTransform/>
+                                <SkewTransform/>
+                                <RotateTransform Angle="90"/>
+                                <TranslateTransform/>
+                            </TransformGroup>
+                        </customControls:CommonValveControl.RenderTransform>
+                    </customControls:CommonValveControl>
+                </Grid>
+                <Grid Grid.Row="1">
+                    <Label Margin="60,-20,-16,10" Height="30" FontSize="10"  FontWeight="Bold" Content="Small" />
+                </Grid>
             </Grid>
-            <Grid Grid.Row="1">
-                <Label Margin="60,-20,-16,10" Height="30" FontSize="10"  FontWeight="Bold" Content="Small" />
-            </Grid>
-        </Grid>
 
-        <Grid Height="50" Width="100" Canvas.Left="355" Canvas.Top="111" HorizontalAlignment="Left" VerticalAlignment="Center"  >
-            <Grid.RowDefinitions>
-                <RowDefinition Height="30"></RowDefinition>
-                <RowDefinition Height="20"></RowDefinition>
-            </Grid.RowDefinitions>
-            <Grid Grid.Row="0" Margin="0,-1,0,1">
-                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
-                           Status="{Binding ElementName=self,Path=LargeValve}"  
-                           IsCanEdit="True" 
-                           ContextMenu="{StaticResource LargeValve}"/>
-            </Grid>
-            <Grid Grid.Row="1">
-                <Label Margin="62,-22,-30,12" Height="30" FontSize="10"  FontWeight="Bold" Content="Large" />
+            <Grid Height="50" Width="100" Canvas.Left="355" Canvas.Top="111" HorizontalAlignment="Left" VerticalAlignment="Center"  >
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="30"></RowDefinition>
+                    <RowDefinition Height="20"></RowDefinition>
+                </Grid.RowDefinitions>
+                <Grid Grid.Row="0" Margin="0,-1,0,1">
+                    <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
+                       Status="{Binding ElementName=self,Path=LargeValve}"  
+                       IsCanEdit="True" 
+                       ContextMenu="{StaticResource LargeValve}" RenderTransformOrigin="0.5,0.5">
+                        <customControls:CommonValveControl.RenderTransform>
+                            <TransformGroup>
+                                <ScaleTransform/>
+                                <SkewTransform/>
+                                <RotateTransform Angle="90"/>
+                                <TranslateTransform/>
+                            </TransformGroup>
+                        </customControls:CommonValveControl.RenderTransform>
+                    </customControls:CommonValveControl>
+                </Grid>
+                <Grid Grid.Row="1">
+                    <Label Margin="62,-22,-30,12" Height="30" FontSize="10"  FontWeight="Bold" Content="Large" />
+                </Grid>
             </Grid>
-        </Grid>
 
-        <Grid Height="50" Width="100" Canvas.Left="436" Canvas.Top="203" HorizontalAlignment="Center" VerticalAlignment="Top" >
-            <Grid.RowDefinitions>
-                <RowDefinition Height="30"></RowDefinition>
-                <RowDefinition Height="20"></RowDefinition>
-            </Grid.RowDefinitions>
-            <Grid Grid.Row="0">
-                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
-                           Status="{Binding ElementName=self,Path=VentValve}"  
-                           IsCanEdit="True" 
-                           ContextMenu="{StaticResource VentValve}"/>
+            <Grid Height="50" Width="100" Canvas.Left="436" Canvas.Top="203" HorizontalAlignment="Center" VerticalAlignment="Top" >
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="30"></RowDefinition>
+                    <RowDefinition Height="20"></RowDefinition>
+                </Grid.RowDefinitions>
+                <Grid Grid.Row="0">
+                    <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
+                       Status="{Binding ElementName=self,Path=VentValve}"  
+                       IsCanEdit="True" 
+                       ContextMenu="{StaticResource VentValve}"/>
+                </Grid>
+                <Grid Grid.Row="1">
+                    <Label Margin="12,0,0,0" Height="30" Width="100" FontSize="10"  FontWeight="Bold" Content="Vent Vlave" />
+                </Grid>
             </Grid>
-            <Grid Grid.Row="1">
-                <Label Margin="12,0,0,0" Height="30" Width="100" FontSize="10"  FontWeight="Bold" Content="Vent Vlave" />
-            </Grid>
-        </Grid>
 
-        <Grid Height="50" Width="100" Canvas.Left="451" Canvas.Top="378" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="2">
-            <Grid.RowDefinitions>
-                <RowDefinition Height="30"></RowDefinition>
-                <RowDefinition Height="20"></RowDefinition>
-            </Grid.RowDefinitions>
-            <Grid Grid.Row="0" >
-                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
-                           Status="{Binding ElementName=self,Path=DrainValve}"  
-                           IsCanEdit="True" 
-                           ContextMenu="{StaticResource DrainValve}"/>
-            </Grid>
-            <Grid Grid.Row="1">
-                <Label Margin="12,0,0,0" Height="30" Width="100" FontSize="10"  FontWeight="Bold" Content="Drain Valve" />
+            <Grid Height="50" Width="100" Canvas.Left="451" Canvas.Top="378" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="2">
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="30"></RowDefinition>
+                    <RowDefinition Height="20"></RowDefinition>
+                </Grid.RowDefinitions>
+                <Grid Grid.Row="0" >
+                    <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
+                       Status="{Binding ElementName=self,Path=DrainValve}"  
+                       IsCanEdit="True" 
+                       ContextMenu="{StaticResource DrainValve}"/>
+                </Grid>
+                <Grid Grid.Row="1">
+                    <Label Margin="12,0,0,0" Height="30" Width="100" FontSize="10"  FontWeight="Bold" Content="Drain Valve" />
+                </Grid>
             </Grid>
-        </Grid>
 
-        <Grid Height="50" Width="100" Canvas.Left="43" Canvas.Top="431" Panel.ZIndex="2">
-            <Grid.RowDefinitions>
-                <RowDefinition Height="30"></RowDefinition>
-                <RowDefinition Height="20"></RowDefinition>
-            </Grid.RowDefinitions>
-            <Grid Grid.Row="0">
-                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
-                           Status="{Binding ElementName=self,Path=VacuumValve}"  
-                           IsCanEdit="True" 
-                           ContextMenu="{StaticResource CellVacuumValve}"/>
+            <Grid Height="50" Width="100" Canvas.Left="43" Canvas.Top="431" Panel.ZIndex="2">
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="30"></RowDefinition>
+                    <RowDefinition Height="20"></RowDefinition>
+                </Grid.RowDefinitions>
+                <Grid Grid.Row="0">
+                    <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
+                       Status="{Binding ElementName=self,Path=VacuumValve}"  
+                       IsCanEdit="True" 
+                       ContextMenu="{StaticResource CellVacuumValve}"/>
+                </Grid>
+                <Grid Grid.Row="1">
+                    <Label Margin="12,0,0,0" Height="30" Width="100" FontSize="10"  FontWeight="Bold" Content="Vacuum Valve" />
+                </Grid>
             </Grid>
-            <Grid Grid.Row="1">
-                <Label Margin="12,0,0,0" Height="30" Width="100" FontSize="10"  FontWeight="Bold" Content="Vacuum Valve" />
-            </Grid>
-        </Grid>
 
-        <Grid Height="50" Width="120" Canvas.Left="420" Canvas.Top="14"  >
-            <Grid.RowDefinitions>
-                <RowDefinition Height="20"></RowDefinition>
-                <RowDefinition Height="30"></RowDefinition>
-            </Grid.RowDefinitions>
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="60"></ColumnDefinition>
-                <ColumnDefinition Width="60"></ColumnDefinition>
-            </Grid.ColumnDefinitions>
-            <Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" Margin="0,0,10,0">
-                <Label Content="DIWLoopDO" FontSize="10" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"/>
+            <Grid Height="50" Width="120" Canvas.Left="420" Canvas.Top="14"  >
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="20"></RowDefinition>
+                    <RowDefinition Height="30"></RowDefinition>
+                </Grid.RowDefinitions>
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="60"></ColumnDefinition>
+                    <ColumnDefinition Width="60"></ColumnDefinition>
+                </Grid.ColumnDefinitions>
+                <Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" Margin="0,0,10,0">
+                    <Label Content="DIWLoopDO" FontSize="10" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"/>
+                </Grid>
+                <Border Grid.Row="1" Grid.Column="0"  Margin="5,5,5,5" Background="Black" Width="50" VerticalAlignment="Center" HorizontalAlignment="Right">
+                    <TextBlock  Text="{Binding ElementName=self,Path=DIWLoopDo}" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
+                </Border>
+                <Border Grid.Row="1" Grid.Column="1"  Margin="0,5,0,5 " Background="Black" Height="22" Width="40" VerticalAlignment="Center" HorizontalAlignment="Left">
+                    <TextBlock  Text="ppm" Foreground="Lime" FontSize="12" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                </Border>
             </Grid>
-            <Border Grid.Row="1" Grid.Column="0"  Margin="5,5,5,5" Background="Black" Width="50" VerticalAlignment="Center" HorizontalAlignment="Right">
-                <TextBlock  Text="{Binding ElementName=self,Path=DIWLoopDo}" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
-            </Border>
-            <Border Grid.Row="1" Grid.Column="1"  Margin="0,5,0,5 " Background="Black" Height="22" Width="40" VerticalAlignment="Center" HorizontalAlignment="Left">
-                <TextBlock  Text="ppm" Foreground="Lime" FontSize="12" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
-            </Border>
-        </Grid>
 
-        <Grid Height="50" Width="120" Canvas.Left="220" Canvas.Top="14"  >
-            <Grid.RowDefinitions>
-                <RowDefinition Height="20"></RowDefinition>
-                <RowDefinition Height="30"></RowDefinition>
-            </Grid.RowDefinitions>
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="60"></ColumnDefinition>
-                <ColumnDefinition Width="60"></ColumnDefinition>
-            </Grid.ColumnDefinitions>
-            <Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" Margin="0,0,10,0">
-                <Label Content="Diw Cell Flow" FontSize="10" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"/>
+            <Grid Height="50" Width="120" Canvas.Left="220" Canvas.Top="14"  >
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="20"></RowDefinition>
+                    <RowDefinition Height="30"></RowDefinition>
+                </Grid.RowDefinitions>
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="60"></ColumnDefinition>
+                    <ColumnDefinition Width="60"></ColumnDefinition>
+                </Grid.ColumnDefinitions>
+                <Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" Margin="0,0,10,0">
+                    <Label Content="Diw Cell Flow" FontSize="10" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"/>
+                </Grid>
+                <Border Grid.Row="1" Grid.Column="0"  Margin="5,5,5,5" Background="Black" Width="50" VerticalAlignment="Center" HorizontalAlignment="Right">
+                    <TextBlock  Text="{Binding ElementName=self,Path=DIWFlow}" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
+                </Border>
+                <Border Grid.Row="1" Grid.Column="1"  Margin="0,5,0,5 " Background="Black" Height="22" Width="40" VerticalAlignment="Center" HorizontalAlignment="Left">
+                    <TextBlock  Text="L/min" Foreground="Lime" FontSize="12" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                </Border>
             </Grid>
-            <Border Grid.Row="1" Grid.Column="0"  Margin="5,5,5,5" Background="Black" Width="50" VerticalAlignment="Center" HorizontalAlignment="Right">
-                <TextBlock  Text="{Binding ElementName=self,Path=DIWFlow}" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
-            </Border>
-            <Border Grid.Row="1" Grid.Column="1"  Margin="0,5,0,5 " Background="Black" Height="22" Width="40" VerticalAlignment="Center" HorizontalAlignment="Left">
-                <TextBlock  Text="L/min" Foreground="Lime" FontSize="12" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
-            </Border>
-        </Grid>
 
-        <Grid Height="50" Width="120" Canvas.Left="76" Canvas.Top="377"  >
-            <Grid.RowDefinitions>
-                <RowDefinition Height="20"></RowDefinition>
-                <RowDefinition Height="30"></RowDefinition>
-            </Grid.RowDefinitions>
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="60"></ColumnDefinition>
-                <ColumnDefinition Width="60"></ColumnDefinition>
-            </Grid.ColumnDefinitions>
-            <Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" Margin="0,0,10,0">
-                <Label Content="Cell Vacuum" FontSize="10" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"/>
+            <Grid Height="50" Width="120" Canvas.Left="76" Canvas.Top="377"  >
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="20"></RowDefinition>
+                    <RowDefinition Height="30"></RowDefinition>
+                </Grid.RowDefinitions>
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="60"></ColumnDefinition>
+                    <ColumnDefinition Width="60"></ColumnDefinition>
+                </Grid.ColumnDefinitions>
+                <Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" Margin="0,0,10,0">
+                    <Label Content="Cell Vacuum" FontSize="10" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"/>
+                </Grid>
+                <Border Grid.Row="1" Grid.Column="0"  Margin="5,5,5,5" Background="Black" Width="50" VerticalAlignment="Center" HorizontalAlignment="Right">
+                    <TextBlock  Text="{Binding ElementName=self,Path=CellVacuum}" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
+                </Border>
+                <Border Grid.Row="1" Grid.Column="1"  Margin="0,5,0,5 " Background="Black" Height="22" Width="40" VerticalAlignment="Center" HorizontalAlignment="Left">
+                    <TextBlock  Text="Toor" Foreground="Lime" FontSize="12" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                </Border>
             </Grid>
-            <Border Grid.Row="1" Grid.Column="0"  Margin="5,5,5,5" Background="Black" Width="50" VerticalAlignment="Center" HorizontalAlignment="Right">
-                <TextBlock  Text="{Binding ElementName=self,Path=CellVacuum}" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
-            </Border>
-            <Border Grid.Row="1" Grid.Column="1"  Margin="0,5,0,5 " Background="Black" Height="22" Width="40" VerticalAlignment="Center" HorizontalAlignment="Left">
-                <TextBlock  Text="Toor" Foreground="Lime" FontSize="12" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
-            </Border>
-        </Grid>
-        <Image Source="pack://application:,,,/PunkHPX8_Themes;component/Themes/Images/parts/VpwUp.png" Height="84"  Width="254"  HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="181" Canvas.Top="163"/>
-        <Image Source="pack://application:,,,/PunkHPX8_Themes;component/Themes/Images/parts/VpwCell.png" Height="236"  Width="236"  HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="187" Canvas.Top="247"/>
+            <Image Source="pack://application:,,,/PunkHPX8_Themes;component/Themes/Images/parts/VpwUp.png" Height="84"  Width="254"  HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="181" Canvas.Top="163"/>
+            <Image Source="pack://application:,,,/PunkHPX8_Themes;component/Themes/Images/parts/VpwCell.png" Height="236"  Width="236"  HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="1" Canvas.Left="187" Canvas.Top="247"/>
+
+            <userControls:FlowPipe  Height="6" Width="360" IsFlowing="true" IsReverse="True" Panel.ZIndex="-1" Canvas.Left="195" Canvas.Top="66" HorizontalAlignment="Left" VerticalAlignment="Center" />
+            <userControls:FlowPipe IsFlowing="{Binding ElementName=self,Path=LargeValve}" Height="8"  Width="124"  RotateTransformValue="90" HorizontalAlignment="Left" VerticalAlignment="Center" Panel.ZIndex="-1" Canvas.Left="409" Canvas.Top="70"/>
+            <userControls:FlowPipe IsFlowing="{Binding ElementName=self,Path=DripValve}" Height="8"  Width="124"  RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="-1" Canvas.Left="203" Canvas.Top="67"/>
+            <userControls:FlowPipe IsFlowing="{Binding ElementName=self,Path=SmallValve}" Height="8"  Width="124"  RotateTransformValue="90" HorizontalAlignment="Left" VerticalAlignment="Center" Panel.ZIndex="-1" Canvas.Left="312" Canvas.Top="71"/>
 
-        <userControls:FlowPipe  Height="6" Width="360" IsFlowing="true" IsReverse="True" Panel.ZIndex="-1" Canvas.Left="195" Canvas.Top="66" HorizontalAlignment="Left" VerticalAlignment="Center" />
-        <userControls:FlowPipe IsFlowing="{Binding ElementName=self,Path=LargeValve}" Height="8"  Width="124"  RotateTransformValue="90" HorizontalAlignment="Left" VerticalAlignment="Center" Panel.ZIndex="-1" Canvas.Left="409" Canvas.Top="70"/>
-        <userControls:FlowPipe IsFlowing="{Binding ElementName=self,Path=DripValve}" Height="8"  Width="124"  RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="-1" Canvas.Left="203" Canvas.Top="67"/>
-        <userControls:FlowPipe IsFlowing="{Binding ElementName=self,Path=SmallValve}" Height="8"  Width="124"  RotateTransformValue="90" HorizontalAlignment="Left" VerticalAlignment="Center" Panel.ZIndex="-1" Canvas.Left="312" Canvas.Top="71"/>
+            <userControls:FlowPipe  Height="6" Width="130" IsFlowing="{Binding ElementName=self,Path=VentValve}" IsReverse="True" Panel.ZIndex="-1" Canvas.Left="424" Canvas.Top="215" HorizontalAlignment="Left" VerticalAlignment="Top" />
+            <userControls:FlowPipe  Height="6" Width="230" IsFlowing="{Binding ElementName=self,Path=DrainValve}" IsReverse="False" Panel.ZIndex="1" Canvas.Left="321" Canvas.Top="391" HorizontalAlignment="Left" VerticalAlignment="Center" />
+            <userControls:FlowPipe  Height="6" Width="260" IsFlowing="{Binding ElementName=self,Path=VacuumValve}" IsReverse="False" Panel.ZIndex="1" Canvas.Left="48" Canvas.Top="443" HorizontalAlignment="Center" VerticalAlignment="Top" />
 
-        <userControls:FlowPipe  Height="6" Width="130" IsFlowing="{Binding ElementName=self,Path=VentValve}" IsReverse="True" Panel.ZIndex="-1" Canvas.Left="424" Canvas.Top="215" HorizontalAlignment="Left" VerticalAlignment="Top" />
-        <userControls:FlowPipe  Height="6" Width="230" IsFlowing="{Binding ElementName=self,Path=DrainValve}" IsReverse="False" Panel.ZIndex="1" Canvas.Left="321" Canvas.Top="391" HorizontalAlignment="Left" VerticalAlignment="Center" />
-        <userControls:FlowPipe  Height="6" Width="260" IsFlowing="{Binding ElementName=self,Path=VacuumValve}" IsReverse="False" Panel.ZIndex="1" Canvas.Left="48" Canvas.Top="443" HorizontalAlignment="Center" VerticalAlignment="Top" />
+            <Label  Height="26" Width="63" FontSize="10"  FontWeight="Bold" Content="DIW In" Canvas.Left="552" Canvas.Top="58" HorizontalAlignment="Center" VerticalAlignment="Top" />
+            <Label  Height="26" Width="63" FontSize="10"  FontWeight="Bold" Content="N2 In" Canvas.Left="553" Canvas.Top="207" HorizontalAlignment="Left" VerticalAlignment="Top" />
+            <Label  Height="26" Width="63" FontSize="10"  FontWeight="Bold" Content="To Drain" Canvas.Left="540" Canvas.Top="368" HorizontalAlignment="Left" VerticalAlignment="Top" RenderTransformOrigin="0.302,1.385" />
+            <Label  Height="26" Width="80" FontSize="10"  FontWeight="Bold" Content="To VAC Pump" Canvas.Left="2" Canvas.Top="421" HorizontalAlignment="Center" VerticalAlignment="Top" />
 
-        <Label  Height="26" Width="63" FontSize="10"  FontWeight="Bold" Content="DIW In" Canvas.Left="552" Canvas.Top="58" HorizontalAlignment="Center" VerticalAlignment="Top" />
-        <Label  Height="26" Width="63" FontSize="10"  FontWeight="Bold" Content="N2 In" Canvas.Left="553" Canvas.Top="207" HorizontalAlignment="Left" VerticalAlignment="Top" />
-        <Label  Height="26" Width="63" FontSize="10"  FontWeight="Bold" Content="To Drain" Canvas.Left="540" Canvas.Top="368" HorizontalAlignment="Left" VerticalAlignment="Top" RenderTransformOrigin="0.302,1.385" />
-        <Label  Height="26" Width="80" FontSize="10"  FontWeight="Bold" Content="To VAC Pump" Canvas.Left="2" Canvas.Top="421" HorizontalAlignment="Center" VerticalAlignment="Top" />
-    </Canvas>
+            <Canvas Height="30" Width="150" Canvas.Left="231" Canvas.Top="231" RenderTransformOrigin="0.5,0.5" Panel.ZIndex="2">
+                <Viewbox   Canvas.Left="5"  Canvas.Top="2.5" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="5">
+                <local:VPWWaferCtrl Width="140" Height="25" WaferData="{Binding ElementName=self, Path=WaferInfo}"/>
+                </Viewbox>
+            </Canvas>
+        </Canvas>
+     
 </UserControl>

+ 18 - 2
PunkHPX8_Themes/UserControls/VPWCellUIControl.xaml.cs

@@ -1,4 +1,5 @@
-using MECF.Framework.Common.OperationCenter;
+using OpenSEMI.ClientBase;
+using MECF.Framework.Common.OperationCenter;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -43,7 +44,22 @@ namespace PunkHPX8_Themes.UserControls
                 this.SetValue(ModuleNameProperty, value);
             }
         }
-
+        public static readonly DependencyProperty WaferInfoProperty = DependencyProperty.Register(
+        "WaferInfo", typeof(WaferInfo), typeof(VPWCellUIControl));
+        /// <summary>
+        /// WaferInfo
+        /// </summary>
+        public WaferInfo WaferInfo
+        {
+            get
+            {
+                return (WaferInfo)this.GetValue(WaferInfoProperty);
+            }
+            set
+            {
+                this.SetValue(WaferInfoProperty, value);
+            }
+        }
         public static readonly DependencyProperty DripValveProerty = DependencyProperty.Register(
             "DripValve", typeof(bool), typeof(VPWCellUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
         /// <summary>

+ 21 - 0
PunkHPX8_Themes/UserControls/VPWWaferCtrl.xaml

@@ -0,0 +1,21 @@
+<UserControl x:Class="PunkHPX8_Themes.UserControls.VPWWaferCtrl"
+             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" 
+             xmlns:local="clr-namespace:PunkHPX8_Themes.UserControls"
+             mc:Ignorable="d" Name="self"
+             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"   
+             xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation">
+    <Grid RenderTransformOrigin="0.5,0.5">
+        <ctrl:Slot ViewType="Front" WaferStatus="{Binding ElementName=self, Path=WaferData.WaferStatus}" 
+                              SlotID="{Binding ElementName=self, Path=WaferData.SlotID}" 
+                              ModuleID="{Binding ElementName=self, Path=WaferData.ModuleID}" 
+                              SourceName="{Binding ElementName=self, Path=WaferData.SourceName}" 
+                   DataContext="{Binding WaferData,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"  
+               HorizontalAlignment="Center" VerticalAlignment="Center"  SlotMouseButtonDown="Slot_SlotMouseButtonDown" WaferTransferStarted="OnWaferTransfer">
+
+        </ctrl:Slot>
+
+    </Grid>
+</UserControl>

+ 61 - 0
PunkHPX8_Themes/UserControls/VPWWaferCtrl.xaml.cs

@@ -0,0 +1,61 @@
+using OpenSEMI.Ctrlib.Controls;
+using PunkHPX8_Core;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+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 OpenSEMI.ClientBase;
+
+namespace PunkHPX8_Themes.UserControls
+{
+    /// <summary>
+    /// VPWWaferCtrl.xaml 的交互逻辑
+    /// </summary>
+    public partial class VPWWaferCtrl : UserControl
+    {
+        public VPWWaferCtrl()
+        {
+            InitializeComponent();
+        }
+
+        public WaferInfo WaferData
+        {
+            get { return (WaferInfo)GetValue(WaferDataProperty); }
+            set { SetValue(WaferDataProperty, value); }
+        }
+
+        public static readonly DependencyProperty WaferDataProperty =
+            DependencyProperty.Register("WaferData", typeof(WaferInfo), typeof(VPWWaferCtrl), new PropertyMetadata(null));
+
+
+        private void Slot_SlotMouseButtonDown(object sender, MouseButtonEventArgs e)
+        {
+            GlobalEvents.OnSlotRightClickChanged(sender as Slot);
+        }
+
+        private void OnWaferTransfer(object sender, DragDropEventArgs e)
+        {
+            try
+            {
+                GlobalEvents.OnSlotWaferTransfer(e);
+            }
+            catch (Exception ex)
+            {
+                Trace.WriteLine(ex);
+            }
+        }
+
+    }
+}
+     

+ 5 - 2
PunkHPX8_Themes/UserControls/WaferCtrl.xaml

@@ -4,11 +4,14 @@
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:PunkHPX8_Themes.UserControls"
-             mc:Ignorable="d" 
+             mc:Ignorable="d" Name="self"
              xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"   
              xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation">
     <Grid RenderTransformOrigin="0.5,0.5">
-        <ctrl:Slot ViewType="Top" WaferStatus="{Binding WaferStatus}" SlotID="{Binding SlotID}" ModuleID="{Binding ModuleID}" SourceName="{Binding SourceName}" 
+        <ctrl:Slot ViewType="Top" WaferStatus="{Binding ElementName=self, Path=WaferData.WaferStatus}" 
+                                  SlotID="{Binding ElementName=self, Path=WaferData.SlotID}" 
+                                  ModuleID="{Binding ElementName=self, Path=WaferData.ModuleID}" 
+                                  SourceName="{Binding ElementName=self, Path=WaferData.SourceName}" 
                        DataContext="{Binding WaferData,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"  
                    HorizontalAlignment="Center" VerticalAlignment="Center"  SlotMouseButtonDown="Slot_SlotMouseButtonDown" WaferTransferStarted="OnWaferTransfer">