PowerToys/Wox.Infrastructure/Wox.cs

26 lines
1.3 KiB
C#
Raw Normal View History

using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Wox.Infrastructure
{
2016-05-19 02:38:43 +08:00
public static class Constant
{
2016-05-19 02:38:43 +08:00
public const string Wox = "Wox";
public const string Plugins = "Plugins";
2016-05-08 02:16:13 +08:00
public const string Settings = "Settings";
private static readonly Assembly Assembly = Assembly.GetExecutingAssembly();
2016-05-19 02:38:43 +08:00
public static readonly string ProgramDirectory = Directory.GetParent(Assembly.Location).ToString();
public static readonly string ExecutablePath = Path.Combine(ProgramDirectory, Wox + ".exe");
public static readonly string DataDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), Wox);
public static readonly string UserDirectory = Path.Combine(DataDirectory, Plugins);
public static readonly string PreinstalledDirectory = Path.Combine(ProgramDirectory, Plugins);
public static readonly string SettingsPath = Path.Combine(DataDirectory, Settings);
public const string Github = "https://github.com/Wox-launcher/Wox";
public const string Issue = "https://github.com/Wox-launcher/Wox/issues/new";
public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location).ProductVersion;
}
}