Exemplo n.º 1
0
 public void OnUpdate()
 {
     if (!IsActive)
     {
         return;
     }
     _flashLightModel.Rotation();
     if (_flashLightModel.EditBatteryCharge())
     {
         _flashLightUi.Text = _flashLightModel.BatteryChargeCurrent;
     }
     else
     {
         Off();
     }
 }
Exemplo n.º 2
0
        public void Execute()
        {
            if (!IsActive && _flashLightModel.BatteryFull())
            {
                return;
            }


            _flashLightModel.Rotation();
            if (_flashLightModel.EditBatteryCharge())
            {
                UiInterface.FlashLightUiBar.Fill = _flashLightModel.BatteryChargeCurrent / _flashLightModel.BatteryChargeMax;
                UiInterface.FlashLightUiBar.SetColor(_flashLightModel.LowBattery() ? Color.red : Color.yellow);
            }
            else
            {
                Off();
            }
        }
Exemplo n.º 3
0
        public void Execute()
        {
            if (!IsActive)
            {
                _flashLightModel.Recharge();
                _flashLightUi.ProgressAmount = _flashLightModel.BatteryChargeCurrent;
                return;
            }

            _flashLightModel.Rotation();
            if (_flashLightModel.EditBatteryCharge())
            {
                _flashLightUi.Text           = _flashLightModel.BatteryChargeCurrent;
                _flashLightUi.ProgressAmount = _flashLightModel.BatteryChargeCurrent;
            }
            else
            {
                Off();
            }
        }
Exemplo n.º 4
0
        public override void OnUpdate()
        {
            if (!IsActive)
            {
                return;
            }

            if (_flashLight == null)
            {
                return;
            }
            _flashLight.Rotation();
            if (_flashLight.EditBatteryCharge())
            {
                UiInterface.LightUiText.Text = _flashLight.BatteryChargeCurrent;
            }
            else
            {
                Off();
            }
        }
Exemplo n.º 5
0
        public override void OnUpdate()
        {
            if (!IsActive)
            {
                return;
            }

            if (_flashLight == null)
            {
                return;
            }
            _flashLight.Rotation();
            if (_flashLight.EditBatteryCharge())
            {
                _flashLightUi.Text = _flashLight.BatteryChargeCurrent;
                _flashLightUIImage.Size(10, _flashLight.BatteryChargeCurrent);
            }
            else
            {
                //Off();
            }
        }
Exemplo n.º 6
0
        public void Execute()
        {
            if (!IsActive)
            {
                return;
            }
            if (_flashLightModel.EditBatteryCharge())
            {
                UiInterface.LightUiText.Text     = _flashLightModel.BatteryChargeCurrent;
                UiInterface.FlashLightUiBar.Fill = _flashLightModel.Charge;
                _flashLightModel.Rotation();

                if (_flashLightModel.LowBattery())
                {
                    UiInterface.FlashLightUiBar.SetColor(Color.red);
                }
            }
            else
            {
                Off();
            }
        }