예제 #1
0
 void OnPlaceClick(Button sender, CinemaRoomPlaceTypeAndInfo place, int x, int y)
 {
     if (place.IsUsed)
     {
         UnsoldNewTicket(x, y);
     }
     else
     {
         SoldNewTicket(x, y);
     }
 }
예제 #2
0
        internal Window_CinemaRoomViewer(DataBaseWorker dbWorker, Seance seance)
        {
            dataBaseWorker = dbWorker;
            currentSeance  = seance;
            Title         += " - " + seance.Room.ToString();

            cinemaRoomScheme = CinemaRoomPlaceTypeAndInfo.SchemeFromString(currentSeance.Room.RoomScheme);
            InitializeComponent();
            BuildSchemeOnForm(cinemaRoomScheme);
            SoldTicket[] st = dataBaseWorker.GetAllTicketsOnSeance(currentSeance);
            HandleSoldTickets(st);
            UpdateRoom();
        }
예제 #3
0
        void AddButtonToForm(CinemaRoomPlaceTypeAndInfo place, int x, int y)
        {
            if (place.PlaceType == CinemaRoomPlaceType.NotExists)
            {
                return;
            }
            Button res = new Button();

            placeButtonsArr[x, y] = res;
            grid.Children.Add(res);
            res.Click += delegate
            {
                OnPlaceClick(res, place, x, y);
            };
        }