예제 #1
0
        public ListView()
        {
            ColumnClick       += new System.Windows.Forms.ColumnClickEventHandler(HandleColumnClick);
            ListViewItemSorter = new ListViewItemComparer();

            alFilteredItems = new ArrayList();
        }
예제 #2
0
        //*************************************************************************************************************
        public LocalList()
        {
            FullRowSelect = true;
            Columns.Add("Name", 205);
            Columns.Add("Size", 100, HorizontalAlignment.Right);
            Columns.Add("Last Update", 125);

            DoubleClick    += new System.EventHandler(this_DoubleClick);
            ItemDrag       += new System.Windows.Forms.ItemDragEventHandler(this_ItemDrag);
            DragDrop       += new System.Windows.Forms.DragEventHandler(this_DragDrop);
            DragEnter      += new System.Windows.Forms.DragEventHandler(this_DragEnter);
            KeyDown        += new System.Windows.Forms.KeyEventHandler(this_KeyDown);
            MouseUp        += new System.Windows.Forms.MouseEventHandler(this_MouseUp);
            AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this_AfterLabelEdit);

            fileSystemWatcher.IncludeSubdirectories = false;
            fileSystemWatcher.NotifyFilter          = NotifyFilters.Attributes
                                                      | NotifyFilters.CreationTime
                                                      | NotifyFilters.DirectoryName
                                                      | NotifyFilters.FileName
                                                      | NotifyFilters.LastWrite
                                                      | NotifyFilters.Size;

            fileSystemWatcher.SynchronizingObject = this;
            fileSystemWatcher.Changed            += new System.IO.FileSystemEventHandler(this.fileSystemWatcher_Changed);
            fileSystemWatcher.Created            += new System.IO.FileSystemEventHandler(this.fileSystemWatcher_Changed);
            fileSystemWatcher.Deleted            += new System.IO.FileSystemEventHandler(this.fileSystemWatcher_Changed);
            fileSystemWatcher.Renamed            += new System.IO.RenamedEventHandler(this.fileSystemWatcher_Renamed);
            ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.List_ColumnClick);
        }
        public ListViewTransforms()
        {
            columnHeaderTransformName        = new System.Windows.Forms.ColumnHeader();
            columnHeaderTransformDescription = new System.Windows.Forms.ColumnHeader();
            columnHeaderTransformDate        = new System.Windows.Forms.ColumnHeader();

            Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
                columnHeaderTransformName,
                columnHeaderTransformDescription,
                columnHeaderTransformDate
            });
            FullRowSelect = true;
            HideSelection = false;
            Location      = new System.Drawing.Point(32, 89);
            MultiSelect   = false;
            Name          = "listViewTransforms";
            Size          = new System.Drawing.Size(726, 194);
            TabIndex      = 61;
            UseCompatibleStateImageBehavior = false;
            View         = System.Windows.Forms.View.Details;
            Tag          = -1;
            ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(ListViewItemComparer.ListView_ColumnClick);
            //
            // columnHeaderTemplateName
            //
            columnHeaderTransformName.Text = "Transform Name";
            //
            // columnHeaderTemplateDate
            //
            columnHeaderTransformDate.Text = "Last modified";
            //
            // columnHeaderTransformDescription
            //
            columnHeaderTransformDescription.Text = "Description";
        }
		/// <summary>
		/// Initializes a new instance of the SortListView class.
		/// </summary>
		/// <remarks>
		/// The new SortListView instance has an ColumnClick event handler defined to handle 
		/// the user clicking a column header to sort the column.
		/// </remarks>
		public SortListView()
		{
			// Capture mouse or stylus input to this ListView control, and then
			// use the unmanaged GetCapture() API to get the handle of the window 
			// that has captured the mouse or stylus input. 
			//bool capture = Capture;
			//Capture = true;
			//m_handle = GetCapture();
			//Capture = capture;

			ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(OnColumnClick);
		}
예제 #5
0
        public Form1()
        {
            InitializeComponent();
            SetupFilters();
            SetupShipDeails();

            _sortHandler = new System.Windows.Forms.ColumnClickEventHandler(this.lvShipDetails_ColumnClick);
            lvShipDetails.ColumnClick += _sortHandler;

            //this.lvShipDetails.ColumnClick +=
            //new System.Windows.Forms.ColumnClickEventHandler(this.lvShipDetails_ColumnClick);

            this.tvFilters.AfterCheck += TvFilters_AfterCheck;
        }
예제 #6
0
        //*************************************************************************************************************
        public RemoteList()
        {
            FullRowSelect = true;
            Columns.Add("Name", 220);
            Columns.Add("Size", 100, HorizontalAlignment.Right);
            Columns.Add("Last Update", 125);

            DoubleClick    += new System.EventHandler(this_DoubleClick);
            ItemDrag       += new System.Windows.Forms.ItemDragEventHandler(this_ItemDrag);
            DragDrop       += new System.Windows.Forms.DragEventHandler(this_DragDrop);
            DragEnter      += new System.Windows.Forms.DragEventHandler(this_DragEnter);
            KeyDown        += new System.Windows.Forms.KeyEventHandler(this_KeyDown);
            MouseUp        += new System.Windows.Forms.MouseEventHandler(this_MouseUp);
            AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this_AfterLabelEdit);
            ColumnClick    += new System.Windows.Forms.ColumnClickEventHandler(this.List_ColumnClick);
        }
예제 #7
0
        /// <summary>
        /// Initializes a new instance of the SortListView class.
        /// </summary>
        /// <remarks>
        /// The new SortListView instance has an ColumnClick event handler defined to handle
        /// the user clicking a column header to sort the column.
        /// </remarks>
        public SortListView()
        {
            //Activate double buffering
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);

            //Enable the OnNotifyMessage event so we get a chance to filter out
            // Windows messages before they get to the form's WndProc
            this.SetStyle(ControlStyles.EnableNotifyMessage, true);

            // Capture mouse or stylus input to this ListView control, and then
            // use the unmanaged GetCapture() API to get the handle of the window
            // that has captured the mouse or stylus input.

            /*bool capture = Capture;
             * Capture = true;
             * m_handle = GetCapture();
             * Capture = capture;*/

            ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(OnColumnClick);
        }
예제 #8
0
 public ResultsListView(main f)
 {
     mainForm            = f;
     headerFont          = UI.environmentFont;
     OwnerDraw           = true;
     DrawItem           += new DrawListViewItemEventHandler(OnDrawItem);
     DrawColumnHeader   += new DrawListViewColumnHeaderEventHandler(OnDrawColumnHeader);
     Resize             += new EventHandler(OnResize);
     ColumnWidthChanged += new ColumnWidthChangedEventHandler(OnColumnWidthChanged);
     Dock             = System.Windows.Forms.DockStyle.Fill;
     VirtualMode      = true;
     VirtualListSize  = 0;
     BorderStyle      = System.Windows.Forms.BorderStyle.None;
     FullRowSelect    = true;
     HideSelection    = false;
     Location         = new System.Drawing.Point(0, 0);
     Name             = "results";
     ShowItemToolTips = true;
     Size             = new System.Drawing.Size(200, 200);
     UseCompatibleStateImageBehavior = false;
     View                 = System.Windows.Forms.View.Details;
     ColumnClick         += new System.Windows.Forms.ColumnClickEventHandler(this.OnColumnClick);
     RetrieveVirtualItem += new System.Windows.Forms.RetrieveVirtualItemEventHandler(OnRetrieveVirtualItem);
 }
        public void Init ()
        {
            this.View = System.Windows.Forms.View.Details;
            MultiSelect = false;

            //AllowOrder ( false );     //默不能排序。
            AllowOrder ( true );        //默可以排序。
 
            //设定排序器.
            ListViewItemSorter = _sorter;
            _sorter.Order = SortOrder.Ascending;

            //消息响应函数。
            ColumnClick += new System.Windows.Forms.ColumnClickEventHandler ( this.OnColumnClick );
            ColumnWidthChanging += new System.Windows.Forms.ColumnWidthChangingEventHandler ( this.OnColWidthChanging );
            ItemMouseHover += new System.Windows.Forms.ListViewItemMouseHoverEventHandler ( this.OnItemMouseHover );
            ColumnWidthChanged += new System.Windows.Forms.ColumnWidthChangedEventHandler ( this.OnColumnWidthChanged );

            //
            SetStyle ();

            //RestoreColWidth ();   

            //
            SetDefaultAllOrderType ();

            //SaveColW();
        }
		/// <summary>
		/// Initializes a new instance of the SortListView class.
		/// </summary>
		/// <remarks>
		/// The new SortListView instance has an ColumnClick event handler defined to handle 
		/// the user clicking a column header to sort the column.
		/// </remarks>
		public SortListView()
		{
            //Activate double buffering
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);

            //Enable the OnNotifyMessage event so we get a chance to filter out 
            // Windows messages before they get to the form's WndProc
            this.SetStyle(ControlStyles.EnableNotifyMessage, true);

			// Capture mouse or stylus input to this ListView control, and then
			// use the unmanaged GetCapture() API to get the handle of the window 
			// that has captured the mouse or stylus input. 
			/*bool capture = Capture;
			Capture = true;
			m_handle = GetCapture();
			Capture = capture;*/

			ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(OnColumnClick);
		}