예제 #1
0
 protected void InitializeControllers()
 {
     canvasController = new CanvasController(canvas, elements);
     canvasController.ElementSelected += (snd, args) => UpdateMenu(args.Element != null);
     toolboxController = new ToolboxController(toolboxCanvas, toolboxElements, canvasController);
     uiController      = new UIController(pgElement, canvasController);
 }
예제 #2
0
 protected void InitializeControllers()
 {
     canvasController = new CanvasController(canvas, elements);
     mouseController  = new MouseController(canvasController);
     // No longer needed, as editbox LostFocus event handles terminating itself now.
     // mouseController.MouseClick += (sndr, args) => TerminateEditing();
     canvasController.ElementSelected += (snd, args) => UpdateMenu(args.Element != null);
     toolboxController = new ToolboxController(toolboxCanvas, toolboxElements, canvasController);
     uiController      = new UIController(pgElement, canvasController);
     mouseController.HookMouseEvents();
     mouseController.InitializeBehavior();
 }