mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
Mouse select support & Code refactoring
This commit is contained in:
@@ -8,24 +8,11 @@ namespace WinAlfred.Commands
|
||||
{
|
||||
public abstract class BaseCommand
|
||||
{
|
||||
private MainWindow window;
|
||||
|
||||
public void Dispatch(Query query)
|
||||
{
|
||||
Dispatch(query, true);
|
||||
}
|
||||
|
||||
public abstract void Dispatch(Query query, bool updateView);
|
||||
|
||||
//TODO:Ugly, we should subscribe events here, instead of just use usercontrol as the parameter
|
||||
protected BaseCommand(MainWindow window)
|
||||
{
|
||||
this.window = window;
|
||||
}
|
||||
public abstract void Dispatch(Query query, bool updateView = true);
|
||||
|
||||
protected void UpdateResultView(List<Result> results)
|
||||
{
|
||||
window.OnUpdateResultView(results);
|
||||
App.Window.OnUpdateResultView(results);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user