黄学彪
2019-11-25 5727cf0b9b54da0a191dd1e23cb5abf21320fbff
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFirmwareUpdateForm.cs
@@ -51,7 +51,7 @@
            frameBack.BackgroundColor = UserCenterColor.Current.White;
            frameBack.Gravity = Gravity.CenterHorizontal;
            frameBack.Y = Application.GetRealHeight(683);
            frameBack.Radius = (uint)Application.GetMinRealAverage(6);
            frameBack.Radius = 6;
            bodyFrameLayout.AddChidren(frameBack);
            //进度显示文本
@@ -121,30 +121,33 @@
            //更新状态变化的事件
            updateLogic.UpdateStatuChangedEvent += (div, msg) =>
            {
                if (div == -1)
                HdlThreadLogic.Current.RunMain(() =>
                {
                    //异常
                    this.ShowMassage(ShowMsgType.Tip, msg);
                    this.CloseForm();
                }
                else if (div == 0)
                {
                    //一般信息
                    btnText.Text = msg;
                }
                else if (div == 1)
                {
                    //升级完成
                    this.ShowMassage(ShowMsgType.Tip, msg);
                    //调用回调函数
                    this.FinishUpdateEvent?.Invoke();
                    this.CloseForm();
                }
                else if (div == 2)
                {
                    //主动终止升级
                    this.CloseForm();
                }
                    if (div == -1)
                    {
                        //异常
                        this.ShowMassage(ShowMsgType.Tip, msg);
                        this.CloseForm();
                    }
                    else if (div == 0)
                    {
                        //一般信息
                        btnText.Text = msg;
                    }
                    else if (div == 1)
                    {
                        //升级完成
                        this.ShowMassage(ShowMsgType.Tip, msg);
                        //调用回调函数
                        this.FinishUpdateEvent?.Invoke();
                        this.CloseForm();
                    }
                    else if (div == 2)
                    {
                        //主动终止升级
                        this.CloseForm();
                    }
                });
            };
            //进度值改变事件
            updateLogic.ProgressEvent += (value) =>
@@ -183,7 +186,9 @@
        public override void CloseForm()
        {
            //安卓可以点击系统的返回键
            UserView.HomePage.Instance.ScrollEnabled = true;
            Shared.Common.CommonPage.BackKeyCanClick = true;
            //升级对象
            if (FirmwareUpdateResourse.dicDeviceUpdateList.ContainsKey(deviceMac) == true
                && FirmwareUpdateResourse.dicDeviceUpdateList[deviceMac].IsFinishUpdate == true)