public bool LoadTextGroup(string strTextGroupKey, string strFileName, string strFilePath, bool useFileNameEncryption = false) { string key = strTextGroupKey.ToLower(); try { NTextGroup nTextGroup = null; bool result; if (!this.m_TextGroups.TryGetValue(key, out nTextGroup)) { if (!this.RegistTextGroup(strTextGroupKey, useFileNameEncryption)) { result = false; return(result); } this.m_TextGroups.TryGetValue(key, out nTextGroup); } result = nTextGroup.LoadFromFile(strFileName, strFilePath, "[Table]"); return(result); } catch (Exception output) { this._OutputDebugLine(output); } return(false); }
public string GetText(string groupKey, string textKey, string srcText = "") { try { string key = groupKey.ToLower(); NTextGroup nTextGroup = null; string result; if (this.m_TextGroups.TryGetValue(key, out nTextGroup)) { result = nTextGroup.GetText(textKey); return(result); } string text = textKey.Replace("\r", "\\r"); text = text.Replace("\r\n", "◀┘"); text = text.Replace("\n", "\\n"); text = text.Replace("\t", "\\t"); string text2 = groupKey.Replace("\r", "\\r"); text2 = text2.Replace("\r\n", "◀┘"); text2 = text2.Replace("\n", "\\n"); text2 = text2.Replace("\t", "\\t"); if (srcText == string.Empty) { result = string.Format("(noTextGroup:{0},{1})", text2, text); return(result); } result = string.Format("(noTextGroup:{0},{1},{2})", text2, text, srcText); return(result); } catch (Exception output) { this._OutputDebugLine(output); } return(string.Format("(Exception:{0}, {1})", groupKey, textKey)); }
public string[] GetGroupList() { string[] array = new string[this.GroupCount]; int num = 0; foreach (KeyValuePair <string, NTextGroup> current in this.m_TextGroups) { NTextGroup value = current.Value; array[num] = value.Name; num++; } return(array); }
public bool SetGroupText(string _GroupText, bool useFileNameEncryption) { NTextGroup nTextGroup = null; string key = _GroupText.ToLower(); if (!this.m_TextGroups.TryGetValue(key, out nTextGroup)) { if (!this.RegistTextGroup(_GroupText, useFileNameEncryption)) { return(false); } this.m_TextGroups.TryGetValue(key, out nTextGroup); } return(true); }
public override string ToString() { StringBuilder stringBuilder = new StringBuilder(1024); stringBuilder.AppendLine(":NTextManager -------------------------------"); stringBuilder.AppendFormat(" 그룹 수: {0}", this.GroupCount); stringBuilder.AppendLine(); foreach (KeyValuePair <string, NTextGroup> current in this.m_TextGroups) { NTextGroup value = current.Value; stringBuilder.Append(value.ToString()); } stringBuilder.AppendLine("---------------------------------------------"); stringBuilder.AppendFormat("Total Text Count : {0}", this.TextCount); return(stringBuilder.ToString()); }
public bool LoadTextGroupFromContext(string strTextGroupKey, string strContext) { string key = strTextGroupKey.ToLower(); try { NTextGroup nTextGroup = null; bool result; if (this.m_TextGroups.TryGetValue(key, out nTextGroup)) { result = nTextGroup.LoadFromContext(strContext); return(result); } result = false; return(result); } catch (Exception output) { this._OutputDebugLine(output); } return(false); }
public bool SetText(string strGroupKey, string strTextKey, string strText) { NTextGroup textGroup = this.GetTextGroup(strGroupKey); return(textGroup != null && textGroup.SetText(strTextKey, strText)); }