Esempio n. 1
0
        public static ModSpecialtopic ArrToModSpecialtopic(String[] arr)
        {
            ModSpecialtopic specialtopic = new ModSpecialtopic();

            specialtopic.ID = arr[0];
            specialtopic.SpecialTopicCode = String.IsNullOrEmpty(arr[8]) ? arr[0] : arr[8];
            specialtopic.SpecialTopicName = arr[1];
            specialtopic.CateGoryCode     = String.IsNullOrEmpty(arr[9]) ? arr[2] : arr[9];
            if (arr[6] != String.Empty)
            {
                specialtopic.IsImportant = int.Parse(arr[6]);
            }
            if (arr[5] != String.Empty)
            {
                specialtopic.IsShowBlock = int.Parse(arr[5]);
            }
            if (arr[4] != String.Empty)
            {
                specialtopic.SortCode = int.Parse(arr[4]);
            }
            if (arr[7] != String.Empty)
            {
                specialtopic.Version = String.IsNullOrEmpty(arr[11]) ? int.Parse(arr[7]) : int.Parse(arr[11]);
            }
            specialtopic.HlepUrl = arr[10];
            return(specialtopic);
        }
Esempio n. 2
0
        private static List <BindingType> Deserialize(String data)
        {
            List <BindingType> list = new List <BindingType>();

            char[]   separator = new char[] { '}' };
            String[] strArray  = data.Split(separator, StringSplitOptions.RemoveEmptyEntries);
            for (int i = 0; i < strArray.Length; i++)
            {
                char[]      chArray2 = new char[] { '◎' };
                String[]    arr      = strArray[i].Split(chArray2);
                BindingType item     = new BindingType();
                item.ID       = arr[0];
                item.Name     = arr[1];
                item.ParentID = arr[2];
                item.Category = arr[3];
                if (arr[4] != String.Empty)
                {
                    item.OrderNum = int.Parse(arr[4]);
                }
                ModSpecialtopic specialtopic = ArrToModSpecialtopic(arr);
                item.Entity = specialtopic;
                if (item.ParentID != "9999")
                {
                    list.Add(item);
                }
            }
            return(list);
        }
Esempio n. 3
0
        public int CompareTo(object obj)
        {
            ModSpecialtopic specialtopic = obj as ModSpecialtopic;

            if (this.SortCode < specialtopic.SortCode)
            {
                return(-1);
            }
            if (this.SortCode == specialtopic.SortCode)
            {
                return(0);
            }
            return(1);
        }
Esempio n. 4
0
        public object Clone()
        {
            ModSpecialtopic specialtopic1 = new ModSpecialtopic();

            specialtopic1.CateGoryCode     = this.CateGoryCode;
            specialtopic1.CateGoryName     = this.CateGoryName;
            specialtopic1.CateGorySortCode = this.CateGorySortCode;
            specialtopic1.ConfigFileName   = this.ConfigFileName;
            specialtopic1.DescRiption      = this.DescRiption;
            specialtopic1.EngName          = this.EngName;
            specialtopic1.ID               = this.ID;
            specialtopic1.IsImportant      = this.IsImportant;
            specialtopic1.IsShowBlock      = this.IsShowBlock;
            specialtopic1.SortCode         = this.SortCode;
            specialtopic1.SpecialTopicCode = this.SpecialTopicCode;
            specialtopic1.SpecialTopicName = this.SpecialTopicName;
            specialtopic1.UpdateID         = this.UpdateID;
            specialtopic1.UpdatePerson     = this.UpdatePerson;
            specialtopic1.Version          = this.Version;
            specialtopic1.HlepUrl          = this.HlepUrl;
            return(specialtopic1);
        }