コード例 #1
0
        /// <summary>
        /// Updates the PageNavigator
        /// </summary>
        private void UpdatePageNavigator()
        {
            if (_CalendarView.TimeLineShowPageNavigation == true)
            {
                // We are to show the PageNavigator, so allocate it
                // if we haven't done so already

                if (_PageNavigator == null)
                {
                    Control c = (Control)_CalendarView.CalendarPanel.GetContainerControl(true);

                    if (c != null)
                    {
                        SetupPageNavigator(c);

                        if (_PageNavigator != null)
                            _PageNavigator.Visible = Visible;
                    }
                }
            }
            else
            {
                // We are not to show a PageNavigator, so if we have already
                // allocated one, see that we release it appropriately

                if (_PageNavigator != null)
                {
                    Control c = (Control)_CalendarView.CalendarPanel.GetContainerControl(true);

                    if (c != null)
                    {
                        c.Controls.Remove(_PageNavigator);

                        HookNavigateEvents(false);

                        _PageNavigator = null;
                    }
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// Sets-up the PageNavigator
        /// </summary>
        /// <param name="c"></param>
        private void SetupPageNavigator(Control c)
        {
            _PageNavigator = new PageNavigator();

            _PageNavigator.Visible = false;
            _PageNavigator.FocusCuesEnabled = false;

            HookNavigateEvents(true);

            c.Controls.Add(_PageNavigator);

            _PageNavigator.NextPageTooltip = _CalendarView.TimeLinePageNavigatorNextPageTooltip;
            _PageNavigator.PreviousPageTooltip = _CalendarView.TimeLinePageNavigatorPreviousPageTooltip;
            _PageNavigator.TodayTooltip = _CalendarView.TimeLinePageNavigatorTodayTooltip;
        }