Exemplo n.º 1
0
 public void expand()
 {
     if (_isCollapsed)
     {
         _cancelStatus = false;
         GroupEventArgs beforeExpand = new GroupEventArgs(this);
         if (BeforeExpand != null)
         {
             BeforeExpand(this, beforeExpand);
         }
         _cancelStatus = beforeExpand.Cancel;
         if (beforeExpand.Cancel)
         {
             return;
         }
         _isCollapsed = false;
         _owner._groupCollapseChanged(this);
         if (AfterExpand != null)
         {
             AfterExpand(this, new GroupEventArgs(this));
         }
     }
 }
Exemplo n.º 2
0
 public void collapse()
 {
     if (!_isCollapsed)
     {
         _cancelStatus = false;
         GroupEventArgs beforeCollapse = new GroupEventArgs(this);
         if (BeforeCollapse != null)
         {
             BeforeCollapse(this, beforeCollapse);
         }
         _cancelStatus = beforeCollapse.Cancel;
         if (beforeCollapse.Cancel)
         {
             return;
         }
         _isCollapsed = true;
         _owner._groupCollapseChanged(this);
         if (AfterCollapse != null)
         {
             AfterCollapse(this, new GroupEventArgs(this));
         }
     }
 }