2014-08-14 14:21:07 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
2014-03-18 18:06:51 +00:00
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
2015-01-03 07:20:34 +00:00
|
|
|
|
namespace Wox.Plugin.Program.ProgramSources
|
2014-03-18 18:06:51 +00:00
|
|
|
|
{
|
2014-12-15 14:58:49 +00:00
|
|
|
|
[Serializable]
|
2016-08-19 22:24:21 +00:00
|
|
|
|
public class UnregisteredPrograms : Win32
|
2014-03-18 18:06:51 +00:00
|
|
|
|
{
|
2016-07-21 18:51:47 +00:00
|
|
|
|
public string Location { get; set; } = "";
|
2014-03-18 20:05:27 +00:00
|
|
|
|
|
2014-03-18 18:06:51 +00:00
|
|
|
|
public override List<Program> LoadPrograms()
|
|
|
|
|
|
{
|
2016-08-19 19:34:20 +00:00
|
|
|
|
if (Directory.Exists(Location) && MaxDepth >= -1)
|
2014-08-12 04:21:04 +00:00
|
|
|
|
{
|
2016-08-19 19:34:20 +00:00
|
|
|
|
var apps = new List<Program>();
|
2016-08-19 22:05:59 +00:00
|
|
|
|
GetAppFromDirectory(apps, Location, MaxDepth);
|
2016-08-19 19:34:20 +00:00
|
|
|
|
return apps;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
return new List<Program>();
|
2014-08-12 04:21:04 +00:00
|
|
|
|
}
|
2015-04-21 00:32:10 +00:00
|
|
|
|
}
|
2014-03-18 18:06:51 +00:00
|
|
|
|
}
|
2016-07-21 18:51:47 +00:00
|
|
|
|
}
|