private CustomResource CreateCustomResource(int res_id, string caption, Color ResColor, string imageUrl) { CustomResource cr = new CustomResource(); cr.Id = res_id; cr.Name = caption; cr.ResourceImageUrl = imageUrl; return(cr); }
private void GenerateEvents() { int count = CustomResourceCollection.Count; for (int i = 0; i < count; i++) { CustomResource resource = CustomResourceCollection[i]; string subjPrefix = resource.Name + "'s "; CustomEventList.Add(CreateEvent(subjPrefix + "meeting", "meeting", resource.Id, 2, 5, 0, "office")); CustomEventList.Add(CreateEvent(subjPrefix + "travel", "travel", resource.Id, 3, 6, 0, "out of the city")); CustomEventList.Add(CreateEvent(subjPrefix + "phone call", "phone call", resource.Id, 0, 10, 0, "office")); CustomEventList.Add(CreateEvent(subjPrefix + "business trip", "business trip", resource.Id, 3, 6, 3, "San-Francisco")); CustomEventList.Add(CreateEvent(subjPrefix + "double personal day", "double personal day", resource.Id, 0, 10, 2, "out of the city")); CustomEventList.Add(CreateEvent(subjPrefix + "personal day", "personal day", resource.Id, 0, 10, 1, "out of the city")); } }