public void deleteSimulatedStation() { if (lbStations.SelectedIndex >= 0) { SimulatedStations.RemoveAt(lbStations.SelectedIndex); lbStations.SelectedIndex = 0; } }
private void newStationSelected() { lbSimulatedStation.Content = "Simulierte Wetterstation: " + SimulatedStations.ElementAt(selectedStationIndex).Station; btStartSimulator.IsEnabled = true; btStopSimulator.IsEnabled = false; btSendData.IsEnabled = false; MeasurementsCollection.Clear(); RoundedMeasurementsCollection.Clear(); MyChartValues.Clear(); UITimeInput(true); UIRightColumnEnabled(true); }
public void AddSimulatedStations(Stations addedStation) { bool alreadyAdded = false; foreach (Stations station in SimulatedStations) { if (station.Station == addedStation.Station) { alreadyAdded = true; } } if (!alreadyAdded) { SimulatedStations.Add(addedStation); lbStations.SelectedIndex = SimulatedStations.Count - 1; } }