Exemplo n.º 1
0
 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)));
     }
 }
Exemplo n.º 2
0
            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];
                }
            }