Exemple #1
0
        public MainPageViewModel()
        {
            MessagingCenter.Subscribe <string>(this, "ExecuteAction", (actionToExecute) =>
            {
                switch (actionToExecute)
                {
                case "Clean":
                    ToDo.Clear();
                    Doing.Clear();
                    Done.Clear();
                    break;

                case "Reset":
                    break;

                case "OtherPage":
                case "AboutPage":
                    navigationService.Navigate(actionToExecute);
                    break;
                }
            });

            navigationService = new NavigationService();
            apiService        = new ApiService();

            ToDo  = new ObservableCollection <TaskItemViewModel>();
            Doing = new ObservableCollection <TaskItemViewModel>();
            Done  = new ObservableCollection <TaskItemViewModel>();

            LoadTasks();
        }
Exemple #2
0
        public void RefreshMainWindow()
        {
            ToDo.Clear();
            Doing.Clear();
            Backlog.Clear();
            Done.Clear();

            var result = readDbDataToDisplay();

            foreach (var i in result)
            {
                if (i.States == BackLog.State.IsToDo)
                {
                    ToDo.Add(i);
                }
                else if (i.States == BackLog.State.IsDoing)
                {
                    Doing.Add(i);
                }
                else if (i.States == BackLog.State.Backlog)
                {
                    Backlog.Add(i);
                }
                else
                {
                    Done.Add(i);
                }
            }
        }
Exemple #3
0
        /// <summary>
        /// Execution of new scrum that will dete tasks from Done, and put all current task to BackLog.
        /// </summary>
        public void NewScrumCommandExecute()
        {
            foreach (var i in Done)
            {
                DeleteTask(i);
            }

            Done.Clear();

            foreach (var i in Doing)
            {
                i.States = BackLog.State.Backlog;
                PutTask(i);
                Backlog.Add(i);
            }
            foreach (var i in ToDo)
            {
                i.States = BackLog.State.Backlog;
                PutTask(i);
                Backlog.Add(i);
            }

            Doing.Clear();
            ToDo.Clear();
        }
Exemple #4
0
 public void Clear()
 {
     ToDo.Clear();
     InProgress.Clear();
     Done.Clear();
     Cancelled.Clear();
 }
Exemple #5
0
        internal async Task RefreshTasks()
        {
            ToDo.Clear();
            Doing.Clear();
            Done.Clear();

            await LoadTasks();
        }