34 lines
866 B
C#
34 lines
866 B
C#
using System;
|
|
using System.Windows.Input;
|
|
using Plume.Icons;
|
|
using Plume.Quik.Service;
|
|
using Plume.WPF.Commands;
|
|
using Action = Plume.Interfaces.WPF.Actions.Action;
|
|
|
|
namespace JD.Quik.Actions
|
|
{
|
|
/// <summary>
|
|
/// Quick open files located inside a map
|
|
/// </summary>
|
|
public class QuickOpenMapAction : Action
|
|
{
|
|
public QuickOpenMapAction()
|
|
:base("Quick Open Map", "Quickly open a file located inside a map", StandardIcon.OpenFolder, new DoubleKeyGesture(ModifierKeys.Alt, Key.O))
|
|
{
|
|
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override void TryExecute()
|
|
{
|
|
var service = Context.ServiceManager.Get<QuikService>();
|
|
service.ShowQuik();
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override bool CanExecute()
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
}
|