ActionPanel -> ContextMenu

part of refactoring for PR #494
This commit is contained in:
bao-qian
2016-02-21 14:40:10 +00:00
parent d5696010d9
commit 927277a6cd
5 changed files with 49 additions and 63 deletions

View File

@@ -25,11 +25,12 @@ namespace Wox.ViewModel
public ResultItemViewModel(Result result)
{
if(null!= result)
if (null != result)
{
this._result = result;
this.OpenResultCommand = new RelayCommand((parameter) => {
this.OpenResultListBoxItemCommand = new RelayCommand((parameter) =>
{
bool hideWindow = result.Action(new ActionContext
{
@@ -44,7 +45,7 @@ namespace Wox.ViewModel
}
});
this.OpenResultActionPanelCommand = new RelayCommand((parameter) =>
this.OpenContextMenuItemCommand = new RelayCommand((parameter) =>
{
var actions = PluginManager.GetContextMenusForPlugin(result);
@@ -104,17 +105,9 @@ namespace Wox.ViewModel
}
}
public RelayCommand OpenResultCommand
{
get;
set;
}
public RelayCommand OpenResultListBoxItemCommand { get; set; }
public RelayCommand OpenResultActionPanelCommand
{
get;
set;
}
public RelayCommand OpenContextMenuItemCommand { get; set; }
#endregion
@@ -172,7 +165,7 @@ namespace Wox.ViewModel
{
return _result.Equals(r.RawResult);
}
return false;
}