/// <summary> /// The SolutionBrowseButton browses for the .sln file that /// contains all the project files. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SolutionBrowseButton_Click(object sender, EventArgs e) { try { // Browse for the folder DialogHelper.ChooseSolutionFile(this.SolutionTextBox); // set the solution fileName string solutionFileName = this.SolutionTextBox.Text; // if the fileName exists if (!String.IsNullOrEmpty(solutionFileName)) { // if the parent form exists if (this.ParentUpdateForm != null) { // turn on a wait cursor this.ParentUpdateForm.Cursor = Cursors.WaitCursor; // force everything to catch up this.Refresh(); Application.DoEvents(); } // Find a visual studio solution this.VSSolution = VisualStudioHelper.FindSolution(solutionFileName); // display the VSSolution this.DisplayVSSolution(); // if the parent form exists if (this.ParentUpdateForm != null) { // turn on a wait cursor this.ParentUpdateForm.Cursor = Cursors.Default; // force everything to catch up this.Refresh(); Application.DoEvents(); } } } catch (Exception error) { // create a message to show to the user string message = "There was an error reading your solution. The error thrown was:" + Environment.NewLine + error.ToString(); string title = "Visual Studio Update Failure"; MessageBox.Show(message, title, MessageBoxButtons.OK, MessageBoxIcon.Error); } }