IfcDoc.CtlProperties.buttonViewXsdAttribute_Click C# (CSharp) Method

buttonViewXsdAttribute_Click() private method

private buttonViewXsdAttribute_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void buttonViewXsdAttribute_Click(object sender, EventArgs e)
        {
            using (FormSelectEntity form = new FormSelectEntity(null, null, this.m_project, SelectDefinitionOptions.Entity))
            {
                if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK && form.SelectedEntity is DocEntity)
                {
                    using(FormSelectAttribute formAttr = new FormSelectAttribute((DocEntity)form.SelectedEntity, this.m_project, null, false))
                    {
                        if(formAttr.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                        {
                            DocXsdFormat docFormat = new DocXsdFormat();
                            docFormat.Entity = form.SelectedEntity.Name;
                            docFormat.Attribute = formAttr.SelectedAttribute.Name;

                            DocModelView docView = (DocModelView)this.m_target;
                            docView.XsdFormats.Add(docFormat);

                            ListViewItem lvi = new ListViewItem();
                            lvi.Tag = docFormat;
                            lvi.Text = docFormat.Entity;
                            lvi.SubItems.Add(docFormat.Attribute);
                            lvi.SubItems.Add(docFormat.XsdFormat.ToString());
                            lvi.SubItems.Add(docFormat.XsdTagless.ToString());

                            this.listViewViewXsd.Items.Add(lvi);

                            lvi.Selected = true;
                        }
                    }
                }
            }
        }
CtlProperties