/// <summary> /// Initializes a new instance of the <see cref="NuGenTrackBarActionList"/> class. /// </summary> /// <exception cref="ArgumentNullException"> /// <para><paramref name="trackBar"/> is <see langword="null"/>.</para> /// </exception> public NuGenTrackBarActionList(NuGenTrackBar trackBar) : base(trackBar) { if (trackBar == null) { throw new ArgumentNullException("trackBar"); } _trackBar = trackBar; }
/// <summary> /// Initializes a new instance of the <see cref="ToolBar"/> class. /// </summary> /// <param name="serviceProvider"><para>Requires:</para> /// <para><see cref="INuGenButtonStateService"/></para> /// <para><see cref="INuGenControlStateService"/></para> /// <para><see cref="INuGenPanelRenderer"/></para> /// <para><see cref="INuGenSwitchButtonLayoutManager"/></para> /// <para><see cref="INuGenSwitchButtonRenderer"/></para> /// <para><see cref="INuGenTrackBarRenderer"/></para> /// <para><see cref="INuGenValueTrackerService"/></para> /// <para><see cref="INuGenThumbnailLayoutManager"/></para> /// <para><see cref="INuGenThumbnailRenderer"/></para> /// </param> /// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception> /// <exception cref="NuGenServiceNotFoundException"/> public ToolBar(INuGenServiceProvider serviceProvider) : base(serviceProvider) { this.Dock = DockStyle.Bottom; this.Padding = new Padding(1, 2, 1, 2); _trackBar = new NuGenTrackBar(serviceProvider); _trackBar.Dock = DockStyle.Left; _trackBar.Minimum = 100; _trackBar.Maximum = 500; _trackBar.LargeChange = 100; _trackBar.SmallChange = 25; _trackBar.TickStyle = TickStyle.TopLeft; _trackBar.Width = 100; _trackBar.ValueChanged += _trackBar_ValueChanged; _rotateCWButton = new ToolBarButton(serviceProvider); _rotateCWButton.Click += _rotateCWButton_Click; _rotateCWButton.Image = this.ThumbnailRenderer.GetRotateCWImage(); _rotateCWButton.Visible = false; _rotateCCWButton = new ToolBarButton(serviceProvider); _rotateCCWButton.Click += _rotateCCWButton_Click; _rotateCCWButton.Image = this.ThumbnailRenderer.GetRotateCCWImage(); _rotateCCWButton.Visible = false; _separators = new ToolBarSeparatorButton[2]; for (int i = 0; i < _separators.Length; i++) { _separators[i] = new ToolBarSeparatorButton(serviceProvider); } _separators[0].Visible = false; _loupeModeButton = new ToolBarButton(serviceProvider); _loupeModeButton.Click += _loupeModeButton_Click; _loupeModeButton.Image = this.ThumbnailRenderer.GetLoupeModeImage(); _gridModeButton = new ToolBarButton(serviceProvider); _gridModeButton.Checked = true; _gridModeButton.Click += _gridModeButton_Click; _gridModeButton.Image = this.ThumbnailRenderer.GetGridModeImage(); _zoomInButton = new ToolBarButton(serviceProvider); _zoomInButton.Click += _zoomInButton_Click; _zoomInButton.Image = this.ThumbnailRenderer.GetZoomInImage(); _zoomInButton.Visible = false; _zoomOutButton = new ToolBarButton(serviceProvider); _zoomOutButton.Click += _zoomOutButton_Click; _zoomOutButton.Image = this.ThumbnailRenderer.GetZoomOutImage(); _zoomOutButton.Visible = false; this.Controls.AddRange( new Control[] { _trackBar , _zoomInButton , _zoomOutButton , _separators[0] , _rotateCWButton , _rotateCCWButton , _separators[1] , _loupeModeButton , _gridModeButton } ); }
/// <summary> /// Initializes a new instance of the <see cref="NuGenTrackBarActionList"/> class. /// </summary> /// <exception cref="ArgumentNullException"> /// <para><paramref name="trackBar"/> is <see langword="null"/>.</para> /// </exception> public NuGenTrackBarActionList(NuGenTrackBar trackBar) : base(trackBar) { if (trackBar == null) { throw new ArgumentNullException("trackBar"); } _trackBar = trackBar; }
/* * Initialize */ /// <summary> /// Initializes the designer with the specified component. /// </summary> /// <param name="component">The <see cref="T:System.ComponentModel.IComponent"></see> to associate the designer with. This component must always be an instance of, or derive from, <see cref="T:System.Windows.Forms.Control"></see>.</param> public override void Initialize(IComponent component) { _trackBar = (NuGenTrackBar)component; base.Initialize(component); }
/* * Initialize */ /// <summary> /// Initializes the designer with the specified component. /// </summary> /// <param name="component">The <see cref="T:System.ComponentModel.IComponent"></see> to associate the designer with. This component must always be an instance of, or derive from, <see cref="T:System.Windows.Forms.Control"></see>.</param> public override void Initialize(IComponent component) { _trackBar = (NuGenTrackBar)component; base.Initialize(component); }