mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
Add missed changes
This commit is contained in:
29
WinAlfred/Commands/BaseCommand.cs
Normal file
29
WinAlfred/Commands/BaseCommand.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
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;
|
||||
|
||||
public abstract void Dispatch(Query query);
|
||||
|
||||
//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)
|
||||
{
|
||||
if (results.Count > 0)
|
||||
{
|
||||
window.OnUpdateResultView(results);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user