mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-09-02 15:25:22 +00:00
Fixed Issue 179.
This commit is contained in:
19
GUI/MainForm.Designer.cs
generated
19
GUI/MainForm.Designer.cs
generated
@@ -108,6 +108,8 @@ namespace OpenHardwareMonitor.GUI {
|
||||
this.splitContainer = new OpenHardwareMonitor.GUI.SplitContainerAdv();
|
||||
this.treeView = new Aga.Controls.Tree.TreeViewAdv();
|
||||
this.plotPanel = new OpenHardwareMonitor.GUI.PlotPanel();
|
||||
this.resetMenuItem = new System.Windows.Forms.MenuItem();
|
||||
this.menuItem6 = new System.Windows.Forms.MenuItem();
|
||||
this.splitContainer.Panel1.SuspendLayout();
|
||||
this.splitContainer.Panel2.SuspendLayout();
|
||||
this.splitContainer.SuspendLayout();
|
||||
@@ -203,6 +205,8 @@ namespace OpenHardwareMonitor.GUI {
|
||||
this.saveReportMenuItem,
|
||||
this.sumbitReportMenuItem,
|
||||
this.MenuItem2,
|
||||
this.resetMenuItem,
|
||||
this.menuItem6,
|
||||
this.exitMenuItem});
|
||||
this.fileMenuItem.Text = "File";
|
||||
//
|
||||
@@ -225,7 +229,7 @@ namespace OpenHardwareMonitor.GUI {
|
||||
//
|
||||
// exitMenuItem
|
||||
//
|
||||
this.exitMenuItem.Index = 3;
|
||||
this.exitMenuItem.Index = 5;
|
||||
this.exitMenuItem.Text = "Exit";
|
||||
this.exitMenuItem.Click += new System.EventHandler(this.exitClick);
|
||||
//
|
||||
@@ -453,6 +457,17 @@ namespace OpenHardwareMonitor.GUI {
|
||||
this.plotPanel.Size = new System.Drawing.Size(386, 124);
|
||||
this.plotPanel.TabIndex = 0;
|
||||
//
|
||||
// resetMenuItem
|
||||
//
|
||||
this.resetMenuItem.Index = 3;
|
||||
this.resetMenuItem.Text = "Reset";
|
||||
this.resetMenuItem.Click += new System.EventHandler(this.resetClick);
|
||||
//
|
||||
// menuItem6
|
||||
//
|
||||
this.menuItem6.Index = 4;
|
||||
this.menuItem6.Text = "-";
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@@ -523,6 +538,8 @@ 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 resetMenuItem;
|
||||
private System.Windows.Forms.MenuItem menuItem6;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -388,9 +388,10 @@ namespace OpenHardwareMonitor.GUI {
|
||||
Visible = false;
|
||||
SaveConfiguration();
|
||||
|
||||
systemTray.IsMainIconEnabled = false;
|
||||
timer.Enabled = false;
|
||||
systemTray.Dispose();
|
||||
computer.Close();
|
||||
systemTray.Dispose();
|
||||
}
|
||||
|
||||
private void aboutMenuItem_Click(object sender, EventArgs e) {
|
||||
@@ -593,5 +594,15 @@ namespace OpenHardwareMonitor.GUI {
|
||||
settings.SetValue("mainForm.Height", Bounds.Height);
|
||||
}
|
||||
}
|
||||
|
||||
private void resetClick(object sender, EventArgs e) {
|
||||
// disable the fallback MainIcon during reset, otherwise icon visibility
|
||||
// might be lost
|
||||
systemTray.IsMainIconEnabled = false;
|
||||
computer.Close();
|
||||
computer.Open();
|
||||
// restore the MainIcon setting
|
||||
systemTray.IsMainIconEnabled = minimizeToTray.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -268,9 +268,11 @@ namespace OpenHardwareMonitor.Hardware {
|
||||
if (!open)
|
||||
return;
|
||||
|
||||
foreach (IGroup group in groups)
|
||||
while (groups.Count > 0) {
|
||||
IGroup group = groups[groups.Count - 1];
|
||||
Remove(group);
|
||||
group.Close();
|
||||
groups.Clear();
|
||||
}
|
||||
|
||||
Opcode.Close();
|
||||
Ring0.Close();
|
||||
|
Reference in New Issue
Block a user