Exemplo n.º 1
0
        public EditorControl(EditorDefinition parent, WorldModel worldModel, Element source)
        {
            m_parent      = parent;
            m_worldModel  = worldModel;
            m_source      = source;
            m_controlType = source.Fields.GetString("controltype");
            m_caption     = source.Fields.GetString("caption");
            m_attribute   = source.Fields.GetString("attribute");
            if (source.Fields.HasType <int>("height"))
            {
                m_height = source.Fields.GetAsType <int>("height");
            }
            if (source.Fields.HasType <int>("width"))
            {
                m_width = source.Fields.GetAsType <int>("width");
            }
            if (source.Fields.HasType <bool>("expand"))
            {
                m_expand = source.Fields.GetAsType <bool>("expand");
            }
            m_visibilityHelper           = new EditorVisibilityHelper(parent, worldModel, source);
            IsControlVisibleInSimpleMode = !source.Fields.GetAsType <bool>("advanced");
            m_id = source.Name;

            if (source.Fields.HasString("filtergroup"))
            {
                parent.RegisterFilter(source.Fields.GetString("filtergroup"), source.Fields.GetString("filter"), m_attribute);
            }
        }
Exemplo n.º 2
0
        public EditorTab(EditorDefinition parent, WorldModel worldModel, Element source)
        {
            m_controls = new Dictionary <string, IEditorControl>();
            m_caption  = source.Fields.GetString("caption");
            IsTabVisibleInSimpleMode = !source.Fields.GetAsType <bool>("advanced");

            foreach (Element e in worldModel.Elements.GetElements(ElementType.EditorControl))
            {
                if (e.Parent == source)
                {
                    m_controls.Add(e.Name, new EditorControl(parent, worldModel, e));
                }
            }
            m_visibilityHelper = new EditorVisibilityHelper(parent, worldModel, source);
            m_source           = source;
        }
Exemplo n.º 3
0
        public EditorTab(EditorDefinition parent, WorldModel worldModel, Element source)
        {
            m_controls = new Dictionary<string, IEditorControl>();
            m_caption = source.Fields.GetString("caption");
            IsTabVisibleInSimpleMode = !source.Fields.GetAsType<bool>("advanced");

            foreach (Element e in worldModel.Elements.GetElements(ElementType.EditorControl))
            {
                if (e.Parent == source)
                {
                    m_controls.Add(e.Name, new EditorControl(parent, worldModel, e));
                }
            }
            m_visibilityHelper = new EditorVisibilityHelper(parent, worldModel, source);
            m_source = source;
        }
Exemplo n.º 4
0
        public EditorControl(EditorDefinition parent, WorldModel worldModel, Element source)
        {
            m_parent = parent;
            m_worldModel = worldModel;
            m_source = source;
            m_controlType = source.Fields.GetString("controltype");
            m_caption = source.Fields.GetString("caption");
            m_attribute = source.Fields.GetString("attribute");
            if (source.Fields.HasType<int>("height")) m_height = source.Fields.GetAsType<int>("height");
            if (source.Fields.HasType<int>("width")) m_width = source.Fields.GetAsType<int>("width");
            if (source.Fields.HasType<bool>("expand")) m_expand = source.Fields.GetAsType<bool>("expand");            
            m_visibilityHelper = new EditorVisibilityHelper(parent, worldModel, source);
            IsControlVisibleInSimpleMode = !source.Fields.GetAsType<bool>("advanced");
            m_id = source.Name;

            if (source.Fields.HasString("filtergroup"))
            {
                parent.RegisterFilter(source.Fields.GetString("filtergroup"), source.Fields.GetString("filter"), m_attribute);
            }
        }