private void radScheduler1_AppointmentFormatting(object sender, SchedulerAppointmentEventArgs e) { if (e.Appointment.Description == "C") { e.AppointmentElement.Visibility = ElementVisibility.Collapsed; } }
private void radScheduler1_AppointmentFormatting_1(object sender, SchedulerAppointmentEventArgs e) { try { if (e.Appointment.Description == "N") { e.AppointmentElement.BorderColor = Color.DarkBlue; e.AppointmentElement.BorderBoxStyle = BorderBoxStyle.SingleBorder; e.AppointmentElement.BorderWidth = 1; e.AppointmentElement.BackColor = Color.White; e.AppointmentElement.BackColor2 = Color.White; e.AppointmentElement.BackColor3 = Color.White; } else if (e.Appointment.Description == "C") { e.AppointmentElement.Visibility = ElementVisibility.Collapsed; e.AppointmentElement.BorderColor = Color.Gold; e.AppointmentElement.BorderBoxStyle = BorderBoxStyle.SingleBorder; e.AppointmentElement.BorderWidth = 1; e.AppointmentElement.BackColor = Color.Gold; e.AppointmentElement.BackColor2 = Color.Gold; e.AppointmentElement.BackColor3 = Color.Gold; } else if (e.Appointment.Description == "D") { e.AppointmentElement.BorderColor = Color.IndianRed; e.AppointmentElement.BorderBoxStyle = BorderBoxStyle.SingleBorder; e.AppointmentElement.BorderWidth = 1; e.AppointmentElement.BackColor = Color.IndianRed; e.AppointmentElement.BackColor2 = Color.IndianRed; e.AppointmentElement.BackColor3 = Color.IndianRed; } else if (e.Appointment.Description == "P") { e.AppointmentElement.BorderColor = Color.LightGreen; e.AppointmentElement.BorderBoxStyle = BorderBoxStyle.SingleBorder; e.AppointmentElement.BorderWidth = 1; e.AppointmentElement.BackColor = Color.LightGreen; e.AppointmentElement.BackColor2 = Color.LightGreen; e.AppointmentElement.BackColor3 = Color.LightGreen; } else if (e.Appointment.Description == "R") { e.AppointmentElement.BorderColor = Color.Gray; e.AppointmentElement.BorderBoxStyle = BorderBoxStyle.SingleBorder; e.AppointmentElement.BorderWidth = 1; e.AppointmentElement.BackColor = Color.Gray; e.AppointmentElement.BackColor2 = Color.Gray; e.AppointmentElement.BackColor3 = Color.Gray; } } catch (Exception ex) { MessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void radScheduler1_AppointmentResizeEnd(object sender, SchedulerAppointmentEventArgs e) { try { if (e.Appointment.Description == "N") { citasTableAdapter1.Update(this.schedulerDataDataSet.CITAS); cita1TableAdapter1.Update(this.schedulerDataDataSet.CITA1); } } catch (Exception ex) { MessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void radScheduler1_AppointmentFormatting(object sender, SchedulerAppointmentEventArgs e) { Font font = new Font("b nazanin", 9f, FontStyle.Bold); Font HeaderFont = new Font("b titr", 10f, FontStyle.Bold); e.AppointmentElement.ResetValue(VisualElement.FontProperty, ValueResetFlags.Local); e.AppointmentElement.ResetValue(VisualElement.ForeColorProperty, ValueResetFlags.Local); e.AppointmentElement.ResetValue(LightVisualElement.TextAlignmentProperty, ValueResetFlags.Local); e.AppointmentElement.UseDefaultPaint = true; e.AppointmentElement.ResetValue(LightVisualElement.BorderColorProperty, ValueResetFlags.Local); e.AppointmentElement.ResetValue(LightVisualElement.BorderWidthProperty, ValueResetFlags.Local); e.AppointmentElement.ResetValue(LightVisualElement.BorderBoxStyleProperty, ValueResetFlags.Local); // e.AppointmentElement.ResetValue(VisualElement.BackColorProperty, ValueResetFlags.Local); e.AppointmentElement.ResetValue(VisualElement.BackgroundShapeProperty, ValueResetFlags.Local); e.AppointmentElement.ResetValue(VisualElement.BorderThicknessProperty, ValueResetFlags.Local); e.AppointmentElement.ResetValue(VisualElement.ForeColorProperty, ValueResetFlags.Local); e.AppointmentElement.ResetValue(VisualElement.ShapeProperty, ValueResetFlags.Local); e.AppointmentElement.ResetValue(VisualElement.ShouldPaintProperty, ValueResetFlags.Local); e.AppointmentElement.ResetValue(VisualElement.StyleProperty, ValueResetFlags.Local); e.AppointmentElement.Font = font; e.AppointmentElement.ForeColor = Color.Black; e.AppointmentElement.TextAlignment = ContentAlignment.MiddleCenter; e.AppointmentElement.TextOrientation = Orientation.Horizontal; e.AppointmentElement.TitleFormat = "{2}"; RadOffice2007ScreenTipElement screenTip = new RadOffice2007ScreenTipElement(); screenTip.CaptionLabel.Text = "مدت زمان"; screenTip.CaptionLabel.Font = HeaderFont; screenTip.CaptionLabel.TextOrientation = Orientation.Horizontal; screenTip.CaptionLabel.Alignment = ContentAlignment.MiddleRight; screenTip.Alignment = ContentAlignment.MiddleCenter; screenTip.CaptionLabel.Alignment = ContentAlignment.TopRight; screenTip.CaptionLabel.TextAlignment = ContentAlignment.TopRight; screenTip.CaptionLabel.TextOrientation = Orientation.Horizontal; screenTip.CaptionLabel.ForeColor = Color.Blue; screenTip.MainTextLabel.Text = e.AppointmentElement.Start.TimeOfDay + " -- " + e.AppointmentElement.End.TimeOfDay; screenTip.MainTextLabel.Font = font; e.AppointmentElement.ScreenTip = screenTip; e.AppointmentElement.ShowAppointmentDescription = true; }
private void radScheduler1_AppointmentFormatting(object sender, SchedulerAppointmentEventArgs e) { }
private void radScheduler1_AppointmentFormatting(object sender, SchedulerAppointmentEventArgs e) { this.radScheduler1.AppointmentTitleFormat = "{2}"; e.AppointmentElement.Text = e.Appointment.End.ToShortTimeString() + " - " + e.Appointment.Start.ToShortTimeString() ; e.AppointmentElement.Text = e.AppointmentElement.Text.Replace("AM", "").Replace("PM",""); e.AppointmentElement.TextAlignment = ContentAlignment.TopCenter; e.AppointmentElement.RightToLeft = true; e.AppointmentElement.Font = _schedulerAppoinmentFont; }
private void radScheduler1_AppointmentDeleted(object sender, SchedulerAppointmentEventArgs e) { this.appointmentsTableAdapter.Update(DataSources.PatientsDataSet.Appointments); }
private void radScheduler1_AppointmentSelected(object sender, SchedulerAppointmentEventArgs e) { this.radTxtEventList.Text += "AppointmentSelected\r\n"; this.radTxtEventList.SelectionStart = this.radTxtEventList.TextLength; this.radTxtEventList.ScrollToCaret(); }