Example #1
0
 /// <summary>
 /// 修改聊天设置
 /// </summary>
 /// <param name="item"></param>
 /// <param name="newValue"></param>
 public void ModifyChatSetting(ChatSettingIndex item, string newValue)
 {
     if (currentChatSettingTable.ContainsKey(item))
     {
         currentChatSettingTable[item] = newValue;
     }
 }
Example #2
0
        public int GetChatSettingIntValue(ChatSettingIndex item)
        {
            int nValue = 0;

            if (currentChatSettingTable.ContainsKey(item))
            {
                nValue = Int32.Parse(currentChatSettingTable[item]);
            }
            return(nValue);
        }
Example #3
0
        public bool GetChatSettingBoolValue(ChatSettingIndex item)
        {
            bool bValue = true;

            if (currentChatSettingTable.ContainsKey(item))
            {
                bValue = Int32.Parse(currentChatSettingTable[item]) == 1 ? true : false;
            }
            return(bValue);
        }
Example #4
0
        public string GetChatSettingStringValue(ChatSettingIndex item)
        {
            string stValue = "";

            if (currentChatSettingTable.ContainsKey(item))
            {
                stValue = currentChatSettingTable[item];
            }
            return(stValue);
        }
Example #5
0
        private void LoadLocalAndCoverConfig()
        {
            List <PlayerSettingData> tempList;

            if (PlayerSettingLocalConfig.PlayerSettingLocalConfig.Instance.GetLocalData(PlayerSettingDataType.ChatSetting, out tempList))
            {
                foreach (PlayerSettingData data in tempList)
                {
                    System.Object resultObj = null;
                    if (StringHelper.StringToEnum(typeof(ChatSettingIndex), data.m_DataName, out resultObj))
                    {
                        ChatSettingIndex index = (ChatSettingIndex)resultObj;
                        if (currentChatSettingTable.ContainsKey(index))
                        {
                            currentChatSettingTable[index] = data.m_DataValueList[0];
                        }
                    }
                }
            }
        }