Esempio n. 1
0
 private List <string> ChoiceDicitionary(ShareString.Type type)
 {
     if (type >= (ShareString.Type) this.m_string_types.Count)
     {
         return((List <string>)null);
     }
     return(this.m_string_types[(int)type]);
 }
Esempio n. 2
0
        public string Get(ShareString.Type type, short index)
        {
            List <string> stringList = this.ChoiceDicitionary(type);

            if ((int)index == -1 || (int)index >= stringList.Count)
            {
                return(string.Empty);
            }
            return(stringList[(int)index]);
        }
Esempio n. 3
0
        public short Set(ShareString.Type type, string val)
        {
            if (string.IsNullOrEmpty(val))
            {
                return(-1);
            }
            List <string> stringList = this.ChoiceDicitionary(type);
            short         num        = (short)stringList.IndexOf(val);

            if ((int)num == -1)
            {
                if (stringList.Count >= (int)short.MaxValue)
                {
                    DebugUtility.LogError("The registered character has exceeded the prescribed value. ShareString.Type = " + (object)type + ", Please change short to int.");
                }
                num = (short)stringList.Count;
                stringList.Add(val);
            }
            return(num);
        }
Esempio n. 4
0
 public void Clear()
 {
     this.mIndexs = (short[])null;
     this.mType   = ShareString.Type.QuestParam_cond;
 }
Esempio n. 5
0
 public ShareStringList(ShareString.Type type)
 {
     this.mType = type;
 }