2020-11-08 21:24:52 +00:00
|
|
|
|
using System;
|
2019-10-17 20:53:00 +00:00
|
|
|
|
using System.Collections.Generic;
|
2019-09-05 22:06:51 +00:00
|
|
|
|
using System.IO;
|
2015-01-05 14:41:17 +00:00
|
|
|
|
|
2020-04-21 09:12:17 +00:00
|
|
|
|
namespace Flow.Launcher.Plugin.Program
|
2015-01-05 14:41:17 +00:00
|
|
|
|
{
|
2016-04-21 00:53:21 +00:00
|
|
|
|
public class Settings
|
2015-01-05 14:41:17 +00:00
|
|
|
|
{
|
2019-10-17 21:16:07 +00:00
|
|
|
|
public DateTime LastIndexTime { get; set; }
|
2016-08-20 00:17:28 +00:00
|
|
|
|
public List<ProgramSource> ProgramSources { get; set; } = new List<ProgramSource>();
|
2019-10-14 21:05:21 +00:00
|
|
|
|
public List<DisabledProgramSource> DisabledProgramSources { get; set; } = new List<DisabledProgramSource>();
|
2020-04-25 08:57:56 +00:00
|
|
|
|
public string[] ProgramSuffixes { get; set; } = {"appref-ms", "exe", "lnk"};
|
2015-01-05 14:41:17 +00:00
|
|
|
|
|
2016-04-21 00:53:21 +00:00
|
|
|
|
public bool EnableStartMenuSource { get; set; } = true;
|
2016-03-28 02:09:57 +00:00
|
|
|
|
|
2021-05-20 09:07:44 +00:00
|
|
|
|
public bool EnableDescription { get; set; } = true;
|
2016-04-21 00:53:21 +00:00
|
|
|
|
public bool EnableRegistrySource { get; set; } = true;
|
2020-11-08 21:24:31 +00:00
|
|
|
|
public string CustomizedExplorer { get; set; } = Explorer;
|
2020-11-09 02:25:43 +00:00
|
|
|
|
public string CustomizedArgs { get; set; } = ExplorerArgs;
|
2016-08-19 19:34:20 +00:00
|
|
|
|
|
|
|
|
|
|
internal const char SuffixSeperator = ';';
|
2016-08-20 00:17:28 +00:00
|
|
|
|
|
2020-11-08 21:24:31 +00:00
|
|
|
|
internal const string Explorer = "explorer";
|
|
|
|
|
|
|
2020-11-09 10:12:07 +00:00
|
|
|
|
internal const string ExplorerArgs = "%s";
|
2020-11-09 02:25:43 +00:00
|
|
|
|
|
2019-09-09 21:57:03 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Contains user added folder location contents as well as all user disabled applications
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>
|
2019-10-16 11:38:44 +00:00
|
|
|
|
/// <para>Win32 class applications set UniqueIdentifier using their full file path</para>
|
|
|
|
|
|
/// <para>UWP class applications set UniqueIdentifier using their Application User Model ID</para>
|
|
|
|
|
|
/// <para>Custom user added program sources set UniqueIdentifier using their location</para>
|
2019-09-09 21:57:03 +00:00
|
|
|
|
/// </remarks>
|
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;
|
2019-09-09 21:57:03 +00:00
|
|
|
|
public string UniqueIdentifier { get; set; }
|
2016-08-20 00:17:28 +00:00
|
|
|
|
}
|
2019-10-14 21:05:21 +00:00
|
|
|
|
|
2019-10-15 09:22:20 +00:00
|
|
|
|
public class DisabledProgramSource : ProgramSource { }
|
2015-01-05 14:41:17 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|