mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-15 03:59:15 +08:00
47 lines
1.7 KiB
C#
47 lines
1.7 KiB
C#
using System.Collections.Generic;
|
|
using System.IO;
|
|
using Wox.Plugin.Program.Programs;
|
|
|
|
namespace Wox.Plugin.Program
|
|
{
|
|
public class Settings
|
|
{
|
|
public List<ProgramSource> ProgramSources { get; set; } = new List<ProgramSource>();
|
|
public List<DisabledProgramSource> DisabledProgramSources { get; set; } = new List<DisabledProgramSource>();
|
|
public string[] ProgramSuffixes { get; set; } = {"bat", "appref-ms", "exe", "lnk"};
|
|
|
|
public bool EnableStartMenuSource { get; set; } = true;
|
|
|
|
public bool EnableRegistrySource { get; set; } = true;
|
|
|
|
internal const char SuffixSeperator = ';';
|
|
|
|
/// <summary>
|
|
/// Contains user added folder location contents as well as all user disabled applications
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>Win32 class applications sets UniqueIdentifier using their full path</para>
|
|
/// <para>UWP class applications sets UniqueIdentifier using their Application User Model ID</para>
|
|
/// </remarks>
|
|
public class ProgramSource
|
|
{
|
|
private string name;
|
|
|
|
public string Location { get; set; }
|
|
public string Name { get => name ?? new DirectoryInfo(Location).Name; set => name = value; }
|
|
public bool Enabled { get; set; } = true;
|
|
public string UniqueIdentifier { get; set; }
|
|
}
|
|
|
|
public class DisabledProgramSource
|
|
{
|
|
private string name;
|
|
|
|
public string Location { get; set; }
|
|
public string Name { get => name ?? new DirectoryInfo(Location).Name; set => name = value; }
|
|
public bool Enabled { get; set; } = true;
|
|
public string UniqueIdentifier { get; set; }
|
|
}
|
|
}
|
|
}
|