Browse Source

efem界面按钮功能优化

lixiang 10 months ago
parent
commit
9e9459c927

+ 1 - 1
Venus/Venus_MainPages/ViewModels/EfemViewModel.cs

@@ -658,7 +658,7 @@ namespace Venus_MainPages.ViewModels
         }
         private void OnLPReset(object obj)
         {
-            //InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.ReSet");
+            InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.ReSet");
 
         }
         private void OnLPLoad(object obj)

+ 13 - 13
Venus/Venus_MainPages/Views/EfemView.xaml

@@ -272,11 +272,11 @@
 
 
 
-                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="White" Grid.Row="6" Padding="5,1,0,1">
+                <!--<Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="White" Grid.Row="6" Padding="5,1,0,1">
                     <TextBlock Text="Is Door Open" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" />
                 </Border>
                 <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,0,1" Background="#F5F7FA" Grid.Row="6" Grid.Column="1" Padding="5,1,0,1">
-                    <!--<deviceControl:AITSensor Margin="5,0" GreenColor="True" LightOnValue="{Binding IsLP1DoorOpen}"></deviceControl:AITSensor>-->
+                    --><!--<deviceControl:AITSensor Margin="5,0" GreenColor="True" LightOnValue="{Binding IsLP1DoorOpen}"></deviceControl:AITSensor>--><!--
                     <Ellipse             Width="16" Height="16"  Fill="{Binding RtDataValues[LP1.IsLP1Clamped],Converter={StaticResource boolToColor3}}"   Stroke="Silver"  StrokeThickness="2"></Ellipse>
 
                 </Border>
@@ -287,7 +287,7 @@
                         <Button IsEnabled="{Binding IsLP1CloseEnable}" Margin="10,0" Content="Close" Width="90" Height="25" Command="{Binding LPCloseDoorCommand}" CommandParameter="LP1">
                         </Button>
                     </StackPanel>
-                </Border>
+                </Border>-->
 
 
             </Grid>
@@ -401,34 +401,34 @@
 
 
 
-                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="White" Grid.Row="6" Padding="5,1,0,1">
+                <!--<Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="White" Grid.Row="6" Padding="5,1,0,1">
                     <TextBlock Text="Is Door Open" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" />
                 </Border>
                 <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,0,1" Background="#F5F7FA" Grid.Row="6" Grid.Column="1" Padding="5,1,0,1">
-                    <!--<deviceControl:AITSensor Margin="5,0" GreenColor="True" LightOnValue="{Binding IsLP1DoorOpen}"></deviceControl:AITSensor>-->
+                    --><!--<deviceControl:AITSensor Margin="5,0" GreenColor="True" LightOnValue="{Binding IsLP1DoorOpen}"></deviceControl:AITSensor>--><!--
                 </Border>
                 <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="#F5F7FA" Grid.Row="6" Grid.Column="2" Padding="5,1">
                     <StackPanel Orientation="Horizontal">
                         <Button IsEnabled="{Binding IsLP1OpenEnable}" Margin="10,0"  Content="Open" Width="90" Height="25" Command="{Binding LPOpenDoorCommand}" CommandParameter="LP2">
-                            <!--<i:Interaction.Triggers>
+                            --><!--<i:Interaction.Triggers>
                             <i:EventTrigger EventName="Click">
                                 <cal:ActionMessage MethodName="OpenDoor">
                                     <cal:Parameter Value="{Binding FOUPA.ModuleID}"></cal:Parameter>
                                 </cal:ActionMessage>
                             </i:EventTrigger>
-                        </i:Interaction.Triggers>-->
+                        </i:Interaction.Triggers>--><!--
                         </Button>
                         <Button IsEnabled="{Binding IsLP1CloseEnable}" Margin="10,0" Content="Close" Width="90" Height="25" Command="{Binding LPCloseDoorCommand}" CommandParameter="LP2">
-                            <!--<i:Interaction.Triggers>
+                            --><!--<i:Interaction.Triggers>
                             <i:EventTrigger EventName="Click">
                                 <cal:ActionMessage MethodName="CloseDoor">
                                     <cal:Parameter Value="{Binding FOUPA.ModuleID}"></cal:Parameter>
                                 </cal:ActionMessage>
                             </i:EventTrigger>
-                        </i:Interaction.Triggers>-->
+                        </i:Interaction.Triggers>--><!--
                         </Button>
                     </StackPanel>
-                </Border>
+                </Border>-->
 
 
             </Grid>
@@ -539,18 +539,18 @@
 
 
 
-                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="White" Grid.Row="6" Padding="5,1,0,1">
+                <!--<Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="White" Grid.Row="6" Padding="5,1,0,1">
                     <TextBlock Text="Is Door Open" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center" />
                 </Border>
                 <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,0,1" Background="#F5F7FA" Grid.Row="6" Grid.Column="1" Padding="5,1,0,1">
-                    <!--<deviceControl:AITSensor Margin="5,0" GreenColor="True" LightOnValue="{Binding IsLP1DoorOpen}"></deviceControl:AITSensor>-->
+                    --><!--<deviceControl:AITSensor Margin="5,0" GreenColor="True" LightOnValue="{Binding IsLP1DoorOpen}"></deviceControl:AITSensor>--><!--
                 </Border>
                 <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="#F5F7FA" Grid.Row="6" Grid.Column="2" Padding="5,1">
                     <StackPanel Orientation="Horizontal">
                         <Button IsEnabled="{Binding IsLP1OpenEnable}" Margin="10,0"  Content="Open" Width="90" Height="25" Command="{Binding LPOpenDoorCommand}" CommandParameter="LP1"/>
                         <Button IsEnabled="{Binding IsLP1CloseEnable}" Margin="10,0" Content="Close" Width="90" Height="25" Command="{Binding LPCloseDoorCommand}" CommandParameter="LP1"/>
                     </StackPanel>
-                </Border>
+                </Border>-->
 
 
             </Grid>

+ 11 - 8
Venus/Venus_RT/Modules/LPs/LoadPortModule.cs

@@ -125,7 +125,7 @@ namespace Venus_RT.Modules.LPs
         private LoadPortLoadRoutine _load;
         private LoadPortUnloadRoutine _unload;
 
-        //private bool _isInit;
+        private bool _isInit;
 
         public LoadPortModule(ModuleName module, EfemBase efem) : base(SC.GetValue<int>("EFEM.LoadPort.SlotNumber"))
         {
@@ -157,6 +157,9 @@ namespace Venus_RT.Modules.LPs
 
             OP.Subscribe($"{Name}.CloseDoor", (string cmd, object[] args) =>{return CheckToPostMessage((int)MSG.CloseDoor);});
 
+            OP.Subscribe($"{Module}.ReSet", (cmd, args) => { PostMsg(MSG.Reset); return true; });
+
+
 
             DATA.Subscribe($"{Module}.Status", () => ((STATE)FsmState).ToString(), Aitex.Core.Util.SubscriptionAttribute.FLAG.IgnoreSaveDB);
             DATA.Subscribe($"{Module}.FsmState", () => ((STATE)FsmState).ToString(), Aitex.Core.Util.SubscriptionAttribute.FLAG.IgnoreSaveDB);
@@ -289,11 +292,11 @@ namespace Venus_RT.Modules.LPs
 
         private bool FsmReset(object[] param)
         {
-            //if (!_isInit)
-            //{
-            //    PostMsg(MSG.ToInit);
-            //    return false;
-            //}
+            if (!_isInit)
+            {
+                PostMsg(MSG.ToInit);
+                return false;
+            }
             return true;
         }
 
@@ -343,7 +346,7 @@ namespace Venus_RT.Modules.LPs
             if (ret == RState.Failed || ret == RState.End)
                 return false;
 
-            //_isInit = false;
+            _isInit = false;
 
             return ret == RState.Running;
         }
@@ -360,7 +363,7 @@ namespace Venus_RT.Modules.LPs
 
             if (ret == RState.End)
             {
-                //_isInit = true;
+                _isInit = true;
                 return true;
             }