private static void ClearViewEntities() { CLReViewEntity next; while (ventities != null) { next = ventities.Next; ventities.Next = null; ventities = next; } }
public static void AddToReleaseQueue(CLReViewEntity ventity) { if (ventitiesToRelease == null) { ventitiesToRelease = ventity; return; } CLReViewEntity vre = ventitiesToRelease; while (vre.Next != null) { vre = vre.Next; } vre.Next = ventity; }
public static void AddToQueue(CLReViewEntity ventity) { if (ventities == null) { ventities = ventity; return; } CLReViewEntity v = ventities; while (v.Next != null) { v = v.Next; } v.Next = ventity; }
public void Render(ColorLinesNG skiaView, SKCanvas canvas) { CLReEntity r = rentities; int renderSpecialBgTexture = 0; for (; r != null; r = r.Next) { r.Render(this.images, skiaView, canvas); if (Device.Idiom != TargetIdiom.Desktop || renderSpecialBgTexture != 0 || this.specialBgTextureIds == null || this.specialBgTextureIds.Length < 2) { continue; } if (r.TextureId == this.specialBgTextureIds[0]) { renderSpecialBgTexture = 1; } else if (r.TextureId == this.specialBgTextureIds[1]) { renderSpecialBgTexture = 2; } } if (renderSpecialBgTexture == 1) { CLReQueue.RenderFadingCircle(canvas, skiaView); } else if (renderSpecialBgTexture == 2) { CLReQueue.RenderFades(canvas, skiaView, false); CLReQueue.RenderFades(canvas, skiaView, true); CLReQueue.RenderFadingCircle(canvas, skiaView); } CLReViewEntity v = ventities; for (; v != null; v = v.Next) { v.Render(this.mainLayout, skiaView); } CLReViewEntity vre = ventitiesToRelease; for (; vre != null; vre = vre.Next) { vre.Release(this.mainLayout); } }
private static void ClearViewToReleaseEntities() { CLReViewEntity next; while (ventitiesToRelease != null) { if (!ventitiesToRelease.Removed) { notRemoved.Add(ventitiesToRelease); } next = ventitiesToRelease.Next; ventitiesToRelease.Next = null; ventitiesToRelease = next; } if (notRemoved.Count <= 0) { if (resetViewToReleaseTimer.IsRunning) { resetViewToReleaseTimer.Stop(); } return; } if (lastCount != notRemoved.Count) { lastCount = notRemoved.Count; resetViewToReleaseTimer.Restart(); } if (resetViewToReleaseTimer.ElapsedMilliseconds > 10000) { notRemoved.Clear(); lastCount = 0; return; } next = ventitiesToRelease = notRemoved[0]; for (int i = 1; i < notRemoved.Count; i++) { next = next.Next = notRemoved[i]; } next.Next = null; notRemoved.Clear(); }