Beispiel #1
0
        public ListViewColumnSorter(int newCol, SortOrder newOrder)
        {
            ColumnToSort = newCol;
            OrderOfSort  = newOrder;

            switch (ColumnToSort)
            {
            case 1:
                mySortModifier = SortModifiers.SortByDate;
                break;

            case 5:
            case 6:
                mySortModifier = SortModifiers.SortByDecimal;
                break;

            default:
                mySortModifier = SortModifiers.SortByText;
                break;
            }

            ObjectCompare       = new NumberCaseInsensitiveComparer();
            FirstObjectCompare  = new ImageTextComparer();
            FirstObjectCompare2 = new CheckboxTextComparer();
        }
Beispiel #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        public ListViewColumnSorter()
        {
            // Initialize the column to '0'
            ColumnToSort = 0;

            // Initialize the CaseInsensitiveComparer object
            ObjectCompare       = new NumberCaseInsensitiveComparer();
            FirstObjectCompare  = new ImageTextComparer();
            FirstObjectCompare2 = new CheckboxTextComparer();
        }