escoz.CalendarMonthView.MoveCalendarMonths C# (CSharp) Метод

MoveCalendarMonths() публичный Метод

public MoveCalendarMonths ( bool right, bool animated ) : void
right bool
animated bool
Результат void
		public void MoveCalendarMonths (bool right, bool animated)
		{
			CurrentMonthYear = CurrentMonthYear.AddMonths(right? 1 : -1);
			RebuildGrid(right, animated);
		}

Usage Example

Пример #1
0
        private bool SelectDayView(UITouch touch)
        {
            var p = touch.LocationInView(this);

            int index = ((int)p.Y / 44) * 7 + ((int)p.X / 46);

            if (index < 0 || index >= _dayTiles.Count)
            {
                return(false);
            }

            var newSelectedDayView = _dayTiles[index];

            if (newSelectedDayView == SelectedDayView)
            {
                return(false);
            }

            if (!newSelectedDayView.Active && touch.Phase != UITouchPhase.Moved)
            {
                var day = int.Parse(newSelectedDayView.Text);
                if (day > 15)
                {
                    _calendarMonthView.MoveCalendarMonths(false, true);
                }
                else
                {
                    _calendarMonthView.MoveCalendarMonths(true, true);
                }
                return(false);
            }
            else if (!newSelectedDayView.Active && !newSelectedDayView.Available)
            {
                return(false);
            }

            if (SelectedDayView != null)
            {
                SelectedDayView.Selected = false;
            }

            this.BringSubviewToFront(newSelectedDayView);
            newSelectedDayView.Selected = true;

            SelectedDayView = newSelectedDayView;
            SetNeedsDisplay();
            return(true);
        }
All Usage Examples Of escoz.CalendarMonthView::MoveCalendarMonths