private CustomResource CreateCustomResource(int res_id, string caption, Color resColor) { CustomResource cr = new CustomResource(); cr.ResID = res_id; cr.Name = caption; cr.ResColor = resColor; return(cr); }
private void GenerateEvents(List <CustomAppointment> eventList, int count) { for (int i = 0; i < count; i++) { CustomResource c_Resource = CustomResourceCollection[i]; string subjPrefix = c_Resource.Name + "'s "; eventList.Add(CreateEvent(subjPrefix + "meeting", "The meeting will be held in the Conference Room", c_Resource.ResID, 2, 5)); eventList.Add(CreateEvent(subjPrefix + "travel", "Book a hotel in advance", c_Resource.ResID, 3, 6)); eventList.Add(CreateEvent(subjPrefix + "phone call", "Important phone call", c_Resource.ResID, 0, 10)); } }