//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); } }
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); }
public async Task LoadData() { //load current classes currentClasses = await studentInfo.Getcurrentclasses().ConfigureAwait(false); //load current tasks currentTasks = await studentInfo.GetTodolist().ConfigureAwait(false); }
////////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); }