CustomResource CreateCustomResource(int res_id, string caption, System.Drawing.Color ResColor, Image image) { CustomResource cr = new CustomResource(); cr.ResID = res_id; cr.Name = caption; if (image != null) { cr.ResImage = image; } return(cr); }
void InitAppointments() { int count = _resourcesList.Count; for (int i = 0; i < count; i++) { CustomResource resource = _resourcesList[i]; string subjPrefix = resource.Name + "'s "; _appointmentsList.Add(CreateEvent(subjPrefix + "meeting", "meeting", resource.ResID, 2, 5, 0, "office")); _appointmentsList.Add(CreateEvent(subjPrefix + "travel", "travel", resource.ResID, 3, 6, 0, "out of the city")); _appointmentsList.Add(CreateEvent(subjPrefix + "phone call", "phone call", resource.ResID, 0, 10, 0, "office")); _appointmentsList.Add(CreateEvent(subjPrefix + "business trip", "business trip", resource.ResID, 3, 6, 3, "San-Francisco")); _appointmentsList.Add(CreateEvent(subjPrefix + "double personal day", "double personal day", resource.ResID, 0, 10, 2, "out of the city")); _appointmentsList.Add(CreateEvent(subjPrefix + "personal day", "personal day", resource.ResID, 0, 10, 1, "out of the city")); } }