Exemplo n.º 1
0
        // ----------------------------------------------------------------------
        public static void ShowAll(int year, YearMonth yearMonth)
        {
            WriteLine("Input: year={0}, month={1}", year, yearMonth);
            WriteLine();

            BroadcastMonth month = new BroadcastMonth(year, yearMonth);

            BroadcastMonth previousMonth = month.GetPreviousMonth();
            BroadcastMonth nextMonth     = month.GetNextMonth();

            ShowMonth(month);
            ShowCompactMonth(previousMonth, "Previous BroadcastMonth");
            ShowCompactMonth(nextMonth, "Next BroadcastMonth");
            WriteLine();

            foreach (BroadcastWeek week in month.GetWeeks())
            {
                BroadcastWeekDemo.ShowCompactWeek(week);
            }
            WriteLine();
            foreach (Day day in month.GetDays())
            {
                DayDemo.ShowCompactDay(day);
            }
            WriteLine();
        }         // ShowAll
Exemplo n.º 2
0
        // ----------------------------------------------------------------------
        public static void ShowAll(int year)
        {
            WriteLine("Input: year={0}", year);

            WriteLine();

            BroadcastYear broadcastYear = new BroadcastYear(year);

            BroadcastYear previousYear = broadcastYear.GetPreviousYear();
            BroadcastYear nextYears    = broadcastYear.GetNextYear();

            ShowYear(broadcastYear);
            ShowCompactYear(previousYear, "Previous BroadcastYear");
            ShowCompactYear(nextYears, "Next BroadcastYear");
            WriteLine();

            foreach (BroadcastMonth month in broadcastYear.GetMonths())
            {
                BroadcastMonthDemo.ShowCompactMonth(month);
            }
            WriteLine();
            foreach (BroadcastWeek week in broadcastYear.GetWeeks())
            {
                BroadcastWeekDemo.ShowCompactWeek(week);
            }
            WriteLine();
        }         // ShowAll