Ejemplo 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
Ejemplo n.º 2
0
        // ----------------------------------------------------------------------
        public static void ShowAll(int periodCount, int year, int weekOfYear, TimeCalendarConfig calendarConfig)
        {
            WriteLine("Input: year={0}, week={1}", year, weekOfYear);
            WriteLine();

            WeekTimeRange weekTimeRange;

            if (periodCount == 1)
            {
                Week week = new Week(year, weekOfYear, new TimeCalendar(calendarConfig));
                weekTimeRange = week;

                Week previousWeek = week.GetPreviousWeek();
                Week nextWeek     = week.GetNextWeek();

                ShowWeek(week);
                ShowCompactWeek(previousWeek, "Previous Week");
                ShowCompactWeek(nextWeek, "Next Week");
                WriteLine();
            }
            else
            {
                Weeks weeks = new Weeks(year, weekOfYear, periodCount, new TimeCalendar(calendarConfig));
                weekTimeRange = weeks;

                ShowWeeks(weeks);
                WriteLine();

                foreach (Week week in weeks.GetWeeks())
                {
                    ShowCompactWeek(week);
                }
                WriteLine();
            }

            foreach (Day day in weekTimeRange.GetDays())
            {
                DayDemo.ShowCompactDay(day);
            }
            WriteLine();
        }         // ShowAll
Ejemplo n.º 3
0
        // ----------------------------------------------------------------------
        public static void ShowAll(int periodCount, int year, YearMonth yearMonth)
        {
            WriteLine("Input: count={0}, year={1}, month={2}", periodCount, year, yearMonth);
            WriteLine();

            MonthTimeRange monthTimeRange;

            if (periodCount == 1)
            {
                Month month = new Month(year, yearMonth);
                monthTimeRange = month;

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

                ShowMonth(month);
                ShowCompactMonth(previousMonth, "Previous Month");
                ShowCompactMonth(nextMonth, "Next Month");
                WriteLine();
            }
            else
            {
                Months months = new Months(year, yearMonth, periodCount);
                monthTimeRange = months;

                ShowMonths(months);
                WriteLine();

                foreach (Month month in months.GetMonths())
                {
                    ShowCompactMonth(month);
                }
                WriteLine();
            }

            foreach (Day day in monthTimeRange.GetDays())
            {
                DayDemo.ShowCompactDay(day);
            }
            WriteLine();
        }         // ShowAll
Ejemplo n.º 4
0
        // ----------------------------------------------------------------------
        public static void ShowAll(int year, int weekOfYear)
        {
            WriteLine("Input: year={0}, week={1}", year, weekOfYear);
            WriteLine();

            BroadcastWeek week = new BroadcastWeek(year, weekOfYear);

            BroadcastWeek previousWeek = week.GetPreviousWeek();
            BroadcastWeek nextWeek     = week.GetNextWeek();

            ShowWeek(week);
            ShowCompactWeek(previousWeek, "Previous BroadcastWeek");
            ShowCompactWeek(nextWeek, "Next BroadcastWeek");
            WriteLine();

            foreach (Day day in week.GetDays())
            {
                DayDemo.ShowCompactDay(day);
            }
            WriteLine();
        }         // ShowAll