//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 Run() { studentInfo = new StudentInfoHandler(token); await LoadData().ConfigureAwait(false); DisplayText(); }
public MainWindow(string token) { this.Token = token; studentInfo = new StudentInfoHandler(token); LoadData().Wait(); DisplayText(); InitializeComponent(); }
////////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); }