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(); }
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); } }); }