2014-08-14 22:21:07 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
2014-03-19 02:06:51 +08:00
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
2016-08-20 01:17:28 +01:00
|
|
|
|
namespace Wox.Plugin.Program.Programs
|
2014-03-19 02:06:51 +08:00
|
|
|
|
{
|
2014-12-15 22:58:49 +08:00
|
|
|
|
[Serializable]
|
2016-08-19 23:24:21 +01:00
|
|
|
|
public class UnregisteredPrograms : Win32
|
2014-03-19 02:06:51 +08:00
|
|
|
|
{
|
2016-08-20 01:17:28 +01:00
|
|
|
|
public static List<Win32> All(List<Settings.ProgramSource> sources, string[] suffixes)
|
2014-03-19 02:06:51 +08:00
|
|
|
|
{
|
2016-08-20 01:17:28 +01:00
|
|
|
|
List<Win32> programs = new List<Win32>();
|
|
|
|
|
|
foreach (var source in sources)
|
2016-08-19 20:34:20 +01:00
|
|
|
|
{
|
2016-08-20 01:17:28 +01:00
|
|
|
|
if (System.IO.Directory.Exists(source.Location) && source.MaxDepth >= -1)
|
|
|
|
|
|
{
|
|
|
|
|
|
GetAppFromDirectory(programs, source.Location, source.MaxDepth, suffixes);
|
|
|
|
|
|
}
|
2014-08-12 12:21:04 +08:00
|
|
|
|
}
|
2016-08-20 01:17:28 +01:00
|
|
|
|
return programs;
|
2015-04-20 20:32:10 -04:00
|
|
|
|
}
|
2014-03-19 02:06:51 +08:00
|
|
|
|
}
|
2016-07-21 19:51:47 +01:00
|
|
|
|
}
|