public override void SaveToAutoCat(AutoCat autocat)
        {
            AutoCatGroup ac = autocat as AutoCatGroup;

            if (ac == null)
            {
                return;
            }

            ac.Autocats = GetGroup();
        }
        public override void LoadFromAutoCat(AutoCat autocat)
        {
            AutoCatGroup ac = autocat as AutoCatGroup;

            current = autocat;
            if (ac == null)
            {
                return;
            }

            FillAutocatList(ac.Autocats);
        }
Пример #3
0
        /// <summary>
        /// </summary>
        /// <param name="xElement"></param>
        /// <returns></returns>
        public static AutoCat LoadAutoCatFromXmlElement(XmlElement xElement)
        {
            switch (xElement.Name)
            {
            case AutoCatGenre.TypeIdString:
                return(AutoCatGenre.LoadFromXmlElement(xElement));

            case AutoCatFlags.TypeIdString:
                return(AutoCatFlags.LoadFromXmlElement(xElement));

            case AutoCatTags.TypeIdString:
                return(AutoCatTags.LoadFromXmlElement(xElement));

            case AutoCatYear.TypeIdString:
                return(AutoCatYear.LoadFromXmlElement(xElement));

            case AutoCatUserScore.TypeIdString:
                return(AutoCatUserScore.LoadFromXmlElement(xElement));

            case AutoCatHltb.TypeIdString:
                return(AutoCatHltb.LoadFromXmlElement(xElement));

            case AutoCatManual.TypeIdString:
                return(AutoCatManual.LoadFromXmlElement(xElement));

            case AutoCatDevPub.TypeIdString:
                return(AutoCatDevPub.LoadFromXmlElement(xElement));

            case AutoCatGroup.TypeIdString:
                return(AutoCatGroup.LoadFromXmlElement(xElement));

            case AutoCatName.TypeIdString:
                return(AutoCatName.LoadFromXmlElement(xElement));

            default:
                return(null);
            }
        }
Пример #4
0
 protected AutoCatGroup(AutoCatGroup other) : base(other)
 {
     Filter   = other.Filter;
     Autocats = new List <string>(other.Autocats);
     Selected = other.Selected;
 }