Skip to content

Commit

Permalink
ExceL.EXE -> EXCEL.EXE for about box
Browse files Browse the repository at this point in the history
  • Loading branch information
IvenBach committed Nov 8, 2017
1 parent cdf4f5f commit a60d2b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 31 deletions.
18 changes: 3 additions & 15 deletions RetailCoder.VBE/App.cs
Expand Up @@ -193,24 +193,12 @@ public void LogRubberduckStart()
var headers = new List<string>
{
$"\r\n\tRubberduck version {version} loading:",
$"\tOperating System: {Environment.OSVersion.VersionString} {GetBitness(Environment.Is64BitOperatingSystem)}",
$"\tHost Product: {Application.ProductName} {GetBitness(Environment.Is64BitProcess)}",
$"\tOperating System: {Environment.OSVersion.VersionString} {(Environment.Is64BitOperatingSystem ? "x64" : "x86")}",
$"\tHost Product: {Application.ProductName} {(Environment.Is64BitProcess ? "x64" : "x86")}",
$"\tHost Version: {Application.ProductVersion}",
$"\tHost Executable: {Path.GetFileName(Application.ExecutablePath)}",
$"\tHost Executable: {Path.GetFileName(Application.ExecutablePath).ToUpper()}", // .ToUpper() used to convert ExceL.EXE -> EXCEL.EXE
};
LogLevelHelper.SetDebugInfo(string.Join(Environment.NewLine, headers));

string GetBitness(bool is64Bit)
{
if (is64Bit)
{
return "x64";
}
else
{
return "x86";
}
}
}

private bool _disposed;
Expand Down
21 changes: 5 additions & 16 deletions RetailCoder.VBE/UI/About/AboutControl.xaml.cs
@@ -1,6 +1,7 @@
using System.Windows;
using System.Windows.Input;
using System;
using System.IO;
using Application = System.Windows.Forms.Application;

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

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

Clipboard.SetText(sb.ToString());
System.Windows.MessageBox.Show("Version information copied to clipboard.", "Copy successfull");

string GetBitness(bool is64Bit)
{
if (is64Bit)
{
return "x64";
}
else
{
return "x86";
}
}
}
}
}

0 comments on commit a60d2b6

Please sign in to comment.