Beispiel #1
0
            /// <summary>
            /// Initializes a new instance of the <see cref="NuGenNavigationBar"/> class.
            /// </summary>
            /// <param name="serviceProvider">
            /// <para>Requires:</para>
            /// <para><see cref="INuGenControlStateTracker"/></para>
            /// <para><see cref="INuGenNavigationBarRenderer"/></para>
            /// <para><see cref="INuGenNavigationBarLayoutManager"/></para>
            /// <para><see cref="INuGenToolStripRenderer"/></para>
            /// <para><see cref="INuGenToolTipLayoutManager"/></para>
            /// <para><see cref="INuGenToolTipRenderer"/></para>
            /// </param>
            /// <exception cref="ArgumentNullException">
            /// <para><paramref name="serviceProvider"/> is <see langword="null"/>.</para>
            /// </exception>
            public ButtonBlock(INuGenServiceProvider serviceProvider)
                : base(serviceProvider)
            {
                _buttons = new ButtonCollection(this);

                _contextMenuStrip = new NuGenContextMenuStrip(serviceProvider);
                _addRemoveButtons = new ToolStripMenuItem(Resources.Text_NavigationBar_AddRemoveButtons);
                _contextMenuStrip.Items.Add(_addRemoveButtons);
                _overflowSeparator = new ToolStripSeparator();
                _tooltip           = new NuGenToolTip(serviceProvider);

                this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
                this.SetStyle(ControlStyles.Opaque, true);
                this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
                this.SetStyle(ControlStyles.ResizeRedraw, true);
            }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NuGenDirectorySelector"/> class.
        /// </summary>
        /// <param name="serviceProvider"><para>Requires:</para>
        ///		<para><see cref="INuGenButtonStateService"/></para>
        ///     <para><see cref="INuGenControlStateService"/></para>
        ///		<para><see cref="INuGenDirectorySelectorRenderer"/></para>
        ///		<para><see cref="INuGenToolStripRenderer"/></para>
        ///		<para><see cref="INuGenToolTipLayoutManager"/></para>
        ///		<para><see cref="INuGenToolTipRenderer"/></para>
        /// </param>
        /// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
        public NuGenDirectorySelector(INuGenServiceProvider serviceProvider)
            : base(serviceProvider)
        {
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.ResizeRedraw, true);
            this.SetStyle(ControlStyles.Selectable, true);
            this.SetStyle(ControlStyles.UserPaint, true);

            this.BackColor = Color.Transparent;

            _toolTip = new NuGenToolTip(serviceProvider);

            _dropDownButton            = new DropDownButton(serviceProvider);
            _dropDownButton.Bounds     = this.GetDropDownButtonBounds();
            _dropDownButton.MouseDown += _dropDownButton_MouseDown;
            _dropDownButton.Parent     = this;

            _contextMenu = new NuGenContextMenuStrip(serviceProvider);
        }
		/// <summary>
		/// Initializes a new instance of the <see cref="NuGenDirectorySelector"/> class.
		/// </summary>
		/// <param name="serviceProvider"><para>Requires:</para>
		///		<para><see cref="INuGenButtonStateService"/></para>
		/// 	<para><see cref="INuGenControlStateService"/></para>
		///		<para><see cref="INuGenDirectorySelectorRenderer"/></para>
		///		<para><see cref="INuGenToolStripRenderer"/></para>
		///		<para><see cref="INuGenToolTipLayoutManager"/></para>
		///		<para><see cref="INuGenToolTipRenderer"/></para>
		/// </param>
		/// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
		public NuGenDirectorySelector(INuGenServiceProvider serviceProvider)
			: base(serviceProvider)
		{
			this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
			this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
			this.SetStyle(ControlStyles.ResizeRedraw, true);
			this.SetStyle(ControlStyles.Selectable, true);
			this.SetStyle(ControlStyles.UserPaint, true);

			this.BackColor = Color.Transparent;

			_toolTip = new NuGenToolTip(serviceProvider);

			_dropDownButton = new DropDownButton(serviceProvider);
			_dropDownButton.Bounds = this.GetDropDownButtonBounds();
			_dropDownButton.MouseDown += _dropDownButton_MouseDown;
			_dropDownButton.Parent = this;

			_contextMenu = new NuGenContextMenuStrip(serviceProvider);
		}
			/// <summary>
			/// Initializes a new instance of the <see cref="NuGenNavigationBar"/> class.
			/// </summary>
			/// <param name="serviceProvider">
			/// <para>Requires:</para>
			/// <para><see cref="INuGenControlStateTracker"/></para>
			/// <para><see cref="INuGenNavigationBarRenderer"/></para>
			/// <para><see cref="INuGenNavigationBarLayoutManager"/></para>
			/// <para><see cref="INuGenToolStripRenderer"/></para>
			/// <para><see cref="INuGenToolTipLayoutManager"/></para>
			/// <para><see cref="INuGenToolTipRenderer"/></para>
			/// </param>
			/// <exception cref="ArgumentNullException">
			/// <para><paramref name="serviceProvider"/> is <see langword="null"/>.</para>
			/// </exception>
			public ButtonBlock(INuGenServiceProvider serviceProvider)
				: base(serviceProvider)
			{
				_buttons = new ButtonCollection(this);

				_contextMenuStrip = new NuGenContextMenuStrip(serviceProvider);
				_addRemoveButtons = new ToolStripMenuItem(Resources.Text_NavigationBar_AddRemoveButtons);
				_contextMenuStrip.Items.Add(_addRemoveButtons);
				_overflowSeparator = new ToolStripSeparator();
				_tooltip = new NuGenToolTip(serviceProvider);

				this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
				this.SetStyle(ControlStyles.Opaque, true);
				this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
				this.SetStyle(ControlStyles.ResizeRedraw, true);
			}