diff --git a/Bloxstrap/Dialogs/Preferences.cs b/Bloxstrap/Dialogs/Preferences.cs index ad67e070..b6f261c6 100644 --- a/Bloxstrap/Dialogs/Preferences.cs +++ b/Bloxstrap/Dialogs/Preferences.cs @@ -32,6 +32,7 @@ public partial class Preferences : Form { "Late 2015", BootstrapperIcon.IconLate2015 }, { "2017", BootstrapperIcon.Icon2017 }, { "2019", BootstrapperIcon.Icon2019 }, + { "2022", BootstrapperIcon.Icon2022 } }; private string ChannelInfo diff --git a/Bloxstrap/Enums/BootstrapperIcon.cs b/Bloxstrap/Enums/BootstrapperIcon.cs index e0444d4c..87ecaf99 100644 --- a/Bloxstrap/Enums/BootstrapperIcon.cs +++ b/Bloxstrap/Enums/BootstrapperIcon.cs @@ -8,6 +8,7 @@ public enum BootstrapperIcon IconEarly2015, IconLate2015, Icon2017, - Icon2019 + Icon2019, + Icon2022 } } diff --git a/Bloxstrap/Helpers/DeployManager.cs b/Bloxstrap/Helpers/DeployManager.cs index dfdbd631..080c90fb 100644 --- a/Bloxstrap/Helpers/DeployManager.cs +++ b/Bloxstrap/Helpers/DeployManager.cs @@ -99,22 +99,21 @@ private static string BuildBaseUrl(string channel) public static async Task GetLastDeploy(string channel) { string baseUrl = BuildBaseUrl(channel); - string deployHistory = ""; string lastDeploy = ""; using (HttpClient client = new()) { - deployHistory = await client.GetStringAsync($"{baseUrl}/DeployHistory.txt"); - } - - using (StringReader reader = new(deployHistory)) - { - string? line; + string deployHistory = await client.GetStringAsync($"{baseUrl}/DeployHistory.txt"); - while ((line = await reader.ReadLineAsync()) is not null) + using (StringReader reader = new(deployHistory)) { - if (line.Contains("WindowsPlayer")) - lastDeploy = line; + string? line; + + while ((line = await reader.ReadLineAsync()) is not null) + { + if (line.Contains("WindowsPlayer")) + lastDeploy = line; + } } } @@ -148,7 +147,12 @@ public static async Task GetLastDeploy(string channel) // convert to traditional version format fileVersion = fileVersion.Replace(" ", "").Replace(',', '.'); - return new VersionDeploy { VersionGuid = versionGuid, Date = date, FileVersion = fileVersion }; + return new VersionDeploy + { + VersionGuid = versionGuid, + Date = date, + FileVersion = fileVersion + }; } } } diff --git a/Bloxstrap/Helpers/IconManager.cs b/Bloxstrap/Helpers/IconManager.cs index 3f873a85..1cd38456 100644 --- a/Bloxstrap/Helpers/IconManager.cs +++ b/Bloxstrap/Helpers/IconManager.cs @@ -19,6 +19,7 @@ public static Icon GetIconResource(BootstrapperIcon icon) case BootstrapperIcon.IconLate2015: return Properties.Resources.IconLate2015_ico; case BootstrapperIcon.Icon2017: return Properties.Resources.Icon2017_ico; case BootstrapperIcon.Icon2019: return Properties.Resources.Icon2019_ico; + case BootstrapperIcon.Icon2022: return Properties.Resources.Icon2022_ico; case BootstrapperIcon.IconBloxstrap: default: return Properties.Resources.IconBloxstrap_ico; } } @@ -38,6 +39,7 @@ public static Bitmap GetBitmapResource(BootstrapperIcon icon) case BootstrapperIcon.IconLate2015: return Properties.Resources.IconLate2015_png; case BootstrapperIcon.Icon2017: return Properties.Resources.Icon2017_png; case BootstrapperIcon.Icon2019: return Properties.Resources.Icon2019_png; + case BootstrapperIcon.Icon2022: return Properties.Resources.Icon2022_png; case BootstrapperIcon.IconBloxstrap: default: return Properties.Resources.IconBloxstrap_png; } } diff --git a/Bloxstrap/Properties/Resources.Designer.cs b/Bloxstrap/Properties/Resources.Designer.cs index a95d9ea6..eb97d68c 100644 --- a/Bloxstrap/Properties/Resources.Designer.cs +++ b/Bloxstrap/Properties/Resources.Designer.cs @@ -180,6 +180,26 @@ internal static System.Drawing.Bitmap Icon2019_png { } } + /// + /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). + /// + internal static System.Drawing.Icon Icon2022_ico { + get { + object obj = ResourceManager.GetObject("Icon2022_ico", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Icon2022_png { + get { + object obj = ResourceManager.GetObject("Icon2022_png", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// diff --git a/Bloxstrap/Properties/Resources.resx b/Bloxstrap/Properties/Resources.resx index 059cfaca..50ed237f 100644 --- a/Bloxstrap/Properties/Resources.resx +++ b/Bloxstrap/Properties/Resources.resx @@ -154,6 +154,12 @@ ..\Resources\Icon2019-png.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Icon2022-ico.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Icon2022-png.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\IconBloxstrap-ico.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/Bloxstrap/Resources/Icon2022-ico.ico b/Bloxstrap/Resources/Icon2022-ico.ico new file mode 100644 index 00000000..a05eb33d Binary files /dev/null and b/Bloxstrap/Resources/Icon2022-ico.ico differ diff --git a/Bloxstrap/Resources/Icon2022-png.png b/Bloxstrap/Resources/Icon2022-png.png new file mode 100644 index 00000000..7f26209d Binary files /dev/null and b/Bloxstrap/Resources/Icon2022-png.png differ