示例#1
0
        //determines when an assigment is added to the list
        public static async Task NewAssignmentAdded()
        {
            //I have the old list, get a new list and compare sizes
            List <Assignment> refreshedTasks = await StudentInfoHandler.GetTodolist().ConfigureAwait(false);

            List <Assignment> newTasks = new List <Assignment>();

            //if there is a change grab the assignment that was last added to the list

            if (currentList.Count != refreshedTasks.Count)
            {
                foreach (Assignment item in refreshedTasks)
                {
                    if (!currentList.Contains(item))
                    {
                        newTasks.Add(item);
                    }
                }
                isUpdateable = true;
            }

            refreshedList = refreshedTasks;

            if (newTasks.Count != 0)
            {
                NotificationBalloonTips.NewAssignmentPopUp(newTasks);
            }
        }
示例#2
0
        protected async Task TotalSetUp()
        {
            lbl_Name.Content = "Welcome, " + name;
            dateBox.Content  = "Date: " + DateTime.Now.ToString("MMMM dd, yyyy");
            classes          = await StudentInfoHandler.GetCurrentClasses().ConfigureAwait(false);

            totalAssignments = await StudentInfoHandler.GetTodolist().ConfigureAwait(false);
        }
示例#3
0
        public async Task LoadData()
        {
            //load current classes
            currentClasses = await studentInfo.Getcurrentclasses().ConfigureAwait(false);

            //load current tasks
            currentTasks = await studentInfo.GetTodolist().ConfigureAwait(false);
        }
示例#4
0
        ////////LOGIC /////////////////////
        #region API Logic
        protected async Task RetrieveData()
        {
            UserName_lbl.Content = "Welcome, " + User;
            Date_lbl.Content     = "Today's Date : " + DateTime.Now.ToString("MMM dd, yyyy");

            currentCoursesJson = await StudentInfoHandler.GetCurrentClasses().ConfigureAwait(false);

            currentAssignmentsJson = await StudentInfoHandler.GetTodolist().ConfigureAwait(false);

            currentEnrollmentsJson = await StudentInfoHandler.GetStudentEnrollment().ConfigureAwait(false);
        }