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(); }
public EraserUserControl(EraserRendererState eraserRendererState) { eraserRendererState.ThrowIfNull("eraserRendererState"); _eraserRendererState = eraserRendererState; InitializeComponent(); }