-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathConstants.cs
More file actions
27 lines (25 loc) · 782 Bytes
/
Constants.cs
File metadata and controls
27 lines (25 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Management.Automation;
using NStack;
namespace Terminal.Gui.Designer
{
public static class Constants
{
public static string[] SkippedProperties = new string[] { "HotKeySpecifier", "Frame", "Bounds", "ColorScheme" };
public static string Version
{
get
{
using (var ps = PowerShell.Create())
{
ps.AddCommand("Get-Module").AddParameter("ListAvailable").AddParameter("Name", "PowerShellProTools");
var psobject = ps.Invoke().First();
return psobject.Properties["Version"].Value.ToString();
}
}
}
}
}