JLChen
2020-12-03 11c4199c6015914b5de6d96fca3b478c0a852f9b
2020-12-03 1.OnAppConfig 配置文件检测处理,禁止删除。
4个文件已修改
35 ■■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/FileUtils.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/OnAppConfig.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,10 +1,15 @@
<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" />
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/MainPage.cs">
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/Entity/OnAppConfig.cs">
    <Files>
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs" Line="344" Column="45" IsPinned="True" />
      <File FileName="HDL_ON/Common/ImageUtlis.cs" Line="16" Column="28" />
      <File FileName="HDL_ON/Common/ImageUtlis.cs" Line="18" Column="8" />
      <File FileName="HDL_ON/UI/MainPage.cs" Line="28" Column="23" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs" Line="203" Column="42" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs" Line="1" Column="1" />
      <File FileName="HDL_ON/DAL/FileUtils.cs" Line="197" Column="122" />
      <File FileName="HDL_ON/Entity/OnAppConfig.cs" Line="15" Column="50" />
      <File FileName="HDL_ON/Entity/UserInfo.cs" Line="14" Column="49" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
@@ -16,9 +21,10 @@
                <Node name="DriverLayer" expanded="True" />
                <Node name="Server" expanded="True" />
              </Node>
              <Node name="Entity" expanded="True" />
              <Node name="Entity" expanded="True">
                <Node name="OnAppConfig.cs" selected="True" />
              </Node>
              <Node name="UI" expanded="True">
                <Node name="UI1-Login" expanded="True" />
                <Node name="UI2" expanded="True">
                  <Node name="3-Intelligence" expanded="True">
                    <Node name="Scene" expanded="True" />
@@ -32,7 +38,6 @@
                    <Node name="UnlockSetting" expanded="True" />
                  </Node>
                </Node>
                <Node name="MainPage.cs" selected="True" />
              </Node>
            </Node>
            <Node name="HDL-ON_Android" expanded="True">
HDL_ON/DAL/FileUtils.cs
@@ -79,11 +79,11 @@
            foreach (FileInfo NextFile in thFolders)
            {
                index++;
                if (NextFile.Name == "headImage.png")
                if (NextFile.Name.Contains(ImageUtlis.HEADIMAGE))
                {
                    continue;
                }
                if (NextFile.Name == "null" || NextFile.Name == "UserConfig" || NextFile.Name == "UserInfo_File" || NextFile.Name == "AccountListDB")
                if (NextFile.Name == "null" || NextFile.Name == "UserConfig" || NextFile.Name == "UserInfo_File" || NextFile.Name == "AccountListDB" || NextFile.Name == OnAppConfig.ConfigFile)
                {
                    continue;
                }
@@ -194,7 +194,7 @@
        /// <param name="fileName">File name.</param>
        public static void DeleteFile(string fileName)
        {
            if (fileName == null || fileName == "Language.ini" || fileName == "AccountListDB")
            if (fileName == null || fileName == "Language.ini" || fileName == "AccountListDB" || fileName == OnAppConfig.ConfigFile)
            {
                return;
            }
@@ -211,7 +211,7 @@
            for (int j = 0; j < filesList.Count; j++)
            {
                var f = filesList[j];
                if (f == "linphonerc" || f == "AccountListDB" || f == "UserInfo_File")
                if (f == "linphonerc" || f == "AccountListDB" || f == "UserInfo_File" || f == OnAppConfig.ConfigFile)
                    continue;
                DeleteFile(f);
            }
HDL_ON/Entity/OnAppConfig.cs
@@ -9,13 +9,17 @@
    [System.Serializable]
    public class OnAppConfig
    {
        /// <summary>
        /// 用户头像
        /// </summary>
        public const string ConfigFile = "OnAppConfig";
        static OnAppConfig instance;
        public static OnAppConfig Instance {
            get {
                if (instance == null) {
                    try {
                        var userConfigBytes = FileUtils.ReadFile ("OnAppConfig");
                        var userConfigBytes = FileUtils.ReadFile (ConfigFile);
                        var userConfigString = System.Text.Encoding.UTF8.GetString (userConfigBytes);
                        OnAppConfig temp = null;
                        if (userConfigString != null) {
@@ -51,7 +55,7 @@
        public void SaveUserConfig ()
        {
            FileUtils.WriteFileByBytes ("OnAppConfig", GetUserConfigBytes ());
            FileUtils.WriteFileByBytes (ConfigFile, GetUserConfigBytes ());
        }
        /// <summary>
        /// 信息推送标记
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
@@ -200,7 +200,7 @@
                    foreach (var fileName in backuplist)
                    {
                        System.IO.FileInfo fileInfo = new System.IO.FileInfo(FileUtils.RootPath + fileName);
                        if (fileName == "headImage.png")
                        if (fileName.Contains(ImageUtlis.HEADIMAGE) || fileName == OnAppConfig.ConfigFile)
                        {
                            continue;
                        }
@@ -219,7 +219,7 @@
                    //删除本地文件
                    foreach (var fileName in backuplist)
                    {
                        if (fileName == "headImage.png")
                        if (fileName.Contains(ImageUtlis.HEADIMAGE))
                        {
                            continue;
                        }