Browse Source

Minor UI changes; minor WindowsDebugger changes.

pull/15/head
Eusebiu Marcu 15 years ago
parent
commit
449521311b
  1. 3
      data/resources/StringResources.resx
  2. 30
      src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs
  3. 2
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/DebugOptions.cs
  4. 2
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/WebProjectOptions/WebProjectOptionsPanel.xaml
  5. 2
      src/Main/Base/Project/Src/Services/WebProjectService/WebProjectService.cs

3
data/resources/StringResources.resx

@ -3785,6 +3785,9 @@ You can also choose to store the setting in the .user-file instead of the projec @@ -3785,6 +3785,9 @@ You can also choose to store the setting in the .user-file instead of the projec
<data name="ICSharpCode.WepProjectOptionsPanel.UnableToAttach" xml:space="preserve">
<value>Debugger was unable to attach to process.</value>
</data>
<data name="ICSharpCode.NoStartupProject" xml:space="preserve">
<value>There is no startup project to debug.</value>
</data>
<data name="ICSharpCode.CodeCoverage.CodeCovered" xml:space="preserve">
<value>Code Covered</value>
</data>

30
src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs

@ -139,38 +139,36 @@ namespace ICSharpCode.SharpDevelop.Services @@ -139,38 +139,36 @@ namespace ICSharpCode.SharpDevelop.Services
InitializeService();
}
if (FileUtility.IsUrl(processStartInfo.FileName))
{
if (ProjectService.CurrentProject == null) {
MessageService.ShowError("${res:ICSharpCode.WepProjectOptionsPanel.NoProjectUrlOrProgramAction}");
if (FileUtility.IsUrl(processStartInfo.FileName)) {
var project = ProjectService.OpenSolution.Preferences.StartupProject as CompilableProject;
if (project == null) {
MessageService.ShowError("${res:ICSharpCode.WepProjectOptionsPanel.NoStartupProject}");
return;
}
var debugData = WebProjectsOptions.Instance.GetWebProjectOptions(ProjectService.CurrentProject.Name);
var debugData = WebProjectsOptions.Instance.GetWebProjectOptions(project.Name);
if (debugData == null) {
MessageService.ShowError("${res:ICSharpCode.WepProjectOptionsPanel.NoProjectUrlOrProgramAction}");
return;
}
var project = ProjectService.CurrentProject as CompilableProject;
System.Diagnostics.Process localProcess = null;
if (project != null) {
// start browser
if (project.StartAction == StartAction.StartURL)
localProcess = System.Diagnostics.Process.Start(processStartInfo.FileName);
else
if (!string.IsNullOrEmpty(debugData.Data.ProjectUrl) && debugData.Data.WebServer == WebServer.IIS)
localProcess = System.Diagnostics.Process.Start(debugData.Data.ProjectUrl);
}
// start default application(e.g. browser)
if (project.StartAction == StartAction.StartURL)
localProcess = System.Diagnostics.Process.Start(processStartInfo.FileName);
else
if (!string.IsNullOrEmpty(debugData.Data.ProjectUrl) && debugData.Data.WebServer == WebServer.IIS)
localProcess = System.Diagnostics.Process.Start(debugData.Data.ProjectUrl);
// try debug IIS WP
// try attach to IIS WP
var processes = System.Diagnostics.Process.GetProcesses();
string processName = WebProjectService.WorkerProcessName;
if (debugData.Data.WebServer == WebServer.IISExpress)
processName = "iisexpress";
foreach(var process in processes) {
if (process.ProcessName.ToLower().IndexOf(processName) > -1) {
if (process.ProcessName.ToLower().IndexOf(processName) == 0) {
Attach(process);
break;
}

2
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/DebugOptions.cs

@ -61,7 +61,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -61,7 +61,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
if (isWebProject) {
ElementHost host = new ElementHost();
host.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
host.Height = 160;
host.Height = 150;
host.Width = 550;
host.Top = 240;
host.Left = 8;

2
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/WebProjectOptions/WebProjectOptionsPanel.xaml

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<UserControl
x:Class="ICSharpCode.SharpDevelop.Gui.OptionPanels.WebProjectOptionsPanel" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets" xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<GroupBox Margin="0, 0, 86, 0"
<GroupBox Margin="0, 0, 85, 0"
Header="{core:Localize ICSharpCode.WepProjectOptionsPanel.Server}">
<widgets:StackPanelWithSpacing SpaceBetweenItems="5">
<!--IIS Express-->

2
src/Main/Base/Project/Src/Services/WebProjectService/WebProjectService.cs

@ -119,8 +119,8 @@ namespace ICSharpCode.SharpDevelop.Project @@ -119,8 +119,8 @@ namespace ICSharpCode.SharpDevelop.Project
default:
using (var manager = new Microsoft.Web.Administration.ServerManager())
{
string name = "/" + virtualDirectoryName;
if (manager.Sites[DEFAULT_WEB_SITE] != null) {
string name = "/" + virtualDirectoryName;
if (manager.Sites[DEFAULT_WEB_SITE].Applications[name] == null) {
manager.Sites[DEFAULT_WEB_SITE].Applications.Add(name, physicalDirectoryPath);
manager.CommitChanges();

Loading…
Cancel
Save