private void InitTabPage(TabPage tb) { if (tb.Controls.Count < 1) { UserControl_Base UserControl = null; if (tb == this.tbFileRename) { WaitForm wf = new WaitForm(); //Thread t1 = new Thread(new ThreadStart(wf.ShowForm)); ThreadHelper.Thread_Busy = true; //t1.Start(); UserControl = new MusicFileRenameControl(FolderName); wf.ShowForm(); } else if (tb == this.tbID3Renamer) { UserControl = new ID3TagRenameControl(FolderName); } if (UserControl != null) { UserControl.Dock = DockStyle.Fill; tb.Controls.Add(UserControl); } } }
private void btnConfirm_Click(object sender, EventArgs e) { if (!ThreadHelper.Thread_Busy) { ThreadHelper.Thread_Busy = true; WaitForm wf = new WaitForm(); //Thread t1 = new Thread(new ThreadStart(wf.ShowForm)); Thread t2 = new Thread(new ThreadStart(ConfirmFolderRename)); //t1.Start(); t2.Start(); wf.ShowForm(); } }
private void btnPreview_Click(object sender, EventArgs e) { if (!ThreadHelper.Thread_Busy) { lstFileListPreview.Items.Clear(); WaitForm wf = new WaitForm(); //Thread t1 = new Thread(new ThreadStart(wf.ShowForm)); Thread t2 = new Thread(new ThreadStart(Generate_Preview)); ThreadHelper.Thread_Busy = true; //t1.Start(); t2.Start(); wf.ShowForm(); } }