Пример #1
0
        void moveToPrevMonth(DateTime prevMonth)
        {
            _nextMonthView       = new MonthView(RectangleF.Empty, _ctr, prevMonth, _firstDayOfWeek);
            _nextMonthView.Frame = new RectangleF(0, -_nextMonthView.Frame.Height, Resources.MONTHVIEW_WIDTH, _nextMonthView.Frame.Height);
            _scollView.Add(_nextMonthView);

            scrollCalendar(_nextMonthView.Frame.Height);
        }
Пример #2
0
        void _AnimationStopped()
        {
            DateTime prevMonth = _monthView.Month;

            _monthView.RemoveFromSuperview();
            _monthView.Dispose(); // reuse day views

            _monthView     = _nextMonthView;
            _nextMonthView = null;

            _ctr.CalendarViewChanged(_monthView.Month, prevMonth);

            UserInteractionEnabled = true;
        }
Пример #3
0
        public CalendarView(RectangleF rect, CalendarController ctr, DayOfWeek firstDayOfWeek)
            : base(rect)
        {
            _ctr            = ctr;
            _firstDayOfWeek = firstDayOfWeek;

            _monthView = new MonthView(new RectangleF(0, 0, Resources.MONTHVIEW_WIDTH, 300), _ctr, DateTime.Now, _firstDayOfWeek);

            _scollView = new UIScrollView(new RectangleF(0, Resources.TITLE_HEIGHT, Resources.MONTHVIEW_WIDTH, _monthView.Frame.Height));
            _scollView.ScrollEnabled = false;
            _scollView.Add(_monthView);
            Add(_scollView);

            buildButtons();
            buildTitleLabel();
            buildDayLabels();
            updateDayLabels();
            updateFrame();

            _titleLabel.Text = _monthView.Month.ToString("y");

            //Frame = new RectangleF(Frame.Location, new SizeF(Resources.MONTHVIEW_WIDTH, _monthView.Frame.Height + Resources.TITLE_HEIGHT));
        }