public propertyTableControl(int id1, DBTablesGroups par, TableEdit table_edit_frm) { InitializeComponent(); id = id1; geom = getGeomTable(id); parent = par; table_edit = table_edit_frm; if (!geom) { MessageBox.Show(Rekod.Properties.Resources.PTC_TableIsNotLayer); parent.CloseElemsAfter(this, true); } cbRefType.SelectedIndex = 0; loadTableGeomField(); loadTableStyleField(); loadTables(); loadInfo(); loadDaipazonInfo(id); SetControlVisibility(); if (!Rekod.DBTablesEdit.SyncController.HasRight(id)) { button2.Enabled = false; } }
private void button3_Click(object sender, EventArgs e) { if (list_of_controls.Count > 0) { if (!(list_of_controls[0] is TableEdit)) { CloseElemsAfter(null, false); TableEdit te = new TableEdit(null, this); AddNewElem(te, Rekod.Properties.Resources.DBTG_TablesList); button2.BackgroundImage = null; } } else { CloseElemsAfter(null, false); TableEdit te = new TableEdit(null, this); AddNewElem(te, Rekod.Properties.Resources.DBTG_TablesList); } button3.BackgroundImage = null; button4.BackgroundImage = null; button5.BackgroundImage = null; button6.BackgroundImage = null; if (sender == button3) { button3.BackgroundImage = Rekod.Properties.Resources.bg_selecteg_button; button2.BackgroundImage = null; (list_of_controls[0] as TableEdit).cbTableType.SelectedIndex = 0; } else if (sender == button4) { button4.BackgroundImage = Rekod.Properties.Resources.bg_selecteg_button; button2.BackgroundImage = null; (list_of_controls[0] as TableEdit).cbTableType.SelectedIndex = 1; } else if (sender == button5) { button5.BackgroundImage = Rekod.Properties.Resources.bg_selecteg_button; button2.BackgroundImage = null; (list_of_controls[0] as TableEdit).cbTableType.SelectedIndex = 2; } else if (sender == button6) { button6.BackgroundImage = Rekod.Properties.Resources.bg_selecteg_button; button2.BackgroundImage = null; (list_of_controls[0] as TableEdit).cbTableType.SelectedIndex = 3; } //else //{ // CloseElemsAfter(null, false); // checkBox1.BackgroundImage = null; //} panel1.Focus(); }
public ActionWithTables(DBTablesGroups par, TableEdit t_edit) { InitializeComponent(); parent = par; table_edit = t_edit; if (Program.app.sscUser != null) { btnGroups.Visible = false; btnIndexation.Location = btnCopy.Location; btnCopy.Location = btnGroups.Location; } }
public TableGroup(int id_table, DBTablesGroups par, TableEdit t_edit) { InitializeComponent(); id = id_table; parent = par; table_edit = t_edit; gf = new GroupFunct(); listBox1.SelectedIndexChanged += (s, e) => { button1.Enabled = (listBox1.SelectedIndex != -1); }; listBox2.SelectedIndexChanged += (s, e) => { button2.Enabled = (listBox2.SelectedIndex != -1); }; reload(); }
public FiledEditListControl(int id1, DBTablesGroups par, TableEdit table_edit_frm) { InitializeComponent(); id = id1; loadFields(id); button3.Enabled = false; parent = par; table_edit = table_edit_frm; hasRightToChange = DBTablesEdit.SyncController.HasRight(id); if (!hasRightToChange) { button1.Enabled = false; button2.Enabled = false; button4.Enabled = false; button5.Enabled = false; } }