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); } }
/// <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>(); }
public RefreshMethod SetRefreshMethod(RefreshMethod method) { return(this.method = method); }