CustomObject CreateCustomObject(string name, int index)
        {
            CustomObject obj = new CustomObject();

            obj.Name    = name;
            obj.Info    = objectInfos[index];
            obj.Picture = Image.FromFile(objectInfos[index]);
            return(obj);
        }
        private void schedulerControl1_InitAppointmentImages(object sender, AppointmentImagesEventArgs e)
        {
            AppointmentImageInfoCollection c = e.ImageInfoList;

            CustomObject obj = e.Appointment.CustomFields[CustomFieldName] as CustomObject;

            AppointmentImageInfo info = new AppointmentImageInfo();

            if ((obj != null) && (obj.Picture != null))
            {
                info.Image      = obj.Picture;
                info.ImageIndex = 2;
                c.Add(info);
            }
        }
        private void schedulerControl1_InitAppointmentDisplayText(object sender, AppointmentDisplayTextEventArgs e)
        {
            CustomObject obj = e.Appointment.CustomFields[CustomFieldName] as CustomObject;

            e.Description = (obj != null) ? obj.ToString() : "(no custom info)";
        }