private void mobileResources_ResourceInstallStepUpdate(object sender, MobileResourceInstallEventArgs e)
 {
     progressBar1.Value = e.StepNumber;
     Application.DoEvents();
 }
        private void mobileResources_ResourceInstallInitializing(object sender, MobileResourceInstallEventArgs e)
        {
            progressBar1.Maximum = e.StepTotal;
            progressBar1.Value = e.StepNumber;

            labelStatus.Text = "Initializing downloads...";
            Application.DoEvents();
        }
        private void mobileResources_ResourceInstallProgress(object sender, MobileResourceInstallEventArgs e)
        {
            string status = "";
            try
            {
                status = string.Format("{0} {1}", e.Action, e.CurrentPackage).Trim();
                switch (e.Action)
                {
                    case "Downloading":
                        status += string.Format(" ({0}% complete)", e.ProgressPercentage);
                        break;
                    case "Extracting":
                        status += string.Format(" ({0} of {1} files complete)", e.ProgressCurrentFile, e.ProgressTotalFiles);
                        Application.DoEvents();
                        break;
                }
            }
            catch {}

            labelStatus.Text = status;
        }
        private void mobileResources_ResourceInstallComplete(object sender, MobileResourceInstallEventArgs e)
        {
            buttonCreateDevEnv.Enabled = true;
            progressBar1.Visible = false;
            labelStatus.Visible = false;

            if (checkLaunch.Checked)
            {
                var launcher = new LaunchManager();
                launcher.Launch(textProductPath.Text);
                this.FindForm().Close();
            }
            else
            {
                MessageBox.Show("The mobile development environment has been created. To start the website use the 'Start Mobile Website' shortcut located at the root of the website.", "Complete", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Back();
            }
        }