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 //I hate everything about this function
private async Task<bool> RemoteFileExists(string url) private bool RemoteFileExists(string url)
{ {
try try
{ {
HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest; HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
request.Method = "HEAD"; request.Method = "HEAD";
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
HttpWebResponse response = await request.GetResponseAsync() as HttpWebResponse; return (response.StatusCode == HttpStatusCode.OK);
var statusCode = response.StatusCode;
response.Close();
return (statusCode == HttpStatusCode.OK);
} }
catch catch
{ {
@ -2386,7 +2383,7 @@ namespace UWUVCI_AIO_WPF
repoids.Add(SystemType + repoid.Substring(0, 3) + "P"); repoids.Add(SystemType + repoid.Substring(0, 3) + "P");
repoids.Add(SystemType + repoid.Substring(0, 3) + "J"); repoids.Add(SystemType + repoid.Substring(0, 3) + "J");
await GetRepoImages(SystemType, repoid); GetRepoImages(SystemType, repoid);
await checkForAdditionalFiles(GameConsoles.GBA, repoids); await checkForAdditionalFiles(GameConsoles.GBA, repoids);
} }
@ -2402,7 +2399,7 @@ namespace UWUVCI_AIO_WPF
if (await CheckForInternetConnectionWOWarningAsync()) if (await CheckForInternetConnectionWOWarningAsync())
{ {
await GetRepoImages(SystemType, repoid); GetRepoImages(SystemType, repoid);
await checkForAdditionalFiles(GameConsoles.SNES, repoids); await checkForAdditionalFiles(GameConsoles.SNES, repoids);
} }
} }
@ -2417,7 +2414,7 @@ namespace UWUVCI_AIO_WPF
if (await CheckForInternetConnectionWOWarningAsync()) if (await CheckForInternetConnectionWOWarningAsync())
{ {
await GetRepoImages(SystemType, repoid); GetRepoImages(SystemType, repoid);
await checkForAdditionalFiles(GameConsoles.MSX, repoids); await checkForAdditionalFiles(GameConsoles.MSX, repoids);
} }
} }
@ -2431,7 +2428,7 @@ namespace UWUVCI_AIO_WPF
}; };
if (await CheckForInternetConnectionWOWarningAsync()) if (await CheckForInternetConnectionWOWarningAsync())
{ {
await GetRepoImages(SystemType, repoid); GetRepoImages(SystemType, repoid);
await checkForAdditionalFiles(GameConsoles.TG16, repoids); await checkForAdditionalFiles(GameConsoles.TG16, repoids);
} }
} }
@ -2539,7 +2536,7 @@ namespace UWUVCI_AIO_WPF
if (await CheckForInternetConnectionWOWarningAsync()) if (await CheckForInternetConnectionWOWarningAsync())
{ {
await GetRepoImages(SystemType, repoid); GetRepoImages(SystemType, repoid);
await checkForAdditionalFiles(GameConsoles.NES, repoids); 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) + "E");
repoids.Add(SystemType + repoid.Substring(0, 3) + "P"); repoids.Add(SystemType + repoid.Substring(0, 3) + "P");
repoids.Add(SystemType + repoid.Substring(0, 3) + "J"); repoids.Add(SystemType + repoid.Substring(0, 3) + "J");
await GetRepoImages(SystemType, repoid); GetRepoImages(SystemType, repoid);
await checkForAdditionalFiles(GameConsoles.NDS, repoids); await checkForAdditionalFiles(GameConsoles.NDS, repoids);
} }
} }
@ -2693,7 +2690,7 @@ namespace UWUVCI_AIO_WPF
repoids.Add(SystemType + repoid); repoids.Add(SystemType + repoid);
repoids.Add(SystemType + new string(new char[] { repoid[0], repoid[2], repoid[1], repoid[3] })); 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); await checkForAdditionalFiles(GameConsoles.N64, repoids);
} }
} }
@ -2832,7 +2829,7 @@ namespace UWUVCI_AIO_WPF
{ {
foreach (string repoid in repoids) foreach (string repoid in repoids)
{ {
if (await RemoteFileExists(linkbase + repoid + "/game.ini")) if (RemoteFileExists(linkbase + repoid + "/game.ini"))
{ {
ini = true; ini = true;
inip = linkbase + repoid + "/game.ini"; inip = linkbase + repoid + "/game.ini";
@ -2845,7 +2842,7 @@ namespace UWUVCI_AIO_WPF
{ {
foreach (string repoid in repoids) foreach (string repoid in repoids)
{ {
if (await RemoteFileExists(linkbase + repoid + "/BootSound." + e)) if (RemoteFileExists(linkbase + repoid + "/BootSound." + e))
{ {
btsnd = true; btsnd = true;
string btsndp = linkbase + repoid + "/BootSound." + e; string btsndp = linkbase + repoid + "/BootSound." + e;
@ -3025,7 +3022,7 @@ namespace UWUVCI_AIO_WPF
/// <param name="SystemType"></param> /// <param name="SystemType"></param>
/// <param name="repoid"></param> /// <param name="repoid"></param>
/// <param name="repoids"></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/"; string linkbase = "https://raw.githubusercontent.com/Flumpster/UWUVCI-Images/master/";
IMG_Message img = null; IMG_Message img = null;
@ -3053,7 +3050,7 @@ namespace UWUVCI_AIO_WPF
foreach (var id in repoids) foreach (var id in repoids)
{ {
var remoteFile = linkbase + id + $"/iconTex.{e}"; var remoteFile = linkbase + id + $"/iconTex.{e}";
if (await RemoteFileExists(remoteFile) == true) if (RemoteFileExists(remoteFile) == true)
{ {
if (e.Contains("tga")) 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, // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben: // indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.99.1.0")] [assembly: AssemblyVersion("3.99.2.0")]
[assembly: AssemblyFileVersion("3.99.1.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"/>
<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"/> <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"> <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" /> <Image HorizontalAlignment="Left" Height="46" VerticalAlignment="Top" Width="46" Source="/UI/Images/61e111774d3a2f67c827cd25_Frame 5.png" />
</Button> </Button>

View file

@ -8,7 +8,7 @@
d:DesignHeight="480" d:DesignWidth="1130" d:DesignHeight="480" d:DesignWidth="1130"
Title="SettingsFrame" > Title="SettingsFrame" >
<Grid> <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> <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"> <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" /> <Image HorizontalAlignment="Left" Height="46" VerticalAlignment="Top" Width="46" Source="/UI/Images/61e111774d3a2f67c827cd25_Frame 5.png" />

View file

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