private void HideWeekends(bool hide) { TimeScaleCollection scales = schedulerControl1.TimelineView.Scales; if (hide) { scales.BeginUpdate(); try { scales.Clear(); scales.Add(new TimeScaleMonth()); TimeScaleWorkWeekDay customWorkWeekScale = new TimeScaleWorkWeekDay(); TimeScaleLessThanDay customTimeScaleHour = new TimeScaleLessThanDay(TimeSpan.FromHours(1)); TimeScaleLessThanDay customTimeScaleMinutes = new TimeScaleLessThanDay(TimeSpan.FromMinutes(30)); customWorkWeekScale.Width = 125; customTimeScaleHour.Width = 125; customTimeScaleMinutes.Width = 125; scales.Add(customWorkWeekScale); scales.Add(customTimeScaleHour); scales.Add(customTimeScaleMinutes); } finally { scales.EndUpdate(); } checkEdit2.Enabled = true; } else { scales.BeginUpdate(); try { scales.Clear(); scales.Add(new TimeScaleMonth()); TimeScaleDay dayScale = new TimeScaleDay(); scales.Add(dayScale); TimeScaleHour hourScale = new TimeScaleHour(); hourScale.Width = 125; scales.Add(hourScale); } finally { scales.EndUpdate(); } checkEdit2.Enabled = false; } }
public Form1() { InitializeComponent(); TimeScaleCollection scales = schedulerControl1.TimelineView.Scales; scales.BeginUpdate(); try { scales.Clear(); scales.Add(new CustomTimeScaleDay()); scales.Add(new CustomTimeScaleHour()); schedulerControl1.DayView.TimeScale = TimeSpan.FromMinutes(12); this.schedulerStorage1.Appointments.Mappings.Description = "Requester"; this.schedulerStorage1.Appointments.Mappings.End = "fecha Fin"; this.schedulerStorage1.Appointments.Mappings.Label = "Tipo"; this.schedulerStorage1.Appointments.Mappings.ResourceId = "TypistID"; this.schedulerStorage1.Appointments.Mappings.Start = "Fecha inicio"; this.schedulerStorage1.Appointments.Mappings.Subject = "CaseNr"; this.schedulerStorage1.Appointments.CustomFieldMappings.Add(new DevExpress.XtraScheduler.AppointmentCustomFieldMapping("IdPaciente", "IdPaciente")); //this.schedulerStorage1.Appointments.CustomFieldMappings.Add(new DevExpress.XtraScheduler.AppointmentCustomFieldMapping("IdPaciente", "AssignmentText")); //schedulerControl1.DayView.TimeSlots.Add(new DevExpress.XtraScheduler.TimeSlot(TimeSpan.FromMinutes(15), "1 minutes")); //DateTime d1 = new DateTime(2012, 1, 1, 9, 0, 0); //DateTime d2 = new DateTime(2012, 1, 1, 16, 30, 0); // schedulerControl1.DayView.VisibleTime.Start = System.TimeSpan.Parse("9:00:00"); //schedulerControl1.DayView.VisibleTime.End = System.TimeSpan.Parse("12.09:00:00"); //schedulerControl1.Views.DayView.VisibleTime.Start = System.TimeSpan.Parse("9:00:00"); //schedulerControl1.Views.DayView.VisibleTime.End = System.TimeSpan.Parse("12.09:00:00"); //schedulerControl1.DayView.VisibleTime = new TimeOfDayInterval(TimeSpan.FromHours(9), TimeSpan.FromHours(12)); //TimeInterval interva1 = new TimeInterval( TimeSpan.FromHours(15)); //TimeInterval interva2 = new TimeInterval(d2, TimeSpan.FromHours(15)); //TimeIntervalCollection cooll = new TimeIntervalCollection(); //cooll.Add(new TimeOfDayInterval(TimeSpan.FromHours(10), TimeSpan.FromHours(13))); //cooll.Add(interva2); //schedulerControl1.DayView.SetVisibleIntervals(cooll); printProperties(); FillData(); } finally { scales.EndUpdate(); } }
private void HideWeekends(bool hide) { TimeScaleCollection scales = schedulerControl1.TimelineView.Scales; if (hide) { scales.BeginUpdate(); try { scales.Clear(); scales.Add(new TimeScaleMonth()); TimeScaleWorkWeekDay customWorkWeekScale = new TimeScaleWorkWeekDay(); customWorkWeekScale.Width = 125; scales.Add(customWorkWeekScale); } finally { scales.EndUpdate(); } checkEdit2.Enabled = true; } else { scales.BeginUpdate(); try { scales.Clear(); scales.Add(new TimeScaleMonth()); TimeScaleDay dayScale = new TimeScaleDay(); dayScale.Width = 125; scales.Add(dayScale); } finally { scales.EndUpdate(); } checkEdit2.Enabled = false; } }
private void Form1_Load(object sender, EventArgs e) { InitResources(); InitAppointments(); schedulerControl1.Start = DateTime.Now; schedulerControl1.GroupType = DevExpress.XtraScheduler.SchedulerGroupType.Resource; TimeScaleCollection scales = schedulerControl1.TimelineView.Scales; scales.BeginUpdate(); try { scales.Clear(); scales.Add(new MyTimeScaleMinutesInterval(TimeSpan.FromMinutes(12))); scales.Add(new MyTimeScaleHoursInterval()); scales.Add(new MyTimeScaleDaysInterval()); scales.EndUpdate(); } finally { scales.EndUpdate(); } }
protected void Page_Load(object sender, EventArgs e) { ASPxScheduler1.ActiveViewType = SchedulerViewType.Timeline; TimeScaleCollection scales = ASPxScheduler1.TimelineView.Scales; scales.BeginUpdate(); try { scales.Clear(); scales.Add(new My20MinutesScale()); scales.Add(new My15MinutesScale()); scales.Add(new MyHourScale()); scales.Add(new CustomTimeScaleDay()); } finally { scales.EndUpdate(); } }
public Form1() { InitializeComponent(); schedulerControl1.TimelineView.AppointmentDisplayOptions.StartTimeVisibility = AppointmentTimeVisibility.Always; schedulerControl1.TimelineView.AppointmentDisplayOptions.EndTimeVisibility = AppointmentTimeVisibility.Always; schedulerControl1.TimelineView.AppointmentDisplayOptions.TimeDisplayType = AppointmentTimeDisplayType.Text; schedulerControl1.TimelineView.AppointmentDisplayOptions.SnapToCellsMode = AppointmentSnapToCellsMode.Disabled; #region #changescales TimeScaleCollection scales = schedulerControl1.TimelineView.Scales; scales.BeginUpdate(); try { scales.Clear(); scales.Add(new CustomTimeScaleDay()); scales.Add(new CustomTimeScaleHour()); } finally { scales.EndUpdate(); } #endregion #changescales }