Пример #1
0
        private void lstProperty_SelectedIndexChanged(object sender, EventArgs e)
        {
            PropertyDesigner property = this.lstProperty.SelectedItem as PropertyDesigner;
            bool             selected = property != null;

            this.btnDeleteProperty.Enabled = selected;
        }
Пример #2
0
        private void btnDeleteProperty_Click(object sender, EventArgs e)
        {
            PropertyDesigner property = this.lstProperty.SelectedItem as PropertyDesigner;
            TableDesigner    table    = this.lstTable.SelectedItem as TableDesigner;

            this.lstProperty.Items.Remove(property);
            table.PropertyDesignerList.Remove(property);
        }
Пример #3
0
        private void btnAddProperty_Click(object sender, EventArgs e)
        {
            FormAddProperty frmAddProperty = new FormAddProperty();

            if (frmAddProperty.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                PropertyDesigner propertyDesigner = frmAddProperty.NewPropertyDesigner;
                TableDesigner    table            = this.lstTable.SelectedItem as TableDesigner;
                table.PropertyDesignerList.Add(propertyDesigner);
                this.lstProperty.Items.Add(propertyDesigner);
            }
        }
Пример #4
0
        public FormAddProperty()
        {
            InitializeComponent();

            this.NewPropertyDesigner = new PropertyDesigner();
        }