public int CompareTo(object obj) { return(obj == null ? -1 : string.CompareOrdinal(StationName.ToUpperInvariant(), ((MassiveConfigureDevicePart)obj).StationName.ToUpperInvariant())); }
/// ************************************************************************************************ /// <summary> /// /// </summary> private void FillMinColumnsSize() { string gleisText = Common.MultiplatformTramStations.Contains(StationName.ToUpperInvariant()) ? Common.HeaderTitles["PlatformT"] : (Common.MultiplatformSbahnStations.Contains(StationName.ToUpperInvariant()) ? Common.HeaderTitles["PlatformS"] : ""); string textToMeasure; MinWidth = new double[Common.HeaderTitles.Count - 1]; foreach (string column in Common.HeaderTitles.Keys) { if (string.Compare(column, "PlatformT") == 0) { continue; } if (string.Compare(column, "PlatformS") == 0) { textToMeasure = gleisText; } else { textToMeasure = Common.HeaderTitles[column]; } MinColumnsSize.Add(Common.HeaderTitles[column], Common.MeasureText(textToMeasure, HeaderFontFamily.ToString(), HeaderFontSize)); } MinWidth[0] = MinColumnsSize["Linie"]; MinWidth[1] = MinColumnsSize["Ziel"]; MinWidth[2] = MinColumnsSize["Gleis"]; MinWidth[3] = MinColumnsSize["Abfahrt"]; MinWidth[4] = MinColumnsSize["Zeit"]; }