void SelectLocalIIS()
        {
            WebProjectDebugData data = new WebProjectDebugData();

            data.WebServer = WebServer.IIS;
            data.Port      = string.Empty;
            bool isIISInstalled = WebProjectService.IISVersion == IISVersion.IIS5 ||
                                  WebProjectService.IISVersion == IISVersion.IIS6 ||
                                  WebProjectService.IISVersion == IISVersion.IIS7;

            if (!isIISInstalled)
            {
                StatusLabel.Text      = ResourceService.GetString("ICSharpCode.WepProjectOptionsPanel.IISNotFound");
                ProjectUrl.Text       = string.Empty;
                data.WebServer        = WebServer.None;
                UseLocalIIS.IsChecked = false;
            }
            else
            {
                StatusLabel.Text = string.Empty;
                ProjectUrl.Text  = @"http://localhost/" + ProjectService.CurrentProject.Name;
            }

            data.ProjectUrl           = ProjectUrl.Text;
            LocalIISGroup.IsEnabled   = CreateVirtualDirectoryButton.IsEnabled = isIISInstalled;
            IISExpressGroup.IsEnabled = false;
            CurrentProjectDebugData   = data;
        }
        void SelectIISExpress()
        {
            WebProjectDebugData data = new WebProjectDebugData();

            data.WebServer  = WebServer.IISExpress;
            data.Port       = PortTextBox.Text;
            data.ProjectUrl = string.Format(@"http://localhost:{0}/" + ProjectService.CurrentProject.Name, PortTextBox.Text);
            bool isIISExpressInstalled = WebProjectService.IISVersion == IISVersion.IISExpress;

            if (!isIISExpressInstalled)
            {
                UseIISExpress.IsChecked = false;
                data.WebServer          = WebServer.None;
                StatusLabel.Text        = ResourceService.GetString("ICSharpCode.WepProjectOptionsPanel.IISNotFound");
                data.ProjectUrl         = string.Empty;
            }
            else
            {
                StatusLabel.Text = string.Empty;
            }

            IISExpressGroup.IsEnabled = CreateVirtualDirectoryButton.IsEnabled = isIISExpressInstalled;
            LocalIISGroup.IsEnabled   = false;
            CurrentProjectDebugData   = data;
        }
        void ProjectUrl_TextChanged(object sender, TextChangedEventArgs e)
        {
            WebProjectDebugData data = new WebProjectDebugData();

            data.WebServer          = WebServer.IIS;
            data.ProjectUrl         = ProjectUrl.Text;
            CurrentProjectDebugData = data;
        }
        void PortTextBox_KeyUp(object sender, System.Windows.Input.KeyEventArgs e)
        {
            WebProjectDebugData data = new WebProjectDebugData();

            data.WebServer          = WebServer.IISExpress;
            data.Port               = PortTextBox.Text;
            data.ProjectUrl         = string.Format(@"http://localhost:{0}/" + ProjectService.CurrentProject.Name, PortTextBox.Text);
            CurrentProjectDebugData = data;
        }
		public WebProjectOptionsPanel(DebugOptions parentPanel)
		{
			InitializeComponent();
			
			this.parentPanel = parentPanel;
			
			if (CurrentProjectDebugData == null)
				CurrentProjectDebugData = new WebProjectDebugData();
			
			Loaded += OnLoaded;
		}
        public WebProjectOptionsPanel(DebugOptions parentPanel)
        {
            InitializeComponent();

            this.parentPanel = parentPanel;

            if (CurrentProjectDebugData == null)
            {
                CurrentProjectDebugData = new WebProjectDebugData();
            }

            Loaded += OnLoaded;
        }
        void ClearWebServerButton_Click(object sender, RoutedEventArgs e)
        {
            UseIISExpress.IsChecked = false;
            UseLocalIIS.IsChecked   = false;
            CreateVirtualDirectoryButton.IsEnabled = false;
            ProjectUrl.Text           = string.Empty;
            LocalIISGroup.IsEnabled   = false;
            IISExpressGroup.IsEnabled = false;

            WebProjectDebugData data = new WebProjectDebugData();

            data.WebServer  = WebServer.None;
            data.ProjectUrl = string.Empty;

            CurrentProjectDebugData = data;
        }
		void PortTextBox_KeyUp(object sender, System.Windows.Input.KeyEventArgs e)
		{
			WebProjectDebugData data = new WebProjectDebugData();
			data.WebServer = WebServer.IISExpress;
			data.Port = PortTextBox.Text;
			data.ProjectUrl = string.Format(@"http://localhost:{0}/" + ProjectService.CurrentProject.Name, PortTextBox.Text);
			CurrentProjectDebugData = data;
		}
		void ClearWebServerButton_Click(object sender, RoutedEventArgs e)
		{
			UseIISExpress.IsChecked = false;
			UseLocalIIS.IsChecked = false;
			CreateVirtualDirectoryButton.IsEnabled = false;
			ProjectUrl.Text = string.Empty;
			LocalIISGroup.IsEnabled = false;
			IISExpressGroup.IsEnabled = false;
			
			WebProjectDebugData data = new WebProjectDebugData();
			data.WebServer = WebServer.None;
			data.ProjectUrl = string.Empty;
			
			CurrentProjectDebugData = data;
		}
		void ProjectUrl_TextChanged(object sender, TextChangedEventArgs e)
		{
			WebProjectDebugData data = new WebProjectDebugData();
			data.WebServer = WebServer.IIS;
			data.ProjectUrl = ProjectUrl.Text;
			CurrentProjectDebugData = data;
		}
		void SelectLocalIIS()
		{
			WebProjectDebugData data = new WebProjectDebugData();
			data.WebServer = WebServer.IIS;
			data.Port = string.Empty;
			bool isIISInstalled = WebProjectService.IISVersion == IISVersion.IIS5 ||
				WebProjectService.IISVersion == IISVersion.IIS6 ||
				WebProjectService.IISVersion == IISVersion.IIS7;
			
			if (!isIISInstalled) {
				StatusLabel.Text = ResourceService.GetString("ICSharpCode.WepProjectOptionsPanel.IISNotFound");
				ProjectUrl.Text = string.Empty;
				data.WebServer = WebServer.None;
				UseLocalIIS.IsChecked = false;
			}
			else {
				StatusLabel.Text = string.Empty;
				ProjectUrl.Text = @"http://localhost/" + ProjectService.CurrentProject.Name;
			}
			
			data.ProjectUrl = ProjectUrl.Text;
			LocalIISGroup.IsEnabled = CreateVirtualDirectoryButton.IsEnabled = isIISInstalled;
			IISExpressGroup.IsEnabled = false;
			CurrentProjectDebugData = data;
		}
		void SelectIISExpress()
		{
			WebProjectDebugData data = new WebProjectDebugData();
			data.WebServer = WebServer.IISExpress;
			data.Port = PortTextBox.Text;
			data.ProjectUrl = string.Format(@"http://localhost:{0}/" + ProjectService.CurrentProject.Name, PortTextBox.Text);
			bool isIISExpressInstalled = WebProjectService.IISVersion == IISVersion.IISExpress;
			
			if (!isIISExpressInstalled) {
				UseIISExpress.IsChecked = false;
				data.WebServer = WebServer.None;
				StatusLabel.Text = ResourceService.GetString("ICSharpCode.WepProjectOptionsPanel.IISNotFound");
				data.ProjectUrl = string.Empty;
			}
			else
				StatusLabel.Text = string.Empty;
			
			IISExpressGroup.IsEnabled = CreateVirtualDirectoryButton.IsEnabled = isIISExpressInstalled;
			LocalIISGroup.IsEnabled = false;
			CurrentProjectDebugData = data;
		}
		void PortTextBox_KeyUp(object sender, System.Windows.Input.KeyEventArgs e)
		{
			WebProjectDebugData data = new WebProjectDebugData();
			data.WebServer = WebServer.IISExpress;
			data.Port = PortTextBox.Text;
			data.ProjectUrl = string.Format(@"{0}:{1}/{2}", CompilableProject.LocalHost, PortTextBox.Text, ProjectService.CurrentProject.Name);
			CurrentProjectDebugData = data;
		}
		void SelectLocalIIS()
		{
			WebProjectDebugData data = new WebProjectDebugData();
			data.WebServer = WebServer.IIS;
			data.Port = string.Empty;
			bool isIISInstalled = WebProjectService.IISVersion != IISVersion.IISExpress &&
					    WebProjectService.IISVersion != IISVersion.None;
			
			if (!isIISInstalled) {
				StatusLabel.Text = ResourceService.GetString("ICSharpCode.WepProjectOptionsPanel.IISNotFound");
				ProjectUrl.Text = string.Empty;
				data.WebServer = WebServer.None;
				UseLocalIIS.IsChecked = false;
			} else {
				StatusLabel.Text = string.Empty;
				ProjectUrl.Text = string.Format("{0}/{1}", CompilableProject.LocalHost, ProjectService.CurrentProject.Name);
			}
			
			data.ProjectUrl = ProjectUrl.Text;
			LocalIISGroup.IsEnabled = CreateVirtualDirectoryButton.IsEnabled = isIISInstalled;
			IISExpressGroup.IsEnabled = false;
			CurrentProjectDebugData = data;
		}