private void timer1_Tick(object sender, EventArgs e) { float persent = 0; if (Items.Count > 0) { try { persent = (float)((float)Items.Count / ((float)progressBar1.Maximum / 100)); } catch { } } label1.Text = "Всего элементов: " + Items.Count + " из " + progressBar1.Maximum + " " + persent + "%"; if (progressBar1.Maximum >= Items.Count) { progressBar1.Value = Items.Count; } progressBar1.Refresh(); if (Reload.Checked) { ParseGrid.Refresh(); //BindingSource source = new BindingSource(Items.ToArray(),""); // source.Clear(); try { foreach (var item in Items) { if (!source.Contains(item)) { source.Add(item); if (item.ChildrenItems.Count != 0) { foreach (var child in item.ChildrenItems) { source.Add(child); } } } } } catch { } } //dataGridView1.DataSource = source; }
//**************************************************************************************************** //显示审核状态 private void grd_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { ParseGrid.showPass(grd, e); }