Subversion Repositories DevTools

Rev

Rev 2106 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2106 Rev 2124
Line 16... Line 16...
16
         else
16
         else
17
            return 0;
17
            return 0;
18
      }
18
      }
19
   }
19
   }
20
 
20
 
-
 
21
   /// <summary>
-
 
22
   /// This sort is different to the elementSortByName sorter because it assumes the presence of a 
-
 
23
   /// requirement tag and so processes it to ensure the number components of the tag have leading zeros
-
 
24
   /// thus ensuring the sort outcome is pleasing to the human eye. The field width is limited to what
-
 
25
   /// is considered reasonable (ie. 4). Note also that the EA_Utilities.OutlineNumberMunging() function used
-
 
26
   /// imposes some constraints, such as the length of the tag, etc. 
-
 
27
   /// </summary>
-
 
28
   public class elementSortByTAG : IComparer
-
 
29
   {
-
 
30
      int IComparer.Compare( object x, object y)
-
 
31
      {
-
 
32
         if (x!=null & y!= null)
-
 
33
         {
-
 
34
            return (new CaseInsensitiveComparer()).Compare( 
-
 
35
               EA_Utilities.OutlineNumberMunging(((EA.Element)x).Name, 4), 
-
 
36
               EA_Utilities.OutlineNumberMunging(((EA.Element)y).Name, 4) );
-
 
37
         }
-
 
38
         else
-
 
39
            return 0;
-
 
40
      }
-
 
41
   }
21
 
42
 
22
   public class attributeSortByPos : IComparer
43
   public class attributeSortByPos : IComparer
23
   {
44
   {
24
      int IComparer.Compare( object x, object y)
45
      int IComparer.Compare( object x, object y)
25
      {
46
      {