This commit is contained in:
Li 2024-01-11 21:29:23 +13:00
parent 97c5959caf
commit dd3431c312
4 changed files with 19 additions and 9 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<_LastSelectedProfileId>C:\Users\Li\Documents\git\Chovy-Sign-v2\ChovySign-CLI\Properties\PublishProfiles\Win64.pubxml</_LastSelectedProfileId> <_LastSelectedProfileId>C:\Users\Li\Desktop\git\chovy-sign\ChovySign-CLI\Properties\PublishProfiles\Linux64.pubxml</_LastSelectedProfileId>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -176,19 +176,28 @@ namespace ChovySign_GUI.Global
} }
} }
public BrowseButton() public BrowseButton()
{ {
InitializeComponent(); InitializeComponent();
this.filePath.KeyUp += onKeyPress; this.filePath.PropertyChanged += onPropertyChanged;
this.extension = ""; this.extension = "";
this.fileTypeName = "All Files"; this.fileTypeName = "All Files";
} }
private void onKeyPress(object? sender, KeyEventArgs e) private void onPropertyChanged(object? sender, AvaloniaPropertyChangedEventArgs e)
{ {
OnFileChanged(new EventArgs()); TextBox? txt = sender as TextBox;
if (txt is null) return;
if (e.Property.Name == "Text")
{
if (txt.Text is null) return;
if (!ContainsFile) return;
OnFileChanged(new EventArgs());
}
} }
} }
} }

View File

@ -99,9 +99,12 @@ namespace ChovySign_GUI.Ps1
Title = disc.DiscName; Title = disc.DiscName;
DiscId = disc.DiscId; DiscId = disc.DiscId;
byte[] newCover = await Downloader.DownloadCover(disc); if (!File.Exists(this.iconFile.FilePath))
loadIcon(newCover); {
iconCache = newCover; byte[] newCover = await Downloader.DownloadCover(disc);
loadIcon(newCover);
iconCache = newCover;
}
} }
catch (Exception e) { catch (Exception e) {
Window? currentWindow = this.VisualRoot as Window; Window? currentWindow = this.VisualRoot as Window;

View File

@ -1,11 +1,9 @@
using Avalonia.Controls; using Avalonia.Controls;
using Avalonia.Interactivity;
using ChovySign_GUI.Global; using ChovySign_GUI.Global;
using ChovySign_GUI.Popup.Global; using ChovySign_GUI.Popup.Global;
using ChovySign_GUI.Settings; using ChovySign_GUI.Settings;
using GameBuilder.Psp; using GameBuilder.Psp;
using LibChovy; using LibChovy;
using LibChovy.Config;
using System; using System;
using System.Linq; using System.Linq;
using Vita.ContentManager; using Vita.ContentManager;