Beispiel #1
0
        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()));
            }
        }
Beispiel #2
0
 /// <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()))
 {
 }
Beispiel #3
0
 /// <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()))
 {
 }