public ToolSelectionUserControl(
            PencilRendererState pencilRendererState,
            EraserRendererState eraserRendererState)
        {
            pencilRendererState.ThrowIfNull("pencilRendererState");
            eraserRendererState.ThrowIfNull("eraserRendererState");

            _pencilRendererState = pencilRendererState;
            _eraserRendererState = eraserRendererState;

            InitializeComponent();

            toolStripButtonPencil.Image = Resources.Pencil;
            toolStripButtonEraser.Image = Resources.Eraser;

            _pencilUserControl = new PencilUserControl(pencilRendererState)
            {
                Dock    = DockStyle.Fill,
                Visible = false
            };
            _eraserUserControl = new EraserUserControl(eraserRendererState)
            {
                Dock    = DockStyle.Fill,
                Visible = false
            };

            AddToolUserControls();
            SelectPencil();
        }
Exemplo n.º 2
0
        public PencilUserControl(PencilRendererState pencilRendererState)
        {
            pencilRendererState.ThrowIfNull("pencilRendererState");

            _pencilRendererState = pencilRendererState;

            InitializeComponent();
        }