Ejemplo n.º 1
0
 public void onClickTableEvent(TableControl tb)
 {
     chooseTable      = tb;
     lbNameTable.Text = tb.Table.TableName;
     unCheckTable();
     tb.check();
     updateListChoose();
 }
Ejemplo n.º 2
0
 private void flowLayoutPanel1_MouseClick(object sender, MouseEventArgs e)
 {
     if (sender is TableControl)
     {
     }
     else
     {
         chooseTable      = null;
         lbNameTable.Text = "None";
         unCheckTable();
     }
 }
Ejemplo n.º 3
0
        private void updateTable()
        {
            List <Table> list = TableController.getController().getListTable();

            if (list != null)
            {
                list.ForEach(item =>
                {
                    TableControl tb = new TableControl();
                    tb.Table        = item;
                    tb.Parent       = flowLayoutPanel1;
                    flowLayoutPanel1.Controls.Add(tb);
                    tb.onClick          = new onClickTable(onClickTableEvent);
                    tb.ContextMenuStrip = menuTable;
                    listTable.Add(tb);
                });
            }
        }
Ejemplo n.º 4
0
        private void menuTable_Opening(object sender, CancelEventArgs e)
        {
            ContextMenuStrip menu         = sender as ContextMenuStrip;
            TableControl     tableControl = menu.SourceControl as TableControl;

            if (tableControl != null)
            {
                if (!tableControl.Table.TableStatus)
                {
                    menuTable.Items[0].Enabled = true;
                    menuTable.Items[1].Enabled = false;
                }
                else
                {
                    menuTable.Items[0].Enabled = false;
                    menuTable.Items[1].Enabled = true;
                }
                chooseTable = tableControl;
                unCheckTable();
                tableControl.check();
                updateListChoose();
            }
        }