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(); }
/// <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(); }
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); } } }
public void Clear() { ToDo.Clear(); InProgress.Clear(); Done.Clear(); Cancelled.Clear(); }
internal async Task RefreshTasks() { ToDo.Clear(); Doing.Clear(); Done.Clear(); await LoadTasks(); }
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"); }