Esempio n. 1
0
        private CremaDataType(TypeInfo typeInfo)
        {
            this.builder = new CremaDataTypeMemberBuilder(this);
            this.type    = new InternalDataType(this, typeInfo.Name, typeInfo.CategoryPath)
            {
                IsFlag  = typeInfo.IsFlag,
                Comment = typeInfo.Comment,
                Tags    = typeInfo.Tags,
            };
            this.attributes            = new CremaAttributeCollection(this.type);
            this.members               = new CremaDataTypeMemberCollection(this.type);
            this.type.CreationInfo     = typeInfo.CreationInfo;
            this.type.ModificationInfo = typeInfo.ModificationInfo;

            foreach (var item in typeInfo.Members)
            {
                var member = this.NewMember();
                member.Name      = item.Name;
                member.Value     = item.Value;
                member.Comment   = item.Comment;
                member.IsEnabled = item.IsEnabled;
                member.Tags      = item.Tags;
                this.Members.Add(member);
            }
            this.type.AcceptChanges();
            this.AttachEventHandlers();
        }
Esempio n. 2
0
        internal CremaDataType(InternalDataType type)
        {
            this.type       = type;
            this.builder    = new CremaDataTypeMemberBuilder(this);
            this.attributes = new CremaAttributeCollection(this.type);
            this.members    = new CremaDataTypeMemberCollection(this.type);

            this.AttachEventHandlers();
        }
Esempio n. 3
0
        public CremaDataType(string name, string categoryPath)
        {
            this.builder    = new CremaDataTypeMemberBuilder(this);
            this.type       = new InternalDataType(this, name, categoryPath);
            this.attributes = new CremaAttributeCollection(this.type);
            this.members    = new CremaDataTypeMemberCollection(this.type);

            this.AttachEventHandlers();
        }
Esempio n. 4
0
        internal CremaDataTable(InternalDataTable table)
        {
            this.table      = table;
            this.builder    = new CremaDataRowBuilder(this);
            this.columns    = new CremaDataColumnCollection(this.table);
            this.attributes = new CremaAttributeCollection(this.table);
            this.rows       = new CremaDataRowCollection(this.table);
            this.childs     = new CremaChildTableCollection(this.table);

            this.AttachEventHandlers();
        }
Esempio n. 5
0
        public CremaDataTable(string name, string categoryPath)
        {
            this.builder    = new CremaDataRowBuilder(this);
            this.table      = new InternalDataTable(this, name, categoryPath);
            this.columns    = new CremaDataColumnCollection(this.table);
            this.attributes = new CremaAttributeCollection(this.table);
            this.rows       = new CremaDataRowCollection(this.table);
            this.childs     = new CremaChildTableCollection(this.table);

            this.AttachEventHandlers();
        }
Esempio n. 6
0
        public CremaTemplate(CremaDataTable targetTable)
        {
            if (targetTable == null)
            {
                throw new ArgumentNullException(nameof(targetTable));
            }
            if (targetTable.TemplateNamespace != string.Empty)
            {
                throw new ArgumentException(Resources.Exception_CannotEditInheritedTable, nameof(targetTable));
            }

            this.builder  = new CremaTemplateColumnBuilder(this);
            this.template = new InternalTemplate(this, this.builder)
            {
                TargetTable = (InternalDataTable)targetTable
            };
            this.attributes = new CremaAttributeCollection(this.template);
            this.columns    = new CremaTemplateColumnCollection(this.template);

            this.AttachEventHandlers();
        }