public int Compare(object x, object y) { ListViewItem left = (ListViewItem)x; ListViewItem right = (ListViewItem)y; if (Reverse) { return(String.Compare(right.SubItems[Column].Text, left.SubItems[Column].Text, false, GeneralUtils.GetCurrentCulture())); } else { return(String.Compare(left.SubItems[Column].Text, right.SubItems[Column].Text, false, GeneralUtils.GetCurrentCulture())); } }
/// <summary> /// Constructor /// </summary> /// <param name="localizedDescription">The localized string name</param> /// <param name="assignedType">The type of resources (normally Properties.Resources)</param> public LocalizedDescriptionAttribute(string localizedDescription, Type assignedType) : base(new ResourceManager(assignedType).GetString(localizedDescription, GeneralUtils.GetCurrentCulture())) { }
/// <summary> /// Localized constructor, passes a localizable string and the type this is applied to /// </summary> /// <param name="localizableCategory">The localizable category name</param> /// <param name="assignedType">The type of resources (normally Properties.Resources)</param> public LocalizedCategoryAttribute(string localizableCategory, Type assignedType) : base(new ResourceManager(assignedType).GetString(localizableCategory, GeneralUtils.GetCurrentCulture())) { }