public virtual void Clear() { if (resumes == null) { resumes = new TArray <Updateable>(10); } else { resumes.Clear(); } if (loads == null) { loads = new TArray <Updateable>(10); } else { loads.Clear(); } if (unloads == null) { unloads = new TArray <Updateable>(10); } else { unloads.Clear(); } ClearScreens(); }
private static void CallUpdateable(TArray <Updateable> list) { lock (typeof(LProcess)) { TArray <Updateable> loadCache; lock (list) { loadCache = new TArray <Updateable>(list); list.Clear(); } for (int i = 0, size = loadCache.size; i < size; i++) { Updateable r = loadCache.Get(i); if (r == null) { continue; } lock (r) { try { r.Action(null); } catch (System.Exception cause) { LSystem.Error("Updateable dispatch failure", cause); } } } loadCache = null; } }
public virtual void Clear() { if (clicks != null) { clicks.Clear(); } _downClick = false; }
public void Close() { foreach (LRelease release in objects) { if (release != null) { release.Close(); } } objects.Clear(); }
public virtual void ClearScreens() { _screenMap.Clear(); foreach (Screen screen in _screens) { if (screen != null) { screen.Destroy(); } } _screens.Clear(); }
internal virtual void Dispatch() { lock (this) { running.AddAll(pending); pending.Clear(); } for (int ii = 0, ll = running.size; ii < ll; ii++) { Runnable action = running.Get(ii); try { action.Run(); } catch (System.Exception e) { log.Warn("invokeLater Runnable failed: " + action, e); } } running.Clear(); }
public virtual Scheduler Clear() { _scheduled.Clear(); return(this); }
private bool Process(TArray <PointF> contour, TArray <PointF> result) { result.Clear(); int n = contour.Size(); if (n < 3) { return(false); } int[] sV = new int[n]; if (0.0f < Area(contour)) { for (int v = 0; v < n; v++) { sV[v] = v; } } else { for (int v = 0; v < n; v++) { sV[v] = (n - 1) - v; } } int nv = n; int count = 2 * nv; for (int v = nv - 1; nv > 2;) { if (0 >= (count--)) { return(false); } int u = v; if (nv <= u) { u = 0; } v = u + 1; if (nv <= v) { v = 0; } int w = v + 1; if (nv <= w) { w = 0; } if (Snip(contour, u, v, w, nv, sV)) { int a, b, c, s, t; a = sV[u]; b = sV[v]; c = sV[w]; result.Add(contour.Get(a)); result.Add(contour.Get(b)); result.Add(contour.Get(c)); for (s = v, t = v + 1; t < nv; s++, t++) { sV[s] = sV[t]; } nv--; count = 2 * nv; } } return(true); }