Example #1
0
        /// <summary>
        /// Handles invocation of ScrollMax events
        /// </summary>
        internal void DoScrollMaxEvent(GridPanel gridPanel, ScrollEventArgs args)
        {
            if (ScrollMax != null)
            {
                GridScrollEventArgs ev = new
                    GridScrollEventArgs(gridPanel, args);

                ScrollMax(this, ev);
            }
        }
Example #2
0
        /// <summary>
        /// Handles invocation of Scroll events
        /// </summary>
        internal void DoScrollEvent(GridPanel gridPanel,
            ScrollEventArgs args, ScrollBarAdv sbar)
        {
            if (Scroll != null)
            {
                GridScrollEventArgs ev = new
                    GridScrollEventArgs(gridPanel, args);

                Scroll(this, ev);
            }

            if (args.Type == ScrollEventType.EndScroll)
            {
                if (args.NewValue == 0)
                    DoScrollMaxEvent(gridPanel, args);

                else if (args.NewValue + sbar.LargeChange >= sbar.Maximum)
                    DoScrollMaxEvent(gridPanel, args);
            }
        }