コード例 #1
0
 private CommandFactory()
 {
     shortcutCommandConstructor = new UndoShortcutCommandConstructor();
     shortcutCommandConstructor.AddHandler(new RedoShortcutCommandConstructor());
     shortcutCommandConstructor.AddHandler(new SaveAsPdfShortcutCommandConstructor());
     shortcutCommandConstructor.AddHandler(new SaveAsLilyPondShortcutCommandConstructor());
     shortcutCommandConstructor.AddHandler(new OpenFileShortcutCommandConstructor());
     shortcutCommandConstructor.AddHandler(new InsertTrebleClefShortcutCommandConstructor());
 }
コード例 #2
0
 public void AddHandler(ShortcutCommandConstructorBase handler)
 {
     if (nextHandler == null)
     {
         nextHandler = handler;
     }
     else
     {
         nextHandler.AddHandler(handler);
     }
 }