private void schedulerControl1_InitAppointmentImages(object sender, AppointmentImagesEventArgs e) { if (e.Appointment.CustomFields["ApptImage1"] != null) { byte[] imageBytes = (byte[])e.Appointment.CustomFields["ApptImage1"]; if (imageBytes != null) { AppointmentImageInfo info = new AppointmentImageInfo(); using (MemoryStream ms = new MemoryStream(imageBytes)) { info.Image = Image.FromStream(ms); info.Image.Tag = e.ImageInfoList.Add(info); } } } if (e.Appointment.CustomFields["ApptImage2"] != null) { byte[] imageBytes = (byte[])e.Appointment.CustomFields["ApptImage2"]; if (imageBytes != null) { AppointmentImageInfo info = new AppointmentImageInfo(); using (MemoryStream ms = new MemoryStream(imageBytes)) { info.Image = Image.FromStream(ms); e.ImageInfoList.Add(info); } } } }
public static void scheduler_InitAppointmentImages(object sender, AppointmentImagesEventArgs e) { AppointmentImageInfo info = new AppointmentImageInfo(); info.Image = Image.FromFile("image.png"); e.ImageInfoList.Add(info); }
private void schedulerControl1_InitAppointmentImages(object sender, AppointmentImagesEventArgs e) { AppointmentImageInfo info = new AppointmentImageInfo(); info.Image = this.sportsImages.Images[Convert.ToInt32(e.Appointment.LabelKey)]; e.ImageInfoList.Add(info); }
protected void ASPxScheduler1_InitAppointmentImages(object sender, AppointmentImagesEventArgs e) { ImageProperties imageProperties = new ImageProperties("~/ImageHandler.ashx?imgId=" + e.Appointment.LabelKey.ToString()); imageProperties.Width = 24; imageProperties.Height = 24; AppointmentImageInfo info = new AppointmentImageInfo(); info.ImageProperties = imageProperties; e.ImageInfoList.Add(info); }
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); // } }
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_InitAppointmentImages(object sender, AppointmentImagesEventArgs e) { MyAppointment a = e.Appointment.GetSourceObject(schedulerStorage1) as MyAppointment; if (a != null) { a.CalculateAppointmentInfo(Properties.Settings.Default.Main_DeadlineDaysBefore); AppointmentImageInfo info = new AppointmentImageInfo(); info.Image = imageCollection1.Images[SelectImageIndex(a)]; //AppointmentImageInfo info1 = new AppointmentImageInfo(); //info1.Image = Properties.Resources.openHS; e.ImageInfoList.Add(info); //e.ImageInfoList.Add(info1); } }
/// <summary> /// Evento chamado para colocar imagens nos appointments /// </summary> /// <param name="sender">object</param> /// <param name="e">AppointmentImagesEventArgs</param> private void schedulerControl1_InitAppointmentImages(object sender, AppointmentImagesEventArgs e) { SuspendLayout(); FeriasPlanejamento ferias = Session.FindObject <FeriasPlanejamento>(CriteriaOperator.Parse("Oid=?", new Guid(e.Appointment.Id.ToString()))); e.Appointment.Duration = ferias._DuracaoFerias; Image img; if (ferias.Periodo.Colaborador._Foto != null) { img = ImageUtil.ResizeImage(ferias.Periodo.Colaborador._Foto, 32, 32); } else { img = ImageUtil.ResizeImage(Resources.no_image, 32, 32); } if (!FotosColaboradores.Keys.Contains(ferias.Oid)) { FotosColaboradores.Add(ferias.Oid, img); } ResumeLayout(); }
private void schedulerControl1_InitAppointmentImages_1(object sender, AppointmentImagesEventArgs e) { Assignment a = e.Appointment.GetSourceObject(schedulerStorage1) as Assignment; if (a != null) { AppointmentImageInfo info = new AppointmentImageInfo(); info.Image = SelectImage(a); //AppointmentImageInfo info1 = new AppointmentImageInfo(); //info1.Image = Properties.Resources.openHS; e.ImageInfoList.Add(info); //e.ImageInfoList.Add(info1); if (a.CheckedIn) { AppointmentImageInfo info1 = new AppointmentImageInfo(); info1.Image = Properties.Resources.Lock_Lock_icon16; //AppointmentImageInfo info1 = new AppointmentImageInfo(); //info1.Image = Properties.Resources.openHS; e.ImageInfoList.Add(info1); } } }
public void InitAppointmentImages(object sender, AppointmentImagesEventArgs e, AppointmentStatusDataStorage statuses) { //throw new NotImplementedException(); }
public void InitAppointmentImages(object sender, AppointmentImagesEventArgs e, AppointmentStatusDataStorage statuses) { }