mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Incremental fix for StyleCop on Infra (#5729)
* Fixes file names and classes don't match. All but PluginsSettings * making it pluginsettings * fixing due to conflict
This commit is contained in:
51
src/modules/launcher/Wox.Infrastructure/Constant.cs
Normal file
51
src/modules/launcher/Wox.Infrastructure/Constant.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Wox.Infrastructure
|
||||
{
|
||||
public static class Constant
|
||||
{
|
||||
public const string ExeFileName = "PowerLauncher";
|
||||
public const string ModuleLocation = "Microsoft\\PowerToys\\PowerToys Run";
|
||||
public const string Plugins = "Plugins";
|
||||
|
||||
private static readonly Assembly Assembly = Assembly.GetExecutingAssembly();
|
||||
public static readonly string ProgramDirectory = Directory.GetParent(Assembly.Location.NonNull()).ToString();
|
||||
public static readonly string ExecutablePath = Path.Combine(ProgramDirectory, ExeFileName + ".exe");
|
||||
|
||||
public static bool IsPortableMode;
|
||||
public const string PortableFolderName = "UserData";
|
||||
public static string PortableDataPath = Path.Combine(ProgramDirectory, PortableFolderName);
|
||||
|
||||
public static string DetermineDataDirectory()
|
||||
{
|
||||
if (Directory.Exists(PortableDataPath))
|
||||
{
|
||||
IsPortableMode = true;
|
||||
return PortableDataPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), ModuleLocation);
|
||||
}
|
||||
}
|
||||
|
||||
public static readonly string DataDirectory = DetermineDataDirectory();
|
||||
public static readonly string PluginsDirectory = Path.Combine(DataDirectory, Plugins);
|
||||
public static readonly string PreinstalledDirectory = Path.Combine(ProgramDirectory, Plugins);
|
||||
public const string Issue = "https://aka.ms/powerToysReportBug";
|
||||
public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location.NonNull()).ProductVersion;
|
||||
|
||||
public static readonly int ThumbnailSize = 64;
|
||||
public static readonly string DefaultIcon = Path.Combine(ProgramDirectory, "Images", "app.dark.png");
|
||||
public static readonly string ErrorIcon = Path.Combine(ProgramDirectory, "Images", "app_error.dark.png");
|
||||
public static readonly string LightThemedDefaultIcon = Path.Combine(ProgramDirectory, "Images", "app.light.png");
|
||||
public static readonly string LightThemedErrorIcon = Path.Combine(ProgramDirectory, "Images", "app_error.light.png");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user