예제 #1
0
 void FileSection_IndexChanged(object sender, FileSection.IndexChangedEventArgs e)
 {
     if (sender != this && Parent != null && Parent.IndexChanged != null)
     {
         Parent.IndexChanged(this, e);
     }
 }
예제 #2
0
        void Parent_IndexChanged(object sender, FileSection.IndexChangedEventArgs e)
        {
            int displacement = e.Displacement;

            if (displacement < -(ei + e.Location))
            {
                displacement = -(ei + e.Location);
            }

            if (e.Location > ei) //if the changed location is further down than this section extends, it does not affect it
            {
                return;
            }
            if (e.Location <= si)
            {
                si += displacement;
            }
            ei += displacement;
        }