Example #1
0
        public bool SetPageIndex(int index)
        {
            if (index < 0)
            {
                index = 0;
            }
            if (index >= Pages)
            {
                index = Pages - 1;
            }

            lblPage.Text = (index + 1).ToString();

            if (PageIndex == index)
            {
                return(false);
            }

            PageIndex = index;

            PageIndexChanged?.Invoke(this, EventArgs.Empty);
            return(true);
        }
Example #2
0
 protected virtual void OnPageIndexChanged()
 {
     PageIndexChanged.Invoke(this, EventArgs.Empty);
 }