Beispiel #1
0
        private void AddFloorButtonOnClick(object sender, RoutedEventArgs e)
        {
            ((HotelSetupWindow)Owner).SaveBuildings(Building);
            int   lastFloorNumber = Building.Floors.Any() ? Building.Floors.Last().FloorNumber : -1;
            Floor floor           = new Floor {
                FloorNumber = lastFloorNumber + 1, Building = Building
            };
            EditFloorWindow editFloorWindow = new EditFloorWindow(Controller, floor)
            {
                Owner = this
            };

            Hide();
            editFloorWindow.ShowDialog();
            ShowDialog();
        }
Beispiel #2
0
        private void EditFloorOnMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            Floor floor = GetFloor(sender);

            if (floor == null)
            {
                return;
            }
            EditFloorWindow editFloorWindow = new EditFloorWindow(Controller, floor)
            {
                Owner = this
            };

            Hide();
            editFloorWindow.ShowDialog();
            ShowDialog();
        }