Skip to content

Commit a60d2b6

Browse files
committed
ExceL.EXE -> EXCEL.EXE for about box
1 parent cdf4f5f commit a60d2b6

File tree

2 files changed

+8
-31
lines changed

2 files changed

+8
-31
lines changed

RetailCoder.VBE/App.cs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -193,24 +193,12 @@ public void LogRubberduckStart()
193193
var headers = new List<string>
194194
{
195195
$"\r\n\tRubberduck version {version} loading:",
196-
$"\tOperating System: {Environment.OSVersion.VersionString} {GetBitness(Environment.Is64BitOperatingSystem)}",
197-
$"\tHost Product: {Application.ProductName} {GetBitness(Environment.Is64BitProcess)}",
196+
$"\tOperating System: {Environment.OSVersion.VersionString} {(Environment.Is64BitOperatingSystem ? "x64" : "x86")}",
197+
$"\tHost Product: {Application.ProductName} {(Environment.Is64BitProcess ? "x64" : "x86")}",
198198
$"\tHost Version: {Application.ProductVersion}",
199-
$"\tHost Executable: {Path.GetFileName(Application.ExecutablePath)}",
199+
$"\tHost Executable: {Path.GetFileName(Application.ExecutablePath).ToUpper()}", // .ToUpper() used to convert ExceL.EXE -> EXCEL.EXE
200200
};
201201
LogLevelHelper.SetDebugInfo(string.Join(Environment.NewLine, headers));
202-
203-
string GetBitness(bool is64Bit)
204-
{
205-
if (is64Bit)
206-
{
207-
return "x64";
208-
}
209-
else
210-
{
211-
return "x86";
212-
}
213-
}
214202
}
215203

216204
private bool _disposed;

RetailCoder.VBE/UI/About/AboutControl.xaml.cs

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System.Windows;
22
using System.Windows.Input;
33
using System;
4+
using System.IO;
45
using Application = System.Windows.Forms.Application;
56

67
namespace Rubberduck.UI.About
@@ -31,27 +32,15 @@ private void CopyVersionInfo_MouseLeftButtonDown(object sender, MouseButtonEvent
3132

3233
private void CopyVersionInfoToClipboard()
3334
{
34-
System.Text.StringBuilder sb = new System.Text.StringBuilder();
35+
var sb = new System.Text.StringBuilder();
3536
sb.AppendLine($"Rubberduck version: {this.Version.Text}");
36-
sb.AppendLine($"Operating System: {Environment.OSVersion.VersionString}, {GetBitness(Environment.Is64BitOperatingSystem)}");
37-
sb.AppendLine($"Host Product: {Application.ProductName} {GetBitness(Environment.Is64BitProcess)}");
37+
sb.AppendLine($"Operating System: {Environment.OSVersion.VersionString}, {(Environment.Is64BitOperatingSystem ? "x64" : "x86")}");
38+
sb.AppendLine($"Host Product: {Application.ProductName} {(Environment.Is64BitProcess ? "x64" : "x86")}");
3839
sb.AppendLine($"Host Version: {Application.ProductVersion}");
39-
sb.AppendFormat($"Host Executable: {System.IO.Path.GetFileName(Application.ExecutablePath)}");
40+
sb.AppendFormat($"Host Executable: {Path.GetFileName(Application.ExecutablePath).ToUpper()}"); // .ToUpper() used to convert ExceL.EXE -> EXCEL.EXE
4041

4142
Clipboard.SetText(sb.ToString());
4243
System.Windows.MessageBox.Show("Version information copied to clipboard.", "Copy successfull");
43-
44-
string GetBitness(bool is64Bit)
45-
{
46-
if (is64Bit)
47-
{
48-
return "x64";
49-
}
50-
else
51-
{
52-
return "x86";
53-
}
54-
}
5544
}
5645
}
5746
}

0 commit comments

Comments
 (0)