Пример #1
0
        //============================================================================*
        // OnColumnClick()
        //============================================================================*

        protected override void OnColumnClick(ColumnClickEventArgs args)
        {
            if (args.Column == m_DataFiles.Preferences.EvaluationSortColumn)
            {
                SortingOrder = (SortingOrder == SortOrder.Ascending) ? SortOrder.Descending : SortOrder.Ascending;

                m_DataFiles.Preferences.EvaluationSortOrder = SortingOrder;

                ListViewItemSorter = new cListViewEvaluationComparer(m_DataFiles, m_DataFiles.Preferences.EvaluationSortColumn, m_DataFiles.Preferences.EvaluationSortOrder);
            }
            else
            {
                SortingColumn = args.Column;

                m_DataFiles.Preferences.EvaluationSortColumn = SortingColumn;

                ListViewItemSorter = new cListViewEvaluationComparer(m_DataFiles, SortingColumn, SortingOrder);
            }

            this.Invalidate(true);

            if (SelectedItems.Count > 0)
            {
                SelectedItems[0].EnsureVisible();
            }
        }
Пример #2
0
        //============================================================================*
        // cEvaluationListView() - Constructor
        //============================================================================*

        public cEvaluationListView(cDataFiles DataFiles, cLoadList LoadList, bool fFactoryTest = false, bool fAmmo = false)
            : base(DataFiles, cPreferences.eApplicationListView.LoadDataListView)
        {
            m_DataFiles = DataFiles;

            m_LoadList = LoadList;

            m_fFactoryTest = fFactoryTest;
            m_fAmmo        = fAmmo;

            //----------------------------------------------------------------------------*
            // Set Properties
            //----------------------------------------------------------------------------*

            AllowColumnReorder = false;
            CheckBoxes         = false;

            //----------------------------------------------------------------------------*
            // Event Handlers
            //----------------------------------------------------------------------------*

            ListViewItemSorter = new cListViewEvaluationComparer(m_DataFiles, m_DataFiles.Preferences.EvaluationSortColumn, m_DataFiles.Preferences.EvaluationSortOrder);

            //----------------------------------------------------------------------------*
            // Populate Columns and Groups
            //----------------------------------------------------------------------------*

            PopulateColumns(m_arColumns);

            SortingOrder = m_DataFiles.Preferences.EvaluationSortOrder;

            SortingColumn = m_DataFiles.Preferences.EvaluationSortColumn;

            Populate();

            Initialized = true;
        }