private void MonthDownMethod() { if (MonthesNames.IndexOf(SelectedMonth) == 0) { SelectedYear = (int.Parse(SelectedYear) - 1).ToString(); } SelectedMonth = MonthesNames[((MonthesNames.IndexOf(SelectedMonth) - 1) % 12)]; RefreshCalendar(); }
private void RefreshCalendar() { if (SelectedYear == null || SelectedMonth == null) { return; } DateTime targetDate = new DateTime(Convert.ToInt32(SelectedYear), MonthesNames.IndexOf(SelectedMonth) + 1, 1); BuildCalendar(targetDate); }