Example #1
0
        public void UncheckTasks()
        {
            if (SelectedTasks != null)
            {
                _listTasks.Add(SelectedTasks);
                _listTasksDone.Remove(SelectedTasks);

                TasksDone.Refresh();
                Tasks.Refresh();
            }
        }
Example #2
0
        public ProfilViewModel()
        {
            _listTasks = new List <Tasks>
            {
                new Tasks(1, "Rendre TP C#", false, DateTime.Now.AddDays(15)),
                new Tasks(2, "Rendre TP Java", false, DateTime.Now.AddMonths(1)),
                new Tasks(3, "Terminer MSPR Oracle", false, DateTime.Now.AddDays(3))
            };
            Tasks = CollectionViewSource.GetDefaultView(_listTasks);
            Tasks.Refresh();

            _listTasksDone = new List <Tasks>
            {
                new Tasks(4, "Rendre TP Python", true, DateTime.Now.AddMonths(-2)),
                new Tasks(5, "Faire documentation technique projet POIN", true, DateTime.Now.AddDays(-45))
            };
            TasksDone = CollectionViewSource.GetDefaultView(_listTasksDone);
            TasksDone.Refresh();

            _listActivities = new List <Activity>
            {
                new Activity(1, "A mis 5 étoiles à l'extrait de code : Links To Css in HTML", DateTime.Now.AddDays(-2).ToString("dd/MM/yyyy")),
                new Activity(2, "A créé l'extrait de code : WPF Grid Exemple", "29/05/2020")
            };
            Activities = CollectionViewSource.GetDefaultView(_listActivities);
            Activities.Refresh();

            _listFavorites = new List <Favorite>
            {
                new Favorite("Links To Css in HTML", "ExtraitCodeHome"),
                new Favorite("WPF Grid Exemple", "ExtraitCodeHome")
            };
            Favorites = CollectionViewSource.GetDefaultView(_listFavorites);
            Favorites.Refresh();

            SelectedDate = DateTime.Today;
            ShowProfile  = true;
        }