Flow.Launcher/WinAlfred/Commands/BaseCommand.cs

32 lines
738 B
C#
Raw Normal View History

2014-01-06 11:03:20 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WinAlfred.Plugin;
namespace WinAlfred.Commands
{
public abstract class BaseCommand
{
private MainWindow window;
2014-01-13 10:43:44 +00:00
public void Dispatch(Query query)
{
Dispatch(query, true);
}
public abstract void Dispatch(Query query, bool updateView);
2014-01-06 11:03:20 +00:00
//TODO:Ugly, we should subscribe events here, instead of just use usercontrol as the parameter
protected BaseCommand(MainWindow window)
{
this.window = window;
}
protected void UpdateResultView(List<Result> results)
{
2014-01-07 15:27:05 +00:00
window.OnUpdateResultView(results);
2014-01-06 11:03:20 +00:00
}
}
}