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;
		}
示例#2
0
        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;
        }
示例#3
0
		private void ReceiveNewAssignments(object sender, AssignmentRetreiverEventArgs args)
		{
			latestMyAssignments = args.Assignments;
			isUpdatedData = true;
		}