public void ShowTimeTable()
        {
            var timeTable = new TimeLineView();

            timeTable.SetTimeTable(WorkPlanElements);
            timeTable.ShowDialog();
        }
        /// <summary>
        /// Gets the 'HitArea' for the item
        /// </summary>
        /// <param name="objArg"></param>
        /// <returns>eHitArea (move, resize, etc)</returns>
        private eHitArea GetHitArea(MouseEventArgs objArg)
        {
            // WeekDayView item

            WeekDayView wv = this.Parent as WeekDayView;

            if (wv != null)
            {
                return(GetWeekDayHitArea(objArg));
            }

            // MonthView item

            MonthView mv = this.Parent as MonthView;

            if (mv != null)
            {
                return(GetMonthHitArea(mv, objArg));
            }

            // TimeLineView item

            TimeLineView tv = this.Parent as TimeLineView;

            if (tv != null)
            {
                return(GetTimeLineHitArea(objArg));
            }

            // Nowhere we recognize

            return(eHitArea.None);
        }
Beispiel #3
0
            private TimeLineView getTimeLineView()
            {
                if (timelineView == null)
                {
                    timelineView = new TimeLineView(new RectangleF(this.Bounds.X, this.Bounds.Y, this.Bounds.Size.Width, TIMELINE_HEIGHT));
                    timelineView.BackgroundColor = UIColor.White;
                }

                return(timelineView);
            }
        private TimeLineView getTimeLineView()
        {
            timelineView = new TimeLineView (new RectangleF (Bounds.X, Bounds.Y, CurrentWidth, consts.TIMELINE_HEIGHT));
            timelineView.BackgroundColor = UIColor.White;

            return timelineView;
        }
Beispiel #5
0
        void CheckDemo()
        {
            TimeLineView     timeLineViewModule        = (TimeLineView)DemoBaseTesting.CurrentDemoModule;
            int              initialIntervalCount      = 10;
            int              initialSelectionBarHeight = 0;
            SchedulerControl scheduler = timeLineViewModule.scheduler;

            Assert.AreEqual(SchedulerViewType.Timeline, scheduler.ActiveViewType);
            DevExpress.Xpf.Scheduler.TimelineView timelineView = scheduler.TimelineView;
            Assert.AreEqual(initialIntervalCount, timelineView.IntervalCount);
            SchedulerSelectionBarOptions selectionBar = timelineView.SelectionBar;

            Assert.AreEqual(initialSelectionBarHeight, selectionBar.Height);

            for (int i = initialIntervalCount - 1; i >= 1; i--)
            {
                timeLineViewModule.spnIntervalCount.SpinDown();
                if (initialIntervalCount / 2 - 1 < i && i < initialIntervalCount / 2 + 1)
                {
                    timeLineViewModule.chkVisible.IsChecked = false;
                }
                else
                {
                    timeLineViewModule.chkVisible.IsChecked = true;
                }
                UpdateLayoutAndDoEvents();
                if (selectionBar.Visible)
                {
                    Assert.AreEqual(i, GetSelectionBarElementCount(scheduler));
                }
                Assert.AreEqual(false, timeLineViewModule.spnIntervalCount.HasValidationError);
                Assert.AreEqual(i, timelineView.IntervalCount);
            }

            for (int i = 0; i <= 2; i++)
            {
                timeLineViewModule.cbSnapToCellsMode.SelectedItem = (AppointmentSnapToCellsMode)i;
                UpdateLayoutAndDoEvents();
                Assert.AreEqual((AppointmentSnapToCellsMode)i, timelineView.AppointmentDisplayOptions.SnapToCellsMode);
            }

            Assert.AreEqual(true, timeLineViewModule.chkVisible.IsChecked);

            for (int i = 20; i <= 10; i++)
            {
                timeLineViewModule.spnSelectionBarHeight.SpinUp();
                UpdateLayoutAndDoEvents();
                Assert.AreEqual(i, selectionBar.Height);
            }

            timeLineViewModule.chkVisible.IsChecked = false;
            UpdateLayoutAndDoEvents();
            Assert.AreEqual(false, selectionBar.Visible);

            Assert.AreEqual(false, timeLineViewModule.chYearScaleEnabled.IsChecked);
            Assert.AreEqual(false, timelineView.Scales[0].Enabled);
            timeLineViewModule.chYearScaleEnabled.IsChecked = true;
            UpdateLayoutAndDoEvents();
            Assert.AreEqual(true, timelineView.Scales[0].Enabled);

            Assert.AreEqual(true, timeLineViewModule.chYearScaleVisible.IsChecked);
            Assert.AreEqual(true, timelineView.Scales[0].Visible);
            timeLineViewModule.chYearScaleVisible.IsChecked = false;
            UpdateLayoutAndDoEvents();
            Assert.AreEqual(false, timelineView.Scales[0].Visible);

            Assert.AreEqual(false, timeLineViewModule.chQuarterScaleEnabled.IsChecked);
            Assert.AreEqual(false, timelineView.Scales[1].Enabled);
            timeLineViewModule.chQuarterScaleEnabled.IsChecked = true;
            UpdateLayoutAndDoEvents();
            Assert.AreEqual(true, timelineView.Scales[1].Enabled);

            Assert.AreEqual(true, timeLineViewModule.chQuarterScaleVisible.IsChecked);
            Assert.AreEqual(true, timelineView.Scales[1].Visible);
            timeLineViewModule.chQuarterScaleVisible.IsChecked = false;
            UpdateLayoutAndDoEvents();
            Assert.AreEqual(false, timelineView.Scales[1].Visible);

            Assert.AreEqual(false, timeLineViewModule.chMonthScaleEnabled.IsChecked);
            Assert.AreEqual(false, timelineView.Scales[2].Enabled);
            timeLineViewModule.chMonthScaleEnabled.IsChecked = true;
            UpdateLayoutAndDoEvents();
            Assert.AreEqual(true, timelineView.Scales[2].Enabled);

            Assert.AreEqual(true, timeLineViewModule.chMonthScaleVisible.IsChecked);
            Assert.AreEqual(true, timelineView.Scales[2].Visible);
            timeLineViewModule.chMonthScaleVisible.IsChecked = false;
            UpdateLayoutAndDoEvents();
            Assert.AreEqual(false, timelineView.Scales[2].Visible);

            Assert.AreEqual(true, timeLineViewModule.chWeekScaleEnabled.IsChecked);
            Assert.AreEqual(true, timelineView.Scales[3].Enabled);
            timeLineViewModule.chWeekScaleEnabled.IsChecked = false;
            UpdateLayoutAndDoEvents();
            Assert.AreEqual(false, timelineView.Scales[3].Enabled);

            Assert.AreEqual(true, timeLineViewModule.chWeekScaleVisible.IsChecked);
            Assert.AreEqual(true, timelineView.Scales[3].Visible);
            timeLineViewModule.chWeekScaleVisible.IsChecked = false;
            UpdateLayoutAndDoEvents();
            Assert.AreEqual(false, timelineView.Scales[3].Visible);

            Assert.AreEqual(true, timeLineViewModule.chDayScaleEnabled.IsChecked);
            Assert.AreEqual(true, timelineView.Scales[4].Enabled);
            timeLineViewModule.chDayScaleEnabled.IsChecked = false;
            UpdateLayoutAndDoEvents();
            Assert.AreEqual(false, timelineView.Scales[4].Enabled);

            Assert.AreEqual(false, timeLineViewModule.chHourScaleEnabled.IsChecked);
            Assert.AreEqual(false, timelineView.Scales[5].Enabled);
            timeLineViewModule.chHourScaleEnabled.IsChecked = true;
            UpdateLayoutAndDoEvents();
            Assert.AreEqual(true, timelineView.Scales[5].Enabled);

            Assert.AreEqual(true, timeLineViewModule.chHourScaleVisible.IsChecked);
            Assert.AreEqual(true, timelineView.Scales[5].Visible);
            timeLineViewModule.chHourScaleVisible.IsChecked = false;
            UpdateLayoutAndDoEvents();
            Assert.AreEqual(false, timelineView.Scales[5].Visible);

            Assert.AreEqual(false, timeLineViewModule.chMin15ScaleEnabled.IsChecked);
            Assert.AreEqual(false, timelineView.Scales[6].Enabled);
            timeLineViewModule.chMin15ScaleEnabled.IsChecked = true;
            UpdateLayoutAndDoEvents();
            Assert.AreEqual(true, timelineView.Scales[6].Enabled);

            Assert.AreEqual(true, timeLineViewModule.chMin15ScaleVisible.IsChecked);
            Assert.AreEqual(true, timelineView.Scales[6].Visible);
            timeLineViewModule.chMin15ScaleVisible.IsChecked = false;
            UpdateLayoutAndDoEvents();
            Assert.AreEqual(false, timelineView.Scales[6].Visible);
        }
Beispiel #6
0
            private TimeLineView getTimeLineView()
            {
                if (timelineView == null)
                {
                    timelineView = new TimeLineView (new RectangleF (this.Bounds.X, this.Bounds.Y, this.Bounds.Size.Width, TIMELINE_HEIGHT));
                    timelineView.BackgroundColor = UIColor.White;

                }

                return timelineView;
            }