mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-09-03 15:55:26 +00:00
Added more null checks to the MainForm.SaveConfiguration method. Updated the version.
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
Copyright (C) 2009-2013 Michael Möller <mmoeller@openhardwaremonitor.org>
|
Copyright (C) 2009-2020 Michael Möller <mmoeller@openhardwaremonitor.org>
|
||||||
Copyright (C) 2010 Paul Werelds <paul@werelds.net>
|
Copyright (C) 2010 Paul Werelds <paul@werelds.net>
|
||||||
Copyright (C) 2012 Prince Samuel <prince.samuel@gmail.com>
|
Copyright (C) 2012 Prince Samuel <prince.samuel@gmail.com>
|
||||||
|
|
||||||
@@ -575,12 +575,19 @@ namespace OpenHardwareMonitor.GUI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void SaveConfiguration() {
|
private void SaveConfiguration() {
|
||||||
plotPanel.SetCurrentSettings();
|
if (settings == null)
|
||||||
foreach (TreeColumn column in treeView.Columns)
|
return;
|
||||||
settings.SetValue("treeView.Columns." + column.Header + ".Width",
|
|
||||||
column.Width);
|
|
||||||
|
|
||||||
this.settings.SetValue("listenerPort", server.ListenerPort);
|
if (plotPanel != null) {
|
||||||
|
plotPanel.SetCurrentSettings();
|
||||||
|
foreach (TreeColumn column in treeView.Columns)
|
||||||
|
settings.SetValue("treeView.Columns." + column.Header + ".Width",
|
||||||
|
column.Width);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (server != null) {
|
||||||
|
this.settings.SetValue("listenerPort", server.ListenerPort);
|
||||||
|
}
|
||||||
|
|
||||||
string fileName = Path.ChangeExtension(
|
string fileName = Path.ChangeExtension(
|
||||||
System.Windows.Forms.Application.ExecutablePath, ".config");
|
System.Windows.Forms.Application.ExecutablePath, ".config");
|
||||||
|
@@ -10,5 +10,5 @@
|
|||||||
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion("0.9.0.0")]
|
[assembly: AssemblyVersion("0.9.1.0")]
|
||||||
[assembly: AssemblyInformationalVersion("0.9.0.0")]
|
[assembly: AssemblyInformationalVersion("0.9.1.0")]
|
Reference in New Issue
Block a user