37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using System;
|
|
using System.Windows.Input;
|
|
using JD.Jira.Service;
|
|
using JD.Jira.WPF.View;
|
|
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.Jira.WPF
|
|
{
|
|
[NeededService(ServiceType = typeof(JiraService))]
|
|
public sealed class JiraModule : IWpfModule
|
|
{
|
|
/// <inheritdoc />
|
|
public void Dispose()
|
|
{
|
|
//Nothing to dispose
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void Setup(IModuleSetup setup)
|
|
{
|
|
}
|
|
|
|
|
|
/// <inheritdoc />
|
|
public void Initialize(IWpfModuleContext context)
|
|
{
|
|
var jiraService = context.ServiceManager.Get<JiraService>();
|
|
context.WindowManager.AddToolWindow("JiraToolWindow", "Jira View", new Icon(GetType().Assembly, "Resources/jira.png"), new MyJiraView(jiraService), DockingSide.Right, new DoubleKeyGesture(ModifierKeys.Control, Key.V, Key.J));
|
|
context.StatusBarManager.AddStatusControl(new JiraStatusControl(jiraService));
|
|
}
|
|
}
|
|
}
|