Browse Source

add efem/operation view aligner wafer module

chenzk 2 days ago
parent
commit
b1596be753

+ 7 - 1
PunkHPX8_MainPages/ViewModels/EfemViewModel.cs

@@ -53,6 +53,7 @@ namespace PunkHPX8_MainPages.ViewModels
         private ModuleInfo m_EFEMModuleInfo;
         private ModuleInfo m_srd1ModuleInfo;//upper
         private ModuleInfo m_srd2ModuleInfo;
+        private ModuleInfo _alignerModuleInfo;
 
         private List<EFEMModule> m_EFEMModules = new List<EFEMModule>();
         private List<Flip> m_FlipNames = new List<Flip>();
@@ -176,6 +177,11 @@ namespace PunkHPX8_MainPages.ViewModels
             get { return m_EFEMModuleInfo; }
             set { SetProperty(ref m_EFEMModuleInfo, value); }
         }
+        public ModuleInfo AlignerModuleInfo
+        {
+            get { return _alignerModuleInfo; }
+            set { SetProperty(ref _alignerModuleInfo, value); }
+        }
         public List<EFEMModule> EFEMModules
         {
             get { return m_EFEMModules; }
@@ -1011,7 +1017,7 @@ namespace PunkHPX8_MainPages.ViewModels
         #region 私有方法
         private void Timer_Tick(object sender, EventArgs e)
         {
-            
+            AlignerModuleInfo = ModuleManager.ModuleInfos["Aligner1"];
             if (Srd1IsInstalled)
             {
                 if (ModuleManager.ModuleInfos["SRD1"].WaferManager.Wafers.Count != 0)

+ 1 - 1
PunkHPX8_MainPages/ViewModels/MaterialMovementViewModel.cs

@@ -20,7 +20,7 @@ namespace PunkHPX8_MainPages.ViewModels
     public class MaterialMovementViewModel : BindableBase
     {
         #region 常量
-        private const int DATAGRIP_ROW_NUM = 24;
+        private const int DATAGRIP_ROW_NUM = 8;
         
         #endregion
 

+ 7 - 0
PunkHPX8_MainPages/ViewModels/OperationOverNewViewModel.cs

@@ -56,6 +56,7 @@ namespace PunkHPX8_MainPages.ViewModels
         private ModuleInfo _LP1ModuleInfo;
         private ModuleInfo _LP2ModuleInfo;
         private ModuleInfo _EFEMModuleInfo;
+        private ModuleInfo _alignerModuleInfo;
         private ModuleInfo _srd1ModuleInfo;
         private ModuleInfo _srd2ModuleInfo;
         private ModuleInfo _dummy1ModuleInfo;
@@ -129,6 +130,11 @@ namespace PunkHPX8_MainPages.ViewModels
             get { return _EFEMModuleInfo; }
             set { SetProperty(ref _EFEMModuleInfo, value); }
         }
+        public ModuleInfo AlignerModuleInfo
+        {
+            get { return _alignerModuleInfo; }
+            set { SetProperty(ref _alignerModuleInfo, value); }
+        }
         public ModuleInfo LP2ModuleInfo
         {
             get { return _LP2ModuleInfo; }
@@ -550,6 +556,7 @@ namespace PunkHPX8_MainPages.ViewModels
             SRD2ModuleInfo = ModuleManager.ModuleInfos["SRD2"];
             Dummy1ModuleInfo = ModuleManager.ModuleInfos["Dummy1"];
             Dummy2ModuleInfo = ModuleManager.ModuleInfos["Dummy2"];
+            AlignerModuleInfo = ModuleManager.ModuleInfos["Aligner1"];
 
             if (ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers.Count != 0)
             {

+ 1 - 0
PunkHPX8_MainPages/Views/EfemView.xaml

@@ -78,6 +78,7 @@
             <TextBlock Canvas.Top="650" Canvas.Left="90" Text="{Binding RtDataValues[LP2.WaferSize], StringFormat=({0})}" Visibility="{Binding RtDataValues[LP2.CassettePlaced], Converter={StaticResource BoolToVisibility2}}"
                        HorizontalAlignment="Center" Margin="0,5,0,0" FontSize="16">
             </TextBlock>
+            <userControls:AlignerFrontView Canvas.Left="370" Canvas.Top="735" UnitData="{Binding AlignerModuleInfo}"/>
             <userControls:CellChamber x:Name="efem1" Width="924" Height="733" Canvas.Left="58" Canvas.Top="150" 
                                 LP1Presented="{Binding RtDataValues[LP1.CassettePlaced]}" 
                                 LP2Presented="{Binding RtDataValues[LP2.CassettePlaced]}" 

+ 1 - 0
PunkHPX8_MainPages/Views/OperationOverNewView.xaml

@@ -179,5 +179,6 @@
         <!--<userControls:SRD CassetteName="SRD2" Canvas.Left="345" Canvas.Top="107" Width="100" Height="100" HorizontalAlignment="Center" VerticalAlignment="Top" RobotWafer="{Binding SRD2Wafer}" SRDVisibility="Visible"/>-->
         <userControls:SRDFrontView UnitData1="{Binding SRD2ModuleInfo}" UnitData2="{Binding SRD1ModuleInfo}" Title="SRD"  Canvas.Top="71" Canvas.Left="1125"/>
         <userControls:RobotFrontView Canvas.Left="1125" Canvas.Top="183" UnitData="{Binding EFEMModuleInfo}"/>
+        <userControls:AlignerFrontView Canvas.Left="360" Canvas.Top="685" UnitData="{Binding AlignerModuleInfo}"/>
     </Canvas>
 </UserControl>

+ 7 - 0
PunkHPX8_Themes/PunkHPX8_Themes.csproj

@@ -148,6 +148,9 @@
     <Compile Include="Themes\Attach\ElementForeground.cs" />
     <Compile Include="Themes\Attach\IconElement.cs" />
     <Compile Include="unity\UIEvents.cs" />
+    <Compile Include="UserControls\AlignerFrontView.xaml.cs">
+      <DependentUpon>AlignerFrontView.xaml</DependentUpon>
+    </Compile>
     <Compile Include="UserControls\AnolyteGroove.xaml.cs">
       <DependentUpon>AnolyteGroove.xaml</DependentUpon>
     </Compile>
@@ -632,6 +635,10 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
+    <Page Include="UserControls\AlignerFrontView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="UserControls\AnolyteGroove.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 54 - 0
PunkHPX8_Themes/UserControls/AlignerFrontView.xaml

@@ -0,0 +1,54 @@
+<UserControl x:Class="PunkHPX8_Themes.UserControls.AlignerFrontView"
+                          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"
+             xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation"
+             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+             xmlns:cal="http://www.caliburn.org" x:Name="self"    
+             mc:Ignorable="d" 
+             >
+    <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
+
+        <Grid.RowDefinitions>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition />
+        </Grid.RowDefinitions>
+        <Canvas x:Name="canvas"  PreviewDrop="Canvas_Drop" AllowDrop="True" Background="Transparent" Grid.RowSpan="2"/>
+
+        <TextBlock Text="{Binding ElementName=self,Path=Title1}" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center" HorizontalAlignment="Center">
+            <TextBlock.Style>
+                <Style>
+                    <Style.Triggers>
+                        <DataTrigger Binding="{Binding ShowTitle1,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" Value="False">
+                            <Setter Property="TextBlock.Visibility" Value="Collapsed" />
+                        </DataTrigger>
+                    </Style.Triggers>
+                </Style>
+            </TextBlock.Style>
+        </TextBlock>
+        <Border Grid.Row="1" BorderThickness="1" BorderBrush="{DynamicResource FOUP_OuterBD}" Background="{DynamicResource FOUP_OuterBG}" HorizontalAlignment="Center" VerticalAlignment="Center" Width="150"  CornerRadius="4" Height="35">
+            <Grid Height="33">
+                <Rectangle Fill="{DynamicResource FOUP_InnerBG}" Margin="3,3,3,3" RadiusX="2" RadiusY="2"/>
+
+                <Grid Margin="0,5">
+                    <Grid.RowDefinitions>
+                        <RowDefinition Height="30"/>
+                    </Grid.RowDefinitions>
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition Width="47"/>
+                        <ColumnDefinition />
+                    </Grid.ColumnDefinitions>
+                    <TextBlock Text="Aligner" FontFamily="Arial" FontSize="12" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,5,5,0"/>
+                    <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="0,5,5,0">
+                        <ctrl:Slot ViewType="Front" AllowDrop="True" Cursor="Hand" DataContext="{Binding UnitData.WaferManager.Wafers[0], ElementName=self}" WaferStatus="{Binding WaferStatus}" SlotID="{Binding SlotID}" ModuleID="{Binding ModuleID}" SourceName="{Binding SourceName}" SlotMouseButtonDown="Slot_SlotMouseButtonDown" WaferTransferStarted="Slot_WaferTransferStarted"/>
+                    </StackPanel>
+
+                </Grid>
+            </Grid>
+        </Border>
+
+    </Grid>
+</UserControl>
+

+ 94 - 0
PunkHPX8_Themes/UserControls/AlignerFrontView.xaml.cs

@@ -0,0 +1,94 @@
+using OpenSEMI.ClientBase;
+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;
+
+namespace PunkHPX8_Themes.UserControls
+{
+    /// <summary>
+    /// AlignerFrontView.xaml 的交互逻辑
+    /// </summary>
+    public partial class AlignerFrontView : UserControl
+    {
+        public AlignerFrontView()
+        {
+            InitializeComponent();
+        }
+        #region UnitData11 (DependencyProperty)
+        public ModuleInfo UnitData
+        {
+            get { return (ModuleInfo)GetValue(UnitDataProperty); }
+            set { SetValue(UnitDataProperty, value); }
+        }
+        public static readonly DependencyProperty UnitDataProperty =
+            DependencyProperty.Register("UnitData", typeof(ModuleInfo), typeof(AlignerFrontView), new UIPropertyMetadata(null));
+
+        public bool ShowTitle1
+        {
+            get { return (bool)GetValue(ShowTitle1Property); }
+            set { SetValue(ShowTitle1Property, value); }
+        }
+        public static readonly DependencyProperty ShowTitle1Property =
+            DependencyProperty.Register("ShowTitle1", typeof(bool), typeof(AlignerFrontView), new UIPropertyMetadata(true));
+
+
+        public string Title1
+        {
+            get { return (string)GetValue(Title1Property); }
+            set { SetValue(Title1Property, value); }
+        }
+        public static readonly DependencyProperty Title1Property =
+            DependencyProperty.Register("Title1", typeof(string), typeof(AlignerFrontView));
+
+        private void Slot_SlotMouseButtonDown(object sender, MouseButtonEventArgs e)
+        {
+            GlobalEvents.OnSlotRightClickChanged(sender as Slot);
+        }
+        private void Canvas_Drop(object sender, DragEventArgs e)
+        {
+            var data = e.Data.GetData(typeof(string));
+            Button btn = new Button();
+            btn.Content = data;
+            canvas.Children.Add(btn);
+
+            var point = e.GetPosition(canvas);
+
+            Canvas.SetLeft(btn, point.X);
+            Canvas.SetTop(btn, point.Y);
+
+            Debug.WriteLine("Canvas_Drop");
+        }
+        #endregion
+
+        private void EFEMUpper_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+        {
+            var test = sender as Slot;
+            DragDrop.DoDragDrop(test, "test", DragDropEffects.Copy);
+        }
+        private void Slot_WaferTransferStarted(object sender, DragDropEventArgs e)
+        {
+            try
+            {
+                GlobalEvents.OnSlotWaferTransfer(e);
+            }
+            catch (Exception ex)
+            {
+                Trace.WriteLine(ex);
+            }
+        }
+    }
+}

+ 2 - 2
PunkHPX8_Themes/UserControls/RobotFrontView.xaml

@@ -36,7 +36,7 @@
                         <ColumnDefinition Width="47"/>
                         <ColumnDefinition />
                     </Grid.ColumnDefinitions>
-                    <TextBlock Text="RobotA" FontFamily="Arial" FontSize="12" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,5,0,0"/>
+                    <TextBlock Text="Upper" FontFamily="Arial" FontSize="12" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,5,0,0"/>
                     <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="0,5,5,0">
                         <ctrl:Slot ViewType="Front" AllowDrop="True" Cursor="Hand" DataContext="{Binding UnitData.WaferManager.Wafers[0], ElementName=self}" WaferStatus="{Binding WaferStatus}" SlotID="{Binding SlotID}" ModuleID="{Binding ModuleID}" SourceName="{Binding SourceName}" SlotMouseButtonDown="Slot_SlotMouseButtonDown" WaferTransferStarted="Slot_WaferTransferStarted"/>
                     </StackPanel>
@@ -64,7 +64,7 @@
                         <ColumnDefinition Width="47"/>
                         <ColumnDefinition />
                     </Grid.ColumnDefinitions>
-                    <TextBlock Text="RobotB" FontFamily="Arial" FontSize="12" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,5,0,0"/>
+                    <TextBlock Text="Down" FontFamily="Arial" FontSize="12" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,5,0,0"/>
                     <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="0,5,5,0">
                         <ctrl:Slot ViewType="Front" AllowDrop="True" Cursor="Hand" DataContext="{Binding UnitData.WaferManager.Wafers[1], ElementName=self}" WaferStatus="{Binding WaferStatus}" SlotID="{Binding SlotID}" ModuleID="{Binding ModuleID}" SourceName="{Binding SourceName}" SlotMouseButtonDown="Slot_SlotMouseButtonDown" WaferTransferStarted="Slot_WaferTransferStarted"/>
                     </StackPanel>