少年修仙传客户端代码仓库
client_Wu Xijin
2019-06-13 033958214c0b16d7e7b93cc821b018c295251867
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
public enum PrivateRemindBoolType
{
    NoDisturbing, //免打扰
    BossRefresh,  //boss刷新通知
    PrivateChat,//私聊消息通知
    OfflineDie, //脱机时死亡通知
    OfflinePluginStart, //脱机外挂开始通知
    OfflinePluginTimeDeficiency,
 
}
 
[XLua.LuaCallCSharp]
public class PrivateRemind : Singleton<HangUpSetModel>
 
{
    //const string 
    const string BoolSet_Key = "BoolSet";
    private StringBuilder _boolSetStr = new StringBuilder();
 
    #region 设置参数
    
    
    #endregion
 
    public void SetBoolSetStr(PrivateRemindBoolType dropType, bool isOpen)
    {
        _boolSetStr.Append(dropType + "_" + isOpen + "|");
        LocalSave.SetString(BoolSet_Key, _boolSetStr.ToString());
    }
 
    private string[] _boolStrs = null;
    private string[] _keyStrs = null;
    public bool GetBool(PrivateRemindBoolType type)
    {
        _boolStrs = LocalSave.GetString(BoolSet_Key).Split('|');
        int length = _boolStrs.Length;
        int i = 0;
        for (i = 0; i < length; i++)
        {
            if (_boolStrs[i].Length > 0)
            {
                _keyStrs = _boolStrs[i].Split('_');
                if (_keyStrs[0] == type.ToString())
                {
                    if (_keyStrs[1].Trim() == "True")
                        return true;
                    else if (_keyStrs[1].Trim() == "False")
                        return false;
 
                }
            }
        }
        return false;
    }
 
}