public PresenterServiceProvider() { _buttonLayoutManager = new NuGenSmoothButtonLayoutManager(); _buttonRenderer = new NuGenSmoothButtonRenderer(this); _checkBoxLayoutManager = new NuGenCheckBoxLayoutManager(); _checkBoxRenderer = new NuGenSmoothCheckBoxRenderer(this); _colorsProvider = new NuGenColorsProvider(); _comboBoxRenderer = new NuGenSmoothComboBoxRenderer(this); _controlImageManager = new NuGenControlImageManager(); _imageListService = new NuGenImageListService(); _directorySelectorRenderer = new NuGenSmoothDirectorySelectorRenderer(this); _dropDownRenderer = new NuGenSmoothDropDownRenderer(this); _fontFamiliesProvider = new NuGenFontFamiliesProvider(); _listBoxRenderer = new NuGenSmoothListBoxRenderer(this); _panelRenderer = new NuGenSmoothPanelRenderer(this); _progressBarLayoutManager = new NuGenProgressBarLayoutManager(); _progressBarRenderer = new NuGenSmoothProgressBarRenderer(this); _radioButtonLayoutManager = new NuGenRadioButtonLayoutManager(); _radioButtonRenderer = new NuGenSmoothRadioButtonRenderer(this); _scrollBarRenderer = new NuGenSmoothScrollBarRenderer(this); _spinRenderer = new NuGenSmoothSpinRenderer(this); _switchButtonLayoutManager = new NuGenSmoothSwitchButtonLayoutManager(); _switchButtonRenderer = new NuGenSmoothSwitchButtonRenderer(this); _tabStateService = new NuGenTabStateService(); _tabLayoutManager = new NuGenSmoothTabLayoutManager(); _tabRenderer = new NuGenSmoothTabRenderer(this); _tempImageService = new NuGenTempImageService(); _textBoxRenderer = new NuGenSmoothTextBoxRenderer(this); _trackBarRenderer = new NuGenSmoothTrackBarRenderer(this); _thumbnailLayoutManager = new NuGenSmoothThumbnailLayoutManager(); _thumbnailRenderer = new NuGenSmoothThumbnailRenderer(this); _toolStripRenderer = new NuGenSmoothToolStripRenderer(); _valueTrackerService = new NuGenValueTrackerService(); _smoothColorManager = new NuGenSmoothColorManager(); }
/// <summary> /// Initializes a new instance of the <see cref="NuGenToolStrip"/> class. /// </summary> /// <param name="serviceProvider"> /// <para>Requires:</para> /// <para><see cref="INuGenToolStripRenderer"/></para> /// </param> /// <exception cref="ArgumentNullException"> /// <para><paramref name="serviceProvider"/> is <see langword="null"/>.</para> /// </exception> /// <exception cref="NuGenServiceNotFoundException"/> public NuGenToolStrip(INuGenServiceProvider serviceProvider) { if (serviceProvider == null) { throw new ArgumentNullException("serviceProvider"); } INuGenToolStripRenderer toolStripRenderer = serviceProvider.GetService <INuGenToolStripRenderer>(); if (toolStripRenderer == null) { throw new NuGenServiceNotFoundException <INuGenToolStripRenderer>(); } this.Renderer = toolStripRenderer.GetToolStripRenderer(); }