Exemplo n.º 1
0
            /// <summary>
            /// Initializes a new instance of the <see cref="ColorTabControl"/> class.
            /// </summary>
            /// <param name="serviceProvider">
            /// Requires:<para/>
            /// <see cref="INuGenButtonStateTracker"/><para/>
            /// <see cref="INuGenControlStateTracker"/><para/>
            /// <see cref="INuGenTabRenderer"/><para/>
            /// <see cref="INuGenTabStateTracker"/><para/>
            /// <see cref="INuGenTabLayoutManager"/><para/>
            /// <see cref="INuGenPanelRenderer"/><para/>
            /// <see cref="INuGenListBoxRenderer"/><para/>
            /// <see cref="INuGenImageListService"/><para/>
            /// <see cref="INuGenColorsProvider"/><para/>
            /// </param>
            /// <exception cref="ArgumentNullException">
            /// <para>
            ///		<paramref name="serviceProvider"/> is <see langword="null"/>.
            /// </para>
            /// </exception>
            public ColorTabControl(INuGenServiceProvider serviceProvider)
                : base(serviceProvider)
            {
                _customColorsPanel = new CustomColorsPanel(serviceProvider);
                _stdColorListBox   = new StdColorListBox(serviceProvider);
                _webColorListBox   = new WebColorListBox(serviceProvider);

                this.CloseButtonOnTab = false;
                this.Dock             = DockStyle.Fill;

                NuGenTabPage customColorsPage = new NuGenTabPage(serviceProvider);

                customColorsPage.Text = Resources.Text_ColorBoxPopup_Custom;
                customColorsPage.Controls.Add(_customColorsPanel);

                NuGenTabPage stdColorsPage = new NuGenTabPage(serviceProvider);

                stdColorsPage.Text = Resources.Text_ColorBoxPopup_System;
                stdColorsPage.Controls.Add(_stdColorListBox);

                NuGenTabPage webColorsPage = new NuGenTabPage(serviceProvider);

                webColorsPage.Text = Resources.Text_ColorBoxPopup_Web;
                webColorsPage.Controls.Add(_webColorListBox);

                this.TabPages.Add(customColorsPage);
                this.TabPages.Add(webColorsPage);
                this.TabPages.Add(stdColorsPage);

                _colorCollections = new Dictionary <IColorCollection, NuGenTabPage>();

                _colorCollections.Add(_stdColorListBox, stdColorsPage);
                _colorCollections.Add(_webColorListBox, webColorsPage);
                _colorCollections.Add(_customColorsPanel, customColorsPage);
            }
			/// <summary>
			/// Initializes a new instance of the <see cref="ColorTabControl"/> class.
			/// </summary>
			/// <param name="serviceProvider">
			/// Requires:<para/>
			/// <see cref="INuGenButtonStateTracker"/><para/>
			/// <see cref="INuGenControlStateTracker"/><para/>
			/// <see cref="INuGenTabRenderer"/><para/>
			/// <see cref="INuGenTabStateTracker"/><para/>
			/// <see cref="INuGenTabLayoutManager"/><para/>
			/// <see cref="INuGenPanelRenderer"/><para/>
			/// <see cref="INuGenListBoxRenderer"/><para/>
			/// <see cref="INuGenImageListService"/><para/>
			/// <see cref="INuGenColorsProvider"/><para/>
			/// </param>
			/// <exception cref="ArgumentNullException">
			/// <para>
			///		<paramref name="serviceProvider"/> is <see langword="null"/>.
			/// </para>
			/// </exception>
			public ColorTabControl(INuGenServiceProvider serviceProvider)
				: base(serviceProvider)
			{
				_customColorsPanel = new CustomColorsPanel(serviceProvider);
				_stdColorListBox = new StdColorListBox(serviceProvider);
				_webColorListBox = new WebColorListBox(serviceProvider);

				this.CloseButtonOnTab = false;
				this.Dock = DockStyle.Fill;

				NuGenTabPage customColorsPage = new NuGenTabPage(serviceProvider);
				customColorsPage.Text = Resources.Text_ColorBoxPopup_Custom;
				customColorsPage.Controls.Add(_customColorsPanel);

				NuGenTabPage stdColorsPage = new NuGenTabPage(serviceProvider);
				stdColorsPage.Text = Resources.Text_ColorBoxPopup_System;
				stdColorsPage.Controls.Add(_stdColorListBox);

				NuGenTabPage webColorsPage = new NuGenTabPage(serviceProvider);
				webColorsPage.Text = Resources.Text_ColorBoxPopup_Web;
				webColorsPage.Controls.Add(_webColorListBox);

				this.TabPages.Add(customColorsPage);
				this.TabPages.Add(webColorsPage);
				this.TabPages.Add(stdColorsPage);

				_colorCollections = new Dictionary<IColorCollection, NuGenTabPage>();

				_colorCollections.Add(_stdColorListBox, stdColorsPage);
				_colorCollections.Add(_webColorListBox, webColorsPage);
				_colorCollections.Add(_customColorsPanel, customColorsPage);
			}