private void showYearData() { //show the year data into text boxes Yearly[] theYearData = Data.WeatherStationData[locationSelected].getYears(); Yearly yearData = theYearData[yearSelected]; txtYear.Text = yearData.getYear().ToString(); txtDescription.Text = yearData.getDescription(); }
private void saveMonths(StreamWriter theData, Yearly yearData) { //loop through each month in the year foreach (Monthly monthData in yearData.getMonths()) { theData.WriteLine(yearData.getYear()); // save the year id as it repeats in every month // write all of the month data to the file theData.WriteLine(monthData.getId()); theData.WriteLine(monthData.getMaxTemp()); theData.WriteLine(monthData.getMinTemp()); theData.WriteLine(monthData.getMmRainfall()); theData.WriteLine(monthData.getNumDaysAirFrost()); theData.WriteLine(monthData.getHoursSunshine()); } }