Example #1
0
 protected override int[] GetItemIndex(object aNode, bool aDeepSearch)
 {
     if (TypeValidator.IsCompatible(aNode.GetType(), typeof(DevelopmentInformationAttribute)) == true)
     {
         int i = (DataSource as DevelopmentDescriptionCollection).IndexOf(aNode);
         if (i == -1)
         {
             return(null);
         }
         return(new int[1] {
             i
         });
     }
     else if (TypeValidator.IsCompatible(aNode.GetType(), typeof(DevelopmentInformationItem)) == true)
     {
         DevelopmentInformationAttribute di = (aNode as DevelopmentInformationItem).Owner;
         int i = (DataSource as DevelopmentDescriptionCollection).IndexOf(di);
         if (i == -1)
         {
             return(null);
         }
         int j = di.IndexOf(aNode as DevelopmentInformationItem);
         if (j == -1)
         {
             return(null);
         }
         return(new int[2] {
             i, j
         });
     }
     return(null);
 }