| | |
| | | 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); |
| | | |
| | | //进度显示文本 |
| | |
| | | //更新状态变化的事件
|
| | | 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) =>
|
| | |
| | | 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)
|