PowerToys/Plugins/Wox.Plugin.Program/Programs/StartMenu.cs

20 lines
640 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
2016-08-20 08:17:28 +08:00
namespace Wox.Plugin.Program.Programs
{
[Serializable]
class StartMenu : Win32
{
2016-08-20 08:17:28 +08:00
public static IEnumerable<Win32> All(string[] suffixes)
{
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);
return programs;
}
}
}