Esempio n. 1
0
        public SelectPeriod()
        {
            this.Build();

            //Создаем переключатели
            RadioButtons = new Dictionary <Period, RadioButton>();
            RadioButtons.Add(Period.Today, new RadioButton("Сегодня"));
            RadioButtons[Period.Today].Clicked += OnRadioTodayClicked;
            RadioButton RadioToday = RadioButtons[Period.Today];

            RadioButtons.Add(Period.Week, new RadioButton(RadioToday, "За неделю"));
            RadioButtons[Period.Week].Clicked += OnRadioWeekClicked;
            RadioButtons.Add(Period.Month, new RadioButton(RadioToday, "За месяц"));
            RadioButtons[Period.Month].Clicked += OnRadioMonthClicked;
            RadioButtons.Add(Period.ThreeMonth, new RadioButton(RadioToday, "За 3 месяца"));
            RadioButtons[Period.ThreeMonth].Clicked += OnRadio3monthClicked;
            RadioButtons.Add(Period.SixMonth, new RadioButton(RadioToday, "За полгода"));
            RadioButtons[Period.SixMonth].Clicked += OnRadio6monthClicked;
            RadioButtons.Add(Period.Year, new RadioButton(RadioToday, "За год"));
            RadioButtons[Period.Year].Clicked += OnRadioYearClicked;
            RadioButtons.Add(Period.AllTime, new RadioButton(RadioToday, "Все время"));
            RadioButtons[Period.AllTime].Clicked += OnRadioAllClicked;

            RadioButtons.Add(Period.CurWeek, new RadioButton(RadioToday, "Тек. неделя"));
            RadioButtons[Period.CurWeek].Clicked += OnRadioCurWeekClicked;
            RadioButtons.Add(Period.CurMonth, new RadioButton(RadioToday, "Тек. месяц"));
            RadioButtons[Period.CurMonth].Clicked += OnRadioCurMonthClicked;
            RadioButtons.Add(Period.CurQuarter, new RadioButton(RadioToday, "Тек. квартал"));
            RadioButtons[Period.CurQuarter].Clicked += OnRadioCurQuarterClicked;
            RadioButtons.Add(Period.CurYear, new RadioButton(RadioToday, "Тек. год"));
            RadioButtons[Period.CurYear].Clicked += OnRadioCurYearClicked;

            ShowRadio = new Dictionary <Period, bool>();
            ShowRadio.Add(Period.Today, true);
            ShowRadio.Add(Period.Week, true);
            ShowRadio.Add(Period.Month, true);
            ShowRadio.Add(Period.ThreeMonth, false);
            ShowRadio.Add(Period.SixMonth, false);
            ShowRadio.Add(Period.Year, false);
            ShowRadio.Add(Period.CurWeek, false);
            ShowRadio.Add(Period.CurMonth, false);
            ShowRadio.Add(Period.CurQuarter, false);
            ShowRadio.Add(Period.CurYear, false);
            ShowRadio.Add(Period.AllTime, true);

            _RadioMode = RadioModeType.DoubleColumn;
            OnRepackRadios();
            ActiveRadio = Period.AllTime;
        }
Esempio n. 2
0
        public SelectPeriod()
        {
            this.Build ();

            //Создаем переключатели
            RadioButtons = new Dictionary<Period, RadioButton>();
            RadioButtons.Add (Period.Today, new RadioButton("Сегодня"));
            RadioButtons[Period.Today].Clicked += OnRadioTodayClicked;
            RadioButton RadioToday = RadioButtons[Period.Today];
            RadioButtons.Add (Period.Week, new RadioButton(RadioToday, "За неделю"));
            RadioButtons[Period.Week].Clicked += OnRadioWeekClicked;
            RadioButtons.Add (Period.Month, new RadioButton(RadioToday, "За месяц"));
            RadioButtons[Period.Month].Clicked += OnRadioMonthClicked;
            RadioButtons.Add (Period.ThreeMonth, new RadioButton(RadioToday, "За 3 месяца"));
            RadioButtons[Period.ThreeMonth].Clicked += OnRadio3monthClicked;
            RadioButtons.Add (Period.SixMonth, new RadioButton(RadioToday, "За полгода"));
            RadioButtons[Period.SixMonth].Clicked += OnRadio6monthClicked;
            RadioButtons.Add (Period.Year, new RadioButton(RadioToday, "За год"));
            RadioButtons[Period.Year].Clicked += OnRadioYearClicked;
            RadioButtons.Add (Period.AllTime, new RadioButton(RadioToday, "Все время"));
            RadioButtons[Period.AllTime].Clicked += OnRadioAllClicked;

            RadioButtons.Add (Period.CurWeek, new RadioButton(RadioToday, "Тек. неделя"));
            RadioButtons[Period.CurWeek].Clicked += OnRadioCurWeekClicked;
            RadioButtons.Add (Period.CurMonth, new RadioButton(RadioToday, "Тек. месяц"));
            RadioButtons[Period.CurMonth].Clicked += OnRadioCurMonthClicked;
            RadioButtons.Add (Period.CurQuarter, new RadioButton(RadioToday, "Тек. квартал"));
            RadioButtons[Period.CurQuarter].Clicked += OnRadioCurQuarterClicked;
            RadioButtons.Add (Period.CurYear, new RadioButton(RadioToday, "Тек. год"));
            RadioButtons[Period.CurYear].Clicked += OnRadioCurYearClicked;

            ShowRadio = new Dictionary<Period, bool>();
            ShowRadio.Add (Period.Today, true);
            ShowRadio.Add (Period.Week, true);
            ShowRadio.Add (Period.Month, true);
            ShowRadio.Add (Period.ThreeMonth, false);
            ShowRadio.Add (Period.SixMonth, false);
            ShowRadio.Add (Period.Year, false);
            ShowRadio.Add (Period.CurWeek, false);
            ShowRadio.Add (Period.CurMonth, false);
            ShowRadio.Add (Period.CurQuarter, false);
            ShowRadio.Add (Period.CurYear, false);
            ShowRadio.Add (Period.AllTime, true);

            _RadioMode = RadioModeType.DoubleColumn;
            OnRepackRadios ();
            ActiveRadio = Period.AllTime;
        }