28 lines
830 B
C#
28 lines
830 B
C#
using System.Windows.Input;
|
|
using JD.Oasis.Module.ViewModel;
|
|
using Plume.Icons;
|
|
using Plume.Interfaces.WPF.Actions;
|
|
|
|
namespace JD.Oasis.Module.Actions
|
|
{
|
|
public class RefreshOasisDataAction : Action
|
|
{
|
|
private OasisViewModel _oasisViewModel;
|
|
|
|
public RefreshOasisDataAction(OasisViewModel oasisViewModel)
|
|
: base("Refresh tree", "Refresh Oasis data", StandardIcon.Refresh, new KeyGesture(Key.R, ModifierKeys.Control))
|
|
{
|
|
_oasisViewModel = oasisViewModel;
|
|
}
|
|
|
|
public override void TryExecute()
|
|
{
|
|
_oasisViewModel.RefreshLocalisationDataCommand.Execute();
|
|
}
|
|
|
|
public override bool CanExecute()
|
|
{
|
|
return _oasisViewModel != null && _oasisViewModel.RefreshLocalisationDataCommand.CanExecute();
|
|
}
|
|
}
|
|
}
|