黄学彪
2020-01-09 fa6bcb2e9907772480f99205f36ec2a1ce735a22
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
@@ -421,7 +421,7 @@
                                catch (Exception ex)
                                {
                                    //出现未知错误,数据丢失
                                    var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnknownErrorAndDataLost));
                                    var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnKnownError));
                                    alert.Show();
                                    //Log出力
@@ -456,7 +456,7 @@
                                    catch (Exception ex)
                                    {
                                        //出现未知错误,数据丢失
                                        var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnknownErrorAndDataLost));
                                        var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnKnownError));
                                        alert.Show();
                                        //Log出力
@@ -824,6 +824,16 @@
                //消息记录重新读取及检测
                ControlCommonResourse.ReadMessageAgain = true;
                ControlCommonResourse.HadNewMessage = false;
                HdlThreadLogic.Current.RunMain(() =>
                {
                    for (int i = 0; i < ControlCommonResourse.listMessageManaContr.Count; i++)
                    {
                        //显示角标特效
                        ControlCommonResourse.listMessageManaContr[i].IsSelected = false;
                    }
                });
                //加载账号配置信息
                var optionInfo = UserCenterResourse.Option.Load();
                UserCenterResourse.Option = optionInfo;
@@ -888,6 +898,8 @@
                    //开启自动备份提示
                    HdlAutoBackupLogic.ShowAutoBackupPromptedForm();
                }
                //显示引导界面
                ShowGuideForm(result);
            }
            //APP缓存加载完成
            UserCenterResourse.Option.AppCanSignout = true;
@@ -1182,6 +1194,36 @@
        #endregion
        #region ■ 引导界面___________________________
        /// <summary>
        /// 显示引导界面
        /// </summary>
        /// <param name="result">同步结果 -1:异常   0:已经同步过,不需要同步  1:正常同步  2:没有自动备份数据</param>
        private static void ShowGuideForm(int result)
        {
            var checkFile = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, DirNameResourse.GuideFile);
            if (System.IO.File.Exists(checkFile) == true)
            {
                //不需要显示
                return;
            }
            if (result == 2 && Config.Instance.Home.IsOthreShare == false)
            {
                HdlThreadLogic.Current.RunMain(() =>
                {
                    var form = new Guide.GuideHouseForm();
                    form.ShowFrom();
                });
            }
            //创建一个空文件(标识已经完成引导)
            var file = System.IO.File.Create(checkFile);
            file.Close();
        }
        #endregion
        #region ■ 16进制转化_________________________
        /// <summary>
@@ -1292,6 +1334,21 @@
        }
        #endregion
        #region ■ 时间转换___________________________
        /// <summary>
        /// 将utc时间类型的字符串,转换为本地时间
        /// </summary>
        /// <param name="timeText"></param>
        /// <returns></returns>
        public static DateTime ConvertUtcTimeToLocalTime(string timeText)
        {
            var utcTime = Convert.ToDateTime(timeText);
            return TimeZoneInfo.ConvertTimeFromUtc(utcTime, TimeZoneInfo.Local);
        }
        #endregion
        #region ■ 文件保存和读取_____________________
        /// <summary>