Merge pull request #48 from stuff-by-3-random-dudes/OverhaulToNet6

??? Fix
This commit is contained in:
ZestyTS 2022-09-09 16:58:54 -07:00 committed by GitHub
commit ffda8a1f37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 24 deletions

View file

@ -1429,17 +1429,14 @@ namespace UWUVCI_AIO_WPF
}
}
//I hate everything about this function
private async Task<bool> RemoteFileExists(string url)
private bool RemoteFileExists(string url)
{
try
{
HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
request.Method = "HEAD";
HttpWebResponse response = await request.GetResponseAsync() as HttpWebResponse;
var statusCode = response.StatusCode;
response.Close();
return (statusCode == HttpStatusCode.OK);
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
return (response.StatusCode == HttpStatusCode.OK);
}
catch
{
@ -2386,7 +2383,7 @@ namespace UWUVCI_AIO_WPF
repoids.Add(SystemType + repoid.Substring(0, 3) + "P");
repoids.Add(SystemType + repoid.Substring(0, 3) + "J");
await GetRepoImages(SystemType, repoid);
GetRepoImages(SystemType, repoid);
await checkForAdditionalFiles(GameConsoles.GBA, repoids);
}
@ -2402,7 +2399,7 @@ namespace UWUVCI_AIO_WPF
if (await CheckForInternetConnectionWOWarningAsync())
{
await GetRepoImages(SystemType, repoid);
GetRepoImages(SystemType, repoid);
await checkForAdditionalFiles(GameConsoles.SNES, repoids);
}
}
@ -2417,7 +2414,7 @@ namespace UWUVCI_AIO_WPF
if (await CheckForInternetConnectionWOWarningAsync())
{
await GetRepoImages(SystemType, repoid);
GetRepoImages(SystemType, repoid);
await checkForAdditionalFiles(GameConsoles.MSX, repoids);
}
}
@ -2431,7 +2428,7 @@ namespace UWUVCI_AIO_WPF
};
if (await CheckForInternetConnectionWOWarningAsync())
{
await GetRepoImages(SystemType, repoid);
GetRepoImages(SystemType, repoid);
await checkForAdditionalFiles(GameConsoles.TG16, repoids);
}
}
@ -2539,7 +2536,7 @@ namespace UWUVCI_AIO_WPF
if (await CheckForInternetConnectionWOWarningAsync())
{
await GetRepoImages(SystemType, repoid);
GetRepoImages(SystemType, repoid);
await checkForAdditionalFiles(GameConsoles.NES, repoids);
}
}
@ -2668,7 +2665,7 @@ namespace UWUVCI_AIO_WPF
repoids.Add(SystemType + repoid.Substring(0, 3) + "E");
repoids.Add(SystemType + repoid.Substring(0, 3) + "P");
repoids.Add(SystemType + repoid.Substring(0, 3) + "J");
await GetRepoImages(SystemType, repoid);
GetRepoImages(SystemType, repoid);
await checkForAdditionalFiles(GameConsoles.NDS, repoids);
}
}
@ -2693,7 +2690,7 @@ namespace UWUVCI_AIO_WPF
repoids.Add(SystemType + repoid);
repoids.Add(SystemType + new string(new char[] { repoid[0], repoid[2], repoid[1], repoid[3] }));
await GetRepoImages(SystemType, repoid);
GetRepoImages(SystemType, repoid);
await checkForAdditionalFiles(GameConsoles.N64, repoids);
}
}
@ -2832,7 +2829,7 @@ namespace UWUVCI_AIO_WPF
{
foreach (string repoid in repoids)
{
if (await RemoteFileExists(linkbase + repoid + "/game.ini"))
if (RemoteFileExists(linkbase + repoid + "/game.ini"))
{
ini = true;
inip = linkbase + repoid + "/game.ini";
@ -2845,7 +2842,7 @@ namespace UWUVCI_AIO_WPF
{
foreach (string repoid in repoids)
{
if (await RemoteFileExists(linkbase + repoid + "/BootSound." + e))
if (RemoteFileExists(linkbase + repoid + "/BootSound." + e))
{
btsnd = true;
string btsndp = linkbase + repoid + "/BootSound." + e;
@ -3025,7 +3022,7 @@ namespace UWUVCI_AIO_WPF
/// <param name="SystemType"></param>
/// <param name="repoid"></param>
/// <param name="repoids"></param>
private async Task GetRepoImages(string SystemType, string repoid, List<string> repoids = null)
private void GetRepoImages(string SystemType, string repoid, List<string> repoids = null)
{
string linkbase = "https://raw.githubusercontent.com/Flumpster/UWUVCI-Images/master/";
IMG_Message img = null;
@ -3053,7 +3050,7 @@ namespace UWUVCI_AIO_WPF
foreach (var id in repoids)
{
var remoteFile = linkbase + id + $"/iconTex.{e}";
if (await RemoteFileExists(remoteFile) == true)
if (RemoteFileExists(remoteFile) == true)
{
if (e.Contains("tga"))

View file

@ -51,5 +51,5 @@ using System.Windows;
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.99.1.0")]
[assembly: AssemblyFileVersion("3.99.1.0")]
[assembly: AssemblyVersion("3.99.2.0")]
[assembly: AssemblyFileVersion("3.99.2.0")]

View file

@ -46,7 +46,7 @@
<Ellipse Fill="#FF2196F3" HorizontalAlignment="Left" Height="21" Margin="12,7,0,0" VerticalAlignment="Top" Width="17"/>
<Ellipse Fill="#FF2196F3" HorizontalAlignment="Left" Height="21" Margin="12,7,0,0" VerticalAlignment="Top" Width="17"/>
<Border BorderBrush="#FF2196F3" BorderThickness="1" HorizontalAlignment="Left" Height="33" Margin="12,6,0,0" VerticalAlignment="Top" Width="1108" CornerRadius="5" Background="#FF2196F3"/>
<Label Content="v3.99.1" HorizontalAlignment="Left" Margin="1075,10,0,0" VerticalAlignment="Top" Foreground="#DDFFFFFF" Width="81" Height="24"/>
<Label Content="v3.99.2" HorizontalAlignment="Left" Margin="1075,10,0,0" VerticalAlignment="Top" Foreground="#DDFFFFFF" Width="81" Height="24"/>
<Button HorizontalAlignment="Left" Margin="32,522,0,0" VerticalAlignment="Top" Width="74" Click="Button_Click_13" IsTabStop="False" Height="58" ToolTip="Support UWUVCI on Ko-Fi">
<Image HorizontalAlignment="Left" Height="46" VerticalAlignment="Top" Width="46" Source="/UI/Images/61e111774d3a2f67c827cd25_Frame 5.png" />
</Button>

View file

@ -8,7 +8,7 @@
d:DesignHeight="480" d:DesignWidth="1130"
Title="SettingsFrame" >
<Grid>
<TextBlock x:Name="tb" Margin="10,172,10,192" TextWrapping="Wrap" Text="Welcome to UWUVCI AIO v3.99.1. To start Injecting select a Console to your left." FontSize="20" Height="116" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" Width="1110" />
<TextBlock x:Name="tb" Margin="10,172,10,192" TextWrapping="Wrap" Text="Welcome to UWUVCI AIO v3.99.2. To start Injecting select a Console to your left." FontSize="20" Height="116" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" Width="1110" />
<TextBlock Margin="15,505,15,0" HorizontalAlignment="Right" VerticalAlignment="Top" Text="Support MAC Development" TextAlignment="Right"></TextBlock>
<Button HorizontalAlignment="Right" Margin="15,525,15,0" VerticalAlignment="Top" Width="74" Click="Button_Click" IsTabStop="False" Height="58" ToolTip="Support UWUVCI MAC Development on Ko-Fi">
<Image HorizontalAlignment="Left" Height="46" VerticalAlignment="Top" Width="46" Source="/UI/Images/61e111774d3a2f67c827cd25_Frame 5.png" />

View file

@ -479,9 +479,8 @@ namespace UWUVCI_AIO_WPF.UI.Windows
{
HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
request.Method = "HEAD";
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
response.Close();
return (response.StatusCode == HttpStatusCode.OK);
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
return (response.StatusCode == HttpStatusCode.OK);
}
catch
{