/// <summary> /// 修改聊天设置 /// </summary> /// <param name="item"></param> /// <param name="newValue"></param> public void ModifyChatSetting(ChatSettingIndex item, string newValue) { if (currentChatSettingTable.ContainsKey(item)) { currentChatSettingTable[item] = newValue; } }
public int GetChatSettingIntValue(ChatSettingIndex item) { int nValue = 0; if (currentChatSettingTable.ContainsKey(item)) { nValue = Int32.Parse(currentChatSettingTable[item]); } return(nValue); }
public bool GetChatSettingBoolValue(ChatSettingIndex item) { bool bValue = true; if (currentChatSettingTable.ContainsKey(item)) { bValue = Int32.Parse(currentChatSettingTable[item]) == 1 ? true : false; } return(bValue); }
public string GetChatSettingStringValue(ChatSettingIndex item) { string stValue = ""; if (currentChatSettingTable.ContainsKey(item)) { stValue = currentChatSettingTable[item]; } return(stValue); }
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]; } } } } }