43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Input;
|
|
using JD.Plugin.WPF.Module.Views;
|
|
using JD.Remoting.Services;
|
|
using Plume.Icons;
|
|
using Plume.Interfaces.Application;
|
|
using Plume.Interfaces.Modules;
|
|
using Plume.Interfaces.WPF.Modules;
|
|
using Plume.Interfaces.WPF.Window;
|
|
using Plume.WPF.Commands;
|
|
|
|
namespace JD.Plugin.WPF.Module
|
|
{
|
|
[NeededService(ServiceType = typeof(IPluginService))]
|
|
public sealed class PluginModule : IWpfModule
|
|
{
|
|
private IPluginService pluginService;
|
|
/// <inheritdoc />
|
|
public void Dispose()
|
|
{
|
|
//Nothing to dispose
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void Setup(IModuleSetup setup)
|
|
{
|
|
//Nothing to setup
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void Initialize(IWpfModuleContext context)
|
|
{
|
|
pluginService = context.ServiceManager.GetPluginService();
|
|
context.WindowManager.AddToolWindow("PluginToolWindow", "Plugins", StandardIcon.GraphTopToBottom,
|
|
new ToolWindowContent(pluginService), DockingSide.Left,
|
|
new DoubleKeyGesture(ModifierKeys.Control, Key.T, Key.P));
|
|
}
|
|
}
|
|
}
|