示例#1
0
        private int GetTag()
        {
            string str = this._comboxBoxTag.SelectedItem as string;

            if (str == null || str.Length < 1)
            {
                return(0);
            }
            return(DHelper.GetTag(str));
        }
示例#2
0
        private static List <TagItem> GetTagItemList()
        {
            string[] tagList = DHelper.GetTagNames();
            SortedList <string, TagItem> slist = new SortedList <string, TagItem>();

            foreach (string str in tagList)
            {
                TagItem ti = new TagItem();
                ti.EnumName    = str;
                ti.Tag         = DHelper.GetTag(str);
                ti.DisplayName = str.TrimStart('k');
                slist.Add(ti.DisplayName, ti);
            }
            List <TagItem> tlist = new List <TagItem>();

            foreach (KeyValuePair <string, TagItem> p in slist)
            {
                tlist.Add(p.Value);
            }
            return(tlist);
        }