Esempio n. 1
0
 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;
     }
 }
Esempio n. 2
0
 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;
     }
 }
Esempio n. 3
0
        public RequestBox(MainDownloader mainform)
        {
            InitializeComponent();
            formMain = mainform;

            timer.Interval = 500;
            timer.Start();
        }
Esempio n. 4
0
        public RequestBox(MainDownloader mainform)
        {
            InitializeComponent();
            formMain = mainform;

            timer.Interval = 500;
            timer.Start();
        }