本文整理汇总了C#中INuGenServiceProvider类的典型用法代码示例。如果您正苦于以下问题:C# INuGenServiceProvider类的具体用法?C# INuGenServiceProvider怎么用?C# INuGenServiceProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
INuGenServiceProvider类属于命名空间,在下文中一共展示了INuGenServiceProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Label
public Label(INuGenServiceProvider serviceProvider)
: base(serviceProvider)
{
this.AutoSize = false;
this.Dock = DockStyle.Fill;
this.Margin = new Padding(3, 6, 0, 3);
}
示例2: OpacitySpin
public OpacitySpin(INuGenServiceProvider serviceProvider)
: base(serviceProvider)
{
this.Minimum = 0;
this.Maximum = 100;
this.Value = 100;
}
示例3: ToolBarButton
/// <summary>
/// Initializes a new instance of the <see cref="ToolBarButton"/> class.
/// </summary>
/// <param name="serviceProvider"><para>Requires:</para>
/// <para><see cref="INuGenButtonStateService"/></para>
/// <para><see cref="INuGenControlStateService"/></para>
/// <para><see cref="INuGenSwitchButtonLayoutManager"/></para>
/// <para><see cref="INuGenSwitchButtonRenderer"/></para>
/// <para><see cref="INuGenThumbnailLayoutManager"/></para>
/// </param>
/// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
public ToolBarButton(INuGenServiceProvider serviceProvider)
: base(serviceProvider)
{
this.Dock = DockStyle.Left;
this.ImageAlign = ContentAlignment.MiddleCenter;
this.Size = this.ThumbnailLayoutManager.GetToolbarButtonSize();
}
示例4: Switcher
/// <summary>
/// Initializes a new instance of the <see cref="Switcher"/> class.
/// </summary>
/// <param name="serviceProvider"><para>Requires:</para>
/// <para><see cref="INuGenRadioButtonRenderer"/></para>
/// <para><see cref="INuGenRadioButtonLayoutManager"/></para>
/// <para><see cref="INuGenButtonStateService"/></para>
/// <para><see cref="INuGenControlStateService"/></para>
/// </param>
/// <param name="associatedAlignment"></param>
/// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
public Switcher(INuGenServiceProvider serviceProvider, ContentAlignment associatedAlignment)
: base(serviceProvider)
{
_assoicatedAlignment = associatedAlignment;
this.CheckAlign = ContentAlignment.MiddleCenter;
this.Dock = DockStyle.Fill;
}
示例5: NuGenCommentsFolderTreeNode
/// <summary>
/// Initializes a new instance of the <see cref="NuGenCommentsFolderTreeNode"/> class.
/// </summary>
public NuGenCommentsFolderTreeNode(
INuGenServiceProvider serviceProvider,
string folderText
) : base(serviceProvider, folderText)
{
this.Text = folderText;
}
示例6: SizeSpin
/// <summary>
/// Initializes a new instance of the <see cref="SizeSpin"/> class.
/// </summary>
/// <param name="serviceProvider">Requires:<para/>
/// <see cref="INuGenSpinRenderer"/><para/>
/// <see cref="INuGenButtonStateTracker"/><para/>
/// <see cref="INuGenControlStateTracker"/><para/></param>
/// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
public SizeSpin(INuGenServiceProvider serviceProvider)
: base(serviceProvider)
{
this.Maximum = 9600;
this.Minimum = 1;
this.Value = 640;
this.Width = 100;
}
示例7: StdColorListBox
/// <summary>
/// Initializes a new instance of the <see cref="StdColorListBox"/> class.
/// </summary>
/// <param name="serviceProvider"><para>Requires:</para>
/// <para><see cref="INuGenControlStateTracker"/></para>
/// <para><see cref="INuGenListBoxRenderer"/></para>
/// <para><see cref="INuGenImageListService"/></para>
/// <para><see cref="INuGenColorsProvider"/></para>
/// </param>
/// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
public StdColorListBox(INuGenServiceProvider serviceProvider)
: base(serviceProvider)
{
IList<Color> colors = null;
this.ColorsProvider.FillWithStandardColors(out colors);
Debug.Assert(colors != null, "colors != null");
this.InitializeColorBox(colors);
}
示例8: NuGenComponent
/// <summary>
/// Initializes a new instance of the <see cref="NuGenComponent"/> class.
/// </summary>
/// <param name="serviceProvider"></param>
/// <exception cref="ArgumentNullException">
/// <para><paramref name="serviceProvider"/> is <see langword="null"/>.</para>
/// </exception>
public NuGenComponent(INuGenServiceProvider serviceProvider)
{
if (serviceProvider == null)
{
throw new ArgumentNullException("serviceProvider");
}
_serviceProvider = serviceProvider;
}
示例9: PropertiesForm
public PropertiesForm(INuGenServiceProvider serviceProvider)
{
if (serviceProvider == null)
{
throw new ArgumentNullException("serviceProvider");
}
_serviceProvider = serviceProvider;
InitializeComponent();
SetStyle(ControlStyles.Opaque, true);
}
示例10: PopulateSampleTree
/// <summary>
/// </summary>
/// <param name="serviceProvider"><para>Requires:</para>
/// <para><see cref="ISampleFolder"/></para></param>
/// <param name="treeView"></param>
/// <param name="folderImageIndex"></param>
/// <param name="expandedFolderImageIndex"></param>
/// <param name="sampleImageIndex"></param>
/// <exception cref="ArgumentNullException">
/// <para><paramref name="serviceProvider"/> is <see langword="null"/>.</para>
/// -or-
/// <para><paramref name="treeView"/> is <see langword="null"/>.</para>
/// </exception>
public void PopulateSampleTree(
INuGenServiceProvider serviceProvider
, NuGenTreeView treeView
, int folderImageIndex
, int expandedFolderImageIndex
, int sampleImageIndex
)
{
if (serviceProvider == null)
{
throw new ArgumentNullException("serviceProvider");
}
if (treeView == null)
{
throw new ArgumentNullException("treeView");
}
ISampleFolderDescriptor sampleFolder = serviceProvider.GetService<ISampleFolderDescriptor>();
Debug.Assert(sampleFolder != null, "sampleFolder != null");
DirectoryInfo sampleDirInfo = new DirectoryInfo(sampleFolder.Path);
Debug.Write("Scanning \"");
Debug.Write(sampleDirInfo.FullName);
Debug.WriteLine("\" folder...");
if (!sampleDirInfo.Exists)
{
Trace.Write("Sample directory does not exist.");
return;
}
DirectoryInfo[] samples = sampleDirInfo.GetDirectories();
Debug.WriteLine("Getting the list of sub-directories...");
Debug.WriteLineIf(samples != null, "samples.Length = " + samples.Length.ToString());
if (samples != null)
{
Debug.WriteLine("Looping through the sub-directories...");
foreach (DirectoryInfo dirInfo in samples)
{
NuGenTreeNode treeNode = new NuGenTreeNode(dirInfo.Name, folderImageIndex, expandedFolderImageIndex);
treeView.Nodes.Add(treeNode);
Debug.Write("Examining \"");
Debug.Write(dirInfo.FullName);
Debug.WriteLine("\" sub-directory...");
this.BuildSampleTreeNode(sampleFolder, dirInfo, treeNode, folderImageIndex, expandedFolderImageIndex, sampleImageIndex);
}
}
}
示例11: ActionButton
public ActionButton(INuGenServiceProvider serviceProvider, IAction buttonAction, string text)
: base(serviceProvider)
{
if (buttonAction == null)
{
throw new ArgumentNullException("buttonAction");
}
_buttonAction = buttonAction;
this.Text = text;
}
示例12: TypeCombo
/// <summary>
/// Initializes a new instance of the <see cref="TypeCombo"/> class.
/// </summary>
/// <param name="serviceProvider"><para>Requires:</para>
/// <para><see cref="INuGenComboBoxRenderer"/></para>
/// <para><see cref="INuGenButtonStateService"/></para>
/// <para><see cref="INuGenImageListService"/></para></param>
/// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
public TypeCombo(INuGenServiceProvider serviceProvider)
: base(serviceProvider)
{
this.DropDownStyle = ComboBoxStyle.DropDownList;
this.Items.AddRange(
new object[]
{
res.ImageType_Color
, res.ImageType_Grayscale
, res.ImageType_Monochrome
}
);
this.SelectedIndex = 0;
this.Width = 100;
}
示例13: NuGenContextMenuStrip
/// <summary>
/// Initializes a new instance of the <see cref="NuGenContextMenuStrip"/> 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 NuGenContextMenuStrip(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();
}
示例14: FormatCombo
/// <summary>
/// Initializes a new instance of the <see cref="FormatCombo"/> class.
/// </summary>
/// <param name="serviceProvider"><para>Requires:</para>
/// <para><see cref="INuGenComboBoxRenderer"/></para>
/// <para><see cref="INuGenButtonStateService"/></para>
/// <para><see cref="INuGenImageListService"/></para>
/// </param>
/// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
public FormatCombo(INuGenServiceProvider serviceProvider)
: base(serviceProvider)
{
this.DropDownStyle = ComboBoxStyle.DropDownList;
this.Items.AddRange(
new object[]
{
res.FileFormat_JPEG
, res.FileFormat_PNG
, res.FileFormat_TIFF
, res.FileFormat_BMP
}
);
this.SelectedIndex = 0;
this.Width = 100;
}
示例15: NuGenFontSizeBox
/// <summary>
/// Initializes a new instance of the <see cref="NuGenFontSizeBox"/> class.
/// </summary>
/// <param name="serviceProvider"><para>Requires:</para>
/// <para><see cref="INuGenComboBoxRenderer"/></para>
/// <para><see cref="INuGenButtonStateService"/></para>
/// <para><see cref="INuGenImageListService"/></para>
/// </param>
/// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
public NuGenFontSizeBox(INuGenServiceProvider serviceProvider)
: base(serviceProvider)
{
base.Items.AddRange(
new object[]
{
8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28
, 36, 48, 72
}
);
base.Value = 10;
base.Minimum = 1;
base.Maximum = 1638;
this.MaxDropDownItems = 12;
}