41 lines
1.3 KiB
C#
41 lines
1.3 KiB
C#
using System.Linq;
|
|
using System.Windows.Input;
|
|
using JD.VideoPlayer.WPF.Actions;
|
|
using JD.VideoPlayer.WPF.Settings;
|
|
using JD.VideoPlayer.WPF.View;
|
|
using Plume.Icons;
|
|
using Plume.Interfaces.Modules;
|
|
using Plume.Interfaces.WPF.Modules;
|
|
using Plume.Interfaces.WPF.Window;
|
|
using Plume.WPF.Commands;
|
|
|
|
namespace JD.Remoting.WPF
|
|
{
|
|
public sealed class VideoPlayerModule : IWpfModule
|
|
{
|
|
|
|
/// <inheritdoc />
|
|
public void Dispose()
|
|
{
|
|
//Nothing to dispose
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void Setup(IModuleSetup setup)
|
|
{
|
|
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void Initialize(IWpfModuleContext context)
|
|
{
|
|
context.SettingsManager.Register<VideoPlayerSettings>("Video/Player");
|
|
context.ActionManager.Register(() => new AspectRatioAction(AspectRatio.Original));
|
|
context.ActionManager.Register(() => new AspectRatioAction(AspectRatio.Stretch));
|
|
context.ActionManager.Register<ShowDebugInformationsAction>();
|
|
|
|
var videoPlayer = new VideoPlayerControl(context);
|
|
context.WindowManager.AddToolWindow("VideoPlayer", "Video Player", StandardIcon.Image, videoPlayer, DockingSide.Right, new DoubleKeyGesture(ModifierKeys.Control, Key.V, Key.V));
|
|
}
|
|
}
|
|
}
|