public new void Show() { this.Dock = DockStyle.Fill; System.Collections.Generic.List<System.Threading.Thread> threads = new System.Collections.Generic.List<System.Threading.Thread>(); threads.Add(new System.Threading.Thread((System.Threading.ThreadStart)delegate { this.controlStyler1.FirstControl = firstControl = new Explorer() { Dock = DockStyle.Fill }; })); threads.Add(new System.Threading.Thread((System.Threading.ThreadStart)delegate { this.controlStyler1.SecondControl = secondControl = new Explorer() { Dock = DockStyle.Fill }; })); threads.Add(new System.Threading.Thread((System.Threading.ThreadStart)delegate { this.controlStyler1.ThirdControl = thirdControl = new Explorer() { Dock = DockStyle.Fill }; })); threads.Add(new System.Threading.Thread((System.Threading.ThreadStart)delegate { this.controlStyler1.FourthControl = fourthControl = new Explorer() { Dock = DockStyle.Fill }; })); for (int i = 0; i < threads.Count; i++) threads[i].Start(); do { Application.DoEvents(); System.Threading.Thread.Sleep(300); int isAliveCounter = 0; for (int i = 0; i < threads.Count; i++) if (!threads[i].IsAlive) isAliveCounter++; if (isAliveCounter == threads.Count) break; } while (true); this.controlStyler1.Show(); }
public new void Show() { this.Dock = DockStyle.Fill; System.Collections.Generic.List <System.Threading.Thread> threads = new System.Collections.Generic.List <System.Threading.Thread>(); threads.Add(new System.Threading.Thread((System.Threading.ThreadStart) delegate { this.controlStyler1.FirstControl = firstControl = new Explorer() { Dock = DockStyle.Fill }; })); threads.Add(new System.Threading.Thread((System.Threading.ThreadStart) delegate { this.controlStyler1.SecondControl = secondControl = new Explorer() { Dock = DockStyle.Fill }; })); threads.Add(new System.Threading.Thread((System.Threading.ThreadStart) delegate { this.controlStyler1.ThirdControl = thirdControl = new Explorer() { Dock = DockStyle.Fill }; })); threads.Add(new System.Threading.Thread((System.Threading.ThreadStart) delegate { this.controlStyler1.FourthControl = fourthControl = new Explorer() { Dock = DockStyle.Fill }; })); for (int i = 0; i < threads.Count; i++) { threads[i].Start(); } do { Application.DoEvents(); System.Threading.Thread.Sleep(300); int isAliveCounter = 0; for (int i = 0; i < threads.Count; i++) { if (!threads[i].IsAlive) { isAliveCounter++; } } if (isAliveCounter == threads.Count) { break; } } while (true); this.controlStyler1.Show(); }