public int CompareTo(object obj) { var size = obj as PageSize; int result = Width.CompareTo(size.Width); return((result == 0) ? Height.CompareTo(size.Height) : result); }
public int CompareTo(object obj) { Thumbnail cmp = obj as Thumbnail; if (cmp == null) { return(1); } if (Preference != null && Preference.CompareTo(cmp.Preference) != 0) { return(Preference.CompareTo(cmp.Preference)); } else if (Width.CompareTo(cmp.Width) != 0) { return(Width.CompareTo(cmp.Width)); } else if (Height.CompareTo(cmp.Height) != 0) { return(Height.CompareTo(cmp.Height)); } else if (Id != null && Id.CompareTo(cmp.Id) != 0) { return(Id.CompareTo(cmp.Id)); } else { return(Url.CompareTo(Url)); } }
public int CompareTo(object obj) { int? result; Resolution toCompare = obj as Resolution; if (toCompare != null) { if (Width.CompareTo(toCompare.Width) == 0) { result = Height.CompareTo(toCompare.Height); } else { result = Width.CompareTo(toCompare.Width); } if (result.HasValue) { return(result.Value); } else { return(0); } } else { return(0); } }
public int CompareTo(Size other) { if (Width.CompareTo(other.Width) == 0) { return(Height.CompareTo(other.Height)); } return(Width.CompareTo(other.Width)); }
public int CompareTo(ScreenMode other) { var order = Width.CompareTo(other.Width); if (order == 0) { return(Height.CompareTo(other.Height)); } return(order); }
//---------------------------------------------------------------------- public int CompareTo(ScreenMode _other) { int iOrder = Width.CompareTo(_other.Width); if (iOrder == 0) { return(Height.CompareTo(_other.Height)); } else { return(iOrder); } }
public int CompareTo(object obj) { int c = Width.CompareTo(((Resolution)obj).Width); if (c != 0) { return(c); } c = Height.CompareTo(((Resolution)obj).Height); if (c != 0) { return(c); } c = BitCount.CompareTo(((Resolution)obj).BitCount); return(c); }
public int CompareTo(IConstructionSize other) { var res = Length.CompareTo(other.Length); if (res != 0) { return(res); } res = Width.CompareTo(other.Width); if (res != 0) { return(res); } res = Height.CompareTo(other.Height); return(res); }
public int CompareTo(LineProperties other) { if (Color.R != other.Color.R) { return(Color.R.CompareTo(other.Color.R)); } if (Color.G != other.Color.G) { return(Color.G.CompareTo(other.Color.G)); } if (Color.B != other.Color.B) { return(Color.B.CompareTo(other.Color.B)); } if (Width != other.Width) { return(Width.CompareTo(other.Width)); } return(DashStyle != other.DashStyle ? DashStyles.DashStyleToIndex(DashStyle).CompareTo(DashStyles.DashStyleToIndex(other.DashStyle)) : 0); }
public int CompareTo(CorpBox other) { if (ReferenceEquals(this, other)) { return(0); } if (ReferenceEquals(null, other)) { return(1); } var xComparison = X.CompareTo(other.X); if (xComparison != 0) { return(xComparison); } var yComparison = Y.CompareTo(other.Y); if (yComparison != 0) { return(yComparison); } var widthComparison = Width.CompareTo(other.Width); if (widthComparison != 0) { return(widthComparison); } var heightComparison = Height.CompareTo(other.Height); if (heightComparison != 0) { return(heightComparison); } return(Rank.CompareTo(other.Rank)); }
public int CompareTo(WidthData other) => Width.CompareTo(other.Width);