internal DrawnTableCells(DrawnTable table) { this.table = table ?? throw new ArgumentNullException(nameof(table)); lastId = 0; cells = new List <DrawnTableCell>(); cellsArea = new Dictionary <int, RectangleF>(); BackColors = new DrawnTableBackColors(table); }
public Button Build(DrawnTable drawnTable) { var tableMessage = (drawnTable.Total == 0) ? string.Empty : drawnTable.Total.ToString(); return(new Button() { BackgroundColor = drawnTable.Color, Text = $"{drawnTable.WaiterName ?? string.Empty}\n[{drawnTable.TableNumber}]{tableMessage}", CornerRadius = 6, HeightRequest = drawnTable.LengthY, WidthRequest = drawnTable.LengthX, BorderWidth = 2, BorderColor = Color.Black, ClassId = drawnTable.TableNumber.ToString() }); }