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;
        }
Esempio n. 2
0
        // TODO 5 egyszerusiteni
        //   1) a viszatérési értéket ref paraméterként kapná? Object-ként?

        //   2)
        //protected R getOptionValue<T,R>(AbstractOption id) where T : AbstractOption
        //{
        //    foreach (AbstractOption item in this.options)
        //        if (item is T && item.Key.Equals(id)) return ((T)item).Value;

        //    throw new OptionNotFoundException();
        //}
        //

        protected Boolean getBooleanContextValue(BooleanContext.BCType id)
        {
            foreach (var item in this.Options)
                if (item is BooleanContext && (item as BooleanContext).ContextType.Equals(id)) return (item as BooleanContext).Value;

            throw new OptionNotFoundException();
        }