Ejemplo n.º 1
0
 public void KochWithWait(float x, int level, RefreshMethod refresh)
 {
     if (level < 1)
     {
         turtle.Forward(x, Graphics.FromImage(canvas));
         refresh.Invoke();
         turtle.Wait();
     }
     else
     {
         KochWithWait((x / 3), (level - 1), refresh);
         turtle.Left(60);
         KochWithWait((x / 3), (level - 1), refresh);
         turtle.Right(120);
         KochWithWait((x / 3), (level - 1), refresh);
         turtle.Left(60);
         KochWithWait((x / 3), (level - 1), refresh);
     }
 }
Ejemplo n.º 2
0
 /// <summary>Creates a new instance of the class, with the pointer to the method to refresh itself.</summary>
 /// <param name="method">The refreshTreeNodeServerData method.</param>
 public TreeViewArtifact(RefreshMethod method)
 {
     this._method      = method;
     this.ArtifactType = ArtifactTypeEnum.None;
     this.Items        = new List <object>();
 }
Ejemplo n.º 3
0
 public RefreshMethod SetRefreshMethod(RefreshMethod method)
 {
     return(this.method = method);
 }