示例#1
0
        public static void InsertMap(string col, string row, string type)
        {
            Excel.Range rngText = usedRange.get_Range(col + row, Missing.Value);
            Excel.Range rngID   = (Excel.Range)usedRange.Cells[rngText.Row, rngText.Column - 1];

            lock (thisLock)
            {
                if (rngText.Value2 == null || rngID.Value2 == null)
                {
                    return;
                }

                string keyText = rngText.Value2.ToString();
                if (currMap.ContainsKey(keyText))
                {
                    return;
                }

                TextAllData data = new TextAllData();
                data.id     = rngID.Value2.ToString();
                data.type   = type;
                data.colRow = col + row;

                currMap.Add(keyText, data);
            }
        }
示例#2
0
        public static string ConvertTag(string text)
        {
            // 캐시에 있는지 찾아본다.
            string strConvertText;

            if (dicConvertTag.TryGetValue(text, out strConvertText))
            {
                return(strConvertText);
            }

            TextAllData   data = null;
            StringBuilder sbConvertText;
            bool          bExist = false;

            if (MH4Global.localSource == LocalizeSource.LOCAL_KOREAN)
            {
                if (textDataMap.TryGetValue(text, out data))
                {
                    bExist = true;
                }
            }

            if (bExist)
            {
                sbConvertText = new StringBuilder(data.type);
                sbConvertText.Append(" = \"");
                sbConvertText.Append(data.id);
                sbConvertText.Append("\"");

                dicConvertTag.Add(text, sbConvertText.ToString());   // 캐시에 넣어둔다

                return(sbConvertText.ToString());
            }

            return(strConvertText);
        }