Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
LiEnby committed Jan 11, 2024
1 parent 97c5959 commit dd3431c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ChovySign-CLI/ChovySign-CLI.csproj.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<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>
</Project>
15 changes: 12 additions & 3 deletions ChovySign-GUI/Global/BrowseButton.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,19 +176,28 @@ private async void browseClick(object sender, RoutedEventArgs e)
}
}


public BrowseButton()
{
InitializeComponent();

this.filePath.KeyUp += onKeyPress;
this.filePath.PropertyChanged += onPropertyChanged;

this.extension = "";
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());
}
}
}
}
9 changes: 6 additions & 3 deletions ChovySign-GUI/Ps1/GameInfoSelector.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,12 @@ public async Task GetGameInfo(string cueFile)
Title = disc.DiscName;
DiscId = disc.DiscId;

byte[] newCover = await Downloader.DownloadCover(disc);
loadIcon(newCover);
iconCache = newCover;
if (!File.Exists(this.iconFile.FilePath))
{
byte[] newCover = await Downloader.DownloadCover(disc);
loadIcon(newCover);
iconCache = newCover;
}
}
catch (Exception e) {
Window? currentWindow = this.VisualRoot as Window;
Expand Down
2 changes: 0 additions & 2 deletions ChovySign-GUI/Ps1/Ps1Tab.axaml.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using Avalonia.Controls;
using Avalonia.Interactivity;
using ChovySign_GUI.Global;
using ChovySign_GUI.Popup.Global;
using ChovySign_GUI.Settings;
using GameBuilder.Psp;
using LibChovy;
using LibChovy.Config;
using System;
using System.Linq;
using Vita.ContentManager;
Expand Down

0 comments on commit dd3431c

Please sign in to comment.