当前位置: 首页>>代码示例>>C#>>正文


C# Generator.Create方法代码示例

本文整理汇总了C#中Generator.Create方法的典型用法代码示例。如果您正苦于以下问题:C# Generator.Create方法的具体用法?C# Generator.Create怎么用?C# Generator.Create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Generator的用法示例。


在下文中一共展示了Generator.Create方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Widget

		/// <summary>
		/// Initializes a new instance of the Widget class
		/// </summary>
		/// <param name="generator">Generator to create the handler with, or null to use <see cref="Eto.Generator.Current"/></param>
		/// <param name="type">Type of widget handler to create from the generator for this widget</param>
		/// <param name="initialize">True to initialize the widget, false to defer that to the caller</param>
		protected Widget(Generator generator, Type type, bool initialize = true)
		{
			if (generator == null)
				generator = Generator.Current;
			this.Handler = generator.Create(type);
			var widgetHandler = this.Handler as IWidget;
			if (widgetHandler != null)
			{
				widgetHandler.Generator = generator;
				widgetHandler.Widget = this;
			}

			if (initialize)
				Initialize();
		}
开发者ID:JohnACarruthers,项目名称:Eto,代码行数:21,代码来源:Widget.cs

示例2: Create

		/// <summary>
		/// Creates a new matrix with the specified components
		/// </summary>
		/// <param name="xx">Xx component of the matrix</param>
		/// <param name="yx">Yx component of the matrix</param>
		/// <param name="xy">Xy component of the matrix</param>
		/// <param name="yy">Yy component of the matrix</param>
		/// <param name="x0">X0 component of the matrix</param>
		/// <param name="y0">Y0 component of the matrix</param>
		/// <param name="generator">Generator.</param>
		public static IMatrix Create (float xx, float yx, float xy, float yy, float x0, float y0, Generator generator = null)
		{
			var handler = generator.Create<IMatrixHandler> ();
			handler.Create (xx, yx, xy, yy, x0, y0);
			return handler;
		}
开发者ID:JohnACarruthers,项目名称:Eto,代码行数:16,代码来源:Matrix.cs

示例3: Create

		/// <summary>
		/// Creates a new instance of the IGraphicsPath for the specified generator
		/// </summary>
		/// <param name="generator">Platform generator for the object, or null to use the current generator</param>
		public static IGraphicsPath Create (Generator generator = null)
		{
			return generator.Create<IGraphicsPathHandler> ();
		}
开发者ID:alexandrebaker,项目名称:Eto,代码行数:8,代码来源:GraphicsPath.cs

示例4: Show

		public static DialogResult Show(Generator generator, Control parent, string text, string caption, MessageBoxButtons buttons, MessageBoxType type = MessageBoxType.Information, MessageBoxDefaultButton defaultButton = MessageBoxDefaultButton.Default)
		{
			var mb = generator.Create<IMessageBox>();
			mb.Text = text;
			mb.Caption = caption;
			mb.Type = type;
			mb.Buttons = buttons;
			mb.DefaultButton = defaultButton;
			return mb.ShowDialog(parent);
		}
开发者ID:JohnACarruthers,项目名称:Eto,代码行数:10,代码来源:MessageBox.cs


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