PowerToys/Plugins/Wox.Plugin.Program/ProgramSources/StartMenu.cs
bao-qian 19617e9dae Refactoring start menu source
1. refactoriong start menu source
2. fix depth problems involved in last commit
2016-08-19 23:05:59 +01:00

24 lines
714 B
C#

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Wox.Plugin.Program.ProgramSources
{
[Serializable]
class StartMenu : Win32
{
public override List<Program> LoadPrograms()
{
var directory1 = Environment.GetFolderPath(Environment.SpecialFolder.Programs);
var directory2 = Environment.GetFolderPath(Environment.SpecialFolder.CommonPrograms);
var programs = new List<Program>();
GetAppFromDirectory(programs, directory1, MaxDepth);
GetAppFromDirectory(programs, directory2, MaxDepth);
return programs;
}
}
}