public MainWindow() { InitializeComponent(); Counter.NumberOfDeclinedBoatsEachDay = 0; Counter.NumberOfDeclinedBoatsSinceStartOfSimulation = 0; Counter.NumberOfNewBoatsPerUdate = 5; //if file path doesent exist hide button if (!File.Exists("theharbour.txt")) { PreviousSimulation.Visibility = Visibility.Hidden; } HarbourAdministration.BoatsComingToHarbour = new List <Boat>(); Harbour.CreateWharfPlacesInHArbour(); Harbour.BoatsInHarbour = new List <Boat>(); }
private void Click_NewSimulation(object sender, RoutedEventArgs e) { if (File.Exists("theharbour.txt")) { PreviousSimulation.Visibility = Visibility.Visible; } foreach (var boat in Harbour.BoatsInHarbour) { boat.ImageBoat.Visibility = Visibility.Hidden; } InformationHarbour.Text = ""; NorthHarbour.Text = ""; SouthHarbour.Text = ""; Counter.DaysSinceStartOfSimulation = 0; Counter.NumberOfDeclinedBoatsSinceStartOfSimulation = 0; Harbour.CreateWharfPlacesInHArbour(); Harbour.BoatsInHarbour = new List <Boat>(); }