public UserObject() { objects = new List <TechObject>(); baseTechObject = BaseTechObjectManager.GetInstance() .GetTechObject(Name); techObjectManager = TechObjectManager.GetInstance(); globalObjectsList = techObjectManager.TechObjects; }
private void SortTreeObjectsByCustomComparer() { string firstS88LevelName = BaseTechObjectManager.GetInstance() .GetS88Name((int)BaseTechObjectManager.ObjectType.Unit); string secondS88LevelName = BaseTechObjectManager.GetInstance() .GetS88Name((int)BaseTechObjectManager.ObjectType.Aggregate); treeObjects = treeObjects.OrderByDescending(i => i is ProcessCell) .ThenByDescending(i => i is S88Object && i.DisplayText[0] .Contains(firstS88LevelName)) .ThenByDescending(i => i is S88Object && i.DisplayText[0] .Contains(secondS88LevelName)) .ThenByDescending(i => i is UserObject) .ThenByDescending(i => i is Unidentified) .ToList(); }