2016-08-20 06:05:59 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
2016-08-20 08:17:28 +08:00
|
|
|
|
namespace Wox.Plugin.Program.Programs
|
2016-08-20 06:05:59 +08:00
|
|
|
|
{
|
|
|
|
|
[Serializable]
|
|
|
|
|
class StartMenu : Win32
|
|
|
|
|
{
|
2016-08-20 08:17:28 +08:00
|
|
|
|
public static IEnumerable<Win32> All(string[] suffixes)
|
2016-08-20 06:05:59 +08:00
|
|
|
|
{
|
|
|
|
|
var directory1 = Environment.GetFolderPath(Environment.SpecialFolder.Programs);
|
|
|
|
|
var directory2 = Environment.GetFolderPath(Environment.SpecialFolder.CommonPrograms);
|
2016-08-20 08:17:28 +08:00
|
|
|
|
var programs = new List<Win32>();
|
|
|
|
|
GetAppFromDirectory(programs, directory1, -1, suffixes);
|
|
|
|
|
GetAppFromDirectory(programs, directory2, -1, suffixes);
|
2016-08-20 06:05:59 +08:00
|
|
|
|
return programs;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|