private void UpdateTaskList(object sender, AssignmentRetreiverEventArgs args) { if (args.Assignments == null) return; var knownTasks = new List<AssignmentData>(); foreach (var assignment in args.Assignments.Assignables) { knownTasks.Add(new AssignmentData(assignment.ID.Value, assignment.Name)); if (!IsPreviousTask(assignment.ID.Value) && !IsUnreadTask(assignment.ID.Value) && !isFirstTime) { AddNewAssignment(assignment); } } isFirstTime = false; previousTasks = knownTasks; SettingsManager.KnownAssignments = previousTasks; }
private void UpdateTaskList(object sender, AssignmentRetreiverEventArgs args) { if (args.Assignments == null) { return; } var knownTasks = new List <AssignmentData>(); foreach (var assignment in args.Assignments.Assignables) { knownTasks.Add(new AssignmentData(assignment.ID.Value, assignment.Name)); if (!IsPreviousTask(assignment.ID.Value) && !IsUnreadTask(assignment.ID.Value) && !isFirstTime) { AddNewAssignment(assignment); } } isFirstTime = false; previousTasks = knownTasks; SettingsManager.KnownAssignments = previousTasks; }
private void ReceiveNewAssignments(object sender, AssignmentRetreiverEventArgs args) { latestMyAssignments = args.Assignments; isUpdatedData = true; }