public FormUpdateIntermediateStructure(CSSLTemplate template, IntermediateStructure target)
        {
            InitializeComponent();

            this.template = template;
            this.clonedTarget = target.Clone() as IntermediateStructure;
        }
        private void btnOK_Click(object sender, EventArgs e)
        {
            this.clonedTarget.Name = this.txtName.Text;
            foreach (var item in this.lstField.Items)
            {
                this.clonedTarget.FieldList.Add(item as StructureField);
            }

            this.Result = this.clonedTarget;

            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }
        private void btnOK_Click(object sender, EventArgs e)
        {
            var result = new IntermediateStructure()
            {
                Name = this.txtName.Text,
            };
            foreach (var item in this.lstField.Items)
            {
                result.FieldList.Add(item as StructureField);
            }
            this.Result = result;

            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }