修复可能和L2D插件引起的错误

This commit is contained in:
ZouJin 2024-06-10 00:00:33 +08:00
parent 1f82987fd5
commit 0e0843bad8
2 changed files with 7 additions and 10 deletions

View File

@ -108,11 +108,6 @@ namespace VPet_Simulator.Core
ig.Run(PetGrid, () =>
{
IsWorking = true;
Dispatcher.Invoke(() =>
{
PetGrid.Tag = ig;
PetGrid2.Tag = ig;
});
DisplayNomal();
});
});

View File

@ -505,7 +505,8 @@ namespace VPet_Simulator.Core
if (graph.Equals(PetGridTag))
{
petgridcrlf = true;
((IGraph)(PetGrid2Tag)).Stop(true);
if(PetGrid2Tag is IGraph ig)
ig.Stop(true);
Dispatcher.Invoke(() =>
{
PetGrid.Visibility = Visibility.Visible;
@ -517,7 +518,8 @@ namespace VPet_Simulator.Core
else if (graph.Equals(PetGrid2Tag))
{
petgridcrlf = false;
((IGraph)(PetGridTag)).Stop(true);
if (PetGridTag is IGraph ig)
ig.Stop(true);
Dispatcher.Invoke(() =>
{
PetGrid2.Visibility = Visibility.Visible;