public ActionResult Update([DataSourceRequest] DataSourceRequest request, PaintOrder order)
        {
            if (order != null && ModelState.IsValid)
            {
                OrderRepository.Update(order);
            }

            return(Json(ModelState.ToDataSourceResult()));
        }
Example #2
0
 public Screen()
 {
     LSystem.AUTO_REPAINT = true;
     Screen.StaticCurrentSceen = this;
     this.runnables = new List<Runnable>(1);
     this.handler = LSystem.screenProcess;
     this.width = LSystem.screenRect.width;
     this.height = LSystem.screenRect.height;
     this.halfWidth = width / 2;
     this.halfHeight = height / 2;
     this.fristOrder = DRAW_USER_PAINT();
     this.secondOrder = DRAW_SPRITE_PAINT();
     this.lastOrder = DRAW_DESKTOP_PAINT();
     this.fristPaintFlag = true;
     this.secondPaintFlag = true;
     this.lastPaintFlag = true;
 }
Example #3
0
 protected virtual PaintOrder DRAW_DESKTOP_PAINT()
 {
     if (desktopOrder == null)
     {
         desktopOrder = new PaintOrder(DRAW_DESKTOP, this);
     }
     return desktopOrder;
 }
Example #4
0
 protected virtual PaintOrder DRAW_SPRITE_PAINT()
 {
     if (spriteOrder == null)
     {
         spriteOrder = new PaintOrder(DRAW_SPRITE, this);
     }
     return spriteOrder;
 }
Example #5
0
 protected virtual PaintOrder DRAW_USER_PAINT()
 {
     if (userOrder == null)
     {
         userOrder = new PaintOrder(DRAW_USER, this);
     }
     return userOrder;
 }
Example #6
0
 public virtual void SetLastOrder(PaintOrder lastOrder)
 {
     if (lastOrder == null)
     {
         this.lastPaintFlag = false;
     }
     else
     {
         this.lastPaintFlag = true;
         this.lastOrder = lastOrder;
     }
 }
Example #7
0
 public virtual void SetSecondOrder(PaintOrder secondOrder)
 {
     if (secondOrder == null)
     {
         this.secondPaintFlag = false;
     }
     else
     {
         this.secondPaintFlag = true;
         this.secondOrder = secondOrder;
     }
 }
Example #8
0
 public virtual void SetFristOrder(PaintOrder fristOrder)
 {
     if (fristOrder == null)
     {
         this.fristPaintFlag = false;
     }
     else
     {
         this.fristPaintFlag = true;
         this.fristOrder = fristOrder;
     }
 }
Example #9
0
 public Screen()
 {
     LSystem.AUTO_REPAINT = true;
     Screen.StaticCurrentSceen = this;
     this.log = LogFactory.GetInstance(GetType());
     this.runnables = new List<Runnable>(1);
     this.handler = LSystem.screenProcess;
     this.width = LSystem.screenRect.width;
     this.height = LSystem.screenRect.height;
     this.halfWidth = width / 2;
     this.halfHeight = height / 2;
     this.fristOrder = DRAW_USER;
     this.secondOrder = DRAW_SPRITE;
     this.lastOrder = DRAW_DESKTOP;
     this.fristPaintFlag = true;
     this.secondPaintFlag = true;
     this.lastPaintFlag = true;
     this.SetFPS(GetMaxFPS());
 }
Example #10
0
 public ActionResult Create([DataSourceRequest] DataSourceRequest request, PaintOrder order)
 {
     OrderRepository.Insert(order);
     return(Json(new[] { order }.ToDataSourceResult(request, ModelState)));
 }