public static void GenerateEvents(BindingList <CustomAppointment> eventList, int count, BindingList <CustomResource> resources) { for (int i = 0; i < count; i++) { CustomResource resource = resources[i]; string subjPrefix = resource.Name + "'s "; eventList.Add(CreateEvent(subjPrefix + "meeting", resource.ResourceID, 2, 5, Priority.High)); eventList.Add(CreateEvent(subjPrefix + "travel", resource.ResourceID, 3, 6, Priority.Low)); eventList.Add(CreateEvent(subjPrefix + "phone call", resource.ResourceID, 0, 10, Priority.Medium)); } }
public static void FillResources(BindingList <CustomResource> resources, int count) { int cnt = Math.Min(count, Users.Length); for (int i = 1; i <= cnt; i++) { CustomResource resource = new CustomResource(); resource.Name = Users[i - 1]; resource.ResourceID = i; resources.Add(resource); } }