예제 #1
0
        private void HandleDeploymentComplete(object sender, DeploymentCompleteEventArgs e)
        {
            switch (e.DeploymentStatus)
            {
            case DeploymentStatus.Success:
                picStatus.Image = (_dpiScaleFactor > 1 ? HighDPIUtils.ScaleByDpi(Resources.ProgressSuccess) : Resources.ProgressSuccess);
                lblStatus.Text  = "Success";
                _deployStatus   = DeploymentStatus.Success;
                break;

            case DeploymentStatus.Cancel:
                picStatus.Image = (_dpiScaleFactor > 1 ? HighDPIUtils.ScaleByDpi(Resources.ProgressCancel) : Resources.ProgressCancel);
                lblStatus.Text  = "Cancelled";
                _deployStatus   = DeploymentStatus.Cancel;
                break;

            case DeploymentStatus.Error:
                SetErrorStatus(e.ErrorMessage);
                break;

            default:
                break;
            }

            btnStopProcessing.Enabled = false;
            btnClose.Enabled          = true;
            //btnClose.Select();
        }
예제 #2
0
 /// <summary>
 /// Invokes the DeploymentComplete event.
 /// </summary>
 /// <param name="e">DeploymentCompleteEventArgs object.</param>
 public virtual void OnDeploymentComplete(DeploymentCompleteEventArgs e) => DeploymentComplete?.Invoke(this, e);