Пример #1
0
        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;
        }
Пример #2
0
 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);
         }
     }
 }