public static StaticEquipmentDeploymentWindow getInstance(Room currentRoom, string idOfSelectedEquipment) { if (instance == null) { instance = new StaticEquipmentDeploymentWindow(currentRoom, idOfSelectedEquipment); } return(instance); }
private void TryOpenEquipmentDeploymentWindow() { if (RoomController.GetInstance().EquipmentExistInRoom(EquipmentController.getInstance().getEquipmentIdByName(SplitListBoxSelectedValue(staticEquipmentListBox)[0]), selectedRoom.EquipmentInRoom.Equipment)) { StaticEquipmentDeploymentWindow.getInstance(selectedRoom, EquipmentController.getInstance().getEquipmentIdByName(SplitListBoxSelectedValue(staticEquipmentListBox)[0])).Show(); } else { MessageBox.Show("Prvo dodajte opremu, zatim zakažite njeno premeštanje!", "Upozorenje", MessageBoxButton.OK, MessageBoxImage.Warning); } }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { instance = null; }