public void AddFestivalCopy(GPEvent pEvx) { GPCalendarDay.Festival fest = null; if (pEvx.hasFasting()) { fest = new GPCalendarDay.Festival(((pEvx.nClass >= 0) ? pEvx.nClass * 5 + 30 : 200), GPDisplays.Keys.FestivalClass(pEvx.nClass), pEvx.getText(), pEvx.getFastType(), pEvx.getFastSubject()); } else { fest = new GPCalendarDay.Festival(((pEvx.nClass >= 0) ? pEvx.nClass * 5 + 30 : 200), GPDisplays.Keys.FestivalClass(pEvx.nClass), pEvx.getText()); } Festivals.Add(fest); if (GPDisplays.Calendar.AnniversaryType() != 2 && pEvx.nStartYear > -7000) { int years = astrodata.nGaurabdaYear - (pEvx.nStartYear - 1496); fest.Text += " "; if (GPDisplays.Calendar.AnniversaryType() == 0) { fest.Text += string.Format(GPStrings.getString(962), years); } else { fest.Text += string.Format(GPStrings.getString(963), years); } } if (pEvx.hasChildrenItems()) { foreach (GPEvent ev in pEvx.childrenItems) { if (ev is GPEventRelative) { GPEventRelative relev = ev as GPEventRelative; GPCalendarDay vd = GetDayWithOffset(relev.nOffset); if (vd != null) { vd.AddFestivalCopy(relev); } } } } }