Skip to content

Commit dd3431c

Browse files
committed
Fix bugs
1 parent 97c5959 commit dd3431c

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
4-
<_LastSelectedProfileId>C:\Users\Li\Documents\git\Chovy-Sign-v2\ChovySign-CLI\Properties\PublishProfiles\Win64.pubxml</_LastSelectedProfileId>
4+
<_LastSelectedProfileId>C:\Users\Li\Desktop\git\chovy-sign\ChovySign-CLI\Properties\PublishProfiles\Linux64.pubxml</_LastSelectedProfileId>
55
</PropertyGroup>
66
</Project>

ChovySign-GUI/Global/BrowseButton.axaml.cs

+12-3
Original file line numberDiff line numberDiff line change
@@ -176,19 +176,28 @@ private async void browseClick(object sender, RoutedEventArgs e)
176176
}
177177
}
178178

179+
179180
public BrowseButton()
180181
{
181182
InitializeComponent();
182183

183-
this.filePath.KeyUp += onKeyPress;
184+
this.filePath.PropertyChanged += onPropertyChanged;
184185

185186
this.extension = "";
186187
this.fileTypeName = "All Files";
187188
}
188189

189-
private void onKeyPress(object? sender, KeyEventArgs e)
190+
private void onPropertyChanged(object? sender, AvaloniaPropertyChangedEventArgs e)
190191
{
191-
OnFileChanged(new EventArgs());
192+
TextBox? txt = sender as TextBox;
193+
if (txt is null) return;
194+
195+
if (e.Property.Name == "Text")
196+
{
197+
if (txt.Text is null) return;
198+
if (!ContainsFile) return;
199+
OnFileChanged(new EventArgs());
200+
}
192201
}
193202
}
194203
}

ChovySign-GUI/Ps1/GameInfoSelector.axaml.cs

+6-3
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,12 @@ public async Task GetGameInfo(string cueFile)
9999
Title = disc.DiscName;
100100
DiscId = disc.DiscId;
101101

102-
byte[] newCover = await Downloader.DownloadCover(disc);
103-
loadIcon(newCover);
104-
iconCache = newCover;
102+
if (!File.Exists(this.iconFile.FilePath))
103+
{
104+
byte[] newCover = await Downloader.DownloadCover(disc);
105+
loadIcon(newCover);
106+
iconCache = newCover;
107+
}
105108
}
106109
catch (Exception e) {
107110
Window? currentWindow = this.VisualRoot as Window;

ChovySign-GUI/Ps1/Ps1Tab.axaml.cs

-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
using Avalonia.Controls;
2-
using Avalonia.Interactivity;
32
using ChovySign_GUI.Global;
43
using ChovySign_GUI.Popup.Global;
54
using ChovySign_GUI.Settings;
65
using GameBuilder.Psp;
76
using LibChovy;
8-
using LibChovy.Config;
97
using System;
108
using System.Linq;
119
using Vita.ContentManager;

0 commit comments

Comments
 (0)