public OptionsPanel_Controller(MainPage mainControl)
        {
            this.mainControl        = mainControl;
            this.isPanelOpen        = false;
            snooze_duration_minutes = 5;
            GuiEventCaller.GetCaller().NotifySnoozePeriodChangeRequested(snooze_duration_minutes);
            this.mainControl.sDuration_Label.Content = snooze_duration_minutes.ToString();
            this.timeController = new TimeSelector(this, true);

            this.dropdownSelectorController = new DropdownSelectorController(mainControl.timezoneComboBox);

            InitDefaultTimeZone();

            mainControl.sDuration_dec.Click += SDuration_MinuteDown_Click;
            mainControl.sDuration_inc.Click += SDuration_MinuteUp_Click;
            mainControl.cdDatePicker.SelectedDateChanged += CdDatePicker_SelectedDateChanged;

            mainControl.timezoneComboBox.SelectionChanged += Timezone_SelectionChanged;

            mainControl.AnalogButton.Click  += Analog_Click;
            mainControl.DigitalButton.Click += Digital_Click;

            new DarkButton(mainControl.sDuration_dec);
            new DarkButton(mainControl.sDuration_inc);

            new DarkButton(mainControl.AnalogButton);
            new DarkButton(mainControl.DigitalButton);
        }
예제 #2
0
        public AddEditWindow(MainPage mainControl)
        {
            this.mainControl = mainControl;

            mainControl.SaveAlarm.Click     += SaveAlarm_Click;
            mainControl.CancelAddEdit.Click += CancelAddEdit_Click;

            timeController = new TimeSelector(this, false);

            weekdayControl = new WeekdaySelector(mainControl);

            weekdayControl.SetVisibleState(Visibility.Collapsed);

            mainControl.RepeatCheckbox.Checked   += RepeatCheckbox_Checked;
            mainControl.RepeatCheckbox.Unchecked += RepeatCheckbox_UnChecked;

            audioFileController = new DropdownSelectorController(mainControl.AudioFileComboBox);

            new DarkButton(mainControl.SaveAlarm);
            new DarkButton(mainControl.CancelAddEdit);
        }