protected override IOperation CreateOperation()
        {
            //TimeScaleCollection timeScales = CreateTimeScaleCollection();
            TimeScaleCollection timeScales = new TimeScaleCollection();

            timeScales.Add(new TimeScaleFixedInterval(SplitAppointmentCommandStep));
            return(new SplitAppointmentOperation(SchedulerControl, timeScales, SchedulerControl.SelectedAppointments[0]));
        }
Exemple #2
0
        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 FillTimeScaleList()
        {
            TimeScaleCollection scales = scheduler.TimelineView.Scales;

            YearScale    = scales[0];
            QuarterScale = scales[1];
            MonthScale   = scales[2];
            WeekScale    = scales[3];
            DayScale     = scales[4];
            HourScale    = scales[5];
            Min15Scale   = scales[6];
        }
        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;
            }
        }
    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
        }
Exemple #7
0
        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;
            }
        }
Exemple #8
0
        private void Form1_Load(object sender, EventArgs e)
        {
            TimeScaleCollection scales = schedulerControl1.TimelineView.Scales;

            schedulerControl1.TimelineView.Scales.BeginUpdate();
            try
            {
                scales.Clear();
                scales.Add(new MyTimeScaleFixedInterval(TimeSpan.FromDays(1), minTime, maxTime));
                scales.Add(new MyTimeScaleFixedInterval(TimeSpan.FromHours(1), minTime, maxTime));
                scales.Add(new MyTimeScaleFixedInterval(TimeSpan.FromMinutes(30), minTime, maxTime));
            }
            finally
            {
                schedulerControl1.TimelineView.Scales.EndUpdate();
            }

            Appointment apt = schedulerStorage1.CreateAppointment(AppointmentType.Normal);

            apt.Start   = DateTime.Today.AddHours(10);
            apt.End     = DateTime.Today.AddHours(14);
            apt.Subject = "Test appointment";
            schedulerStorage1.Appointments.Add(apt);
        }
        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();
            }
        }
Exemple #10
0
        private void fLichSX_Load(object sender, EventArgs e)
        {
            lightColor = Color.Black;
            grayColor  = Color.Black;
            dockManager1.BeginUpdate();
            DateTime bWork = DateTime.Parse(DateTime.Now.ToShortDateString() + " " + Config.GetValue("TimeStart").ToString() + ":00");
            DateTime eWork = DateTime.Parse(DateTime.Now.ToShortDateString() + " " + Config.GetValue("TimeEnd").ToString() + ":00");

            schedu.TimelineView.WorkTime = new TimeOfDayInterval(new TimeSpan(bWork.Hour, bWork.Minute, bWork.Second), new TimeSpan(eWork.Hour, eWork.Minute, eWork.Second));
            schedu.WorkWeekView.WorkTime = new TimeOfDayInterval(new TimeSpan(bWork.Hour, bWork.Minute, bWork.Second), new TimeSpan(eWork.Hour, eWork.Minute, eWork.Second));
            schedu.DayView.WorkTime      = new TimeOfDayInterval(new TimeSpan(bWork.Hour, bWork.Minute, bWork.Second), new TimeSpan(eWork.Hour, eWork.Minute, eWork.Second));
            dockPanel1.Visibility        = DevExpress.XtraBars.Docking.DockVisibility.AutoHide;
            dockPanel2.Visibility        = DevExpress.XtraBars.Docking.DockVisibility.AutoHide;
            dockPanel3.Visibility        = DevExpress.XtraBars.Docking.DockVisibility.AutoHide;
            dockPanel3.HideImmediately();
            dockPanel2.HideImmediately();
            dockPanel1.HideImmediately();
            dockManager1.EndUpdate();
            //this.barEditItem1.Edit.EditValueChanging += Edit_EditValueChanging;
            //this.barEditItem2.Edit.EditValueChanging += Edit_EditValueChanging1;
            schedu.AllowAppointmentDelete      += Schedu_AllowAppointmentDelete;
            schedu.AllowAppointmentCreate      += Schedu_AllowAppointmentCreate;
            schedu.EditAppointmentFormShowing  += Schedu_EditAppointmentFormShowing;
            schedu.AppointmentDrag             += Schedu_AppointmentDrag;
            schedu.Storage.AppointmentChanging += Storage_AppointmentChanging;

            dateEdit1.DateTime    = DateTime.Parse(DateTime.Now.ToShortDateString());
            dateEdit2.DateTime    = DateTime.Parse(DateTime.Now.AddDays(7).ToShortDateString());
            schedu.QueryWorkTime += Schedu_QueryWorkTime;
            //Resource

            dmMayin           = dbdata.GetDataTable("select * from dmMIn  order by Sorted");
            dmMayin.TableName = "DmMIn";
            ds.Tables.Add(dmMayin);
            dmMInBindingSource.DataSource = ds;
            dmMInBindingSource.DataMember = "DmMIn";
            //Schedu
            scales = new TimeScaleCollection();
            foreach (TimeScale scl in schedu.TimelineView.Scales)
            {
                scales.Add(scl);
            }
            getData(dateEdit1.DateTime, dateEdit2.DateTime);
            //
            // ctLichSXBind = new BindingList<LSXappoint>();

            this.schedulerStorage1.BeginUpdate();
            this.schedulerStorage1.Appointments.DataSource              = ctLichSXBind;//ctLichSX;//
            this.schedulerStorage1.Appointments.Mappings.Description    = "GhiChu";
            this.schedulerStorage1.Appointments.Mappings.End            = "End";
            this.schedulerStorage1.Appointments.Mappings.Location       = "TenHang";
            this.schedulerStorage1.Appointments.Mappings.RecurrenceInfo = "MaMIn";
            this.schedulerStorage1.Appointments.Mappings.ResourceId     = "MaMIn";
            this.schedulerStorage1.Appointments.Mappings.Start          = "Start";
            // this.schedulerStorage1.Appointments.Mappings.Type = "LichSXID";
            this.schedulerStorage1.Appointments.Mappings.Subject = "SoCT";

            this.schedulerStorage1.Appointments.Mappings.Label = "TrangThai";

            this.schedulerStorage1.Resources.DataSource = this.dmMInBindingSource;
            schedulerStorage1.Appointments.CustomFieldMappings["ctID"].Member = "ctLichSXID";
            this.schedulerStorage1.Resources.Mappings.Caption = "TenMIn";
            this.schedulerStorage1.Resources.Mappings.Id      = "MaMIn";
            this.schedulerStorage1.Resources.Mappings.Image   = "Hinh";
            this.schedulerStorage1.EndUpdate();
            schedu.GoToToday();

            // getData(dateEdit1.DateTime, dateEdit2.DateTime);
        }