Flow.Launcher/Plugins/Wox.Plugin.Program/Settings.cs

30 lines
893 B
C#
Raw Normal View History

2016-08-19 22:24:21 +00:00
using System.Collections.Generic;
2019-09-05 22:06:51 +00:00
using System.IO;
2016-08-20 00:17:28 +00:00
using Wox.Plugin.Program.Programs;
namespace Wox.Plugin.Program
{
public class Settings
{
2016-08-20 00:17:28 +00:00
public List<ProgramSource> ProgramSources { get; set; } = new List<ProgramSource>();
public string[] ProgramSuffixes { get; set; } = {"bat", "appref-ms", "exe", "lnk"};
public bool EnableStartMenuSource { get; set; } = true;
public bool EnableRegistrySource { get; set; } = true;
2016-08-19 19:34:20 +00:00
public bool EnableProgramSourceOnly { get; set; } = false;
2016-08-19 19:34:20 +00:00
internal const char SuffixSeperator = ';';
2016-08-20 00:17:28 +00:00
public class ProgramSource
{
2019-09-05 22:06:51 +00:00
private string name;
2016-08-20 00:17:28 +00:00
public string Location { get; set; }
2019-09-05 22:06:51 +00:00
public string Name { get => name ?? new DirectoryInfo(Location).Name; set => name = value; }
public bool Enabled { get; set; } = true;
2016-08-20 00:17:28 +00:00
}
}
}