public IHttpActionResult GetImages() { try { var images = ImageInit.GetImages(context.Server.MapPath(CSV_PATH)); if (images == null) { return(NotFound()); } return(Ok(images)); } catch (Exception ex) { return(BadRequest(string.Concat(ex.ToString(), " ____ ", ex.StackTrace))); } }
public void TickSync() { if (CurrIcon == null) { return; } var now = EngineNS.Support.Time.GetTickCount(); if (now - EnterTime < 1000) { return; } if (now - mPrevTick < 100) { return; } mPrevTick = now; if (IconAnimTask == null) { IconAnimTask = ImageInit.GetImage(CurrIcon.ResourceRName.Address + ".snap"); } else { if (IconAnimTask.IsCompleted) { IconAnim = IconAnimTask.Result; IconAnimTask = null; } } if (IconAnim != null) { PlayFrame++; if (PlayFrame >= IconAnim.Length) { PlayFrame = 0; } CurrIcon.Snapshot = IconAnim[PlayFrame]; } }