Browse Source

fix alarmRecipe/Abort recipe右侧Table不展示名称

jiangjy 1 week ago
parent
commit
077a65ee6d

+ 2 - 2
Furnace/FurnaceUI/Views/Editors/AlarmErrorCallRecipeView.xaml

@@ -173,7 +173,7 @@
                         Text="{Binding SelectItemEndStatus, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" />
                 </Border>
             </Grid>
-
+          
             <ListView
                 Name="ChannelListView"
                 Grid.Row="2"
@@ -185,7 +185,7 @@
                 HorizontalAlignment="Left"
                 VerticalAlignment="Top"
                 AlternationCount="2"
-                ItemsSource="{Binding SelectItemTable, UpdateSourceTrigger=PropertyChanged}">
+                ItemsSource="{Binding SelectedTable.TableData.Steps, UpdateSourceTrigger=PropertyChanged}">
                 <ListView.ItemContainerStyle>
                     <Style TargetType="ListViewItem">
                         <Setter Property="Height" Value="50" />

+ 10 - 1
Furnace/FurnaceUI/Views/Editors/AlarmErrorCallRecipeViewModel.cs

@@ -56,8 +56,13 @@ namespace FurnaceUI.Views.Editors
         }
 
         private RecipeProvider _recipeProvider = new RecipeProvider();
+        private RecipeTable _SelectedTable = new RecipeTable();
 
-
+        public RecipeTable SelectedTable
+        {
+            get { return _SelectedTable; }
+            set { _SelectedTable = value; this.NotifyOfPropertyChange(nameof(SelectedTable)); }
+        }
         public string ResultParameterStr { get; set; }
         private RecipeDataBase _CurrentRecipe = new RecipeDataBase();
 
@@ -100,6 +105,7 @@ namespace FurnaceUI.Views.Editors
                     var one = Steps.Where(a => a.StepNo.Equals(int.Parse(stepNo))).FirstOrDefault();
                     one.IsChecked = true;
                     SelectItemName = one.Name;
+                    SelectedTable = CurrentRecipe.Tables[one.StepNo - 1];
 
                 }
                 else
@@ -110,6 +116,7 @@ namespace FurnaceUI.Views.Editors
                         first.IsChecked = true;
                         SelectItemName = first.Name;
                         ResultParameterStr = $"{first.StepNo}:{first.Name}";
+                        SelectedTable = CurrentRecipe.Tables[first.StepNo-1];
                     }
                 }
             }
@@ -124,6 +131,7 @@ namespace FurnaceUI.Views.Editors
                 SelectItemName = step1.Name;
                 SelectItemTable = new ObservableCollection<ParameterTable>();
                 ResultParameterStr = $"{step1.StepNo}:{step1.Name}";
+                SelectedTable = CurrentRecipe.Tables[SelectedStep.StepNo-1];
             }
         }
 
@@ -137,6 +145,7 @@ namespace FurnaceUI.Views.Editors
                 SelectItemName = step1.Name;
                 SelectItemTable = new ObservableCollection<ParameterTable>();
                 ResultParameterStr = $"{step1.StepNo}:{step1.Name}";
+                SelectedTable = CurrentRecipe.Tables[SelectedStep.StepNo-1];
             }
         }