Example #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();
        }
Example #2
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();
        }
Example #3
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);
                }
            }
        }
Example #4
0
 public void Clear()
 {
     ToDo.Clear();
     InProgress.Clear();
     Done.Clear();
     Cancelled.Clear();
 }
Example #5
0
        internal async Task RefreshTasks()
        {
            ToDo.Clear();
            Doing.Clear();
            Done.Clear();

            await LoadTasks();
        }
Example #6
0
 private void ReadTimer_Tick(object sender, EventArgs e)
 {
     string[] precteno = ToDo.VratS();
     if (precteno.Length < 1)
     {
         return;
     }
     args = precteno;
     CheckAndDo();
     ToDo.Clear();
     Log.Vlozit("Soubor ToDo.txt vymazán");
 }