mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 19:49:15 +08:00
343b904607
* Added thumbnail loader * Deleted old shell icon extraction logic. Refactored ImageLoader.Load to improve readibility. * Moved error handling down into the API call itself * Minor renamings in ImageLoader * Load icons only for files that are not images. Fixes stutters when loading folders. * Added the ability to load a full image through ImageLoader. ImageLoader.Load now also has a "loadFullImage" parameter. * Max image cache is now 5000 instead of 200. * Added some commentaries on how thumbnails are loaded
31 lines
1.5 KiB
C#
31 lines
1.5 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
using System.IO;
|
|
using System.Reflection;
|
|
|
|
namespace Wox.Infrastructure
|
|
{
|
|
public static class Constant
|
|
{
|
|
public const string Wox = "Wox";
|
|
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, Wox + ".exe");
|
|
public static readonly string DataDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), Wox);
|
|
public static readonly string PluginsDirectory = Path.Combine(DataDirectory, Plugins);
|
|
public static readonly string PreinstalledDirectory = Path.Combine(ProgramDirectory, Plugins);
|
|
public const string Repository = "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.NonNull()).ProductVersion;
|
|
|
|
public static readonly int ThumbnailSize = 64;
|
|
public static readonly string DefaultIcon = Path.Combine(ProgramDirectory, "Images", "app.png");
|
|
public static readonly string ErrorIcon = Path.Combine(ProgramDirectory, "Images", "app_error.png");
|
|
|
|
public static string PythonPath;
|
|
public static string EverythingSDKPath;
|
|
}
|
|
}
|