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 "; Assembly currentAssembly = System.Reflection.Assembly.GetExecutingAssembly(); eventList.Add(CreateEvent(subjPrefix + "meeting", "The meeting will be held in the Conference Room", c_Resource.ResID, 2, 5, 14, currentAssembly.GetManifestResourceStream("CustomAppointmentImageAndText.Images.BOCustomer_16x16.png"), currentAssembly.GetManifestResourceStream("CustomAppointmentImageAndText.Images.Project_32x32.png"))); eventList.Add(CreateEvent(subjPrefix + "travel", "Book a hotel in advance", c_Resource.ResID, 3, 6, 10, currentAssembly.GetManifestResourceStream("CustomAppointmentImageAndText.Images.Country_16x16.png"), currentAssembly.GetManifestResourceStream("CustomAppointmentImageAndText.Images.BOChangeHistory_32x32.png"))); eventList.Add(CreateEvent(subjPrefix + "phone call", "Important phone call", c_Resource.ResID, 0, 4, 16, currentAssembly.GetManifestResourceStream("CustomAppointmentImageAndText.Images.BOContact_16x16.png"), currentAssembly.GetManifestResourceStream("CustomAppointmentImageAndText.Images.EditTask_32x32.png"))); } }