Exemple #1
0
        private int GetBlockMaxY(SpBlock spBlock)
        {
            var labelMaxY = spBlock.SpRowLabels.Max(l => l.Y);
            var seatMaxY  = spBlock.SpSeats.Max(l => l.Y);

            return(Math.Max(labelMaxY, seatMaxY));
        }
Exemple #2
0
        private (int x, int y) GetBlockMinCoordinates(SpBlock spBlock)
        {
            var labelMinX = spBlock.SpRowLabels.Min(l => l.X);
            var labelMinY = spBlock.SpRowLabels.Min(l => l.Y);
            var seatMinX  = spBlock.SpSeats.Min(s => s.X);
            var seatMinY  = spBlock.SpSeats.Min(s => s.Y);
            var minX      = Math.Min(labelMinX, seatMinX);
            var minY      = Math.Min(labelMinY, seatMinY);

            return(minX, minY);
        }
Exemple #3
0
        private void AdjustCoordinates(SpBlock spBlock, int deltaX, int deltaY)
        {
            foreach (var spRowLabel in spBlock.SpRowLabels)
            {
                spRowLabel.X += deltaX;
                spRowLabel.Y += deltaY;
            }

            foreach (var spSeat in spBlock.SpSeats)
            {
                spSeat.X += deltaX;
                spSeat.Y += deltaY;
            }
        }