wxr
2020-11-12 a715181089be0d31cd737a5367ffd02690b9d77f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
using System;
using System.Collections.Generic;
using HDL_ON.DAL;
using HDL_ON.Entity;
using Shared;
 
namespace HDL_ON
{
    [System.Serializable]
    public class OnAppConfig
    {
 
        static OnAppConfig instance;
        public static OnAppConfig Instance {
            get {
                if (instance == null) {
                    try {
                        var userConfigBytes = FileUtils.ReadFile ("OnAppConfig");
                        var userConfigString = System.Text.Encoding.UTF8.GetString (userConfigBytes);
                        OnAppConfig temp = null;
                        if (userConfigString != null) {
                            temp = Newtonsoft.Json.JsonConvert.DeserializeObject<OnAppConfig> (userConfigString);
                        }
                        if (temp == null) {
                            instance = new OnAppConfig { };
                        } else {
                            instance = temp;
                        }
                    } catch { }
                }
                return instance;
            }
        }
 
        byte [] GetUserConfigBytes ()
        {
            return System.Text.Encoding.UTF8.GetBytes (Newtonsoft.Json.JsonConvert.SerializeObject (this));
        }
 
        public void RefreshUserConfig ()
        {
            instance = null;
        }
 
        public void SaveUserConfig ()
        {
            FileUtils.WriteFileByBytes ("OnAppConfig", GetUserConfigBytes ());
        }
        /// <summary>
        /// 信息推送标记
        /// </summary>
        public string PushDeviceToken;
 
        public string SetLanguage = "";
 
        /// <summary>
        /// 软件解锁界面
        /// 1:启动时
        /// 2:布防撤防时
        /// 3:远程开锁时
        /// </summary>
        public List<string> appUnlockPage = new List<string>();
        /// <summary>
        /// 软件解锁方式
        /// 1:数字密码
        /// 2:手势密码
        /// 3:指纹密码
        /// 4:面容ID
        /// </summary>
        public List<string> appUnlockType = new List<string>();
        /// <summary>
        /// 软件解锁密码
        /// </summary>
        public string appUnlockPasswrod = "";
        /// <summary>
        /// 解锁时间
        /// </summary>
        public DateTime unlockTime = DateTime.MinValue;
    }
}