예제 #1
0
        public void Initialize([NotNull] TemplateDesigner templateDesigner, [NotNull] TemplateDesigner.TemplateField field)
        {
            Assert.ArgumentNotNull(templateDesigner, nameof(templateDesigner));
            Assert.ArgumentNotNull(field, nameof(field));

            TemplateDesigner = templateDesigner;
            Field            = field;

            Update();
        }
        public void CreateEmpyField()
        {
            var field = new TemplateDesigner.TemplateField();

            var fieldControl = new TemplateField();

            fieldControl.Initialize(TemplateDesigner, field);

            field.Id      = Guid.NewGuid().ToString(@"B").ToUpperInvariant();
            field.Control = fieldControl;
            field.Section = Section;

            Section.Fields.Add(field);

            Section.Control.FieldStack.Children.Add(fieldControl);
        }