mirror of
https://github.com/wmjordan/PDFPatcher.git
synced 2026-10-24 17:30:30 +08:00
29 lines
651 B
C#
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));
|
|
}
|
|
|
|
}
|
|
}
|