mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Driver Updates
This commit is contained in:
@@ -61,8 +61,25 @@ public static class AppConfig
|
||||
|
||||
GetModel();
|
||||
return (_model is not null && _model.ToLower().Contains(contains.ToLower()));
|
||||
|
||||
}
|
||||
|
||||
public static string GetModelShort()
|
||||
{
|
||||
GetModel();
|
||||
if (_model is not null)
|
||||
{
|
||||
int trim = _model.LastIndexOf("_");
|
||||
if (trim > 0) return _model.Substring(trim+1);
|
||||
|
||||
trim = _model.LastIndexOf(" ");
|
||||
if (trim > 0) return _model.Substring(trim + 1);
|
||||
|
||||
return _model;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
private static void initConfig()
|
||||
{
|
||||
config = new Dictionary<string, object>();
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<AssemblyVersion>0.78</AssemblyVersion>
|
||||
<AssemblyVersion>0.79</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
||||
@@ -126,6 +126,9 @@ namespace GHelper
|
||||
if (settingsForm.keyb is not null && settingsForm.keyb.Text != "")
|
||||
settingsForm.keyb.InitTheme();
|
||||
|
||||
if (settingsForm.updates is not null && settingsForm.updates.Text != "")
|
||||
settingsForm.updates.InitTheme();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
10
app/Properties/Resources.Designer.cs
generated
10
app/Properties/Resources.Designer.cs
generated
@@ -350,6 +350,16 @@ namespace GHelper.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap icons8_software_48 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("icons8-software-48", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
||||
@@ -118,6 +118,9 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="brightness_up" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\brightness-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-leaf-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-leaf-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -133,11 +136,17 @@
|
||||
<data name="icons8-fiat-500-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-fiat-500-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8_microphone_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-microphone-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-rocket-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-rocket-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-bicycle-48 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-bicycle-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-game-controller-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-game-controller-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="icons8_touchpad_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-touchpad-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-fan-head-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-fan-head-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@@ -145,8 +154,8 @@
|
||||
<data name="icons8-processor-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-processor-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-spa-flower-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-spa-flower-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="icons8-game-controller-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-game-controller-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-spa-flower-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-spa-flower-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@@ -157,9 +166,15 @@
|
||||
<data name="icons8-keyboard-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-keyboard-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="brightness_down" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\brightness-down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-fan-speed-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-fan-speed-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-help-64" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-help-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-speed-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-speed-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -169,12 +184,24 @@
|
||||
<data name="icons8-laptop-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-laptop-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-project-management-48 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-project-management-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-video-card-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-video-card-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="backlight_up" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\backlight-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-spa-flower-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-spa-flower-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-organic-food-961" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-organic-food-961.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8_function" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-function-mac-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-balance-symbol-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-balance-symbol-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -184,55 +211,31 @@
|
||||
<data name="icons8-matrix-desktop-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-matrix-desktop-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8_mute_unmute_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-mute-unmute-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-xbox-controller-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-xbox-controller-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-project-management-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-project-management-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8_video_48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-video-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-leaf-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-leaf-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ultimate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ultimate.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-rocket-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-rocket-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="backlight_down" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\backlight-down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-speed-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-speed-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-help-64" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-help-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8_video_48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-video-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-project-management-48 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-project-management-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8_microphone_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-microphone-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8_touchpad_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-touchpad-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="backlight_down" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\backlight-down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="backlight_up" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\backlight-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="brightness_down" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\brightness-down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="brightness_up" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\brightness-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8_mute_unmute_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-mute-unmute-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8_function" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-function-mac-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="icons8-software-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-software-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
27
app/Properties/Strings.Designer.cs
generated
27
app/Properties/Strings.Designer.cs
generated
@@ -312,6 +312,15 @@ namespace GHelper.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to BIOS and Driver Updates.
|
||||
/// </summary>
|
||||
internal static string BiosAndDriverUpdates {
|
||||
get {
|
||||
return ResourceManager.GetString("BiosAndDriverUpdates", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Boot.
|
||||
/// </summary>
|
||||
@@ -393,6 +402,15 @@ namespace GHelper.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Drivers and Software.
|
||||
/// </summary>
|
||||
internal static string DriverAndSoftware {
|
||||
get {
|
||||
return ResourceManager.GetString("DriverAndSoftware", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Disables dGPU for battery savings.
|
||||
/// </summary>
|
||||
@@ -1095,6 +1113,15 @@ namespace GHelper.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Updates.
|
||||
/// </summary>
|
||||
internal static string Updates {
|
||||
get {
|
||||
return ResourceManager.GetString("Updates", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Version.
|
||||
/// </summary>
|
||||
|
||||
@@ -201,6 +201,9 @@
|
||||
<data name="BatteryChargeLimit" xml:space="preserve">
|
||||
<value>Battery Charge Limit</value>
|
||||
</data>
|
||||
<data name="BiosAndDriverUpdates" xml:space="preserve">
|
||||
<value>BIOS and Driver Updates</value>
|
||||
</data>
|
||||
<data name="Boot" xml:space="preserve">
|
||||
<value>Boot</value>
|
||||
</data>
|
||||
@@ -228,6 +231,9 @@
|
||||
<data name="DownloadUpdate" xml:space="preserve">
|
||||
<value>Download Update</value>
|
||||
</data>
|
||||
<data name="DriverAndSoftware" xml:space="preserve">
|
||||
<value>Drivers and Software</value>
|
||||
</data>
|
||||
<data name="EcoGPUTooltip" xml:space="preserve">
|
||||
<value>Disables dGPU for battery savings</value>
|
||||
</data>
|
||||
@@ -462,6 +468,9 @@
|
||||
<data name="UltimateMode" xml:space="preserve">
|
||||
<value>Ultimate</value>
|
||||
</data>
|
||||
<data name="Updates" xml:space="preserve">
|
||||
<value>Updates</value>
|
||||
</data>
|
||||
<data name="VersionLabel" xml:space="preserve">
|
||||
<value>Version</value>
|
||||
</data>
|
||||
|
||||
BIN
app/Resources/icons8-bios-48.png
Normal file
BIN
app/Resources/icons8-bios-48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 362 B |
BIN
app/Resources/icons8-software-48.png
Normal file
BIN
app/Resources/icons8-software-48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 645 B |
49
app/Settings.Designer.cs
generated
49
app/Settings.Designer.cs
generated
@@ -47,6 +47,7 @@ namespace GHelper
|
||||
pictureBattery = new PictureBox();
|
||||
labelBatteryTitle = new Label();
|
||||
panelFooter = new Panel();
|
||||
buttonUpdates = new RButton();
|
||||
buttonQuit = new RButton();
|
||||
checkStartup = new CheckBox();
|
||||
panelPerformance = new Panel();
|
||||
@@ -121,7 +122,7 @@ namespace GHelper
|
||||
panelMatrix.Controls.Add(pictureMatrix);
|
||||
panelMatrix.Controls.Add(labelMatrix);
|
||||
panelMatrix.Dock = DockStyle.Top;
|
||||
panelMatrix.Location = new Point(10, 795);
|
||||
panelMatrix.Location = new Point(10, 777);
|
||||
panelMatrix.Margin = new Padding(8);
|
||||
panelMatrix.Name = "panelMatrix";
|
||||
panelMatrix.Padding = new Padding(0, 0, 0, 12);
|
||||
@@ -244,7 +245,7 @@ namespace GHelper
|
||||
panelBattery.Controls.Add(pictureBattery);
|
||||
panelBattery.Controls.Add(labelBatteryTitle);
|
||||
panelBattery.Dock = DockStyle.Top;
|
||||
panelBattery.Location = new Point(10, 963);
|
||||
panelBattery.Location = new Point(10, 945);
|
||||
panelBattery.Margin = new Padding(8);
|
||||
panelBattery.Name = "panelBattery";
|
||||
panelBattery.Padding = new Padding(0, 0, 0, 12);
|
||||
@@ -322,16 +323,34 @@ namespace GHelper
|
||||
//
|
||||
panelFooter.AutoSize = true;
|
||||
panelFooter.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelFooter.Controls.Add(buttonUpdates);
|
||||
panelFooter.Controls.Add(buttonQuit);
|
||||
panelFooter.Controls.Add(checkStartup);
|
||||
panelFooter.Dock = DockStyle.Top;
|
||||
panelFooter.Location = new Point(10, 1126);
|
||||
panelFooter.Location = new Point(10, 1108);
|
||||
panelFooter.Margin = new Padding(8);
|
||||
panelFooter.Name = "panelFooter";
|
||||
panelFooter.Padding = new Padding(0, 0, 0, 10);
|
||||
panelFooter.Size = new Size(810, 74);
|
||||
panelFooter.TabIndex = 35;
|
||||
//
|
||||
// buttonUpdates
|
||||
//
|
||||
buttonUpdates.Activated = false;
|
||||
buttonUpdates.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
buttonUpdates.BackColor = SystemColors.ControlLight;
|
||||
buttonUpdates.BorderColor = Color.Transparent;
|
||||
buttonUpdates.BorderRadius = 2;
|
||||
buttonUpdates.FlatStyle = FlatStyle.Flat;
|
||||
buttonUpdates.Location = new Point(401, 16);
|
||||
buttonUpdates.Margin = new Padding(8, 4, 8, 4);
|
||||
buttonUpdates.Name = "buttonUpdates";
|
||||
buttonUpdates.Secondary = true;
|
||||
buttonUpdates.Size = new Size(180, 44);
|
||||
buttonUpdates.TabIndex = 19;
|
||||
buttonUpdates.Text = "Updates";
|
||||
buttonUpdates.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// buttonQuit
|
||||
//
|
||||
buttonQuit.Activated = false;
|
||||
@@ -340,11 +359,11 @@ namespace GHelper
|
||||
buttonQuit.BorderColor = Color.Transparent;
|
||||
buttonQuit.BorderRadius = 2;
|
||||
buttonQuit.FlatStyle = FlatStyle.Flat;
|
||||
buttonQuit.Location = new Point(599, 16);
|
||||
buttonQuit.Location = new Point(597, 16);
|
||||
buttonQuit.Margin = new Padding(8, 4, 8, 4);
|
||||
buttonQuit.Name = "buttonQuit";
|
||||
buttonQuit.Secondary = true;
|
||||
buttonQuit.Size = new Size(185, 44);
|
||||
buttonQuit.Size = new Size(180, 44);
|
||||
buttonQuit.TabIndex = 18;
|
||||
buttonQuit.Text = Properties.Strings.Quit;
|
||||
buttonQuit.UseVisualStyleBackColor = false;
|
||||
@@ -536,20 +555,18 @@ namespace GHelper
|
||||
panelGPU.Margin = new Padding(8);
|
||||
panelGPU.Name = "panelGPU";
|
||||
panelGPU.Padding = new Padding(0, 0, 0, 45);
|
||||
panelGPU.Size = new Size(810, 237);
|
||||
panelGPU.Size = new Size(810, 257);
|
||||
panelGPU.TabIndex = 37;
|
||||
//
|
||||
// labelTipGPU
|
||||
//
|
||||
labelTipGPU.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
labelTipGPU.ForeColor = SystemColors.GrayText;
|
||||
labelTipGPU.Location = new Point(44, 191);
|
||||
labelTipGPU.Location = new Point(44, 211);
|
||||
labelTipGPU.Margin = new Padding(4, 0, 4, 0);
|
||||
labelTipGPU.Name = "labelTipGPU";
|
||||
labelTipGPU.Size = new Size(760, 36);
|
||||
labelTipGPU.TabIndex = 20;
|
||||
labelTipGPU.Text = "";
|
||||
labelTipGPU.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
|
||||
|
||||
//
|
||||
// pictureGPU
|
||||
//
|
||||
@@ -604,7 +621,8 @@ namespace GHelper
|
||||
tableGPU.Name = "tableGPU";
|
||||
tableGPU.RowCount = 1;
|
||||
tableGPU.RowStyles.Add(new RowStyle(SizeType.Absolute, 128F));
|
||||
tableGPU.Size = new Size(772, 128);
|
||||
tableGPU.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F));
|
||||
tableGPU.Size = new Size(772, 148);
|
||||
tableGPU.TabIndex = 16;
|
||||
//
|
||||
// buttonEco
|
||||
@@ -668,7 +686,7 @@ namespace GHelper
|
||||
buttonXGM.Margin = new Padding(4);
|
||||
buttonXGM.Name = "buttonXGM";
|
||||
buttonXGM.Secondary = false;
|
||||
buttonXGM.Size = new Size(185, 120);
|
||||
buttonXGM.Size = new Size(185, 12);
|
||||
buttonXGM.TabIndex = 2;
|
||||
buttonXGM.Text = "XG Mobile";
|
||||
buttonXGM.TextImageRelation = TextImageRelation.ImageAboveText;
|
||||
@@ -729,7 +747,7 @@ namespace GHelper
|
||||
panelScreen.Controls.Add(pictureScreen);
|
||||
panelScreen.Controls.Add(labelSreen);
|
||||
panelScreen.Dock = DockStyle.Top;
|
||||
panelScreen.Location = new Point(10, 485);
|
||||
panelScreen.Location = new Point(10, 467);
|
||||
panelScreen.Margin = new Padding(8);
|
||||
panelScreen.Name = "panelScreen";
|
||||
panelScreen.Padding = new Padding(0, 0, 0, 10);
|
||||
@@ -886,7 +904,7 @@ namespace GHelper
|
||||
panelKeyboard.Controls.Add(pictureKeyboard);
|
||||
panelKeyboard.Controls.Add(labelKeyboard);
|
||||
panelKeyboard.Dock = DockStyle.Top;
|
||||
panelKeyboard.Location = new Point(10, 666);
|
||||
panelKeyboard.Location = new Point(10, 648);
|
||||
panelKeyboard.Margin = new Padding(8);
|
||||
panelKeyboard.Name = "panelKeyboard";
|
||||
panelKeyboard.Padding = new Padding(0, 0, 0, 12);
|
||||
@@ -1027,7 +1045,7 @@ namespace GHelper
|
||||
AutoScaleMode = AutoScaleMode.Dpi;
|
||||
AutoSize = true;
|
||||
AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
ClientSize = new Size(830, 1173);
|
||||
ClientSize = new Size(830, 1195);
|
||||
Controls.Add(panelFooter);
|
||||
Controls.Add(panelBattery);
|
||||
Controls.Add(panelMatrix);
|
||||
@@ -1137,5 +1155,6 @@ namespace GHelper
|
||||
private Label labelMidFan;
|
||||
private Label labelModel;
|
||||
private WinFormsSliderBar.Slider sliderBattery;
|
||||
private RButton buttonUpdates;
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,7 @@ namespace GHelper
|
||||
public AniMatrix matrix;
|
||||
public Fans fans;
|
||||
public Extra keyb;
|
||||
public Updates updates;
|
||||
|
||||
static long lastRefresh;
|
||||
|
||||
@@ -71,6 +72,7 @@ namespace GHelper
|
||||
|
||||
buttonMatrix.Text = Properties.Strings.PictureGif;
|
||||
buttonQuit.Text = Properties.Strings.Quit;
|
||||
buttonUpdates.Text = Properties.Strings.Updates;
|
||||
|
||||
FormClosing += SettingsForm_FormClosing;
|
||||
|
||||
@@ -157,6 +159,8 @@ namespace GHelper
|
||||
button120Hz.MouseMove += Button120Hz_MouseHover;
|
||||
button120Hz.MouseLeave += ButtonScreen_MouseLeave;
|
||||
|
||||
buttonUpdates.Click += ButtonUpdates_Click;
|
||||
|
||||
sliderBattery.ValueChanged += SliderBattery_ValueChanged;
|
||||
Program.trayIcon.MouseMove += TrayIcon_MouseMove;
|
||||
|
||||
@@ -184,6 +188,18 @@ namespace GHelper
|
||||
|
||||
}
|
||||
|
||||
private void ButtonUpdates_Click(object? sender, EventArgs e)
|
||||
{
|
||||
if (updates == null || updates.Text == "")
|
||||
{
|
||||
updates = new Updates();
|
||||
updates.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
updates.Close();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void WndProc(ref Message m)
|
||||
{
|
||||
|
||||
204
app/Updates.Designer.cs
generated
Normal file
204
app/Updates.Designer.cs
generated
Normal file
@@ -0,0 +1,204 @@
|
||||
namespace GHelper
|
||||
{
|
||||
partial class Updates
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Updates));
|
||||
tableBios = new TableLayoutPanel();
|
||||
labelBIOS = new Label();
|
||||
pictureBios = new PictureBox();
|
||||
panelBiosTitle = new Panel();
|
||||
panelBios = new Panel();
|
||||
panelDrivers = new Panel();
|
||||
tableDrivers = new TableLayoutPanel();
|
||||
panelDriversTitle = new Panel();
|
||||
labelDrivers = new Label();
|
||||
pictureDrivers = new PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBios).BeginInit();
|
||||
panelBiosTitle.SuspendLayout();
|
||||
panelBios.SuspendLayout();
|
||||
panelDrivers.SuspendLayout();
|
||||
panelDriversTitle.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureDrivers).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// tableBios
|
||||
//
|
||||
tableBios.AutoSize = true;
|
||||
tableBios.ColumnCount = 3;
|
||||
tableBios.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
tableBios.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
tableBios.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
tableBios.Dock = DockStyle.Fill;
|
||||
tableBios.Location = new Point(20, 20);
|
||||
tableBios.MinimumSize = new Size(1100, 0);
|
||||
tableBios.Name = "tableBios";
|
||||
tableBios.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
|
||||
tableBios.Size = new Size(1138, 0);
|
||||
tableBios.TabIndex = 0;
|
||||
//
|
||||
// labelBIOS
|
||||
//
|
||||
labelBIOS.AutoSize = true;
|
||||
labelBIOS.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelBIOS.Location = new Point(67, 27);
|
||||
labelBIOS.Name = "labelBIOS";
|
||||
labelBIOS.Size = new Size(68, 32);
|
||||
labelBIOS.TabIndex = 1;
|
||||
labelBIOS.Text = "BIOS";
|
||||
//
|
||||
// pictureBios
|
||||
//
|
||||
pictureBios.BackgroundImage = (Image)resources.GetObject("pictureBios.BackgroundImage");
|
||||
pictureBios.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
pictureBios.Location = new Point(29, 27);
|
||||
pictureBios.Name = "pictureBios";
|
||||
pictureBios.Size = new Size(32, 32);
|
||||
pictureBios.TabIndex = 2;
|
||||
pictureBios.TabStop = false;
|
||||
//
|
||||
// panelBiosTitle
|
||||
//
|
||||
panelBiosTitle.Controls.Add(labelBIOS);
|
||||
panelBiosTitle.Controls.Add(pictureBios);
|
||||
panelBiosTitle.Dock = DockStyle.Top;
|
||||
panelBiosTitle.Location = new Point(0, 0);
|
||||
panelBiosTitle.Name = "panelBiosTitle";
|
||||
panelBiosTitle.Size = new Size(1178, 62);
|
||||
panelBiosTitle.TabIndex = 3;
|
||||
//
|
||||
// panelBios
|
||||
//
|
||||
panelBios.AutoSize = true;
|
||||
panelBios.Controls.Add(tableBios);
|
||||
panelBios.Dock = DockStyle.Top;
|
||||
panelBios.Location = new Point(0, 62);
|
||||
panelBios.Name = "panelBios";
|
||||
panelBios.Padding = new Padding(20);
|
||||
panelBios.Size = new Size(1178, 40);
|
||||
panelBios.TabIndex = 4;
|
||||
//
|
||||
// panelDrivers
|
||||
//
|
||||
panelDrivers.AutoSize = true;
|
||||
panelDrivers.Controls.Add(tableDrivers);
|
||||
panelDrivers.Dock = DockStyle.Top;
|
||||
panelDrivers.Location = new Point(0, 146);
|
||||
panelDrivers.Name = "panelDrivers";
|
||||
panelDrivers.Padding = new Padding(20);
|
||||
panelDrivers.Size = new Size(1178, 40);
|
||||
panelDrivers.TabIndex = 6;
|
||||
//
|
||||
// tableDrivers
|
||||
//
|
||||
tableDrivers.AutoSize = true;
|
||||
tableDrivers.ColumnCount = 3;
|
||||
tableDrivers.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
tableDrivers.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
tableDrivers.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
tableDrivers.Dock = DockStyle.Fill;
|
||||
tableDrivers.Location = new Point(20, 20);
|
||||
tableDrivers.MinimumSize = new Size(1100, 0);
|
||||
tableDrivers.Name = "tableDrivers";
|
||||
tableDrivers.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
|
||||
tableDrivers.Size = new Size(1138, 0);
|
||||
tableDrivers.TabIndex = 0;
|
||||
//
|
||||
// panelDriversTitle
|
||||
//
|
||||
panelDriversTitle.Controls.Add(labelDrivers);
|
||||
panelDriversTitle.Controls.Add(pictureDrivers);
|
||||
panelDriversTitle.Dock = DockStyle.Top;
|
||||
panelDriversTitle.Location = new Point(0, 102);
|
||||
panelDriversTitle.Name = "panelDriversTitle";
|
||||
panelDriversTitle.Size = new Size(1178, 44);
|
||||
panelDriversTitle.TabIndex = 5;
|
||||
//
|
||||
// labelDrivers
|
||||
//
|
||||
labelDrivers.AutoSize = true;
|
||||
labelDrivers.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelDrivers.Location = new Point(67, 7);
|
||||
labelDrivers.Name = "labelDrivers";
|
||||
labelDrivers.Size = new Size(254, 32);
|
||||
labelDrivers.TabIndex = 1;
|
||||
labelDrivers.Text = "Drivers and Software";
|
||||
//
|
||||
// pictureDrivers
|
||||
//
|
||||
pictureDrivers.BackgroundImage = (Image)resources.GetObject("pictureDrivers.BackgroundImage");
|
||||
pictureDrivers.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
pictureDrivers.Location = new Point(29, 8);
|
||||
pictureDrivers.Name = "pictureDrivers";
|
||||
pictureDrivers.Size = new Size(32, 32);
|
||||
pictureDrivers.TabIndex = 2;
|
||||
pictureDrivers.TabStop = false;
|
||||
//
|
||||
// Updates
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(192F, 192F);
|
||||
AutoScaleMode = AutoScaleMode.Dpi;
|
||||
AutoScroll = true;
|
||||
ClientSize = new Size(1178, 690);
|
||||
Controls.Add(panelDrivers);
|
||||
Controls.Add(panelDriversTitle);
|
||||
Controls.Add(panelBios);
|
||||
Controls.Add(panelBiosTitle);
|
||||
MinimizeBox = false;
|
||||
Name = "Updates";
|
||||
ShowIcon = false;
|
||||
ShowInTaskbar = false;
|
||||
Text = "BIOS and Driver Updates";
|
||||
((System.ComponentModel.ISupportInitialize)pictureBios).EndInit();
|
||||
panelBiosTitle.ResumeLayout(false);
|
||||
panelBiosTitle.PerformLayout();
|
||||
panelBios.ResumeLayout(false);
|
||||
panelBios.PerformLayout();
|
||||
panelDrivers.ResumeLayout(false);
|
||||
panelDrivers.PerformLayout();
|
||||
panelDriversTitle.ResumeLayout(false);
|
||||
panelDriversTitle.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureDrivers).EndInit();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private TableLayoutPanel tableBios;
|
||||
private Label labelBIOS;
|
||||
private PictureBox pictureBios;
|
||||
private Panel panelBiosTitle;
|
||||
private Panel panelBios;
|
||||
private Panel panelDrivers;
|
||||
private TableLayoutPanel tableDrivers;
|
||||
private Panel panelDriversTitle;
|
||||
private Label labelDrivers;
|
||||
private PictureBox pictureDrivers;
|
||||
}
|
||||
}
|
||||
187
app/Updates.cs
Normal file
187
app/Updates.cs
Normal file
@@ -0,0 +1,187 @@
|
||||
using CustomControls;
|
||||
using NAudio.CoreAudioApi;
|
||||
using System.Diagnostics;
|
||||
using System.Management;
|
||||
using System.Text.Json;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace GHelper
|
||||
{
|
||||
public partial class Updates : RForm
|
||||
{
|
||||
//static int rowCount = 0;
|
||||
static string model = AppConfig.GetModelShort();
|
||||
|
||||
public Updates()
|
||||
{
|
||||
InitializeComponent();
|
||||
InitTheme();
|
||||
|
||||
Text = Properties.Strings.BiosAndDriverUpdates + ": " + model + " " + GetBiosVersion();
|
||||
labelBIOS.Text = "BIOS";
|
||||
labelDrivers.Text = Properties.Strings.DriverAndSoftware;
|
||||
|
||||
SuspendLayout();
|
||||
tableBios.Visible = false;
|
||||
tableDrivers.Visible = false;
|
||||
|
||||
Task.Run(async () =>
|
||||
{
|
||||
DriversAsync($"https://rog.asus.com/support/webapi/product/GetPDBIOS?website=global&model={model}&cpu=", 1, tableBios);
|
||||
});
|
||||
|
||||
Task.Run(async () =>
|
||||
{
|
||||
DriversAsync($"https://rog.asus.com/support/webapi/product/GetPDDrivers?website=global&model={model}&osid=52", 0, tableDrivers);
|
||||
});
|
||||
|
||||
Shown += Updates_Shown;
|
||||
}
|
||||
|
||||
private void Updates_Shown(object? sender, EventArgs e)
|
||||
{
|
||||
Height = Program.settingsForm.Height;
|
||||
Top = Program.settingsForm.Top;
|
||||
Left = Program.settingsForm.Left - Width - 5;
|
||||
}
|
||||
private Dictionary<string, string> GetDeviceVersions()
|
||||
{
|
||||
ManagementObjectSearcher objSearcher = new ManagementObjectSearcher("Select * from Win32_PnPSignedDriver");
|
||||
ManagementObjectCollection objCollection = objSearcher.Get();
|
||||
Dictionary<string, string> list = new();
|
||||
|
||||
foreach (ManagementObject obj in objCollection)
|
||||
{
|
||||
if (obj["DeviceID"] is not null && obj["DriverVersion"] is not null)
|
||||
list[obj["DeviceID"].ToString()] = obj["DriverVersion"].ToString();
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
private string GetBiosVersion()
|
||||
{
|
||||
ManagementObjectSearcher objSearcher = new ManagementObjectSearcher("SELECT * FROM Win32_BIOS");
|
||||
ManagementObjectCollection objCollection = objSearcher.Get();
|
||||
|
||||
foreach (ManagementObject obj in objCollection)
|
||||
if (obj["SMBIOSBIOSVersion"] is not null)
|
||||
{
|
||||
var bios = obj["SMBIOSBIOSVersion"].ToString();
|
||||
int trim = bios.LastIndexOf(".");
|
||||
if (trim > 0) return bios.Substring(trim + 1);
|
||||
else return bios;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public async void DriversAsync(string url, int type, TableLayoutPanel table)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
Dictionary<string, string> devices = new();
|
||||
string biosVersion = "";
|
||||
|
||||
if (type == 0) devices = GetDeviceVersions();
|
||||
else biosVersion = GetBiosVersion();
|
||||
|
||||
//Debug.WriteLine(biosVersion);
|
||||
|
||||
using (var httpClient = new HttpClient())
|
||||
{
|
||||
httpClient.DefaultRequestHeaders.Add("User-Agent", "C# App");
|
||||
var json = await httpClient.GetStringAsync(url);
|
||||
var data = JsonSerializer.Deserialize<JsonElement>(json);
|
||||
var groups = data.GetProperty("Result").GetProperty("Obj");
|
||||
|
||||
|
||||
List<string> skipList = new() { "Armoury Crate & Aura Creator Installer", "MyASUS", "ASUS Smart Display Control", "Aura Wallpaper" };
|
||||
|
||||
for (int i = 0; i < groups.GetArrayLength(); i++)
|
||||
{
|
||||
var categoryName = groups[i].GetProperty("Name").ToString();
|
||||
var files = groups[i].GetProperty("Files");
|
||||
|
||||
var oldTitle = "";
|
||||
|
||||
for (int j = 0; j < files.GetArrayLength(); j++)
|
||||
{
|
||||
|
||||
var file = files[j];
|
||||
var title = file.GetProperty("Title").ToString();
|
||||
var version = file.GetProperty("Version").ToString().Replace("V", "");
|
||||
var downloadUrl = file.GetProperty("DownloadUrl").GetProperty("Global").ToString();
|
||||
|
||||
//Debug.WriteLine(" - " + title + " " + version + " " + downloadUrl);
|
||||
|
||||
if (oldTitle != title && !skipList.Contains(title))
|
||||
{
|
||||
JsonElement hardwares = file.GetProperty("HardwareInfoList");
|
||||
bool newer = false;
|
||||
|
||||
if (type == 0 && hardwares.ToString().Length > 0)
|
||||
for (int k = 0; k < hardwares.GetArrayLength(); k++)
|
||||
{
|
||||
var deviceID = hardwares[k].GetProperty("hardwareid").ToString();
|
||||
var localVersion = devices.Where(p => p.Key.Contains(deviceID)).Select(p => p.Value).FirstOrDefault();
|
||||
if (localVersion is not null)
|
||||
{
|
||||
newer = (new Version(version).CompareTo(new Version(localVersion)) > 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (type == 1)
|
||||
{
|
||||
newer = Int32.Parse(version) > Int32.Parse(biosVersion);
|
||||
}
|
||||
|
||||
BeginInvoke(delegate
|
||||
{
|
||||
string versionText = version.Replace("latest version at the ", "");
|
||||
Label versionLabel = new Label { Text = versionText, Anchor = AnchorStyles.Left, Dock = DockStyle.Fill, Height = 50 };
|
||||
versionLabel.Cursor = Cursors.Hand;
|
||||
versionLabel.Font = new Font(versionLabel.Font, newer ? FontStyle.Underline | FontStyle.Bold : FontStyle.Underline);
|
||||
versionLabel.ForeColor = newer ? colorTurbo : colorEco;
|
||||
versionLabel.Padding = new Padding(5, 5, 5, 5);
|
||||
versionLabel.Click += delegate
|
||||
{
|
||||
Process.Start(new ProcessStartInfo(downloadUrl) { UseShellExecute = true });
|
||||
};
|
||||
|
||||
table.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
|
||||
table.Controls.Add(new Label { Text = categoryName, Anchor = AnchorStyles.Left, Dock = DockStyle.Fill, Padding = new Padding(5, 5, 5, 5) }, 0, table.RowCount);
|
||||
table.Controls.Add(new Label { Text = title, Anchor = AnchorStyles.Left, Dock = DockStyle.Fill, Padding = new Padding(5, 5, 5, 5) }, 1, table.RowCount);
|
||||
table.Controls.Add(versionLabel, 2, table.RowCount);
|
||||
table.RowCount++;
|
||||
});
|
||||
}
|
||||
|
||||
oldTitle = title;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
BeginInvoke(delegate
|
||||
{
|
||||
table.Visible = true;
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.ToString());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
149
app/Updates.resx
Normal file
149
app/Updates.resx
Normal file
@@ -0,0 +1,149 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="pictureBios.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
|
||||
DwAACw8BkvkDpQAAAWlJREFUaEPtmN1Kw0AQhVOkoo8q7ZUiguid9ULwZaS+g3jtnT6FCv4g2DOhA23I
|
||||
LrvHzKTCfPBRkuFsT9JCyDZBEASBB7fwE960R9tcwze4aI+2sZhRfMHf9WeXDygz+exiMaOQxdQu3jOK
|
||||
3ILes2ImcAYf4eaC3s7hFFaxB+9g34JjeA/3YTHHsG+hMT2BxbxADZ7C6p9wAA7gOdQeT7CYH6jBqp9u
|
||||
YOS7tce3nChFQ+LYUF1SIXlCvsPBnpAFpLpkSYXk8S7nXtsjH1JdsqRCcuflIq7aIx9SXbJQISOoLlTI
|
||||
CKoLFTKC6kKFjKC6UCEjqC5UyAiqCxUygupChYygulAhI6guVMgIqgsVMoLqQoWMoLr8+xeaZ6jBMzjG
|
||||
RRzCC6g9ql4pL6EGd0XZaChG7vgubassYfW/QDa2juAD7FvUS9lc+/OuyOaCXbxnFLkFvWcU7Fa4xYxC
|
||||
X+b7tlO8Z0EQBMFQNM0KZ46+F5QUhV4AAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="pictureDrivers.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
|
||||
DAAACwwBP0AiyAAAAnJJREFUaEPtmL1qlEEUhhdF8Acbo51/KGKRWhvBP7S0Ve9AvAQxuYwUFkkjioro
|
||||
DdgogqJipxa2giIqamOiieZ5IQuH4ezOmf2+3R3ke+CBsLvnzJnZmfnOptfR0dHx33AYr+JtfI1f8PeG
|
||||
+luv3UJ95hBWwWa8jE/xL/4Lqs8q5hJuwqlwDt+hV2CJb/AsToxteAO9Ypq4gFtxrOzBF+gVoG3xGOfw
|
||||
JO7H7bgDj+Ip1HsvcdB2e4YzOBZU/FtMB13DRZzFKEfwDnoT0Zbaja2ibeOt/Ac8gaNyDN9jmvc5trqd
|
||||
Bu35P6ibpAm78BGmuXUmWuE8psmtbUxiC3qTaHw76Z5Pr0ptGxVtX2vrm0i3k85Do+eEHlI2oQ6s9ryK
|
||||
HcckjmN6sC/iyOhpaZPptumTTmIVr2FT7qId8wmOhHobuxr6O70q+5NQ8Rf0Qgvoik3HPYjFqOnqJ5F6
|
||||
SHloEm2svOUV2rGvYDHqHG2S6xhlH97Hnxs+RD2No8yjHfsmFqP21yZRexBBxX9FGyu/od6LcAZtrL6R
|
||||
YtTD2yQHMIJW3sZZ72EEfVs27jMWs4I2iRqzCNoyNs76AyPsRBu3jMX8QptE/VCEYRP4jhG0WDZOtRTz
|
||||
CW2SvRhBB9bGWXXHR9BZsXEfsRj17TbJaYyg/asDa2OlzlR0EdJDrE64mCW0SUrueq2gDqz2vNTKR4sX
|
||||
GsuOrVrC2MAazeIF1WQWL6gms3hBNZnFC6rJLF5QTWbxgmoyixdUk1m8oJrM4gXVZJZh3eS0DXWzD9AL
|
||||
rkH9WMqibtL7SThtVZP+YxFCnWO/m/SSTVLVoJUPF9/R0dExKXq9dc3qWY2Pp0GbAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user