Exemple #1
0
        public override AbstractContext DeepCopy()
        {
            StringListContext newCopy = new StringListContext(this.ContextType) { Name = this.Name, Description = this.Description, Value = this.Value };

            foreach (String item in this.Value)
                newCopy.Value.Add(item);

            return newCopy;
        }
        public override List<AbstractContext> GetDefaultOptions()
        {
            List<AbstractContext> lst = base.GetDefaultOptions();
            if (lst == null) lst = new List<AbstractContext>();

            BooleanContext bo = new BooleanContext(BooleanContext.BCType.AlsoBefore) { Value = true };
            lst.Add(bo);

            bo = new BooleanContext(BooleanContext.BCType.ThenAlso) { Value = true };
            lst.Add(bo);

            List<String> value = new List<string>() 
            { 
                "cim0", "cim1", "cim2", "cim2eo", "cim3", "cim3eo", "cim4", "cim4eo", "felsorolas", "jegyzet", "cim", "szerzo" 
            };
            StringListContext sto = new StringListContext(StringListContext.SLType.Styles) { Value = value };
            lst.Add(sto);

            return lst;
        }
Exemple #3
0
        protected List<string> getStringListOptionValue(StringListContext.SLType id)
        {
            foreach (var item in this.Options)
                if (item is StringListContext && (item as StringListContext).ContextType.Equals(id)) return (item as StringListContext).Value;

            throw new OptionNotFoundException();
        }