本文整理汇总了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();
}
示例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;
}
示例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> ();
}
示例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);
}