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); }
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(); }