Exemplo n.º 1
0
        public void AddFilesToView(string group)
        {
            Package p = packages._packages.Find(Package => Package._name == group);

            this.form.dataGridView1.BeginInvoke((MethodInvoker) delegate()
            {
                foreach (Item i in p._items)
                {
                    DataGridViewCellStyle style = new DataGridViewCellStyle();
                    style.Alignment             = DataGridViewContentAlignment.MiddleCenter;

                    DataGridViewRow row = new DataGridViewRow();

                    DataGridViewTextBoxCell filename = new DataGridViewTextBoxCell();
                    filename.Value = i._file;
                    row.Cells.Add(filename);

                    DataGridViewTextBoxCell status = new DataGridViewTextBoxCell();
                    status.Value = "Unknown";
                    status.Style = style;
                    row.Cells.Add(status);

                    DataGridViewProgressCell download = new DataGridViewProgressCell();
                    download.Value = 0;
                    row.Cells.Add(download);

                    i.row = row;

                    this.form.dataGridView1.Rows.Add(row);
                }
            });
        }
 public DataGridViewProgressColumn()
 {
     CellTemplate = new DataGridViewProgressCell();
 }
Exemplo n.º 3
0
        public void AddFilesToView(string group)
        {
            Package p = packages._packages.Find(Package => Package._name == group);

            this.form.dataGridView1.BeginInvoke((MethodInvoker)delegate()
            {
                foreach (Item i in p._items)
                {
                    DataGridViewCellStyle style = new DataGridViewCellStyle();
                    style.Alignment = DataGridViewContentAlignment.MiddleCenter;

                    DataGridViewRow row = new DataGridViewRow();

                    DataGridViewTextBoxCell filename = new DataGridViewTextBoxCell();
                    filename.Value = i._file;
                    row.Cells.Add(filename);

                    DataGridViewTextBoxCell status = new DataGridViewTextBoxCell();
                    status.Value = "Unknown";
                    status.Style = style;
                    row.Cells.Add(status);

                    DataGridViewProgressCell download = new DataGridViewProgressCell();
                    download.Value = 0;
                    row.Cells.Add(download);

                    i.row = row;

                    this.form.dataGridView1.Rows.Add(row);
                }
            });
        }
Exemplo n.º 4
0
 public DataGridViewProgressColumn()
 {
     CellTemplate = new DataGridViewProgressCell();
 }