Example #1
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);
        }
Example #2
0
        private void btnAddTable_Click(object sender, EventArgs e)
        {
            FormAddTable frmAddTable = new FormAddTable();

            if (frmAddTable.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                TableDesigner table = frmAddTable.NewTableDesigner;
                this.tableDesignerList.Add(table);
                this.lstTable.Items.Add(table);
            }
        }
Example #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);
            }
        }
Example #4
0
        private void btnDeleteTable_Click(object sender, EventArgs e)
        {
            TableDesigner table    = this.lstTable.SelectedItem as TableDesigner;
            bool          selected = table != null;

            if (selected)
            {
                this.tableDesignerList.Remove(table);
                this.lstTable.Items.Remove(table);
                this.btnDeleteTable.Enabled = false;
                this.btnAddProperty.Enabled = false;
            }
        }
Example #5
0
        private void lstTable_SelectedIndexChanged(object sender, EventArgs e)
        {
            TableDesigner table    = this.lstTable.SelectedItem as TableDesigner;
            bool          selected = table != null;

            if (selected)
            {
                this.lstProperty.Items.Clear();
                foreach (var item in table.PropertyDesignerList)
                {
                    this.lstProperty.Items.Add(item);
                }
            }

            this.btnDeleteTable.Enabled = selected;
            this.btnAddProperty.Enabled = selected;
        }
Example #6
0
        public FormAddTable()
        {
            InitializeComponent();

            this.NewTableDesigner = new TableDesigner();
        }