Ejemplo n.º 1
0
 /// <summary>
 /// Links all the references (like parent, etc) for each class object making it possible to traverse the list tree in memory
 /// </summary>
 /// <param name="sp">The package to perform linking on</param>
 /// <param name="cat">The category that the SelectablePackagesp belongs to</param>
 /// <param name="parent">The tree parent of sp</param>
 private static void BuildLinksRefrence(SelectablePackage sp, Category cat, SelectablePackage parent)
 {
     sp.Parent         = parent;
     sp.TopParent      = cat.CategoryHeader;
     sp.ParentCategory = cat;
     if (sp.Packages.Count > 0)
     {
         foreach (SelectablePackage sp2 in sp.Packages)
         {
             BuildLinksRefrence(sp2, cat, sp);
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Alphabetical sorting of packages by NameFormatted property at this level (not recursive)
 /// </summary>
 /// <param name="x">First package to compare</param>
 /// <param name="y">Second package to compare</param>
 /// <returns></returns>
 public static int CompareModsName(SelectablePackage x, SelectablePackage y)
 {
     return(x.NameFormatted.CompareTo(y.NameFormatted));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Alphabetical sorting of packages by PackageName property at this level (not recursive)
 /// </summary>
 /// <param name="x">First package to compare</param>
 /// <param name="y">Second package to compare</param>
 /// <returns></returns>
 public static int CompareModsPackageName(SelectablePackage x, SelectablePackage y)
 {
     return(x.PackageName.CompareTo(y.PackageName));
 }