예제 #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);


            // Get a reference for the week view in the layout.
            mWeekView = (WeekView)FindViewById(Resource.Id.weekView);

            // Show a toast message about the touched event.
            mWeekView.SetOnEventClickListener(this);

            // The week view has infinite scrolling horizontally. We have to provide the events of a
            // month every time the month changes on the week view.
            mWeekView.MonthChangeListener = this;

            // Set long press listener for events.
            mWeekView.EventLongPress += (object sender, WeekView.EventLongPressEventArgs e) => { };

            // Set up a date time interpreter to interpret how the date and time will be formatted in
            // the week view. This is optional.
            setupDateTimeInterpreter(false);


            mToolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(mToolbar);
            SupportActionBar.Title = "XamWeekView";

            mToolbar.MenuItemClick += MenuClickItem;
        }
예제 #2
0
        protected override async void OnAppearing()
        {
            WeekView.BeginRefresh();
            await HomeViewModel.UpdateWeeks();

            WeekView.EndRefresh();
            base.OnAppearing();
        }
예제 #3
0
        private void CreateWeekView()
        {
            bool requiresLayout = false;

            if (weekView == null)
            {
                weekView                         = new WeekView();
                weekView.Visibility              = Visibility.Hidden;
                weekView.OnZoomInEvent          += weekView_OnZoomInEvent;
                weekView.OnZoomOutEvent         += weekView_OnZoomOutEvent;
                weekView.OnBeginEditEvent       += weekView_OnBeginEditEvent;
                weekView.OnEndEditEvent         += weekView_OnEndEditEvent;
                weekView.OnSelectedChangedEvent += weekView_OnSelectedChangedEvent;
                weekView.OnExportEvent          += weekView_OnExportEvent;
                weekView.ReminderChanged        += weekView_ReminderChanged;
                Panel.SetZIndex(weekView, 1);
                calendarGrid.Children.Add(weekView);
                requiresLayout = true;
            }

            if (weekView.Zoom != statusStrip.Zoom / 100)
            {
                weekView.ZoomNoAnimate(statusStrip.Zoom / 100);
                requiresLayout = true;
            }

            if (dayView != null && weekView.ScrollOffset != dayView.ScrollOffset)
            {
                if (!weekView.IsLoaded)
                {
                    weekView.ScrollOffset = dayView.ScrollOffset;
                }
                else
                {
                    if (requiresLayout)
                    {
                        weekView.UpdateLayout();
                    }

                    weekView.ScrollOffset = dayView.ScrollOffset;
                    requiresLayout        = true;
                }
            }

            if (requiresLayout)
            {
                weekView.UpdateLayout();
            }
        }
예제 #4
0
        void CheckDemo()
        {
            WeekView weekViewModule = (WeekView)DemoBaseTesting.CurrentDemoModule;

            Assert.AreEqual(SchedulerViewType.Week, weekViewModule.scheduler.ActiveViewType);
            Assert.AreEqual(DevExpress.XtraScheduler.FirstDayOfWeek.System, weekViewModule.scheduler.OptionsView.FirstDayOfWeek);

            for (int i = 0; i <= 7; i++)
            {
                weekViewModule.cbFirstDayOfWeek.SelectedItem = (DevExpress.XtraScheduler.FirstDayOfWeek)i;
                UpdateLayoutAndDoEvents();
                Assert.AreEqual(false, weekViewModule.cbFirstDayOfWeek.HasValidationError);
                Assert.AreEqual((DevExpress.XtraScheduler.FirstDayOfWeek)i, weekViewModule.scheduler.OptionsView.FirstDayOfWeek);
            }

            for (int i = 0; i <= 2; i++)
            {
                weekViewModule.cbTimeDisplayType.SelectedItem = (AppointmentTimeDisplayType)i;
                UpdateLayoutAndDoEvents();
                Assert.AreEqual((AppointmentTimeDisplayType)i, weekViewModule.scheduler.WeekView.AppointmentDisplayOptions.TimeDisplayType);
            }

            for (int i = 0; i <= 2; i++)
            {
                weekViewModule.cbTimeDisplayType.SelectedItem = (AppointmentTimeDisplayType)i;
                UpdateLayoutAndDoEvents();
                Assert.AreEqual((AppointmentTimeDisplayType)i, weekViewModule.scheduler.WeekView.AppointmentDisplayOptions.TimeDisplayType);
            }

            for (int i = 0; i <= 2; i++)
            {
                weekViewModule.cbStartTimeVisibility.SelectedItem = (AppointmentTimeVisibility)i;
                UpdateLayoutAndDoEvents();
                Assert.AreEqual((AppointmentTimeVisibility)i, weekViewModule.scheduler.WeekView.AppointmentDisplayOptions.StartTimeVisibility);
            }

            for (int i = 0; i <= 2; i++)
            {
                weekViewModule.cbEndTimeVisibility.SelectedItem = (AppointmentTimeVisibility)i;
                UpdateLayoutAndDoEvents();
                Assert.AreEqual((AppointmentTimeVisibility)i, weekViewModule.scheduler.WeekView.AppointmentDisplayOptions.EndTimeVisibility);
            }
        }
예제 #5
0
        protected SchedulerViewCellContainerCollection GetCellContainers(SchedulerViewBase view)
        {
            DayView dayView = view as DayView;

            if (dayView != null)
            {
                return(dayView.ViewInfo.Columns);
            }

            WeekView weekView = view as WeekView;

            if (weekView != null)
            {
                return(weekView.ViewInfo.Weeks);
            }

            TimelineView timeLineView = view as TimelineView;

            return(timeLineView.ViewInfo.Timelines);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            this.EnsureBindingContextIsSet(savedInstanceState);
            var view = this.BindingInflate(Resource.Layout.AddSpotCalendarTabDay, container, false);

            AddSpotCalendarVM = ViewModel as AddSpotCalendarViewModel;
            AddSpotCalendarVM.AddSpotCalendarDayView = this;
            string tmp = AddSpotCalendarVM.SharedTextSource.GetText("YesText");

            if (tmp == "Oui")
            {
                Language = 1;
            }
            else
            {
                Language = 0;
            }
            mWeekView = (WeekView)view.FindViewById(Resource.Id.weekView);
            InitWeekView();
            return(view);
        }
        void ReleaseDesignerOutlets()
        {
            if (BackButtonTopConstraint != null)
            {
                BackButtonTopConstraint.Dispose();
                BackButtonTopConstraint = null;
            }

            if (EarlyBottomConstraint != null)
            {
                EarlyBottomConstraint.Dispose();
                EarlyBottomConstraint = null;
            }

            if (EarlyCheckBox != null)
            {
                EarlyCheckBox.Dispose();
                EarlyCheckBox = null;
            }

            if (EarlyTopConstraint != null)
            {
                EarlyTopConstraint.Dispose();
                EarlyTopConstraint = null;
            }

            if (LateDayBottomConstraint != null)
            {
                LateDayBottomConstraint.Dispose();
                LateDayBottomConstraint = null;
            }

            if (LateDayCheckbox != null)
            {
                LateDayCheckbox.Dispose();
                LateDayCheckbox = null;
            }

            if (LateDayTopConstraint != null)
            {
                LateDayTopConstraint.Dispose();
                LateDayTopConstraint = null;
            }

            if (MiddayBottomConstraint != null)
            {
                MiddayBottomConstraint.Dispose();
                MiddayBottomConstraint = null;
            }

            if (MiddayCheckBox != null)
            {
                MiddayCheckBox.Dispose();
                MiddayCheckBox = null;
            }

            if (MiddayTopConstraint != null)
            {
                MiddayTopConstraint.Dispose();
                MiddayTopConstraint = null;
            }

            if (NextButton != null)
            {
                NextButton.Dispose();
                NextButton = null;
            }

            if (NextButtonHeightConstraint != null)
            {
                NextButtonHeightConstraint.Dispose();
                NextButtonHeightConstraint = null;
            }

            if (pageInfoLabel != null)
            {
                pageInfoLabel.Dispose();
                pageInfoLabel = null;
            }

            if (PageInfoTopConstraint != null)
            {
                PageInfoTopConstraint.Dispose();
                PageInfoTopConstraint = null;
            }

            if (PageSubtitleTopConstraint != null)
            {
                PageSubtitleTopConstraint.Dispose();
                PageSubtitleTopConstraint = null;
            }

            if (PageTitleTopConstraint != null)
            {
                PageTitleTopConstraint.Dispose();
                PageTitleTopConstraint = null;
            }

            if (ViewLeadingConstraint != null)
            {
                ViewLeadingConstraint.Dispose();
                ViewLeadingConstraint = null;
            }

            if (ViewTrailingConstraint != null)
            {
                ViewTrailingConstraint.Dispose();
                ViewTrailingConstraint = null;
            }

            if (WeekDayViewHeightConstraint != null)
            {
                WeekDayViewHeightConstraint.Dispose();
                WeekDayViewHeightConstraint = null;
            }

            if (WeekView != null)
            {
                WeekView.Dispose();
                WeekView = null;
            }

            if (WeekViewTopConstraint != null)
            {
                WeekViewTopConstraint.Dispose();
                WeekViewTopConstraint = null;
            }
        }
예제 #8
0
 public void ConfigureSelected(List <DayOfWeek> selectedDays)
 {
     WeekView.ConfigureSelected(selectedDays);
 }