/// <summary> /// This method fetches the schedules of more than one group. Subscribe to <see cref="RaiseReadyToClearView"/>, <see cref="RaiseErrorMessage"/> and either <see cref="RaiseRetreivedScheduleItems"/> or <see cref="RaiseRetreivedNewsItem"/>, depending on which <see cref="Activity"/> you are performing /// </summary> /// <param name="groups">An array of valid WebUntis group numbers.</param> /// <param name="week">For debugging purposes only. Which week to fetch for. Will default to -1 which means that the current week will be selected.</param> public void GetMultipleGroupTimes(int[] groups, int week = -1) { var tracker = new MulipleAwait(groups.Length); tracker.RaiseFinishedWaitingAndJoining += (sender, e) => { OnRaiseRetreivedScheduleItemsEvent(e); Revert(); }; _temporaryRefresh = tracker.CallMe; _rootToTemporary = true; foreach (var group in groups) { GetTimes(group, Activity.ParseFirstSchedule, week); } }