コード例 #1
0
 private void timerCheckPendingInstalls_Tick(object sender, EventArgs e)
 {
     if (SetupApi.CMP_WaitNoPendingInstallEvents(0) == 0)
     {
         timerCheckPendingInstalls.Enabled = false;
         SynchronizationContext.Current.Post(postCloseForm, DialogResult.OK);
     }
 }
コード例 #2
0
ファイル: InfWizardForm.cs プロジェクト: tmcqueen2/GSharp
        private void buttonInstallDriver_Click(object sender, EventArgs e)
        {
            DialogResult dr = DialogResult.OK;

            if (SetupApi.CMP_WaitNoPendingInstallEvents(0) != 0)
            {
                WaitForSetupForm fWait = new WaitForSetupForm();
                dr = fWait.ShowDialog(this);
            }
            if (dr == DialogResult.OK)
            {
                buttonInstallDriver.Enabled = false;
                wizardPageFinishedEnable(false);
                Thread installSetupThread = new Thread(InstallSetupPackageFn);
                installSetupThread.Start(null);
            }
        }