public static CustomResource CreateCustomResource(int res_id, string caption, Color ResColor) { CustomResource cr = new CustomResource(); cr.ResID = res_id; cr.Name = caption; return(cr); }
public static void GenerateEvents(BindingList <CustomAppointment> eventList, BindingList <CustomResource> resources) { int count = resources.Count; for (int i = 0; i < count; i++) { CustomResource resource = resources[i]; string subjPrefix = resource.Name + "'s "; eventList.Add(CreateEvent(subjPrefix + "meeting", resource.ResID, 2, 5)); eventList.Add(CreateEvent(subjPrefix + "travel", resource.ResID, 3, 6)); eventList.Add(CreateEvent(subjPrefix + "special", resource.ResID, 0, 10)); } }