xuhsili 9 月之前
父节点
当前提交
1a1a8c52ed

+ 1 - 1
NEIntelligentControl2/Views/AGC/AGCCard2.xaml.cs

@@ -137,7 +137,7 @@ namespace NEIntelligentControl2.Views.AGC
             {
                 _ActualPowerList = arg2;
             }
-            else
+            else if (arg1.Type == TagType.IdeaPower)
             {
                 _IdeaPowerList = arg2;
             }

+ 9 - 2
NEIntelligentControl2/Views/Matrix/WindBlock.xaml.cs

@@ -164,8 +164,15 @@ namespace NEIntelligentControl2.Views.Matrix
             if (g == null)
             {
                 ContentPresenter myContentPresenter = FindVisualChild<ContentPresenter>(this);
-                DataTemplate myDataTemplate = myContentPresenter.ContentTemplate;
-                g = myDataTemplate.FindName("_GDMain", myContentPresenter) as Grid;
+                if (myContentPresenter != null)
+                {
+                    DataTemplate myDataTemplate = myContentPresenter.ContentTemplate;
+                    g = myDataTemplate.FindName("_GDMain", myContentPresenter) as Grid;
+                }
+                else
+                {
+                    g = new Grid();
+                }
             }
             g.ToolTip = tp;
             ToolTipService.SetInitialShowDelay(g, _PopupInterval);