PowerToys/Wox.Plugin.System/IProgramSource.cs
Yeechan Lu 07c13d84be Refactor to support multiple program sources #42
App Paths is supported now #41
2014-03-19 02:07:08 +08:00

36 lines
763 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Wox.Plugin.System
{
public interface IProgramSource
{
List<Program> LoadPrograms();
int BonusPoints { get; set; }
}
public abstract class AbstractProgramSource : IProgramSource
{
public abstract List<Program> LoadPrograms();
public int BonusPoints
{
get; set;
}
protected Program CreateEntry(string file)
{
Program p = new Program()
{
Title = global::System.IO.Path.GetFileNameWithoutExtension(file),
IcoPath = file,
ExecutePath = file
};
return p;
}
}
}