mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
Merge models
This commit is contained in:
@@ -2,25 +2,22 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace Wox.Plugin.Program.ProgramSources
|
||||
namespace Wox.Plugin.Program.Programs
|
||||
{
|
||||
[Serializable]
|
||||
public class UnregisteredPrograms : Win32
|
||||
{
|
||||
public string Location { get; set; } = "";
|
||||
|
||||
public override List<Program> LoadPrograms()
|
||||
public static List<Win32> All(List<Settings.ProgramSource> sources, string[] suffixes)
|
||||
{
|
||||
if (Directory.Exists(Location) && MaxDepth >= -1)
|
||||
List<Win32> programs = new List<Win32>();
|
||||
foreach (var source in sources)
|
||||
{
|
||||
var apps = new List<Program>();
|
||||
GetAppFromDirectory(apps, Location, MaxDepth);
|
||||
return apps;
|
||||
}
|
||||
else
|
||||
{
|
||||
return new List<Program>();
|
||||
if (System.IO.Directory.Exists(source.Location) && source.MaxDepth >= -1)
|
||||
{
|
||||
GetAppFromDirectory(programs, source.Location, source.MaxDepth, suffixes);
|
||||
}
|
||||
}
|
||||
return programs;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user