Browse Source

修复Topview显示不正确bug,添加给eap穿eventenum功能

lixiang 10 months ago
parent
commit
abc6ebc8ff

+ 3 - 3
Venus/Framework/Common/Event/EventManager.cs

@@ -213,12 +213,12 @@ namespace Aitex.Core.RT.Event
         {
             if (!_eventDic.ContainsKey(eventName))
             {
-                //LOG.Write("Event name not registered, " + eventName);
                 return;
             }
 
-            EventItem item = _eventDic[eventName].Clone();
+            EventItem item = new EventItem();
             item.Id = (int)id;
+            item.EventEnum = id.ToString();
             item.Source = module;
             item.Description = message;
             item.OccuringTime = DateTime.Now;
@@ -503,7 +503,7 @@ namespace Aitex.Core.RT.Event
 
         public void PostInfoLog(string module, eEvent id, string message)
         {
-            WriteEvent(module,id, id.ToString(), message);
+            WriteEvent(module,id, INFORMATION_EVENT, message);
         }
 
         public void PostWarningLog(string module, string message)

+ 1 - 1
Venus/Framework/SimulatorCore/Commons/SerialPortDeviceSimulator.cs

@@ -54,7 +54,7 @@ namespace MECF.Framework.Simulator.Core.Driver
                 _serialPort.Open();
 
             }
-            catch (Exception ex) 
+            catch
             {
             }
          }

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

@@ -43,8 +43,8 @@
 
                 <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 BorderThickness="1" BorderBrush="Silver"  Width="199" Margin="0" VerticalAlignment="Center" Background="White" Height="19">
+                        <TextBlock Text="{Binding ElementName=WaferUnit,Path=CarrierId}" Foreground="Gray" FontSize="12" VerticalAlignment="Center"/>
                     </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>

File diff suppressed because it is too large
+ 1 - 1
Venus/Venus_MainPages/Views/TopView.xaml


+ 3 - 3
Venus/Venus_RT/Devices/RevtechMatch.cs

@@ -70,11 +70,11 @@ namespace Venus_RT.Devices
                 _port = portNum;
                 if (SC.GetValue<bool>("System.IsSimulatorMode"))
                 {
-                    _serial = new AsyncSerialPort(portNum, 9600, 8);
+                    _serial = new AsyncSerialPort(portNum, 9600, 8, System.IO.Ports.Parity.None, System.IO.Ports.StopBits.One, "\n", true);
                 }
                 else
                 {
-                    _serial = new AsyncSerialPort(portNum, 115200, 8, System.IO.Ports.Parity.None, System.IO.Ports.StopBits.One, "\n", false);
+                    _serial = new AsyncSerialPort(portNum, 115200, 8, System.IO.Ports.Parity.None, System.IO.Ports.StopBits.One, "\n", true);
                 }
             }
             else if (matchCommunicationType == MatchCommunicationType.Ethernet)
@@ -240,7 +240,7 @@ namespace Venus_RT.Devices
             c2SetPoint = c2;
 
 
-            reason = "";
+            //reason = "";
         }
         private void executeMatchPostion(float c1, float c2)
         {

+ 1 - 9
Venus/Venus_Themes/Themes/Generic.xaml

@@ -2081,15 +2081,7 @@
                         <Border x:Name="_border" Grid.ColumnSpan="2"/>
                         <Path x:Name="path" Width="12" Height="12" Stretch="Fill" Data="{StaticResource Icon_Gou}" Fill="Transparent"/>
                         <TextBlock Foreground="#2D2D30" Grid.Column="1" Margin="5 0 15 0" VerticalAlignment="Center" x:Name="_txt" Text="{Binding
-Header,RelativeSource={RelativeSource TemplatedParent}}" />
-                        <!--<Path Visibility="Collapsed" x:Name="_path" Grid.Column="1" HorizontalAlignment="Right" Margin="5 13 5 0" Data="M0,4 4,0 0,-4 z" Fill="#7E8A92"/>-->
-                        <!--<Popup Placement="Right" x:Name="SubMenuPopup" AllowsTransparency="True" Focusable="False" IsOpen="{TemplateBinding IsSubmenuOpen}" >
-                            <ScrollViewer ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
-                                <Border Background="#ffc787" Name="SubmenuBorder" BorderBrush="LightGray" BorderThickness="1" SnapsToDevicePixels="True" >
-                                    <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
-                                </Border>
-                            </ScrollViewer>
-                        </Popup>-->
+Header,RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Left"/>
                     </Grid>
                     <ControlTemplate.Triggers>
                         <!--<Trigger Property="HasItems" Value="true">

+ 14 - 67
Venus/Venus_Themes/UserControls/StateTitle.xaml

@@ -15,69 +15,26 @@
 
     </UserControl.Resources>
     <!--<Border BorderThickness="1" BorderBrush="#D7D7D7">-->
-        <Grid>
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition/>
-                <ColumnDefinition Width="2*"/>
-            </Grid.ColumnDefinitions>
-        <!--<TextBox       DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}"          Text="{Binding ElementName=stateTitle,Path=Title}"        HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Background="{Binding ElementName=stateTitle,Path=LabelColor}"     Height="30" VerticalAlignment="Center"  BorderThickness="1" BorderBrush="Silver" Foreground="#076DB6" FontWeight="Bold" FontSize="15" IsReadOnly="True" Cursor="Hand">
-            <TextBox.Resources>
-                <Style TargetType="{x:Type Border}">
-                    <Setter Property="CornerRadius" Value="4 0 0 4"/>
-                    <Setter Property="BorderBrush" Value="Black"/>
-                    <Setter Property="BorderThickness" Value="1"/>
-                </Style>
-            </TextBox.Resources>
-            <TextBox.ContextMenu>
-                <ContextMenu Visibility="{Binding IsNeedContextMenu,Converter={StaticResource bool2VisibilityConverter}}">
-                    <MenuItem Header="Home"        Click="Initialize_Click" IsEnabled="{Binding IsOnline,Converter={StaticResource BoolToBool}}"/>
-                    <MenuItem Header="Abort"       Click="Abort_Click" IsEnabled="{Binding IsOnline,Converter={StaticResource BoolToBool}}"/>
+    <Grid>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition/>
+            <ColumnDefinition Width="2*"/>
+        </Grid.ColumnDefinitions>
 
-                    <Separator Background="Gray"/>
-                    <MenuItem Header="Online"      IsChecked="{Binding IsOnline}"                                       IsEnabled="{Binding IsOnline,Converter={StaticResource BoolToBool}}"  Click="Online_Click"/>
-                    <MenuItem Header="Offline"     IsChecked="{Binding IsOnline,Converter={StaticResource BoolToBool}}" IsEnabled="{Binding IsOnline}"                                        Click="Offline_Click"/>
-                    <Separator Background="Gray" Visibility="{Binding IsNeedInclude,Converter={StaticResource bool2VisibilityConverter}}"/>
-
-                    <MenuItem Header="Include"     IsChecked="{Binding IsInclude}"     Visibility="{Binding IsNeedInclude,Converter={StaticResource bool2VisibilityConverter}}"                                  Click="Include_Click">
-                            <MenuItem.IsEnabled>
-                                <MultiBinding Converter="{StaticResource includeIsEnableConverter}">
-                                    <Binding  Path="IsInclude"/>
-                                    <Binding  Path="IsOnline"/>
-                                </MultiBinding>
-                            </MenuItem.IsEnabled>
-                        </MenuItem>
-                    <MenuItem Header="Exclude"     IsChecked="{Binding IsInclude,Converter={StaticResource BoolToBool}}"     Visibility="{Binding IsNeedInclude,Converter={StaticResource bool2VisibilityConverter}}"                                    Click="Exclude_Click">
-                        <MenuItem.IsEnabled>
-                                <MultiBinding Converter="{StaticResource excludeIsEnableConverter}">
-                                    <Binding  Path="IsInclude"/>
-                                    <Binding  Path="IsOnline"/>
-                                </MultiBinding>
-                            </MenuItem.IsEnabled>
-                    </MenuItem>
-
-                </ContextMenu>
-            </TextBox.ContextMenu>
-        </TextBox>-->
         <Border CornerRadius="4 0 0 4" BorderBrush="Silver" BorderThickness="1"  Background="{Binding ElementName=stateTitle,Path=LabelColor}" Height="30">
             <TextBlock      DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}"          Text="{Binding ElementName=stateTitle,Path=Title}"    TextBlock.TextAlignment="Center"             Foreground="#076DB6" FontWeight="Bold" FontSize="15" Cursor="Hand" Padding="0 4.5 0 0">
-                <!--<TextBox.Resources>
-                    <Style TargetType="{x:Type Border}">
-                        <Setter Property="CornerRadius" Value="4 0 0 4"/>
-                        <Setter Property="BorderBrush" Value="Black"/>
-                        <Setter Property="BorderThickness" Value="1"/>
-                    </Style>
-                </TextBox.Resources>-->
                 <TextBlock.ContextMenu>
                     <ContextMenu Visibility="{Binding IsNeedContextMenu,Converter={StaticResource bool2VisibilityConverter}}">
-                        <MenuItem Header="Home"        Click="Initialize_Click" IsEnabled="{Binding IsOnline,Converter={StaticResource BoolToBool}}"/>
-                        <MenuItem Header="Abort"       Click="Abort_Click" IsEnabled="{Binding IsOnline,Converter={StaticResource BoolToBool}}"/>
+                        <MenuItem Header="Home"        Click="Initialize_Click" IsEnabled="{Binding IsOnline,Converter={StaticResource BoolToBool}}" Cursor="Hand"/>
+
+                        <MenuItem Header="Abort"       Click="Abort_Click" IsEnabled="{Binding IsOnline,Converter={StaticResource BoolToBool}}" Cursor="Hand"/>
 
                         <Separator Background="Gray"/>
-                        <MenuItem Header="Online"      IsChecked="{Binding IsOnline}"                                       IsEnabled="{Binding IsOnline,Converter={StaticResource BoolToBool}}"  Click="Online_Click"/>
-                        <MenuItem Header="Offline"     IsChecked="{Binding IsOnline,Converter={StaticResource BoolToBool}}" IsEnabled="{Binding IsOnline}"                                        Click="Offline_Click"/>
+                        <MenuItem Header="{Binding UpItem}"       IsChecked="{Binding IsOnline}"                                       IsEnabled="{Binding IsOnline,Converter={StaticResource BoolToBool}}"  Click="Online_Click" Cursor="Hand"/>
+                        <MenuItem Header="{Binding DownItem}"     IsChecked="{Binding IsOnline,Converter={StaticResource BoolToBool}}" IsEnabled="{Binding IsOnline}"                                        Click="Offline_Click" Cursor="Hand"/>
                         <Separator Background="Gray" Visibility="{Binding IsNeedInclude,Converter={StaticResource bool2VisibilityConverter}}"/>
 
-                        <MenuItem Header="Include"     IsChecked="{Binding IsInclude}"     Visibility="{Binding IsNeedInclude,Converter={StaticResource bool2VisibilityConverter}}"                                  Click="Include_Click">
+                        <MenuItem Header="Include"     IsChecked="{Binding IsInclude}"     Visibility="{Binding IsNeedInclude,Converter={StaticResource bool2VisibilityConverter}}"               Cursor="Hand"                   Click="Include_Click">
                             <MenuItem.IsEnabled>
                                 <MultiBinding Converter="{StaticResource includeIsEnableConverter}">
                                     <Binding  Path="IsInclude"/>
@@ -85,7 +42,7 @@
                                 </MultiBinding>
                             </MenuItem.IsEnabled>
                         </MenuItem>
-                        <MenuItem Header="Exclude"     IsChecked="{Binding IsInclude,Converter={StaticResource BoolToBool}}"     Visibility="{Binding IsNeedInclude,Converter={StaticResource bool2VisibilityConverter}}"                                    Click="Exclude_Click">
+                        <MenuItem Header="Exclude"     IsChecked="{Binding IsInclude,Converter={StaticResource BoolToBool}}"     Visibility="{Binding IsNeedInclude,Converter={StaticResource bool2VisibilityConverter}}"   Cursor="Hand"                                 Click="Exclude_Click">
                             <MenuItem.IsEnabled>
                                 <MultiBinding Converter="{StaticResource excludeIsEnableConverter}">
                                     <Binding  Path="IsInclude"/>
@@ -102,16 +59,6 @@
         <Border Grid.Column="1" CornerRadius="0 4 4 0" BorderBrush="Silver"  Background="{Binding ElementName=stateTitle,Path=TextBoxColor}"   Height="30" VerticalAlignment="Center"  BorderThickness="0 1 1 1" Margin="0 0 5 0">
             <TextBlock Text="{Binding ElementName=stateTitle,Path=TextBoxValue}" Foreground="Black"  TextBlock.TextAlignment="Center" Padding="0 2.5 0 0" FontSize="18"/>
         </Border>
-        <!--<TextBox Grid.Column="1" Text="{Binding ElementName=stateTitle,Path=TextBoxValue}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Background="{Binding ElementName=stateTitle,Path=TextBoxColor}"   Height="30" VerticalAlignment="Center"  BorderThickness="0 1 1 1" BorderBrush="Silver" Foreground="Black"  Margin="0 0 5 0"  FontSize="18" IsReadOnly="True">
-            <TextBox.Resources>
-                <Style TargetType="{x:Type Border}">
-                    <Setter Property="CornerRadius" Value="0 4 4 0"/>
-                    <Setter Property="BorderBrush" Value="Black"/>
-                </Style>
-            </TextBox.Resources>
-        </TextBox>-->
-        </Grid>
-        
-    <!--</Border>-->
-   
+    </Grid>
+
 </UserControl>

+ 17 - 0
Venus/Venus_Themes/UserControls/StateTitle.xaml.cs

@@ -47,6 +47,23 @@ namespace Venus_Themes.UserControls
             set { this.SetValue(TitleProperty, value); }
         }
 
+        public static readonly DependencyProperty UpItemProperty = DependencyProperty.Register(
+  "UpItem", typeof(string), typeof(StateTitle),new PropertyMetadata("Online"));
+        public string UpItem
+        {
+            get { return (string)this.GetValue(UpItemProperty); }
+            set { this.SetValue(UpItemProperty, value); }
+        }
+
+
+        public static readonly DependencyProperty DownItemProperty = DependencyProperty.Register(
+  "DownItem", typeof(string), typeof(StateTitle), new PropertyMetadata("Offline"));
+        public string DownItem
+        {
+            get { return (string)this.GetValue(DownItemProperty); }
+            set { this.SetValue(DownItemProperty, value); }
+        }
+
         public static readonly DependencyProperty IsIncludeProperty = DependencyProperty.Register(
          "IsInclude", typeof(bool), typeof(StateTitle));
 

+ 1 - 1
Venus/Venus_Themes/UserControls/WPFMessageBox.xaml.cs

@@ -91,7 +91,7 @@ namespace WPF.Themes.UserControls
             var okButton = new Button
             {
                 Name = "okButton",
-                Content = ((string)Application.Current.Resources["Confirm"]),
+                Content = "Confirm",
                 IsDefault = defaultResult == MessageBoxResult.OK,
                 Tag = MessageBoxResult.OK,
             };