コード例 #1
0
        public EditingTask(TaskObj inputTask)
        {
            InitializeComponent();

            _taskToEdit = inputTask;

            TaskNameTxt.Text        = _taskToEdit.TaskName;
            TaskFrequencyTxt.Text   = _taskToEdit.Frequency.ToString();
            TaskDescriptionTxt.Text = _taskToEdit.Description;
        }
コード例 #2
0
        private void AddNewTaskCommandBinding_OnExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            _newTask = new NewTaskPage();

            _newTask.ShowDialog();

            TaskObj newTaskItem = new TaskObj(_newTask.TaskName)
            {
                RemainderSendAt = _newTask.Remind,
                Frequency       = _newTask.Frequency
            };

            _listOfTasks.AddToTasks(newTaskItem);
            TaskList.Items.Refresh();


            TaskList.Items.MoveCurrentToLast();
            TaskList.SelectedItem = TaskList.Items.CurrentItem;

            TextInfo.Focus();
        }