void initOutputUI(TabControl tab, taskOutput output) { tab.Controls.Clear(); if (output.UI != null) { TabPage page = new TabPage(); page.Text = "UI"; page.Controls.Add(output.UI); output.UI.Dock = DockStyle.Fill; tab.Controls.Add(page); } for (int i = 0; i < output.Tables.Count; i++) { TabPage page = new TabPage(); page.Text = output.Tables[i].TableName; DataGridView dg = new DataGridView(); dg.DataSource = output.Tables[i]; page.Controls.Add(dg); dg.Dock = DockStyle.Fill; tab.Controls.Add(page); dg.ShowCellErrors = false; dg.ShowRowErrors = false; dg.DataError += Dg_DataError; } }
void taskBase_OutPutEvent(object sender, taskOutput e) { }