示例#1
0
 private void MoveItem(bool Up)
 {
     if (CurrentIndex >= 0 && CurrentIndex < ElementList.Count && ElementList.Count > 1)
     {
         int newIndex = CurrentIndex + (Up?-1:1);
         if (newIndex >= 0 && newIndex < ElementList.Count)
         {
             ElementList.Move(CurrentIndex, newIndex);
         }
     }
 }