private void CreateIndividualMonthValues() { StringBuilder sb = new StringBuilder(); sb.AppendLine(CellValueDetails.GetHeaders()); foreach (Year year in years) { foreach (Month month in year.GetMonthsInOrder().ToList()) { string filename = IndividualMonthSettings.FilenameTemplate.Replace("[YEAR]", year.Number.ToString()) .Replace("[MONTH]", month.Number.ToString("00")); MonthGrid mg = new MonthGrid( month, new Coordinate(IndividualMonthSettings.TopLeftX, IndividualMonthSettings.TopLeftY, 0), GridCalculator.CalculateMonthGridSize(IndividualMonthSettings.CellSize)); foreach (ICalendarCell cell in mg.Cells) { CellValueDetails cvd = new CellValueDetails(cell, filename); sb.AppendLine(cvd.ToString()); } } } IndividualMonthValues = sb.ToString(); }
private void CreateYearCalendarValues() { StringBuilder sb = new StringBuilder(); sb.AppendLine(CellValueDetails.GetHeaders()); foreach (Year year in years) { YearGrid yg = new YearGrid( year, new Coordinate(YearCalendarSettings.TopLeftX, YearCalendarSettings.TopLeftY, 0), YearCalendarSettings.ColumnCount, YearCalendarSettings.RowCount, YearCalendarSettings.CellSize); string filename = YearCalendarSettings.FilenameTemplate.Replace("[YEAR]", yg.YearCell.Value); CellValueDetails cvdYear = new CellValueDetails(yg.YearCell, filename); sb.AppendLine(cvdYear.ToString()); foreach (MonthGrid mg in yg.MonthGrids) { foreach (ICalendarCell cell in mg.Cells) { CellValueDetails cvd = new CellValueDetails(cell, filename); sb.AppendLine(cvd.ToString()); } } } YearCalendarValues = sb.ToString(); }