Ejemplo n.º 1
0
        private void PerformConnect()
        {
            // Tools toolstrip manager initialize
            _toolsManager = new ToolStripMananer(true);
            // connect selection
            _toolsManager.Connect(tsbToolSelection,
                new DrawPadTools.CommandObject(DrawPadTools.DrawPadCommand.Selection), drawPad.ChangeTool);
            // connect direct selection
            _toolsManager.Connect(tsbToolDirectSel,
                new DrawPadTools.CommandObject(DrawPadTools.DrawPadCommand.DirectSelection), drawPad.ChangeTool);
            // connect draw text
            _toolsManager.Connect(tsbToolText,
                new DrawPadTools.CommandObject(DrawPadTools.DrawPadCommand.DrawText), drawPad.ChangeTool);
            // connect draw shape
            _toolsManager.Connect(tsbToolShape,
                new DrawPadTools.CommandObject(DrawPadTools.DrawPadCommand.DrawShape,
                    new Core.Line()), drawPad.ChangeTool);
            // connect crop
            _toolsManager.Connect(tsbToolCrop,
                new DrawPadTools.CommandObject(DrawPadTools.DrawPadCommand.Crop), drawPad.ChangeTool);

            _colorManager = new ToolStripMananer();
            // connect change outline
            _colorManager.Connect(tsbToolOutline,
                new DrawPadTools.CommandObject(DrawPadTools.DrawPadCommand.ChangeOutline), drawPad.ChangeTool);
            // connect change fill
            _colorManager.Connect(tsbToolFill,
                new DrawPadTools.CommandObject(DrawPadTools.DrawPadCommand.ChangeFill), drawPad.ChangeTool);
        }
Ejemplo n.º 2
0
        private void PerformConnect()
        {
            // Tools toolstrip manager initialize
            _toolsManager = new ToolStripMananer(true);
            // connect selection
            _toolsManager.Connect(tsbToolSelection,
                new DrawPadTools.CommandObject(DrawPadTools.DrawPadCommand.Selection), drawPad.ChangeTool);
            // connect direct selection
            _toolsManager.Connect(tsbToolDirectSel,
                new DrawPadTools.CommandObject(DrawPadTools.DrawPadCommand.DirectSelection), drawPad.ChangeTool);
            // connect draw text
            _toolsManager.Connect(tsbToolText,
                new DrawPadTools.CommandObject(DrawPadTools.DrawPadCommand.DrawText), drawPad.ChangeTool);
            // connect draw shape
            _toolsManager.Connect(tsbToolShape,
                new DrawPadTools.CommandObject(DrawPadTools.DrawPadCommand.DrawShape,
                    new Core.Line()), drawPad.ChangeTool);
            // connect brush
            _toolsManager.Connect(tsbToolBrush,
                new DrawPadTools.CommandObject(DrawPadTools.DrawPadCommand.Brush, new Core.FreePencil()), drawPad.ChangeTool);
            // connect erase
            _toolsManager.Connect(tsbToolEraser,
                new DrawPadTools.CommandObject(DrawPadTools.DrawPadCommand.Eraser, new Core.FreePencil()), drawPad.ChangeTool);
            // connect bucket
            _toolsManager.Connect(tsbToolBucket,
                new DrawPadTools.CommandObject(DrawPadTools.DrawPadCommand.Bucket), drawPad.ChangeTool);

            _colorManager = new ToolStripMananer();
            // connect change outline
            _colorManager.Connect(tsbToolOutline,
                new DrawPadTools.CommandObject(DrawPadTools.DrawPadCommand.ChangeOutline), drawPad.ChangeTool);
            // connect change fill
            _colorManager.Connect(tsbToolFill,
                new DrawPadTools.CommandObject(DrawPadTools.DrawPadCommand.ChangeFill), drawPad.ChangeTool);
        }