Пример #1
0
        //----------------------------------
        // Organizing tasks by column
        //----------------------------------
        private void LstMision_ColumnClick(object sender, System.Windows.Forms.ColumnClickEventArgs e)
        {
            ListViewColumnSort oCompare = new ListViewColumnSort();

            if (LstMision.Sorting == SortOrder.Ascending)
            {
                oCompare.Sorting = SortOrder.Descending;
            }
            else
            {
                oCompare.Sorting = SortOrder.Ascending;
            }
            LstMision.Sorting    = oCompare.Sorting;
            oCompare.ColumnIndex = e.Column;

            switch (e.Column)
            {
            case 1:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Cadena;
                break;

            case 2:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 3:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 4:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 5:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 6:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 7:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 8:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 9:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 10:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;
            }
            LstMision.ListViewItemSorter = oCompare;
        }
Пример #2
0
        //----------------------------------
        // Put mission list
        //----------------------------------
        public object Colocarmisiones()
        {
            ListViewColumnSort oCompare = new ListViewColumnSort();

            oCompare.Sorting             = SortOrder.Descending;
            LstMision.Sorting            = oCompare.Sorting;
            oCompare.ColumnIndex         = 2;
            oCompare.CompararPor         = ListViewColumnSort.TipoCompare.Numero;
            LstMision.ListViewItemSorter = oCompare;
            return(true);
        }
Пример #3
0
        //----------------------------------------
        // We organize the listview in ascending
        //----------------------------------------
        public object ListadoDown()
        {
            ListViewColumnSort oCompare = new ListViewColumnSort();

            oCompare.Sorting        = SortOrder.Ascending;
            Lst1.Sorting            = oCompare.Sorting;
            oCompare.ColumnIndex    = 1;
            oCompare.CompararPor    = ListViewColumnSort.TipoCompare.Fecha;
            Lst1.ListViewItemSorter = oCompare;
            return(true);
        }
Пример #4
0
        //----------------------------------
        // Organized by column list
        //----------------------------------
        private void Lst1_ColumnClick(object o, ColumnClickEventArgs e)
        {
            ListViewColumnSort oCompare = new ListViewColumnSort(e.Column);

            if (Lst1.Sorting == SortOrder.Ascending)
            {
                oCompare.Sorting = SortOrder.Descending;
            }
            else
            {
                oCompare.Sorting = SortOrder.Ascending;
            }
            Lst1.Sorting         = oCompare.Sorting;
            oCompare.ColumnIndex = e.Column;

            switch (e.Column)
            {
            case 1:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Fecha;
                break;

            case 2:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Cadena;
                break;

            case 3:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 4:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 5:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 6:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 7:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 8:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 9:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 10:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 11:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 12:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;

            case 13:
                oCompare.CompararPor = ListViewColumnSort.TipoCompare.Numero;
                break;
            }

            Lst1.ListViewItemSorter = oCompare;
        }