减少多余的图形控件

This commit is contained in:
ZouJin 2023-08-12 15:44:17 +10:00
parent 5f0934588b
commit 2ec34c81ec
2 changed files with 3 additions and 4 deletions

View File

@ -14,6 +14,7 @@ using static VPet_Simulator.Core.Picture;
namespace VPet_Simulator.Core
{
/// <summary>
/// PNGAnimation.xaml 的交互逻辑
/// </summary>
@ -77,7 +78,6 @@ namespace VPet_Simulator.Core
GraphCore.CommConfig["PA_Setup"] = true;
GraphCore.CommUIElements["Image1.PNGAnimation"] = new System.Windows.Controls.Image() { Height = 500 };
GraphCore.CommUIElements["Image2.PNGAnimation"] = new System.Windows.Controls.Image() { Height = 500 };
GraphCore.CommUIElements["Image3.PNGAnimation"] = new System.Windows.Controls.Image() { Height = 500 };
}
Task.Run(() => startup(path, paths));
//if (storemem)
@ -334,7 +334,7 @@ namespace VPet_Simulator.Core
}
else
{
img = (System.Windows.Controls.Image)GraphCore.CommUIElements["Image3.PNGAnimation"];
img = (System.Windows.Controls.Image)GraphCore.CommUIElements["Image1.PNGAnimation"];
parant.Child = img;
}
}

View File

@ -33,7 +33,6 @@ namespace VPet_Simulator.Core
GraphCore.CommConfig["PIC_Setup"] = true;
GraphCore.CommUIElements["Image1.Picture"] = new Image() { Width = 500, Height = 500 };
GraphCore.CommUIElements["Image2.Picture"] = new Image() { Width = 500, Height = 500 };
GraphCore.CommUIElements["Image3.Picture"] = new Image() { Width = 500, Height = 500 };
}
}
public static void LoadGraph(GraphCore graph, FileSystemInfo path, ILine info)
@ -101,7 +100,7 @@ namespace VPet_Simulator.Core
}
else
{
img = (Image)GraphCore.CommUIElements["Image3.Picture"];
img = (Image)GraphCore.CommUIElements["Image1.Picture"];
parant.Child = null;
parant.Child = img;
}