public void PreloadApp(object sender, DoWorkEventArgs e) { mainDownload = new MainDownloader(this); try { String[] filePaths = Directory.GetFiles(@"Plugins\", "*.mdl"); if (filePaths.Length < 1) { e.Cancel = true; } else { mainProcess.ReportProgress(0); //System.Threading.Thread.Sleep(2000); foreach (String path in filePaths) { mainProcess.ReportProgress(0); String[] fileName = path.Split('\\'); //preLoaderText = fileName[1]; //mainDownload.LoadPlugins(path); System.Threading.Thread.Sleep(1000); } } } catch(Exception ex) { MessageBox.Show(ex.Message); e.Cancel = true; } }
public void PreloadApp(object sender, DoWorkEventArgs e) { mainDownload = new MainDownloader(this); try { String[] filePaths = Directory.GetFiles(@"Plugins\", "*.mdl"); if (filePaths.Length < 1) { e.Cancel = true; } else { mainProcess.ReportProgress(0); //System.Threading.Thread.Sleep(2000); foreach (String path in filePaths) { mainProcess.ReportProgress(0); String[] fileName = path.Split('\\'); //preLoaderText = fileName[1]; //mainDownload.LoadPlugins(path); System.Threading.Thread.Sleep(1000); } } } catch (Exception ex) { MessageBox.Show(ex.Message); e.Cancel = true; } }
public RequestBox(MainDownloader mainform) { InitializeComponent(); formMain = mainform; timer.Interval = 500; timer.Start(); }