Skip to content

Commit

Permalink
修复缺失图片时无法显示图片的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
LorisYounger committed Oct 20, 2023
1 parent cbb09d4 commit e4206e5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VPet-Simulator.Windows.Interface/Source.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public BitmapImage FindImage(string imagename, string superior)
string source = FindSource(imagename);
if (source == null)
{
return NewSafeBitmapImage(source);
return NewSafeBitmapImage(FindImageUri(superior));
}
return NewSafeBitmapImage(source);
}
Expand Down
1 change: 0 additions & 1 deletion VPet-Simulator.Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ private void Restart_Closed(object sender, EventArgs e)
System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().Location);
else
{
App.MainWindows.Remove(this);
new MainWindow(PrefixSave).Show();
}
Exit();
Expand Down
2 changes: 2 additions & 0 deletions VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ public winGameSetting(MainWindow mw)

if (mw.Set.Diagnosis)
RBDiagnosisYES.IsChecked = true;
else
RBDiagnosisNO.IsChecked = true;

List<int> cbDiagnosis = new List<int> { 200, 500, 1000, 2000, 5000, 10000, 20000 };
int ds = cbDiagnosis.IndexOf(mw.Set.DiagnosisInterval);
Expand Down

0 comments on commit e4206e5

Please sign in to comment.