public virtual int CompareTo(object obj) { var other = (DTInspectorNode)obj; int c = SortOrder.CompareTo(other.SortOrder); return((c != 0) ? c : Index.CompareTo(other.Index)); }
/// <summary> /// Compares the current instance with another object of the same type. /// </summary> public int CompareTo(ViewNode other) { if (other == null) { return(1); } int compareResult = SortOrder.CompareTo(other.SortOrder); if (compareResult != 0) { return(compareResult); } compareResult = ViewID.CompareTo(other.ViewID); if (compareResult != 0) { return(compareResult); } compareResult = string.Compare(Text, other.Text, StringComparison.OrdinalIgnoreCase); if (compareResult != 0) { return(compareResult); } return(string.Compare(Url, other.Url, StringComparison.OrdinalIgnoreCase)); }
public int CompareTo(IPlugin other) { if (other == null) { return(1); } int result = SortOrder.CompareTo(other.SortOrder) * 2 + Name.CompareTo(other.Name); return(result); }
public int CompareTo(Entity?value) { if (value == null) { return(1); } int compareTo = SortOrder.CompareTo(value.SortOrder); return(compareTo == 0 ? Id.CompareTo(value.Id) : compareTo); }
public int CompareTo(object obj) { var config = obj as SysConfig; if (config == null) { return(-1); } /*var a = Level.CompareTo(config.Level); * if (a != 0) * return a;*/ // 在主ui上没有图标的排在后面 if (Pos == ESysBtnPos.NONE && config.Pos != ESysBtnPos.NONE) { return(1); } else if (Pos != ESysBtnPos.NONE && config.Pos == ESysBtnPos.NONE) { return(-1); } // 固定位置排在前面 if (FixedPos == ESysBtnFixType.FIX && config.FixedPos != ESysBtnFixType.FIX) { return(-1); } else if (FixedPos != ESysBtnFixType.FIX && config.FixedPos == ESysBtnFixType.FIX) { return(1); } var a = SortOrder.CompareTo(config.SortOrder); if (a != 0) { return(a); } return(Id.CompareTo(config.Id)); }
/// <summary> /// Сравнить текущий объект с другим объектом такого же типа /// </summary> public int CompareTo(MenuItem other) { if (other == null) { return(1); } else { int comp1 = SortOrder.CompareTo(other.SortOrder); if (comp1 == 0) { int comp2 = string.Compare(Text, other.Text, StringComparison.OrdinalIgnoreCase); return(comp2 == 0 ? string.Compare(Url, other.Url, StringComparison.OrdinalIgnoreCase) : comp2); } else { return(comp1); } } }
public virtual int CompareTo(PropertyGridProperty other) { if (other == null) { throw new ArgumentNullException("other"); } if (SortOrder != 0) { return(SortOrder.CompareTo(other.SortOrder)); } if (other.SortOrder != 0) { return(-other.SortOrder.CompareTo(0)); } if (DisplayName == null) { return(1); } return(string.Compare(DisplayName, other.DisplayName, StringComparison.OrdinalIgnoreCase)); }
public int CompareTo(SortItem other) { return(SortOrder.CompareTo(other.SortOrder)); }
public int CompareTo(AnalyzerBase other) { return(SortOrder.CompareTo(other.SortOrder)); }
/// <summary> /// Compare this rarity to an integer. /// </summary> /// <param name="other">The integer to compare this rarity to.</param> /// <returns>0 if the rarity's SortOrder matches the comparison integer, otherwise the result of a comparison between the SortOrder and the integer.</returns> public int CompareTo(int other) { return(SortOrder.CompareTo(other)); }
/// <summary> /// Compare this rarity to another CardRarity object. /// </summary> /// <param name="other">The other CardRarity object to compare this one to.</param> /// <returns>0 if the rarities have the same sort order, otherwise the result of a comparison of the two objects' sort orders.</returns> public int CompareTo(CardRarity other) { return(SortOrder.CompareTo(other.SortOrder)); }
public int CompareTo(SortQuesOpt other) { return(SortOrder.CompareTo(other.SortOrder)); }
public int CompareTo(Lesson other) { return(SortOrder.CompareTo(other.SortOrder)); }
public int CompareTo(object obj) { return(SortOrder.CompareTo(((PropertyBase)obj).SortOrder)); }
/// <summary> /// Compare this CardColors object to another one. /// </summary> /// <param name="other">The other CardColors object to compare this one to.</param> /// <returns>0 if the objects are equal, otherwise a difference value based on the objects' sort orders.</returns> public int CompareTo(CardColors other) { return(SortOrder.CompareTo(other.SortOrder)); }
public int CompareTo(RoleInOnline roleInOnline) { return(SortOrder.CompareTo(roleInOnline.SortOrder)); }