Skip to content

Commit 1093aaf

Browse files
committed
app version info in main form title
1 parent be56abf commit 1093aaf

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

GUI/MainForm.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,10 @@ public MainForm() {
5757

5858
Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
5959

60-
// check if the OpenHardwareMonitorLib assembly has the correct version
61-
if (Assembly.GetAssembly(typeof(Computer)).GetName().Version !=
62-
Assembly.GetExecutingAssembly().GetName().Version) {
63-
MessageBox.Show(
64-
"The version of the file OpenHardwareMonitorLib.dll is incompatible.",
65-
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
66-
Environment.Exit(0);
67-
}
60+
var asm = Assembly.GetExecutingAssembly();
61+
var version = asm.GetName().Version.ToString(3); //Application.ProductVersion;
62+
var bitness = Environment.Is64BitProcess ? "x64" : "x32";
63+
Text = $"Open Hardware Monitor {bitness} - {version}";
6864

6965
settings = new PersistentSettings();
7066
settings.Load(Path.ChangeExtension(

Hardware/Computer.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Globalization;
44
using System.IO;
55
using System.Security.Permissions;
6-
using System.Reflection;
76

87
namespace OpenHardwareMonitor.Hardware {
98

0 commit comments

Comments
 (0)