麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 編程 > C# > 正文

C#中實現單擊LISTVIEW的COLUMN進行排序的測試代碼

2023-05-10 18:49:29
字體:
來源:轉載
供稿:網友

在《C#中實現單擊LISTVIEW的COLUMN進行排序》一文中僅給出了實現的源代碼,而對于具體如何運用沒有做具體介紹,本文給出了具體的應用源代碼。

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using ListViewControl;

namespace SampleOnListViewControl
{
    /// <summary>
    /// Summary description for Form1.
    /// </summary>
    public class Form1 : System.Windows.Forms.Form
    {
        private ListViewControl.EastSpider listView1;
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.Container components = null;

        public Form1()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            testfunction();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose( bool disposing )
        {
            if( disposing )
            {
                if (components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose( disposing );
        }

        #region Windows Form Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.listView1 = new EastSpider();
            this.SuspendLayout();
            //
            // listView1
            //
            this.listView1.Location = new System.Drawing.Point(48, 32);
            this.listView1.Name = "listView1";
            this.listView1.Size = new System.Drawing.Size(256, 136);
            this.listView1.TabIndex = 0;
            //
            // Form1
            //
            this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
            this.ClientSize = new System.Drawing.Size(376, 285);
            this.Controls.AddRange(new System.Windows.Forms.Control[] {
                                                                          this.listView1});
            this.Name = "Form1";
            this.Text = "Form1";
            this.ResumeLayout(false);

        }
        #endregion

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.Run(new Form1());
        }
        private void testfunction()
        {
            this.listView1.AddColumn("名 稱",EastSpider.ColumnTypeEnum.ColumnTypeText, HorizontalAlignment.Left,187);
            this.listView1.AddColumn("地 址",EastSpider.ColumnTypeEnum.ColumnTypeNumber, HorizontalAlignment.Left,100);
            this.listView1.AddColumn("修改時間",EastSpider.ColumnTypeEnum.ColumnTypeDate, HorizontalAlignment.Left,177);

            this.listView1.Dock = DockStyle.Fill;
            this.listView1.View = System.Windows.Forms.View.Details;
            this.listView1.FullRowSelect = true;

            this.listView1.Sorting = SortOrder.Ascending;

            ListViewItem item1 = new ListViewItem(new string[] {"武林網樂園","VeVb.com","2001-1-2 15:05"});
            ListViewItem item2 = new ListViewItem(new string[] {"電子郵箱,"[email protected]","2009-1-3 11:04"});
            ListViewItem item3 = new ListViewItem(new string[] {"QQ號","48110363","2000-1-2 23:34"});

            this.listView1.AddRow(item1,Color.Transparent);
            this.listView1.AddRow(item2,Color.Transparent);
            this.listView1.AddRow(item3,Color.Transparent);
        }
    }
}

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 亚洲午夜一区二区三区 | 亚洲第一页综合 | 日韩美香港a一级毛片免费 欧美一级淫片007 | 中文字幕22页 | 国产免费一区二区三区最新不卡 | 双性精h调教灌尿打屁股的文案 | 羞羞色网站 | 精品一区二区在线视频 | 国产精品久久久乱弄 | 911视频免费版 | 成年性羞羞视频免费观看无限 | a网在线| 精品一区在线视频 | 91懂色| 成人福利视频在线 | 日本人乱人乱亲乱色视频观看 | 草久影院| 欧美精品在线视频观看 | 第一区免费在线观看 | 少妇一级淫片高潮流水电影 | 把娇妻调教成暴露狂 | 黄色免费不卡视频 | 久久久久免费电影 | 国产精品一区二区三区在线播放 | 一本一道久久久a久久久精品91 | 国产精品1区2区 | 亚洲精品免费播放 | 超污视频在线看 | 久草在线手机视频 | 成年免费大片黄在线观看岛国 | 欧美亚洲国产日韩 | 久久久青| 超久久| 成人在线观看网 | 精品久久999 | 一级国产精品一级国产精品片 | 一夜新娘第三季免费观看 | 国产在线精品区 | 少妇一级淫片免费放正片 | 精品免费久久 | 玖玖精品视频在线 |