Skip to content

Commit 2933bc3

Browse files
add more runtime information to About dialog
1 parent 6b34958 commit 2933bc3

1 file changed

Lines changed: 17 additions & 8 deletions

File tree

Core/AboutBoxEx.cs

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2004-2017 The Poderosa Project.
1+
// Copyright 2004-2025 The Poderosa Project.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -56,16 +56,25 @@ public static class AboutBoxUtil {
5656
public const string DEFAULT_ABOUTBOX_ID = "default";
5757

5858
public static string[] GetVersionInfoContent() {
59-
string[] s = new string[6];
60-
s[0] = "Terminal Emulator <Poderosa>";
61-
s[1] = "Copyright(c) " + VersionInfo.COPYRIGHT_YEARS + " " + VersionInfo.PROJECT_NAME + ",";
62-
s[2] = "All Rights Reserved.";
63-
s[3] = "";
64-
s[4] = " Version : " + VersionInfo.PODEROSA_VERSION;
65-
s[5] = " CLR : " + System.Environment.Version.ToString();
59+
string[] s = {
60+
"Terminal Emulator <Poderosa>",
61+
"Copyright(c) " + VersionInfo.COPYRIGHT_YEARS + " " + VersionInfo.PROJECT_NAME + ",",
62+
"All Rights Reserved.",
63+
"",
64+
" Version : " + VersionInfo.PODEROSA_VERSION,
65+
" CLR : " + System.Environment.Version.ToString() + (System.Environment.Is64BitProcess ? " (64 bit)" : " (32 bit)"),
66+
" Runtime Framework : " + GetFrameworkVersion(),
67+
};
6668
return s;
6769
}
6870

71+
private static string GetFrameworkVersion() {
72+
// >= .NET Framework 4.7.1
73+
// return System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription;
74+
AssemblyFileVersionAttribute attr = (AssemblyFileVersionAttribute)(typeof(object).GetTypeInfo().Assembly.GetCustomAttribute(typeof(AssemblyFileVersionAttribute)));
75+
return attr.Version;
76+
}
77+
6978
//ExtensionPointとPreference。別クラスに分離してWindowManagerのメンバに入れようかな?
7079
private static IStringPreferenceItem _aboutBoxID;
7180
public static IStringPreferenceItem AboutBoxID {

0 commit comments

Comments
 (0)