Ejemplo n.º 1
0
 private void WorkerThread()
 {
     try
     {
         bool uninstall;
         lock (CancelPendingLock)
         {
             uninstall = uninstallMode;
         }
         InstallWorker installWorker = new InstallWorker();
         if (uninstall)
         {
             installWorker.PerformUninstall(WorkerThreadComplete, WorkerThreadProgress, WorkerThreadAllowCancel, WorkerThreadCancelPending);
         }
         else
         {
             installWorker.PerformInstall(WorkerThreadComplete, WorkerThreadProgress, WorkerThreadAllowCancel, WorkerThreadCancelPending);
         }
     }
     catch (Exception e)
     {
         if (e is PythonPackageInstallException || e is PythonPackageUninstallException)
         {
             InstallLogger.Log(e.Message);
         }
         else
         {
             InstallLogger.Log(string.Format("Installation Error:\n{0}", e.ToString()));
         }
         WorkerThreadFailed();
     }
 }
Ejemplo n.º 2
0
        protected void btnInstall_Click(object sender, EventArgs e)
        {
            Saved  = Cursor;
            Cursor = Cursors.WaitCursor;

            btnInstall.Enabled   = false;
            btnUninstall.Enabled = false;
            btnExit.Enabled      = false;

            Bus_Device_Configured  = false;
            Bus_Driver_Configured  = false;
            DS3_Driver_Configured  = false;
            BTH_Driver_Configured  = false;
            Scp_Service_Configured = false;

            pbRunning.Style = ProgressBarStyle.Marquee;

            InstallWorker.RunWorkerAsync(InfPath);
        }