HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-08-11 26d1cdf2f5246c1ad7890e6740444c4a6a80e6fb
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
@@ -242,6 +242,7 @@
            List<string> listAllFile = null;
            //文件夹的全路径
            string fullDir = string.Empty;
            string localTemplateName = string.Empty;
            if (upPath == string.Empty)
            {
                //将模板数据保存到到指定的文件夹中
@@ -249,7 +250,8 @@
                var templateFile = TemplateData.TemplateCommonLogic.Current.SaveTemplateDataToFile(templateName, "HomeTemplate");
                //将模板bin文件移动到备份文件夹中
                try { System.IO.File.Move(templateFile, System.IO.Path.Combine(Config.Instance.FullPath, templateName)); }
                localTemplateName = System.IO.Path.Combine(Config.Instance.FullPath, templateName);
                try { System.IO.File.Move(templateFile, localTemplateName); }
                catch (Exception ex) { HdlLogLogic.Current.WriteLog(ex, "移动模板失败"); }
                //获取本地文件
@@ -314,6 +316,11 @@
                    //允许按系统的返回键
                    Shared.Common.CommonPage.BackKeyCanClick = true;
                    UserCenterResourse.AccountOption.AppCanSignout = true;
                    if (localTemplateName != string.Empty)
                    {
                        //删除掉这个模板文件
                        HdlFileLogic.Current.DeleteFile(localTemplateName);
                    }
                    return false;
                }
                //整理数据
@@ -334,6 +341,11 @@
                    //允许按系统的返回键
                    Shared.Common.CommonPage.BackKeyCanClick = true;
                    UserCenterResourse.AccountOption.AppCanSignout = true;
                    if (localTemplateName != string.Empty)
                    {
                        //删除掉这个模板文件
                        HdlFileLogic.Current.DeleteFile(localTemplateName);
                    }
                    return false;
                }
                //设置进度值
@@ -351,6 +363,11 @@
                    //允许按系统的返回键
                    Shared.Common.CommonPage.BackKeyCanClick = true;
                    UserCenterResourse.AccountOption.AppCanSignout = true;
                    if (localTemplateName != string.Empty)
                    {
                        //删除掉这个模板文件
                        HdlFileLogic.Current.DeleteFile(localTemplateName);
                    }
                    return false;
                }
@@ -366,10 +383,21 @@
                    //允许按系统的返回键
                    Shared.Common.CommonPage.BackKeyCanClick = true;
                    UserCenterResourse.AccountOption.AppCanSignout = true;
                    if (localTemplateName != string.Empty)
                    {
                        //删除掉这个模板文件
                        HdlFileLogic.Current.DeleteFile(localTemplateName);
                    }
                    return false;
                }
                //设置进度值
                ProgressFormBar.Current.SetValue(i + 1 + listNormalFile.Count, listFileCount);
            }
            if (localTemplateName != string.Empty)
            {
                //删除掉这个模板文件
                HdlFileLogic.Current.DeleteFile(localTemplateName);
            }
            //进度条关闭
@@ -761,6 +789,12 @@
                //显示设备历史版本(Debug用)
                UserCenterResourse.HideOption.DeviceHistory = 1;
            }
            checkKeys = UserCenterLogic.EncryptPassword(UserCenterResourse.FileEncryptKey, DirNameResourse.StartDebugAppFile + UserCenterResourse.UserInfo.Account);
            if (listFile.Contains(checkKeys) == true)
            {
                //开启后台调试App功能(Debug用)
                UserCenterResourse.HideOption.StartDebugApp = 1;
            }
            //恢复
            IMessageCommon.Current.IgnoreError = false;