1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| private void Form1_Load(object sender, EventArgs e)
{
this.Cursor = Cursors.WaitCursor;
this.tabControl1.TabPages.Clear();
F_Loading loading = new F_Loading();
loading.Maximum = this._ucList.Count;
loading.Show();
for (int i = 0; i < this._ucList.Count; i++)
{
IUC_Total iuc = this._ucList[i];
loading.Courant = i;
if (iuc is UC)
{
UC uc = (iuc as UC);
TabPage tp = new TabPage();
tp.Controls.Add(uc);
String tmp = uc.GetType().Name;
tp.Text = tmp.Substring(tmp.LastIndexOf("_") + 1);
uc.Dock = DockStyle.Fill;
this.tabControl1.TabPages.Add(tp);
}
}
loading.Close();
this.tabControl1.SelectedIndex = selectedIndex;
this.tabControl1_SelectedIndexChanged(null, null);
this.Cursor = Cursors.Default;
} |
Partager