private void updateCurrentTableName(string inName) { try { DTOReservable table = editingFloorPlan.currentTable; if (table.Name != inName) { table.Name = inName; editingFloorPlan.signalTablesChanged(); currentTableView.Caption = inName; toolStripDropDownButtonTables.DropDownItems.Clear(); foreach (DTOReservable tb in editingFloorPlan.tablesInLocation) { addItemsToToolStripDropDownButton(toolStripDropDownButtonTables, tb.Name); //addItemsToToolStripDropDownButton(toolStripDropDownButtonTables, string.Format(@"{0} - {1}", tb.Name, tb.Number)); } toolStripDropDownButtonTables.Text = inName; } } catch { } }
public static void reArrangeTableNumbers() { EditingFloorPlan editingFP = EditingFloorPlan.Instance; DTOReservable[] tablesInLocation = editingFP.tablesInLocation; for (int i = 0; i < tablesInLocation.Length; i++) { tablesInLocation[i].Number = i + 1; } editingFP.signalTablesChanged(); }