mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 18:57:28 -07:00
Added .NET 4.5 check and support, this changes nothing except that we know if 4.5 is installed... which might help with bug fixing.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2462 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
3cd141eb77
commit
1b95405fa9
3 changed files with 12 additions and 3 deletions
|
@ -48,6 +48,11 @@ namespace Greenshot.Helpers {
|
|||
}
|
||||
}
|
||||
|
||||
public static bool IsNet45OrNewer() {
|
||||
// Class "ReflectionContext" exists from .NET 4.5 onwards.
|
||||
return Type.GetType("System.Reflection.ReflectionContext", false) != null;
|
||||
}
|
||||
|
||||
public static string EnvironmentToString(bool newline) {
|
||||
StringBuilder environment = new StringBuilder();
|
||||
environment.Append("Software version: " + Application.ProductVersion);
|
||||
|
@ -62,6 +67,10 @@ namespace Greenshot.Helpers {
|
|||
environment.Append(", ");
|
||||
}
|
||||
environment.Append(".NET runtime version: " + Environment.Version);
|
||||
if (IsNet45OrNewer()) {
|
||||
environment.Append("+");
|
||||
|
||||
}
|
||||
if (newline) {
|
||||
environment.AppendLine();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue