示例#1
0
        private static int ComparePassengers(UIComponent left, UIComponent right)
        {
            TLMLineListItem <T> component  = left.GetComponent <TLMLineListItem <T> >();
            TLMLineListItem <T> component2 = right.GetComponent <TLMLineListItem <T> >();

            return(component2.passengerCountsInt.CompareTo(component.passengerCountsInt));
        }
示例#2
0
        private static int CompareVehicles(UIComponent left, UIComponent right)
        {
            TLMLineListItem <T> component  = left.GetComponent <TLMLineListItem <T> >();
            TLMLineListItem <T> component2 = right.GetComponent <TLMLineListItem <T> >();

            return(NaturalCompare(component2.vehicleCounts, component.vehicleCounts));
        }
示例#3
0
        private static int CompareNames(UIComponent left, UIComponent right)
        {
            TLMLineListItem <T> component  = left.GetComponent <TLMLineListItem <T> >();
            TLMLineListItem <T> component2 = right.GetComponent <TLMLineListItem <T> >();

            return(string.Compare(component.lineName, component2.lineName, StringComparison.InvariantCulture));
        }
示例#4
0
 private void toggleAllLinesVisibility(UIComponent component, bool value)
 {
     foreach (var item in mainPanel.components)
     {
         TLMLineListItem <T> comp = (TLMLineListItem <T>)item.GetComponent(ImplClassChildren);
         comp.ChangeLineVisibility(value);
     }
     isUpdated = false;
 }
示例#5
0
        private static int CompareLineNumbers(UIComponent left, UIComponent right)
        {
            if (left == null || right == null)
            {
                return(0);
            }
            TLMLineListItem <T> component  = left.GetComponent <TLMLineListItem <T> >();
            TLMLineListItem <T> component2 = right.GetComponent <TLMLineListItem <T> >();

            if (component == null || component2 == null)
            {
                return(0);
            }
            return(component.lineNumber.CompareTo(component2.lineNumber));
        }