Example #1
0
 public void InitAppointmentImages(object sender, AppointmentImagesEventArgs e, AppointmentStatusDataStorage statuses)
 {
     //throw new NotImplementedException();
 }
Example #2
0
        public void AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e, AppointmentStatusDataStorage statuses)
        {
            try
            {
                //apply the colours according to the value of the location.
                //e.ViewInfo.Appearance.BackColor <-- this is label colour
                //e.ViewInfo.Status <-- this is status strip colour (we set it on the appointment, not on the entity in "ENTITY" custom field.
                if (e.ViewInfo.Appointment.CustomFields != null)
                {
                    if (e.ViewInfo.Appointment.CustomFields["ENTITY"] is IEntityWithProgressStatus)
                    {
                        Appointment appt   = e.ViewInfo.Appointment;
                        DataTable   table  = appt.CustomFields["ENTITY"].ConvertToDataTable();//TempDataTableCreator.CreateDataTableFromEntity(appt.CustomFields["ENTITY"]);
                        ApptLabel   label  = GetApptLabel(table);
                        ApptStatus  status = GetApptStatus(table);

                        if (label != null)
                        {
                            e.ViewInfo.Appearance.BackColor = Color.FromArgb(label.ColourRGB);
                        }
                        else
                        {
                            e.ViewInfo.Appearance.BackColor = Color.FromArgb(SchedulerLabels.First(l => l.SortIndex == 99).ColourRGB);
                        }

                        if (status != null)
                        {
                            e.ViewInfo.Status = statuses.Items.Find(s => s.Id.ToString() == status.Id.ToString());
                        }
                        else
                        {
                            e.ViewInfo.Status = statuses.Items.CreateNewStatus(Guid.NewGuid(), "", "", new SolidBrush(Color.FromArgb(SchedulerStatuses.First(s => s.SortIndex == 99).ColourRGB)));
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex.Message, ex);
#if DEBUG
                throw ex;
#endif
            }
        }
Example #3
0
        public void InitAppointmentImages(object sender, AppointmentImagesEventArgs e, AppointmentStatusDataStorage statuses)
        {
            //if (e.ViewInfo.Appointment.CustomFields != null)
            //    if (e.ViewInfo.Appointment.CustomFields["ENTITY"] is ILocatableEntity)
            //    {
            //        ILocatableEntity entity = (e.ViewInfo.Appointment.CustomFields["ENTITY"] as ILocatableEntity);
            //        Appointment appt = e.ViewInfo.Appointment;

            //        Image im = DevExpress.Images.ImageResourceCache.Default.GetImage("images/actions/add_16x16.png");
            //        AppointmentImageInfo info = new AppointmentImageInfo();
            //        info.Image = im;//SystemIcons.Warning.ToBitmap();
            //        e.ImageInfoList.Add(info);
            //    }
        }
Example #4
0
        public void AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e, AppointmentStatusDataStorage statuses)
        {
            try
            {
                if (e.ViewInfo.Appointment.CustomFields != null)
                {
                    if (e.ViewInfo.Appointment.CustomFields["ENTITY"] is IEntityWithStatusLabels)
                    {
                        Appointment appt   = e.ViewInfo.Appointment;
                        DataTable   table  = appt.CustomFields["ENTITY"].ConvertToDataTable();
                        ApptLabel   label  = GetApptLabel(table);
                        ApptStatus  status = GetApptStatus(table);

                        if (label != null)
                        {
                            e.ViewInfo.Appearance.BackColor = Color.FromArgb(label.ColourRGB);
                        }
                        else
                        {
                            e.ViewInfo.Appearance.BackColor = Color.FromArgb(SchedulerLabels.First(l => l.SortIndex == 99).ColourRGB);
                        }

                        if (status != null)
                        {
                            e.ViewInfo.Status = statuses.Items.Find(s => s.Id.ToString() == status.Id.ToString());
                        }
                        else
                        {
                            e.ViewInfo.Status = statuses.Items.CreateNewStatus(Guid.NewGuid(), "", "", new SolidBrush(Color.FromArgb(SchedulerStatuses.First(s => s.SortIndex == 99).ColourRGB)));
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex.Message, ex);
#if DEBUG
                throw ex;
#endif
            }
        }
Example #5
0
 public void InitAppointmentImages(object sender, AppointmentImagesEventArgs e, AppointmentStatusDataStorage statuses)
 {
 }