陈嘉乐
2020-09-02 652243206427f35a256400a149a1734085824cb9
ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs
@@ -72,25 +72,20 @@
            frameLogo.Height = Application.GetRealHeight(484);
            frameLogo.BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
            bodyFrameLayout.AddChidren(frameLogo);
            //图标的容器
            var frameLogoBackground = new FrameLayoutBase();
            frameLogoBackground.Y = Application.GetRealHeight(104);
            frameLogoBackground.Width = this.GetPictrueRealSize(167);
            frameLogoBackground.Height = this.GetPictrueRealSize(167);
            frameLogoBackground.Gravity = Gravity.CenterHorizontal;
            frameLogoBackground.BackgroundColor = ZigbeeColor.Current.GXCButtonBlackSelectedColor;
            frameLogoBackground.Radius = (uint)Application.GetRealHeight(37);
            frameLogo.AddChidren(frameLogoBackground);
            //图标
            var btnLogo = new IconViewControl(144);
            btnLogo.UnSelectedImagePath = "Account/Logo_White.png";
            btnLogo.Gravity = Gravity.Center;
            frameLogoBackground.AddChidren(btnLogo);
            //HDL Home
            var btnLogo = new ImageView();
            btnLogo.Y = Application.GetRealHeight(104);
            btnLogo.Width = this.GetPictrueRealSize(167);
            btnLogo.Height = this.GetPictrueRealSize(167);
            btnLogo.Radius = (uint)Application.GetRealHeight(37);
            btnLogo.ImagePath = "Account/Logo_Evoyo.png";
            btnLogo.Gravity = Gravity.CenterHorizontal;
            frameLogo.AddChidren(btnLogo);
            //Evoyo Home
            var btnName = new NormalViewControl(700, 60, true);
            btnName.Y = Application.GetRealHeight(294);
            btnName.Gravity = Gravity.CenterHorizontal;
            btnName.Text = "HDL Home";
            btnName.Text = "Evoyo Home";
            btnName.TextSize = 15;
            btnName.TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor;
            btnName.TextAlignment = TextAlignment.Center;
@@ -111,11 +106,17 @@
            listView.Height = Application.GetRealHeight(500);
            bodyFrameLayout.AddChidren(listView);
            //服务协议
            //var rowService = new FrameRowControl(listView.rowSpace / 2);
            //listView.AddChidren(rowService);
            //rowService.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.SLA), 400);
            //rowService.AddRightArrow();
            //rowService.AddBottomLine();
            var rowService = new FrameRowControl(listView.rowSpace / 2);
            listView.AddChidren(rowService);
            rowService.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.SLA), 400);
            rowService.AddRightArrow();
            rowService.AddBottomLine();
            rowService.ButtonClickEvent += (sender, e) =>
            {
                var form = new SLAForm();
                form.AddForm();
            };
            //版本更新
            this.rowUpdate = new FrameRowControl(listView.rowSpace / 2);
            listView.AddChidren(rowUpdate);
@@ -166,18 +167,6 @@
            });
        }
        /// <summary>
        /// CheckVersion
        /// </summary>
        private void CheckVersion()
        {
            new System.Threading.Thread(async () =>
            {
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 设置进度控件不可见
        /// </summary>
@@ -231,7 +220,7 @@
#elif Android
            try
            {
                var versionResult = await RequestHttpsAndroidAppVersionAsync();
                var versionResult = RequestHttpsAndroidAppVersionAsync();
                if (versionResult == null)
                {
                    return false;
@@ -267,7 +256,7 @@
                };
                var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestObj);
                var bytesTotalLengthResult = await CommonPage.Instance.RequestHttpsZigbeeAsync("FirmwareMana/DownloadPlatformUploadFirmwarePreLength", Encoding.UTF8.GetBytes(requestJson));
                var bytesTotalLengthResult = CommonPage.Instance.RequestHttpsZigbeeAsync("FirmwareMana/DownloadPlatformUploadFirmwarePreLength", Encoding.UTF8.GetBytes(requestJson));
                if (bytesTotalLengthResult == null || bytesTotalLengthResult.ResponseData == null)
                {
                    CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.UpdateAppFail);
@@ -350,7 +339,7 @@
            if (Android.OS.BuildVersionCodes.M < Android.OS.Build.VERSION.SdkInt)
            {
                //参数1 上下文, 参数2 Provider主机地址 和配置文件中保持一致   参数3  共享的文件
                var apkUri = Android.Support.V4.Content.FileProvider.GetUriForFile(context, "com.hdl.home.fileProvider", file);
                var apkUri = Android.Support.V4.Content.FileProvider.GetUriForFile(context, "com.evoyo.home.fileProvider", file);
                //添加这一句表示对目标应用临时授权该Uri所代表的文件
                intent.AddFlags(Android.Content.ActivityFlags.GrantReadUriPermission);
                intent.SetDataAndType(apkUri, "application/vnd.android.package-archive");
@@ -366,7 +355,7 @@
        /// 获取 Android-APP 版本信息
        /// </summary>
        /// <returns>The https app version async.</returns>
        private async System.Threading.Tasks.Task<Common.ResponseEntity.ApkInfoOBJ> RequestHttpsAndroidAppVersionAsync()
        private Common.ResponseEntity.ApkInfoOBJ RequestHttpsAndroidAppVersionAsync()
        {
            try
            {
@@ -376,7 +365,7 @@
                    RequestVersion = CommonPage.CodeIDString
                };
                var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestOBJ);
                var result = await CommonPage.Instance.RequestHttpsZigbeeAsync("FirmwareMana/DetectionPlatformUploadFirmware", System.Text.Encoding.UTF8.GetBytes(requestJson));
                var result = CommonPage.Instance.RequestHttpsZigbeeAsync("FirmwareMana/DetectionPlatformUploadFirmware", System.Text.Encoding.UTF8.GetBytes(requestJson));
                if (result == null)
                {
                    return null;