本文整理汇总了C#中Manager.Create方法的典型用法代码示例。如果您正苦于以下问题:C# Manager.Create方法的具体用法?C# Manager.Create怎么用?C# Manager.Create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Manager
的用法示例。
在下文中一共展示了Manager.Create方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UseMessageBoxTest
public void UseMessageBoxTest(char decoChar, string message)
{
Manager manager = new Manager ();
MessageBox mbox = new MessageBox (decoChar);
manager.Register (message, mbox);
Product wbox = manager.Create (message);
wbox.Use ("Hello World");
}
示例2: UsePrototypeWithUnderLinePenTest
public void UsePrototypeWithUnderLinePenTest(char ulchar, string message)
{
Manager manager = new Manager ();
UnderLinePen upen = new UnderLinePen (ulchar);
manager.Register (message, upen);
Product p1 = manager.Create (message);
p1.Use ("Hello World");
}
示例3: UseBothPrototype
public void UseBothPrototype()
{
Manager manager = new Manager ();
UnderLinePen upen = new UnderLinePen ('-');
MessageBox mbox = new MessageBox ('*');
MessageBox sbox = new MessageBox ('/');
UnderLinePen hpen = new UnderLinePen ('~');
manager.Register ("strong message", upen);
manager.Register ("warning box", mbox);
manager.Register ("slash box", sbox);
manager.Register ("strong message2", hpen);
Product p1 = manager.Create ("warning box");
Product p2 = manager.Create ("strong message2");
Product p3 = manager.Create ("slash box");
Product p4 = manager.Create ("strong message");
p1.Use ("Hello Warld");
p2.Use ("Hello Warld");
p3.Use ("Hello Warld");
p4.Use ("Hello Warld");
}