private void ShowStartDateMenu()
        {
            IDialogbox dlg = (IDialogbox)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU);

            if (dlg == null)
            {
                return;
            }

            dlg.Reset();
            dlg.SetHeading(Translation.StartDate);

            foreach (int value in Enum.GetValues(typeof(StartDates)))
            {
                StartDates type  = (StartDates)Enum.Parse(typeof(StartDates), value.ToString());
                string     label = GetStartDateName(type);

                // Create new item
                GUIListItem listItem = new GUIListItem(label);
                listItem.ItemId = value;

                // Set selected if current
                if (type == CurrentStartDate)
                {
                    listItem.Selected = true;
                }

                // Add new item to context menu
                dlg.Add(listItem);
            }

            dlg.DoModal(GUIWindowManager.ActiveWindow);
            if (dlg.SelectedId <= 0)
            {
                return;
            }

            // Set new Selection
            CurrentStartDate = (StartDates)Enum.GetValues(typeof(StartDates)).GetValue(dlg.SelectedLabel);
            SetCurrentStartDate();

            // Reset Views and Apply
            CurrentWeekDays          = 7;
            PreviousSelectedIndex    = 0;
            PreviousCalendarDayCount = 0;
            _CalendarMyShows         = null;
            _CalendarPremieres       = null;
            _CalendarAllShows        = null;

            LoadCalendar();
        }
        private string GetStartDateName(StartDates date)
        {
            switch (date)
            {
            case StartDates.Today:
                return(Translation.DateToday);

            case StartDates.Yesterday:
                return(Translation.DateYesterday);

            case StartDates.OneWeekAgo:
                return(Translation.DateOneWeekAgo);

            case StartDates.TwoWeeksAgo:
                return(Translation.DateTwoWeeksAgo);

            case StartDates.OneMonthAgo:
                return(Translation.DateOneMonthAgo);

            default:
                return(Translation.DateToday);
            }
        }
        private string GetStartDateName(StartDates date)
        {
            switch (date)
            {
                case StartDates.Today:
                    return Translation.DateToday;

                case StartDates.Yesterday:
                    return Translation.DateYesterday;

                case StartDates.OneWeekAgo:
                    return Translation.DateOneWeekAgo;

                case StartDates.TwoWeeksAgo:
                    return Translation.DateTwoWeeksAgo;

                case StartDates.OneMonthAgo:
                    return Translation.DateOneMonthAgo;

                default:
                    return Translation.DateToday;
            }
        }