Browse Source

增加return wafer的Dialog、右键wafer的菜单项return wafer

zhouhr 1 year ago
parent
commit
1408b6822f

+ 3 - 2
Venus/Venus_MainPages/Unity/ContextMenuManager.cs

@@ -59,6 +59,7 @@ namespace Venus_MainPages.Unity
         private readonly List<MenuElement> _SlotMenuElements = new List<MenuElement>() {
             new MenuElement(){ Name="Create Wafer", Invoke="CreateWafer"},
             new MenuElement(){ Name="Delete Wafer", Invoke="DeleteWafer"},
+            new MenuElement(){ Name="Return Wafer", Invoke="ReturnWafer"},
             //new MenuElement(){ Name="-", IsSeparator = true},
             //new MenuElement(){ Name="Return Wafer", Invoke="ReturnWafer"}
         };
@@ -120,14 +121,14 @@ namespace Venus_MainPages.Unity
             {
                 MenuItem createWafer = _slotMenus.Items.GetItemAt(0) as MenuItem;
                 MenuItem deleteWafer = _slotMenus.Items.GetItemAt(1) as MenuItem;
-                //MenuItem returnWafer = _slotMenus.Items.GetItemAt(3) as MenuItem;
+                MenuItem returnWafer = _slotMenus.Items.GetItemAt(2) as MenuItem;
 
                 createWafer.IsEnabled = ((WaferStatus)slot.WaferStatus == WaferStatus.Empty ? true : false) && EnableAuto;
                 //createWafer.IsChecked= ((WaferStatus)slot.WaferStatus == WaferStatus.Empty ? false : true) && EnableAuto;
                 deleteWafer.IsEnabled = ((WaferStatus)slot.WaferStatus == WaferStatus.Empty ? false : true) && EnableAuto;
                 //deleteWafer.IsChecked = ((WaferStatus)slot.WaferStatus == WaferStatus.Empty ? true : false) && EnableAuto;
 
-                //returnWafer.IsEnabled = (WaferStatus)slot.WaferStatus != WaferStatus.Empty && !slot.ModuleID.StartsWith("LP");
+                returnWafer.Visibility = ((WaferStatus)slot.WaferStatus == WaferStatus.Empty ? false : true) && !slot.ModuleID.StartsWith("LP")? Visibility.Visible : Visibility.Collapsed;
             }
             return _slotMenus;
         }

+ 4 - 3
Venus/Venus_MainPages/Venus_MainPages.csproj

@@ -82,6 +82,7 @@
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
+    <Reference Include="System.Drawing" />
     <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\ThirdParty\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
@@ -283,8 +284,8 @@
     <Compile Include="Views\WaferAssociationUnit.xaml.cs">
       <DependentUpon>WaferAssociationUnit.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\WaferDialog.xaml.cs">
-      <DependentUpon>WaferDialog.xaml</DependentUpon>
+    <Compile Include="Views\WaferDialogView.xaml.cs">
+      <DependentUpon>WaferDialogView.xaml</DependentUpon>
     </Compile>
     <Compile Include="Views\WaferHistoryDBView.xaml.cs">
       <DependentUpon>WaferHistoryDBView.xaml</DependentUpon>
@@ -433,7 +434,7 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
-    <Page Include="Views\WaferDialog.xaml">
+    <Page Include="Views\WaferDialogView.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>

+ 6 - 5
Venus/Venus_MainPages/ViewModels/WaferDialogViewModel.cs

@@ -1,4 +1,5 @@
-using Prism.Mvvm;
+using Caliburn.Micro.Core;
+using Prism.Mvvm;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -7,15 +8,15 @@ using System.Threading.Tasks;
 
 namespace Venus_MainPages.ViewModels
 {
-    internal class WaferDialogViewModel : BindableBase
+    internal class WaferDialogViewModel : Screen
     {
         private string m_title;
 
-        public string Title { get { return m_title; } set { SetProperty(ref m_title,value); } }
+        public string Title { get { return m_title; } set { m_title = value;NotifyOfPropertyChange(()=> m_title); } }
 
-        WaferDialogViewModel()
+        public WaferDialogViewModel()
         {
-            Title = "你好";
+
         }
     }
 }

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

@@ -430,7 +430,7 @@
                         </Grid.ColumnDefinitions>
                         <deviceControl:AITSensor Margin="-30,0,5,0" GreenColor="True" LightOnValue="{Binding IsRtInitialized}"></deviceControl:AITSensor>
 
-                        <Button Grid.Column="1" Content="Init"  Width="120" Height="25" Command="{Binding HomeAllCommand}">
+                        <Button Grid.Column="1" Content="Initialize"  Width="120" Height="25" Command="{Binding HomeAllCommand}">
 
                         </Button>
                     </Grid>
@@ -448,7 +448,7 @@
                             <ColumnDefinition Width="0"/>
                             <ColumnDefinition />
                         </Grid.ColumnDefinitions>
-                        <Button  Grid.Column="1" Content="All Abort" Width="120" Height="25" IsEnabled="{Binding IsPauseAllEnable}" Command="{Binding PauseAllJobCommand}">
+                        <Button  Grid.Column="1" Content="Pause" Width="120" Height="25" IsEnabled="{Binding IsPauseAllEnable}" Command="{Binding PauseAllJobCommand}">
 
                         </Button>
                     </Grid>

+ 0 - 29
Venus/Venus_MainPages/Views/WaferDialog.xaml.cs

@@ -1,29 +0,0 @@
-using System;
-using System.Collections.Generic;
-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 Venus_MainPages.Views
-{
-    /// <summary>
-    /// WaferDialog.xaml 的交互逻辑
-    /// </summary>
-    public partial class WaferDialog : UserControl
-    {
-        public WaferDialog()
-        {
-            InitializeComponent();
-        }
-
-    }
-}

+ 17 - 16
Venus/Venus_MainPages/Views/WaferDialog.xaml

@@ -1,20 +1,21 @@
-<UserControl x:Class="Venus_MainPages.Views.WaferDialog"
+<Window x:Class="Venus_MainPages.Views.WaferDialogView"
              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:prism="http://prismlibrary.com/"
-             prism:ViewModelLocator.AutoWireViewModel="True"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+             mc:Ignorable="d"
+             AllowsTransparency="True"
+             WindowStyle="None"
              xmlns:local="clr-namespace:Venus_MainPages.Views"
-             mc:Ignorable="d" 
-             d:DesignHeight="300" d:DesignWidth="450">
+             xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation"
+             d:DesignHeight="300" d:DesignWidth="400">
     <Border BorderBrush="#006bb1" BorderThickness="5">
         <Grid Background="#dcf3f5">
             <Grid.RowDefinitions>
+                <RowDefinition Height="2*"></RowDefinition>
+                <RowDefinition Height=".5*"></RowDefinition>
                 <RowDefinition Height="1*"></RowDefinition>
                 <RowDefinition Height="1*"></RowDefinition>
-                <RowDefinition Height=".5*"></RowDefinition>
-                <RowDefinition Height=".5*"></RowDefinition>
                 <RowDefinition Height="1*"></RowDefinition>
             </Grid.RowDefinitions>
             <Grid.ColumnDefinitions>
@@ -22,22 +23,22 @@
                 <ColumnDefinition Width="1*"/>
                 <ColumnDefinition Width="1*"/>
             </Grid.ColumnDefinitions>
-            <TextBlock Grid.ColumnSpan="3" Text="{Binding Title}"></TextBlock>
+            <TextBlock Grid.ColumnSpan="3" Text="Please Confirm Return Wafer" VerticalAlignment="Center" Margin="20,0" FontWeight="Bold" FontSize="18"></TextBlock>
             <StackPanel Grid.Row="2" Grid.ColumnSpan="3" Orientation="Horizontal" VerticalAlignment="Center">
-                <CheckBox Content="Need Cooling" Width="120"></CheckBox>
+                <ctrl:CheckBoxExt x:Name="cancooling" Content="Need Cooling" Width="120" Margin="5,0,0,0" Checked="needcooling_Checked" Unchecked="needcooling_unChecked"></ctrl:CheckBoxExt>
                 <TextBlock Text="Cooling Time"  Width="80"/>
-                <TextBox Width="50"></TextBox>
+                <ctrl:TextBoxEx x:Name="coolingtime" IsEnabled="False" Width="50" InputMethod.IsInputMethodEnabled="False" PreviewTextInput="TextBox_PreviewTextInput"></ctrl:TextBoxEx>
                 <TextBlock Text="s"  Margin="5,0"/>
             </StackPanel>
             <StackPanel Grid.Row="3" Grid.ColumnSpan="3" Orientation="Horizontal" VerticalAlignment="Center">
-                <CheckBox Content="Need Align"   Width="120"></CheckBox>
+                <ctrl:CheckBoxExt x:Name="canalign"  Content="Need Align" Width="120" Margin="5,0,0,0" Checked="needalign_Checked" Unchecked="needalign_unChecked"></ctrl:CheckBoxExt>
                 <TextBlock Text="Align Angel"  Width="80"/>
-                <TextBox Width="50"></TextBox>
+                <ctrl:TextBoxEx x:Name="alignangel"  IsEnabled="False" Width="50" InputMethod.IsInputMethodEnabled="False" PreviewTextInput="TextBox_PreviewTextInput"></ctrl:TextBoxEx>
                 <TextBlock Text="D"  Margin="5,0"/>
             </StackPanel>
 
-            <Button Grid.Row="4" Grid.Column="1" Content="Return" Margin="18"></Button>
-            <Button Grid.Row="4" Grid.Column="2" Content="cancel" Margin="18"></Button>
+            <Button Grid.Row="4" Grid.Column="1" Content="Return" Margin="5" Click="Button_Click" ></Button>
+            <Button Grid.Row="4" Grid.Column="2" Content="Cancel" Margin="5" Click="Button_Click_1"></Button>
         </Grid>
     </Border>
-</UserControl>
+</Window>

+ 74 - 0
Venus/Venus_MainPages/Views/WaferDialogView.xaml.cs

@@ -0,0 +1,74 @@
+using MECF.Framework.Common.OperationCenter;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+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.ViewModels;
+
+namespace Venus_MainPages.Views
+{
+    /// <summary>
+    /// WaferDialogView.xaml 的交互逻辑
+    /// </summary>
+    public partial class WaferDialogView : Window
+    {
+        public bool? AlignFlag { get { return canalign.IsChecked; } set { canalign.IsChecked = value; } }
+        public bool? CoolingFlag { get { return cancooling.IsChecked; } set { cancooling.IsChecked = value; } }
+        public string Angle { get { return alignangel.Text; } set { alignangel.Text = value; } }
+        public string CoolingTime { get { return coolingtime.Text; } set { coolingtime.Text = value; } }
+
+        public WaferDialogView()
+        {
+            InitializeComponent();
+            
+        }
+
+        private void Button_Click(object sender, RoutedEventArgs e)
+        {
+            DialogResult = true;
+        }
+
+        private void Button_Click_1(object sender, RoutedEventArgs e)
+        {
+            DialogResult = false;
+        }
+
+        private void needcooling_Checked(object sender, RoutedEventArgs e)
+        {
+            coolingtime.IsEnabled = true;
+        }
+
+        private void needcooling_unChecked(object sender, RoutedEventArgs e)
+        {
+            coolingtime.IsEnabled = false;
+        }
+
+        private void needalign_Checked(object sender, RoutedEventArgs e)
+        {
+            alignangel.IsEnabled = true;
+        }
+
+        private void needalign_unChecked(object sender, RoutedEventArgs e)
+        {
+            alignangel.IsEnabled = false;
+        }
+
+        private void TextBox_PreviewTextInput(object sender, System.Windows.Input.TextCompositionEventArgs e)
+        {
+            e.Handled = new Regex("[^0-9.]+").IsMatch(e.Text);
+        }
+
+
+    }
+}

+ 1 - 1
Venus/Venus_RT/Config/System.sccfg

@@ -177,7 +177,7 @@
 		<config default="180" name="LeakCheckPumpTime" description="Leak Check Pump Time" max="7200" min="0" paramter="" tag="" unit="second" type="Integer" />
 		<config default="300" name="LeakCheckWaitTime" description="Leak Check Wait Time" max="7200" min="0" paramter="" tag="" unit="second" type="Integer" />
 		<config default="30" name="LeakRate" description="Leak Rate" max="756000" min="0" paramter="" tag="" unit="mTorrPerMin" type="Double" />
-		<config default="4" name="SlotNumber" nameView="Slot number"  description="槽位个数" max="60" min="1" paramter="" tag="" unit="" type="Integer" />
+		<config default="2" name="SlotNumber" nameView="Slot number"  description="槽位个数" max="60" min="1" paramter="" tag="" unit="" type="Integer" />
 
 		<configs name="DryPump" nameView="Dry Pump" >
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:Sky; 2:Edwards" max="10" min="0" paramter="" tag="" unit="" type="Integer" />

+ 2 - 2
Venus/Venus_Themes/UserControls/EFEMFrontView.xaml

@@ -28,7 +28,7 @@
         </TextBlock>
         <Border Grid.Row="1" BorderThickness="1" BorderBrush="{DynamicResource FOUP_OuterBD}" Background="{DynamicResource FOUP_OuterBG}" HorizontalAlignment="Center" VerticalAlignment="Center" Width="150" Margin="0,5"  CornerRadius="4">
             <Grid Height="60">
-                <Rectangle Fill="{DynamicResource FOUP_InnerBG}" Margin="5" RadiusX="2" RadiusY="2"/>
+                <Rectangle Fill="{DynamicResource FOUP_InnerBG}" Margin="3" RadiusX="2" RadiusY="2"/>
                 <Rectangle Fill="{DynamicResource FOUP_OuterBG}" Margin="5,38,5,66" RadiusX="0" RadiusY="1"/>
                 <Rectangle Fill="{DynamicResource FOUP_InnerGrow}" Margin="8,8,8,76" RadiusX="2" RadiusY="2">
                     <Rectangle.Effect>
@@ -46,7 +46,7 @@
                         <RowDefinition Height="15"/>
                     </Grid.RowDefinitions>
                     <Grid.ColumnDefinitions>
-                        <ColumnDefinition Width="42"/>
+                        <ColumnDefinition Width="47"/>
                         <ColumnDefinition />
                     </Grid.ColumnDefinitions>
                     <TextBlock Text="Upper" FontFamily="Arial" FontSize="12" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,7,0,10"/>