Пример #1
0
        private void ListViewBing(PackageInfo packinfo)
        {
            //movie
            EXListViewItem item = new EXListViewItem(packinfo.Packagename);

            //添加第二列控件    上传路径
            EXControls.EXListViewSubItem serverpath = new EXControls.EXListViewSubItem();
            item.SubItems.Add(serverpath);
            //添加第三列控件   进度
            EXControlListViewSubItem cs = new EXControlListViewSubItem();
            ProgressBar b = new ProgressBar();

            b.Tag     = item;
            b.Maximum = 100;
            b.Value   = 100;
            item.SubItems.Add(cs);
            this.exListView1.AddControlToSubItem(b, cs);
            //添加第四列控件   状态
            EXControls.EXListViewSubItem status = new EXControls.EXListViewSubItem();
            item.SubItems.Add(status);
            //添加第五列控件   操作
            EXControlListViewSubItem cs1 = new EXControlListViewSubItem();
            LinkLabel llbl = new LinkLabel();

            llbl.Text         = "上传";
            llbl.Tag          = cs;
            llbl.LinkClicked += new LinkLabelLinkClickedEventHandler(llbl_LinkClicked);
            item.SubItems.Add(cs1);
            this.exListView1.AddControlToSubItem(llbl, cs1);


            //conclusion
            //item.SubItems.Add(new EXBoolListViewSubItem(true));
            this.exListView1.Items.Add(item);
        }
Пример #2
0
        private void ListViewBing(PackageInfo packinfo)
        {
            //添加第二列控件    更新包名称     item[0]
            EXListViewItem item = new EXListViewItem(packinfo.Packagename);

            //添加第二列控件    上传路径       item[1]
            EXControls.EXListViewSubItem serverpath = new EXControls.EXListViewSubItem();
            //添加第三列控件   进度            item[2]
            EXControlListViewSubItem cs = new EXControlListViewSubItem();
            ProgressBar b = new ProgressBar();

            b.Tag = item;
            //添加第四列控件   状态            item[3]
            EXControls.EXListViewSubItem status = new EXControls.EXListViewSubItem();
            //添加第五列控件   操作             item[4]
            EXControlListViewSubItem cs1 = new EXControlListViewSubItem();
            LinkLabel llbl = new LinkLabel();

            llbl.Tag          = cs;
            llbl.LinkClicked += new LinkLabelLinkClickedEventHandler(llbl_LinkClicked);

            if (!string.IsNullOrEmpty(packinfo.PubPath) && CommonConst.PACKSTATE_YiFaBu.Equals(packinfo.State))
            {
                serverpath.Text = packinfo.PubPath;
                status.Text     = "已上传";
                b.Maximum       = 100;
                b.Value         = 100;
                llbl.Text       = "重传";
            }
            else
            {
                status.Text = "未上传";
                llbl.Text   = "上传";
            }
            item.SubItems.Add(serverpath);
            item.SubItems.Add(cs);
            item.SubItems.Add(status);
            item.SubItems.Add(cs1);
            item.SubItems.Add(packinfo.Id.ToString());
            item.SubItems.Add(packinfo.Packagepath);
            item.Tag = "true";          //默认是 确认上传
            this.exListView1.AddControlToSubItem(b, cs);
            this.exListView1.AddControlToSubItem(llbl, cs1);
            this.exListView1.Items.Add(item);
        }