~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.Commands/WebReferenceCommandHandler.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
using MonoDevelop.Ide.Gui.Components;
8
8
using MonoDevelop.Ide;
9
9
using System.Collections.Generic;
 
10
using MonoDevelop.Core.Assemblies;
10
11
 
11
12
namespace MonoDevelop.WebReferences.Commands
12
13
{
21
22
                        DotNetProject project = CurrentNode.GetParentDataItem (typeof(DotNetProject), true) as DotNetProject;
22
23
                        
23
24
                        // Check and switch the runtime environment for the current project
24
 
                        if (project.TargetFramework.Id == "1.1")
 
25
                        if (project.TargetFramework.Id == TargetFrameworkMoniker.NET_1_1)
25
26
                        {
26
27
                                string question = "The current runtime environment for your project is set to version 1.0.";
27
28
                                question += "Web Service is not supported in this version.";
29
30
                                
30
31
                                AlertButton switchButton = new AlertButton ("_Switch to .NET2"); 
31
32
                                if (MessageService.AskQuestion(question, AlertButton.Cancel, switchButton) == switchButton)
32
 
                                        project.TargetFramework = Runtime.SystemAssemblyService.GetTargetFramework ("2.0");                                     
 
33
                                        project.TargetFramework = Runtime.SystemAssemblyService.GetTargetFramework (TargetFrameworkMoniker.NET_2_0);                                    
33
34
                                else
34
35
                                        return;
35
36
                        }
36
37
                        
37
38
                        WebReferenceDialog dialog = new WebReferenceDialog (project);
38
 
                        dialog.NamespacePrefix = project.Name;
 
39
                        dialog.NamespacePrefix = project.DefaultNamespace;
39
40
                        
40
41
                        try {
41
42
                                if (MessageService.RunCustomDialog (dialog) == (int)Gtk.ResponseType.Ok) {