• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# INuGenServiceProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中INuGenServiceProvider的典型用法代码示例。如果您正苦于以下问题:C# INuGenServiceProvider类的具体用法?C# INuGenServiceProvider怎么用?C# INuGenServiceProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



INuGenServiceProvider类属于命名空间,在下文中一共展示了INuGenServiceProvider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Label

			public Label(INuGenServiceProvider serviceProvider)
				: base(serviceProvider)
			{
				this.AutoSize = false;
				this.Dock = DockStyle.Fill;
				this.Margin = new Padding(3, 6, 0, 3);
			}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:7,代码来源:NuGenHotKeyPopup.Label.cs


示例2: OpacitySpin

			public OpacitySpin(INuGenServiceProvider serviceProvider)
				: base(serviceProvider)
			{
				this.Minimum = 0;
				this.Maximum = 100;
				this.Value = 100;
			}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:7,代码来源:ImageExportDialog.OpacitySpin.cs


示例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();
			}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:18,代码来源:NuGenThumbnailContainer.ToolBarButton.cs


示例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;
			}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:18,代码来源:NuGenAlignSelector.Switcher.cs


示例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;
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:10,代码来源:NuGenCommentsFolderTreeNode.cs


示例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;
			}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:16,代码来源:ImageExportDialog.SizeSpin.cs


示例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);
			}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:18,代码来源:NuGenColorBoxPopup.StdColorListBox.cs


示例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;
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:16,代码来源:NuGenComponent.cs


示例9: PropertiesForm

		public PropertiesForm(INuGenServiceProvider serviceProvider)
		{
			if (serviceProvider == null)
			{
				throw new ArgumentNullException("serviceProvider");
			}

			_serviceProvider = serviceProvider;
			InitializeComponent();
			SetStyle(ControlStyles.Opaque, true);
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:11,代码来源:PropertiesForm.cs


示例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);
				}
			}
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:66,代码来源:SamplesManager.cs


示例11: ActionButton

			public ActionButton(INuGenServiceProvider serviceProvider, IAction buttonAction, string text)
				: base(serviceProvider)
			{
				if (buttonAction == null)
				{
					throw new ArgumentNullException("buttonAction");
				}

				_buttonAction = buttonAction;

				this.Text = text;
			}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:12,代码来源:NuGenCalculatorPopup.ActionButton.cs


示例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;
			}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:23,代码来源:ImageExportDialog.TypeCombo.cs


示例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();
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:27,代码来源:NuGenContextMenuStrip.cs


示例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;
			}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:25,代码来源:ImageExportDialog.FormatCombo.cs


示例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;
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:26,代码来源:NuGenFontSizeBox.cs


示例16: DrawBackground

		/// <summary>
		/// </summary>
		/// <param name="serviceProvider">
		/// <para>Requires:</para>
		/// <para><see cref="INuGenSmoothColorManager"/></para>
		/// </param>
		/// <param name="paintParams"></param>
		/// <exception cref="ArgumentNullException">
		/// <para><paramref name="serviceProvider"/> is <see langword="null"/>.</para>
		/// -or-
		/// <para><paramref name="paintParams"/> is <see langword="null"/>.</para>
		/// </exception>
		/// <exception cref="NuGenServiceNotFoundException"/>
		public static void DrawBackground(INuGenServiceProvider serviceProvider, NuGenPaintParams paintParams)
		{
			if (serviceProvider == null)
			{
				throw new ArgumentNullException("serviceProvider");
			}

			if (paintParams == null)
			{
				throw new ArgumentNullException("paintParams");
			}

			Graphics g = paintParams.Graphics;
			Rectangle bounds = paintParams.Bounds;
			NuGenControlState state = paintParams.State;

			RectangleF ellipseBounds = new RectangleF(
				bounds.Left - bounds.Width * 0.2f
				, bounds.Top + bounds.Height * 0.6f
				, bounds.Width * 2
				, bounds.Height
			);

			if (ellipseBounds.Width > 0 && ellipseBounds.Height > 0)
			{
				INuGenSmoothColorManager colorManager = serviceProvider.GetService<INuGenSmoothColorManager>();

				if (colorManager == null)
				{
					throw new NuGenServiceNotFoundException<INuGenSmoothColorManager>();
				}

				Color beginColor = Color.FromArgb(60, colorManager.GetBorderColor(state));
				Color endColor = Color.FromArgb(10, colorManager.GetBackgroundGradientEnd(state));

				using (Brush brush = new LinearGradientBrush(ellipseBounds, beginColor, endColor, 0.0f))
				{
					g.SetClip(bounds, CombineMode.Replace);
					g.FillEllipse(brush, ellipseBounds);
				}
			}
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:55,代码来源:RendererUtils.cs


示例17: ThumbnailManager

			public ThumbnailManager(
				INuGenServiceProvider serviceProvider
				, ControlCollection ctrls
				, ImageTracker imageTracker
				)
			{
				Debug.Assert(serviceProvider != null, "serviceProvider != null");
				_serviceProvider = serviceProvider;

				Debug.Assert(ctrls != null, "ctrls != null");
				_ctrls = ctrls;

				Debug.Assert(imageTracker != null, "imageTracker != null");
				_imageTracker = imageTracker;
				_imageTracker.ImageAdded += _imageTracker_ImageAdded;
				_imageTracker.ImageInserted += _imageTracker_ImageInserted;
				_imageTracker.ImageRemoved += _imageTracker_ImageRemoved;

				_imageThumbDictionary = new Dictionary<Image, NuGenThumbnail>();
			}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:20,代码来源:NuGenThumbnailContainer.ThumbnailManager.cs


示例18: NuGenSmoothPinpointWindow

		/// <summary>
		/// Initializes a new instance of the <see cref="NuGenSmoothPinpointWindow"/> class.
		/// </summary>
		/// <param name="serviceProvider"><para>Requires:</para>
		/// 	<para><see cref="INuGenControlStateService"/></para>
		/// 	<para><see cref="INuGenPinpointRenderer"/></para></param>
		/// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
		public NuGenSmoothPinpointWindow(INuGenServiceProvider serviceProvider)
			: base(serviceProvider)
		{
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:11,代码来源:NuGenSmoothPinpointWindow.cs


示例19: NuGenOrientationControlBase

		/// <summary>
		/// Initializes a new instance of the <see cref="NuGenOrientationControlBase"/> class.
		/// </summary>
		/// <param name="serviceProvider"><para>Requires:</para>
		/// 	<para><see cref="INuGenControlStateTracker"/></para></param>
		/// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
		protected NuGenOrientationControlBase(INuGenServiceProvider serviceProvider)
			: base(serviceProvider)
		{
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:10,代码来源:NuGenOrientationControlBase.cs


示例20: DropDownButton

			/// <summary>
			/// Initializes a new instance of the <see cref="DropDownButton"/> class.
			/// </summary>
			/// <param name="serviceProvider"><para>Requires:</para>
			/// 	<para><see cref="INuGenButtonStateService"/></para>
			///		<para><see cref="INuGenDirectorySelectorRenderer"/></para>
			/// </param>
			/// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
			public DropDownButton(INuGenServiceProvider serviceProvider)
				: base(serviceProvider)
			{
			}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:12,代码来源:NuGenDirectorySelector.DropDownButton.cs



注:本文中的INuGenServiceProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# INuGetProjectContext类代码示例发布时间:2022-05-24
下一篇:
C# INotifyPropertyChanged类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap