예제 #1
0
 public static RoomRenovationWindow GetInstance(Room roomForRenovation)
 {
     if (instance == null)
     {
         instance = new RoomRenovationWindow(roomForRenovation);
     }
     return(instance);
 }
예제 #2
0
        private void renovationMenuItem_Click(object sender, RoutedEventArgs e)
        {
            Room selectedRoom = (Room)roomsUserControl.allRoomsTable.SelectedItem;

            if (roomsUserControl.allRoomsTable.SelectedItem != null)
            {
                if (selectedRoom.RoomRenovationState.ActivityStatus)
                {
                    RenovationMessageWindow.GetInstance().ShowDialog();
                }
                else
                {
                    RoomRenovationWindow.GetInstance(selectedRoom).ShowDialog();
                }
            }
            else
            {
                MessageBox.Show("Izaberite prostoriju iz tabele!", "Upozorenje", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
        }
예제 #3
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     instance = null;
 }