Files
PDFPatcher/App/Functions/Editor/Commands/BookmarkStyleCommand.cs
T
2021-12-24 20:35:03 +08:00

29 lines
651 B
C#

using System;
using PDFPatcher.Processor;
using BrightIdeasSoftware;
namespace PDFPatcher.Functions.Editor
{
sealed class BookmarkStyleCommand : IEditorCommand
{
readonly SetTextStyleProcessor.Style _style;
public BookmarkStyleCommand (SetTextStyleProcessor.Style style) {
_style = style;
}
public void Process (Controller controller, params string[] parameters) {
var b = controller.View.Bookmark;
if (b.FocusedItem == null) {
return;
}
var i = b.GetFirstSelectedModel<Model.BookmarkElement> ();
if (i == null) {
return;
}
controller.ProcessBookmarks (new SetTextStyleProcessor (i, _style));
}
}
}