本文整理汇总了C#中Renderer.OnFormShown方法的典型用法代码示例。如果您正苦于以下问题:C# Renderer.OnFormShown方法的具体用法?C# Renderer.OnFormShown怎么用?C# Renderer.OnFormShown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Renderer
的用法示例。
在下文中一共展示了Renderer.OnFormShown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PathMapGenerator
/// <summary>
/// Constructor for the path map generator GUI. Takes the subfield list which is
/// created by the split function in the main form.
/// </summary>
/// <param name="fields">List of subfields</param>
public PathMapGenerator(List<Field> fields)
{
InitializeComponent();
rend = new Renderer(FieldView);
wallsRend = new PolygonRenderable(Color.Brown, true);
objectsRend = new PolygonRenderable(Color.Blue, true);
regionsRend = new PolygonRenderable(Color.Yellow, 0.5f, true);
fieldsRend = new PolygonRenderable(Color.Gray);
pointRend = new PointRenderable();
pointRend.Show = false;
lines = new List<PathRenderable>();
rend.AddRenderable(wallsRend);
rend.AddRenderable(objectsRend);
rend.AddRenderable(regionsRend);
rend.AddRenderable(fieldsRend);
rend.AddRenderable(pointRend);
originalTool = rend.Tool;
polyTool = new ClickTool();
polyTool.clicked += new EventHandler<ClickedEventArgs>(FieldViewClick);
rend.Tool = polyTool;
complete = false;
PRMs = new List<PRMAlgorithm>();
rend.OnFormShown();
this.fields = fields;
f = fields[0];
count = 1;
LoadNext();
}