public static void scheduler_AppointmentViewInfoCustomizing_1(object sender, AppointmentViewInfoCustomizingEventArgs e)
 {
     if (e.ViewInfo.Description.Contains("Time"))
     {
         e.ViewInfo.StatusDisplayType = AppointmentStatusDisplayType.Time;
     }
 }
 private void SchedulerControl1_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
 {
     if (e.ViewInfo.DisplayText == String.Empty)
     {
         e.ViewInfo.ToolTipText = String.Format("Started at {0:g}", e.ViewInfo.Appointment.Start);
     }
 }
        private void OnAppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
        {
            var obj = (AppointmentModel)e.ViewInfo.Appointment.GetSourceObject(scheduler.GetCoreStorage());

            e.ViewInfo.HasRightBorder = obj.IsCompleted;
            e.ViewInfo.IsEndVisible   = obj.IsCompleted;

            e.ViewInfo.HasLeftBorder = true;
        }
        private void SchedulerControl1_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
        {
            var c = e.ViewInfo.Appointment.Id as MyAppointment;

            if (c != null && c.BackColor != Color.Empty)
            {
                e.ViewInfo.Appearance.BackColor = c.BackColor;
            }
        }
Beispiel #5
0
        private void schedulerControl1_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
        {
            Color custColor = (Color)e.ViewInfo.Appointment.CustomFields["CustomColorField"];

            // Change the appointment color if the custom color value is not default.
            if (custColor != Color.Transparent)
            {
                e.ViewInfo.Appearance.BackColor = custColor;
            }
        }
Beispiel #6
0
        static void scheduler_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
        {
            SchedulerControl scheduler = sender as SchedulerControl;

            DevExpress.XtraScheduler.Drawing.AgendaAppointmentViewInfo agendaViewInfo = e.ViewInfo as DevExpress.XtraScheduler.Drawing.AgendaAppointmentViewInfo;
            if (agendaViewInfo != null)
            {
                agendaViewInfo.Appearance.BackColor = scheduler.DataStorage.GetLabelColor(agendaViewInfo.Appointment.LabelKey);
            }
        }
Beispiel #7
0
        private void scheduler_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
        {
            e.ViewInfo.Appearance.BackColor = DXSkinColors.FillColors.Warning;

            if (e.ViewInfo.Appointment.GetRow(storage) is CapacityRequirement capReq &&
                capReq.RoomBooking != null)
            {
                e.ViewInfo.Appearance.BackColor = DXSkinColors.FillColors.Success;
            }
        }
Beispiel #8
0
        private void schedulerControl1_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
        {
            CustomAppointmentData cad = new CustomAppointmentData();
            object price = e.ViewInfo.Appointment.CustomFields["cfPrice"];

            if (price != null && price != DBNull.Value)
            {
                cad.Price = Convert.ToDecimal(price);
            }
            e.ViewInfo.CustomViewInfo = cad;
        }
Beispiel #9
0
    protected void ASPxScheduler1_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
    {
        Appointment apt = e.ViewInfo.Appointment;

        if (apt.HasReminder && apt.Type == AppointmentType.Occurrence && apt.RecurrencePattern != null)
        {
            Appointment       pattern  = apt.RecurrencePattern;
            RecurringReminder reminder = (RecurringReminder)pattern.Reminder;
            e.ViewInfo.ShowBell = reminder.AlertOccurrenceIndex <= apt.RecurrenceIndex;
        }
    }
Beispiel #10
0
 /// <summary>
 /// 스케쥴 스타일 변경
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void schedulerControl_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
 {
     e.ViewInfo.Appearance.Font = new Font("세스코 R", 9, FontStyle.Regular);                                                                                                               //폰트크기 변경
     if (e.ViewInfo.Appointment.Id.Equals(_strUserID))                                                                                                                                   //자신이 등록한 일정이면
     {
         e.ViewInfo.Appearance.BackColor = Color.YellowGreen;                                                                                                                            //색상변경
     }
     if (schedulerControl.ActiveViewType.Equals(SchedulerViewType.Month))                                                                                                                //월단위면
     {
         e.ViewInfo.ToolTipText = e.ViewInfo.Appointment.Description + "\n" + e.ViewInfo.Appointment.Start.ToShortTimeString() + " ~ " + e.ViewInfo.Appointment.End.ToShortTimeString(); //시간을 툴팁으로 보여줌
     }
     e.ViewInfo.ShouldShowToolTip = true;
 }
Beispiel #11
0
        private void schedulerAgenda_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
        {
            var aptViewInfo = e.ViewInfo as AppointmentViewInfo;

            if (aptViewInfo.Appointment.End >= DateTime.Now)
            {
                return;
            }

            aptViewInfo.Appearance.Options.UseBackColor = true;

            var agenda =
                _agendas.First(x => x.IdAgenda == ((Agenda)aptViewInfo.Appointment.GetRow(schedulerStorage)).IdAgenda);

            aptViewInfo.Appearance.BackColor = agenda.Situacao == SituacaoAgenda.Finalizada ? Color.LightSkyBlue : Color.BurlyWood;
        }
        public static void scheduler_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
        {
            switch (e.ViewInfo.Status.Type)
            {
            case AppointmentStatusType.Busy:
                e.ViewInfo.Appearance.ForeColor = Color.Red;
                break;

            case AppointmentStatusType.Free:
                e.ViewInfo.Appearance.ForeColor = Color.Blue;
                break;

            case AppointmentStatusType.OutOfOffice:
                e.ViewInfo.Appearance.ForeColor = Color.Green;
                break;
            }
        }
Beispiel #13
0
        private void schedulerControl1_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
        {
            try
            {
                AppointmentViewInfo aptViewInfo = e.ViewInfo;
                Appointment         apt         = aptViewInfo.Appointment;

                Assignment ass = apt.GetSourceObject(schedulerStorage1) as Assignment;

                if (ass.Booking.ColorBookings)
                {
                    aptViewInfo.Appearance.BackColor = Color.FromArgb(ass.Booking.Color);
                }
            }
            catch (Exception)
            {
            }
        }
Beispiel #14
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
            }
        }
Beispiel #15
0
        void schedulerControl1_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
        {
            DevExpress.XtraScheduler.Drawing.AppointmentViewInfo viewInfo = e.ViewInfo as DevExpress.XtraScheduler.Drawing.AppointmentViewInfo;
            if (viewInfo.Appointment == null)
            {
                return;
            }

            if (viewInfo.Appointment.Description.Equals("0"))
            {
                viewInfo.Appearance.BackColor = Color.Transparent;
            }
            else
            {
                viewInfo.Appearance.BackColor = System.Drawing.ColorTranslator.FromHtml(viewInfo.Appointment.Description);//背景色
            }
            viewInfo.Appearance.Options.UseBackColor   = true;
            viewInfo.Appearance.Options.UseTextOptions = true;
        }
Beispiel #16
0
        private void schedulerControl1_AppointmentViewInfoCustomizing(object sender,
                                                                      AppointmentViewInfoCustomizingEventArgs e)
        {
            AppointmentViewInfo viewInfo = e.ViewInfo;
            Resource            resource = schedulerControl1.Storage.ResourceStorage.
                                           GetResourceById(viewInfo.Appointment.ResourceId);

            if (resource == Resource.Empty || resource.Image == null)
            {
                viewInfo.CustomViewInfo = null;
            }
            else
            {
                if (!this.resourceImages.ContainsKey(resource))
                {
                    this.resourceImages[resource] = resource.Image.Source as BitmapImage;
                }
                viewInfo.CustomViewInfo = this.resourceImages[resource];
            }
        }
Beispiel #17
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
            }
        }
Beispiel #18
0
        /// <summary>
        /// Muda a back color dos appointments de acordo com as férias do colaborador
        /// </summary>
        /// <param name="sender">object</param>
        /// <param name="e">AppointmentViewInfoCustomizingEventArgs</param>
        private void schedulerControl1_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
        {
            string situacao = e.ViewInfo.Appointment.Description.Split(',')[6];
            Color  cor_apt;

            switch (situacao)
            {
            case "EmAtraso": cor_apt = Color.FromArgb(255, 106, 106); break;

            case "Realizado": cor_apt = Color.FromArgb(110, 163, 217); break;

            case "Planejado": cor_apt = Color.FromArgb(255, 255, 98); break;

            case "EmAndamento": cor_apt = Color.LimeGreen; break;

            case "Vendida": cor_apt = Color.LightGreen; break;

            default: cor_apt = Color.FromArgb(191, 177, 207);  //outras licenças
                break;
            }
            e.ViewInfo.Appearance.BackColor = cor_apt;
        }
Beispiel #19
0
        private void scheduler_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
        {
            if (!chkAppointmentToolTip.IsChecked.GetValueOrDefault() == true)
            {
                return;
            }

            AppointmentViewInfo viewInfo = e.ViewInfo;
            Resource            resource = scheduler.Storage.ResourceStorage.GetResourceById(viewInfo.Appointment.ResourceId);

            if (Object.Equals(resource.Id, EmptyResourceId.Id) || resource.ImageBytes == null)
            {
                viewInfo.CustomViewInfo = null;
            }
            else
            {
                if (!this.resourceImages.ContainsKey(resource))
                {
                    this.resourceImages[resource] = resource.GetImage() as BitmapImage;
                }
                viewInfo.CustomViewInfo = this.resourceImages[resource];
            }
        }
Beispiel #20
0
 private void schedulerControl1_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
 {
     if (e.ViewInfo.Appointment.Description.Contains("Inactive"))
     {
         e.ViewInfo.Appearance.Font = new Font(e.ViewInfo.Appearance.Font,(FontStyle.Bold|FontStyle.Strikeout));
     }
 }
        private void schedulerControl1_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
        {
            object group = e.ViewInfo.Appointment.CustomFields[GroupIdFieldName];

            e.ViewInfo.Subject = string.Format("{0} (group: {1})", e.ViewInfo.Appointment.Subject, (group == null ? "N/A" : group.ToString()));
        }
Beispiel #22
0
 private void SchedulerInsertion_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e)
 {
     KnownColor[] values = (KnownColor[])Enum.GetValues(typeof(KnownColor));
     int i =0;
     foreach (KnownColor kc in values)
     {
         if (i >= ListeLibelleAct.Count) break;
         Color RealColor = Color.FromKnownColor(kc);
         if (e.ViewInfo.Appointment.Subject == ListeLibelleAct[i])
             e.ViewInfo.Appearance.BackColor = RealColor;
         i++;//Do something with RealColor here.
     }
 }