void OnTableRemoved(object s, EventArgs e) { NumberTable--; TableControl table = (TableControl)tableGUI_pnl.Controls[numberTable]; tableGUI_pnl.Controls.Remove(table); }
private void Create_Table() { TableControl newtable = new TableControl() { Size = ItemSize, nameTable = "BÀN " + tableGUI_pnl.Controls.Count, ImageTable = itemImage }; newtable.IsManager = this.isManager; newtable.Info.ID = numberTable; tableGUI_pnl.Controls.Add(newtable); newtable.ClickTableControl += Newtable_ClickTableControl; newtable.TableRemoved += Newtable_TableRemoved; }
private void Tbbill_CloseBill(object sender, EventArgs e) { tableGUI_pnl.Show(); TableControl table = (TableControl)tableGUI_pnl.Controls[SelectedTable]; if (table.Info.ProductInTable.Count != 0) { table.Status = TableControl.status.Using; } else { table.Status = TableControl.status.Empty; } SelectedTable = -1; }
public Mouse_move(TableControl tableControl, EventArgs e) { this.tableControl = tableControl; this.e = e; }