private System.Windows.Forms.SortOrder OrderOfSort; //指定排序的方式

        #endregion Fields

        #region Constructors

        public ListViewColumnSorter()
        {
            ColumnToSort = 0;// 按第一列排序

            OrderOfSort = System.Windows.Forms.SortOrder.None;// 排序方式為不排序

            ObjectCompare = new System.Collections.CaseInsensitiveComparer();
        }
Example #2
0
	/// <summary>
	/// Class constructor.  Initializes various elements
	/// </summary>
	public ListViewColumnSorter()
	{
		// Initialize the column to '0'
		ColumnToSort = 0;

		// Initialize the sort order to 'none'
		OrderOfSort = System.Windows.Forms.SortOrder.None;

		// Initialize the CaseInsensitiveComparer object
		ObjectCompare = new System.Collections.CaseInsensitiveComparer();
	}
Example #3
0
 public TList_ValorCaracteristica(System.ComponentModel.PropertyDescriptor Prop,
                                  System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #4
0
 public ListViewItemComparer()
 {
     col   = 0;
     order = System.Windows.Forms.SortOrder.Ascending;
 }
Example #5
0
 public TList_LanServicoEvolucao(System.ComponentModel.PropertyDescriptor Prop,
                                 System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #6
0
 public TList_VeiculoCliente(System.ComponentModel.PropertyDescriptor Prop,
                             System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #7
0
 public TList_TransfLocal(System.ComponentModel.PropertyDescriptor Prop,
                          System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #8
0
 public ListViewBooksSorter()
 {
     ColumnToSort = 0;
     OrderOfSort = System.Windows.Forms.SortOrder.Ascending;
     ObjectCompare = new System.Collections.CaseInsensitiveComparer();
 }
Example #9
0
 public TList_MedicaoTanque(System.ComponentModel.PropertyDescriptor Prop,
                            System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #10
0
 public TList_RegCadProtocolo(System.ComponentModel.PropertyDescriptor Prop,
                              System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #11
0
 public TList_Lan_Provisao_X_Estoque(System.ComponentModel.PropertyDescriptor Prop,
                                     System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #12
0
 public TList_DescontoXAmostra(System.ComponentModel.PropertyDescriptor Prop,
                               System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
 public DataGridView()
 {
     base.SetStyle(ControlStyles.UserMouse | ControlStyles.Opaque | ControlStyles.UserPaint, true);
     base.SetStyle(ControlStyles.SupportsTransparentBackColor, false);
     base.SetState2(0x800, true);
     this.dataGridViewState1 = new BitVector32(0);
     this.dataGridViewState2 = new BitVector32(0);
     this.dataGridViewOper = new BitVector32(0);
     this.dataGridViewState1[0x80001b] = true;
     this.dataGridViewState2[0x60003e7] = true;
     this.displayedBandsInfo = new DisplayedBandsData();
     this.lstRows = new ArrayList();
     this.converters = new Hashtable(8);
     this.pens = new Hashtable(8);
     this.brushes = new Hashtable(10);
     this.gridPen = new Pen(DefaultGridColor);
     this.selectedBandIndexes = new DataGridViewIntLinkedList();
     this.individualSelectedCells = new DataGridViewCellLinkedList();
     this.individualReadOnlyCells = new DataGridViewCellLinkedList();
     this.advancedCellBorderStyle = new DataGridViewAdvancedBorderStyle(this, DataGridViewAdvancedCellBorderStyle.OutsetDouble, DataGridViewAdvancedCellBorderStyle.OutsetPartial, DataGridViewAdvancedCellBorderStyle.InsetDouble);
     this.advancedRowHeadersBorderStyle = new DataGridViewAdvancedBorderStyle(this);
     this.advancedColumnHeadersBorderStyle = new DataGridViewAdvancedBorderStyle(this);
     this.advancedCellBorderStyle.All = DataGridViewAdvancedCellBorderStyle.Single;
     this.advancedRowHeadersBorderStyle.All = DataGridViewAdvancedCellBorderStyle.OutsetPartial;
     this.advancedColumnHeadersBorderStyle.All = DataGridViewAdvancedCellBorderStyle.OutsetPartial;
     this.borderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.dataGridViewState1[0x80] = true;
     this.selectionMode = DataGridViewSelectionMode.RowHeaderSelect;
     this.editMode = DataGridViewEditMode.EditOnKeystrokeOrF2;
     this.autoSizeRowsMode = DataGridViewAutoSizeRowsMode.None;
     this.autoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.None;
     this.columnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing;
     this.rowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.EnableResizing;
     this.clipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithAutoHeaderText;
     this.layout = new LayoutData();
     this.layout.TopLeftHeader = Rectangle.Empty;
     this.layout.ColumnHeaders = Rectangle.Empty;
     this.layout.RowHeaders = Rectangle.Empty;
     this.layout.ColumnHeadersVisible = true;
     this.layout.RowHeadersVisible = true;
     this.layout.ClientRectangle = base.ClientRectangle;
     this.scrollBars = System.Windows.Forms.ScrollBars.Both;
     this.horizScrollBar.RightToLeft = RightToLeft.Inherit;
     this.horizScrollBar.AccessibleName = System.Windows.Forms.SR.GetString("DataGridView_AccHorizontalScrollBarAccName");
     this.horizScrollBar.Top = base.ClientRectangle.Height - this.horizScrollBar.Height;
     this.horizScrollBar.Left = 0;
     this.horizScrollBar.Visible = false;
     this.horizScrollBar.Scroll += new ScrollEventHandler(this.DataGridViewHScrolled);
     base.Controls.Add(this.horizScrollBar);
     this.vertScrollBar.Top = 0;
     this.vertScrollBar.AccessibleName = System.Windows.Forms.SR.GetString("DataGridView_AccVerticalScrollBarAccName");
     this.vertScrollBar.Left = base.ClientRectangle.Width - this.vertScrollBar.Width;
     this.vertScrollBar.Visible = false;
     this.vertScrollBar.Scroll += new ScrollEventHandler(this.DataGridViewVScrolled);
     base.Controls.Add(this.vertScrollBar);
     this.ptCurrentCell = new Point(-1, -1);
     this.ptAnchorCell = new Point(-1, -1);
     this.ptMouseDownCell = new Point(-2, -2);
     this.ptMouseEnteredCell = new Point(-2, -2);
     this.ptToolTipCell = new Point(-1, -1);
     this.ptMouseDownGridCoord = new Point(-1, -1);
     this.sortOrder = System.Windows.Forms.SortOrder.None;
     this.lastMouseClickInfo.timeStamp = 0L;
     this.WireScrollBarsEvents();
     base.PerformLayout();
     this.toolTipControl = new DataGridViewToolTip(this);
     base.Invalidate();
 }
 internal void OnClearingColumns()
 {
     this.CurrentCell = null;
     this.Rows.ClearInternal(false);
     this.sortedColumn = null;
     this.sortOrder = System.Windows.Forms.SortOrder.None;
 }
Example #15
0
 public TList_Cad_TaxaBandeiraCartao(System.ComponentModel.PropertyDescriptor Prop,
                                     System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #16
0
 public TList_CFGSeqPesagem(System.ComponentModel.PropertyDescriptor Prop,
                            System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
 public ListViewItemComparer(int[] mCols, System.Windows.Forms.SortOrder order)
 {
     this.mColonne = mCols;
     this.order    = order;
 }
 private void MapDataGridViewColumnToDataBoundField(DataGridViewColumn dataGridViewColumn)
 {
     DataGridViewDataConnection dataConnection = this.DataConnection;
     int boundColumnIndex = (dataConnection == null) ? -1 : dataConnection.BoundColumnIndex(dataGridViewColumn.DataPropertyName);
     if (boundColumnIndex != -1)
     {
         dataGridViewColumn.IsDataBoundInternal = true;
         dataGridViewColumn.BoundColumnIndex = boundColumnIndex;
         dataGridViewColumn.BoundColumnConverter = dataConnection.BoundColumnConverter(boundColumnIndex);
         dataGridViewColumn.ValueType = dataConnection.BoundColumnValueType(boundColumnIndex);
         dataGridViewColumn.ReadOnly = dataConnection.DataFieldIsReadOnly(dataGridViewColumn.BoundColumnIndex) || dataGridViewColumn.ReadOnly;
         this.InvalidateColumnInternal(dataGridViewColumn.Index);
         if ((dataGridViewColumn.SortMode != DataGridViewColumnSortMode.NotSortable) && !this.dataGridViewOper[0x400])
         {
             dataGridViewColumn.HeaderCell.SortGlyphDirection = dataConnection.BoundColumnSortOrder(boundColumnIndex);
             if ((this.sortedColumn == null) && (dataGridViewColumn.HeaderCell.SortGlyphDirection != System.Windows.Forms.SortOrder.None))
             {
                 this.sortedColumn = dataGridViewColumn;
                 this.sortOrder = dataGridViewColumn.HeaderCell.SortGlyphDirection;
             }
         }
     }
     else
     {
         dataGridViewColumn.IsDataBoundInternal = false;
         dataGridViewColumn.BoundColumnIndex = -1;
         dataGridViewColumn.BoundColumnConverter = null;
         this.InvalidateColumnInternal(dataGridViewColumn.Index);
     }
 }
 public ListViewItemComparer(int[] mCols)
 {
     this.mColonne = mCols;
     this.order    = System.Windows.Forms.SortOrder.Ascending;
 }
 public IconComparer(System.Windows.Forms.SortOrder currentSortOrder)
 {
     this.sortOrder = currentSortOrder;
 }
Example #21
0
 public TList_Ordem_X_VendaRapida(System.ComponentModel.PropertyDescriptor Prop,
                                  System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #22
0
 public TList_Usuario_TpRequisicao(System.ComponentModel.PropertyDescriptor Prop,
                                   System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #23
0
 public TList_DevOutrasReceitas(System.ComponentModel.PropertyDescriptor Prop,
                                System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
 public void SetIssueGridSort(string columnName, System.Windows.Forms.SortOrder order)
 {
     Settings.Default.PropertyValues["IssueGridSortColumn"].PropertyValue = columnName;
     Settings.Default.PropertyValues["IssueGridSortOrder"].PropertyValue  = order;
     Settings.Default.Save();
 }
    public static void SetSortIcon(this System.Windows.Forms.ListView ListViewControl, int ColumnIndex, System.Windows.Forms.SortOrder Order)
    {
        IntPtr ColumnHeader = SendMessage(ListViewControl.Handle, LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero);

        for (int ColumnNumber = 0; ColumnNumber <= ListViewControl.Columns.Count - 1; ColumnNumber++)
        {
            IntPtr   ColumnPtr = new IntPtr(ColumnNumber);
            LVCOLUMN lvColumn  = new LVCOLUMN();
            lvColumn.mask = HDI_FORMAT;
            SendMessageLVCOLUMN(ColumnHeader, HDM_GETITEM, ColumnPtr, ref lvColumn);

            if (!(Order == System.Windows.Forms.SortOrder.None) && ColumnNumber == ColumnIndex)
            {
                switch (Order)
                {
                case System.Windows.Forms.SortOrder.Ascending:
                    lvColumn.fmt &= ~HDF_SORTDOWN;
                    lvColumn.fmt |= HDF_SORTUP;
                    break;

                case System.Windows.Forms.SortOrder.Descending:
                    lvColumn.fmt &= ~HDF_SORTUP;
                    lvColumn.fmt |= HDF_SORTDOWN;
                    break;
                }
            }
            else
            {
                lvColumn.fmt &= ~HDF_SORTDOWN & ~HDF_SORTUP;
            }

            SendMessageLVCOLUMN(ColumnHeader, HDM_SETITEM, ColumnPtr, ref lvColumn);
        }
    }
Example #26
0
 public TList_CadAcessoriosProduto(System.ComponentModel.PropertyDescriptor Prop,
                                   System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #27
0
 public TList_LanFotosItensMud(System.ComponentModel.PropertyDescriptor Prop,
                               System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #28
0
 public ListViewItemComparer(int column, System.Windows.Forms.SortOrder order)
 {
     col        = column;
     this.order = order;
 }
Example #29
0
 public TList_PrecoCommodities(System.ComponentModel.PropertyDescriptor Prop,
                               System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #30
0
 public TList_LanPecasEnvTerceiro(System.ComponentModel.PropertyDescriptor Prop,
                                  System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #31
0
 public ListViewBooksSorter()
 {
     ColumnToSort  = 0;
     OrderOfSort   = System.Windows.Forms.SortOrder.Ascending;
     ObjectCompare = new System.Collections.CaseInsensitiveComparer();
 }
Example #32
0
 public TList_CadDesenhoPneu(System.ComponentModel.PropertyDescriptor Prop,
                             System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #33
0
 public TList_CadCondFiscalICMS(System.ComponentModel.PropertyDescriptor Prop,
                                System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #34
0
 public TList_CTROrdemColeta(System.ComponentModel.PropertyDescriptor Prop,
                             System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #35
0
 public TList_AgendaVendedor(System.ComponentModel.PropertyDescriptor Prop,
                             System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #36
0
 public TList_FormulaApontamento(System.ComponentModel.PropertyDescriptor Prop,
                                 System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }
Example #37
0
 public TList_Folha_X_Funcionarios(System.ComponentModel.PropertyDescriptor Prop,
                                   System.Windows.Forms.SortOrder Dir)
 {
     Propriedade = Prop;
     Direcao     = Dir;
 }