Update() public method

public Update ( ) : void
return void
示例#1
0
        public async void UpdateDevice_ActionExecutes_ReturnResultWithDeviceDto()
        {
            SliderDto deletedData = Sliders.Find(x => x.Id == 1);

            _mockSliderService.Setup(x => x.Update(deletedData, 1)).ReturnsAsync(Response <NoDataDto> .Success(200));
            var result = await _sliderController.Update(deletedData);

            Assert.IsType <ObjectResult>(result);

            ButtonDto deletedButtonData = Buttons.Find(x => x.Id == 1);

            _mockButtonService.Setup(x => x.Update(deletedButtonData, 1)).ReturnsAsync(Response <NoDataDto> .Success(200));
            var resultButton = await _buttonController.Update(deletedButtonData);

            Assert.IsType <ObjectResult>(resultButton);
        }
示例#2
0
        public void UpdateButtons()
        {
            buttons.Update();
            int index = DataUtil.IndexOf(view.cellButtons, buttons.view.target);

            if (0 <= index)
            {
                model.Select(index);
            }
        }
示例#3
0
        private void UpdateButtons()
        {
            buttons.Update();
            int letterButtonIndex = DataUtil.IndexOf(view.letterButtons, buttons.view.target);

            if (0 <= letterButtonIndex)
            {
                model.Toggle(letterButtonIndex);
            }
            else if (view.exitButton == buttons.view.target)
            {
                model.Exit();
            }
            else if (view.hintButton == buttons.view.target)
            {
                model.Hint();
            }
        }
示例#4
0
 public void Update()
 {
     buttons.Update();
     model.Update();
     if (buttons.isAnyNow)
     {
         int index = -1;
         if (model.IsInMenu())
         {
             if (null != view)
             {
                 var items = view.buttons[model.menuIndex];
                 index = items.IndexOf(buttons.view.target);
             }
             if (index <= -1)
             {
                 index = StringUtil.ParseIndex(buttons.downName);
             }
             if (0 <= index)
             {
                 model.Select(index);
             }
             else
             {
                 index = view.exitButtons.IndexOf(buttons.view.target);
                 if (0 <= index)
                 {
                     model.Exit();
                 }
             }
         }
     }
     ViewButtons();
     if (null != view && null != model.menuName)
     {
         AnimationView.SetState(view.animatorOwner, model.menuName);
     }
 }