private void selectToolStripMenuItem_Click(object sender, EventArgs e) { SelectTool select = new SelectTool(); select.setTool(drawingCanvas); this.selectToolStripMenuItem.BackColor = SystemColors.Highlight; this.circleToolStripMenuItem.BackColor = SystemColors.Control; this.lineToolStripMenuItem.BackColor = SystemColors.Control; this.rectangleToolStripMenuItem.BackColor = SystemColors.Control; }
private void Toolbox_ToolSelected(ITool tool) { if (this.canvas != null) { if (tool.GetType() != typeof(AlignmentCenterTool) && tool.GetType() != typeof(AlignmentLeftTool) && tool.GetType() != typeof(AlignmentRightTool)) { this.canvas.SetActiveTool(tool); tool.TargetCanvas = this.canvas; } else { SelectTool select = (SelectTool)this.canvas.GetActiveTool(); select.updatePos(tool); Console.WriteLine(tool); } } }