mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-08-29 13:28:04 +00:00
Removed the WMI Provider menu entry and restricted WMI to the Windows platform.
This commit is contained in:
parent
f34f8c996c
commit
22d714c976
18
GUI/MainForm.Designer.cs
generated
18
GUI/MainForm.Designer.cs
generated
@ -100,8 +100,6 @@ namespace OpenHardwareMonitor.GUI {
|
||||
this.fahrenheitMenuItem = new System.Windows.Forms.MenuItem();
|
||||
this.MenuItem4 = new System.Windows.Forms.MenuItem();
|
||||
this.hddMenuItem = new System.Windows.Forms.MenuItem();
|
||||
this.menuItem5 = new System.Windows.Forms.MenuItem();
|
||||
this.wmiMenuItem = new System.Windows.Forms.MenuItem();
|
||||
this.helpMenuItem = new System.Windows.Forms.MenuItem();
|
||||
this.aboutMenuItem = new System.Windows.Forms.MenuItem();
|
||||
this.sensorContextMenu = new System.Windows.Forms.ContextMenu();
|
||||
@ -310,9 +308,7 @@ namespace OpenHardwareMonitor.GUI {
|
||||
this.separatorMenuItem,
|
||||
this.temperatureUnitsMenuItem,
|
||||
this.MenuItem4,
|
||||
this.hddMenuItem,
|
||||
this.menuItem5,
|
||||
this.wmiMenuItem});
|
||||
this.hddMenuItem});
|
||||
this.optionsMenuItem.Text = "Options";
|
||||
//
|
||||
// startMinMenuItem
|
||||
@ -370,16 +366,6 @@ namespace OpenHardwareMonitor.GUI {
|
||||
this.hddMenuItem.Index = 7;
|
||||
this.hddMenuItem.Text = "Read HDD sensors";
|
||||
//
|
||||
// menuItem5
|
||||
//
|
||||
this.menuItem5.Index = 8;
|
||||
this.menuItem5.Text = "-";
|
||||
//
|
||||
// wmiMenuItem
|
||||
//
|
||||
this.wmiMenuItem.Index = 9;
|
||||
this.wmiMenuItem.Text = "Enable WMI Provider";
|
||||
//
|
||||
// helpMenuItem
|
||||
//
|
||||
this.helpMenuItem.Index = 3;
|
||||
@ -536,8 +522,6 @@ namespace OpenHardwareMonitor.GUI {
|
||||
private System.Windows.Forms.MenuItem MenuItem3;
|
||||
private System.Windows.Forms.MenuItem gadgetMenuItem;
|
||||
private System.Windows.Forms.MenuItem minCloseMenuItem;
|
||||
private System.Windows.Forms.MenuItem menuItem5;
|
||||
private System.Windows.Forms.MenuItem wmiMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,6 @@ namespace OpenHardwareMonitor.GUI {
|
||||
private UserOption autoStart;
|
||||
private UserOption readHddSensors;
|
||||
private UserOption showGadget;
|
||||
private UserOption enableWmiProvider;
|
||||
|
||||
private WmiProvider wmiProvider;
|
||||
|
||||
@ -130,14 +129,12 @@ namespace OpenHardwareMonitor.GUI {
|
||||
minCloseMenuItem.Visible = false;
|
||||
} else { // Windows
|
||||
gadget = new SensorGadget(computer, settings, unitManager);
|
||||
wmiProvider = new WmiProvider(computer);
|
||||
}
|
||||
|
||||
computer.HardwareAdded += new HardwareEventHandler(HardwareAdded);
|
||||
computer.HardwareRemoved += new HardwareEventHandler(HardwareRemoved);
|
||||
|
||||
if (settings.GetValue("enableWmiProvider", false))
|
||||
wmiProvider = new WmiProvider(computer);
|
||||
|
||||
computer.Open();
|
||||
|
||||
timer.Enabled = true;
|
||||
@ -223,17 +220,6 @@ namespace OpenHardwareMonitor.GUI {
|
||||
gadget.Visible = showGadget.Value;
|
||||
};
|
||||
|
||||
enableWmiProvider = new UserOption("enableWmiProvider", false,
|
||||
wmiMenuItem, settings);
|
||||
enableWmiProvider.Changed += delegate {
|
||||
if (enableWmiProvider.Value && wmiProvider == null)
|
||||
wmiProvider = new WmiProvider(computer);
|
||||
else if (!enableWmiProvider.Value && wmiProvider != null) {
|
||||
wmiProvider.Dispose();
|
||||
wmiProvider = null;
|
||||
}
|
||||
};
|
||||
|
||||
celciusMenuItem.Checked =
|
||||
unitManager.TemperatureUnit == TemperatureUnit.Celcius;
|
||||
fahrenheitMenuItem.Checked = !celciusMenuItem.Checked;
|
||||
|
@ -37,5 +37,5 @@
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("0.2.1.1")]
|
||||
[assembly: AssemblyInformationalVersion("0.2.1.1 Alpha")]
|
||||
[assembly: AssemblyVersion("0.2.1.6")]
|
||||
[assembly: AssemblyInformationalVersion("0.2.1.6 Alpha")]
|
Loading…
x
Reference in New Issue
Block a user