Beispiel #1
0
 private void TaskItem_SubtaskClick(object sender, TaskSubtaskEventArgs e)
 {
     if (e.Task != null)
     {
         SetNavigationParameter(true, "AddSubtask");
         Navigate(typeof(SubtasksPage), e.Task);
     }
 }
Beispiel #2
0
        private void ExecuteGesture(GestureAction action, TaskSubtaskEventArgs e)
        {
            if (e.Task == null || e.Subtask == null)
            {
                return;
            }

            switch (action)
            {
            case GestureAction.Complete:
                VibrateHelper.Short();
                ToggleComplete(e.Task, e.Subtask);
                break;

            case GestureAction.Delete:
                VibrateHelper.Short();
                e.Delete = true;
                Toast.Show(AppResources.ToastSubtaskDeleted, App.IconStyle("Delete"));
                break;

            default:
                break;
            }
        }
Beispiel #3
0
 private void TaskItem_SubtaskSwipeRight(object sender, TaskSubtaskEventArgs e)
 {
     ExecuteGesture(Settings.Current.SwipeRightAction, e);
 }
Beispiel #4
0
 private void TaskItem_SubtaskCheck(object sender, TaskSubtaskEventArgs e)
 {
     ToggleComplete(e.Task, e.Subtask);
 }