Exemplo n.º 1
0
        public void SelectTask(string id)
        {
            _selectedTaskID = id;
            _taskFactory    = TaskRegistry.CreateFactoryInstance(id);

            SetupParameters();
        }
Exemplo n.º 2
0
        public TaskOptionsMenu(ITask task, ITranslationHelper translation) : this(translation)
        {
            _task           = task;
            _selectedTaskID = task.ID;
            _taskFactory    = TaskRegistry.CreateFactoryInstance(task.ID);
            _taskFactory.Initialize(task, translation);

            _nameTextBox.Text = task.Name;
            _renewPeriodDropDown.selectedOption = (int)_task.RenewPeriod;

            if (_task.RenewPeriod == Period.Weekly)
            {
                _weekdaysDropDown.selectedOption = (_task.RenewDate.DayOfMonth - 1) % 7;
            }
            else if (_task.RenewPeriod != Period.Never)
            {
                _daysDropDown.selectedOption    = _task.RenewDate.DayOfMonth;
                _seasonsDropDown.selectedOption = _task.RenewDate.SeasonIndex;
            }

            SetupParameters();
        }