Browse Source

DebugOptions Panel

pull/23/head
PeterForstmeier 14 years ago
parent
commit
3f5f683032
  1. 1
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  2. 36
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/DebugOptions.xaml
  3. 5
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ProjectOptionPanel.cs
  4. 41
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/StorageLocationConverter.cs
  5. 14
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/WebProjectOptions/WebProjectOptionsPanel.xaml.cs

1
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -248,6 +248,7 @@
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\ProjectOptionPanel.cs" /> <Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\ProjectOptionPanel.cs" />
<Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\StorageLocationConverter.cs" />
<Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\StorageLocationPicker.cs" /> <Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\StorageLocationPicker.cs" />
<Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\WebProjectOptions\WebProjectOptions.cs" /> <Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\WebProjectOptions\WebProjectOptions.cs" />
<Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\WebProjectOptions\WebProjectOptionsPanel.xaml.cs"> <Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\WebProjectOptions\WebProjectOptionsPanel.xaml.cs">

36
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/DebugOptions.xaml

@ -4,28 +4,29 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:optionpanels="clr-namespace:ICSharpCode.SharpDevelop.Gui.OptionPanels" xmlns:optionpanels="clr-namespace:ICSharpCode.SharpDevelop.Gui.OptionPanels"
xmlns:local="clr-namespace:ICSharpCode.SharpDevelop.Gui.OptionPanels"> xmlns:local="clr-namespace:ICSharpCode.SharpDevelop.Gui.OptionPanels"
>
<optionpanels:ProjectOptionPanel.Resources> <optionpanels:ProjectOptionPanel.Resources>
<local:StorageLocationConverter x:Key="converter"/> <local:StorageLocationConverter x:Key="converter"/>
</optionpanels:ProjectOptionPanel.Resources> </optionpanels:ProjectOptionPanel.Resources>
<Grid ShowGridLines="True"> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="130"></RowDefinition> <RowDefinition Height="130"></RowDefinition>
<RowDefinition Height="130"></RowDefinition> <RowDefinition Height="100"></RowDefinition>
<RowDefinition ></RowDefinition>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<GroupBox Height="120" <GroupBox Height="120"
Margin="0,15,0,0" Margin="0,5,0,0"
Header="Start Action" Header="Start Action"
VerticalAlignment="Top" VerticalAlignment="Top"
Grid.Column="0" Grid.Column="0"
Grid.Row="0" Grid.Row="0"
Grid.ColumnSpan="3" Grid.ColumnSpan="3"
HorizontalAlignment="Stretch"> HorizontalAlignment="Stretch">
<Grid ShowGridLines="True" Background="AliceBlue"> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition></RowDefinition> <RowDefinition></RowDefinition>
<RowDefinition></RowDefinition> <RowDefinition></RowDefinition>
@ -50,14 +51,17 @@ xmlns:local="clr-namespace:ICSharpCode.SharpDevelop.Gui.OptionPanels">
</optionpanels:StorageLocationPicker.Location> </optionpanels:StorageLocationPicker.Location>
</optionpanels:StorageLocationPicker> </optionpanels:StorageLocationPicker>
<RadioButton Grid.Column="1" VerticalAlignment="Center" Margin="4,0,0,0" Content="Start Project"></RadioButton> <RadioButton IsChecked="True"
Grid.Column="1" VerticalAlignment="Center"
Margin="4,0,0,0" Content="Start Project">
</RadioButton>
<RadioButton <RadioButton x:Name="startexternal"
Grid.Row="1" VerticalAlignment="Center" Grid.Column="1" Margin="4,0,0,0" Grid.Row="1" VerticalAlignment="Center" Grid.Column="1" Margin="4,0,0,0"
Content="Start external program:"> Content="Start external program:">
</RadioButton> </RadioButton>
<RadioButton <RadioButton x:Name="startUrl"
Grid.Row="2" VerticalAlignment="Center" Grid.Column="1" Margin="4,0,0,0" Grid.Row="2" VerticalAlignment="Center" Grid.Column="1" Margin="4,0,0,0"
Content="Start browser in URL:"> Content="Start browser in URL:">
</RadioButton> </RadioButton>
@ -86,9 +90,9 @@ xmlns:local="clr-namespace:ICSharpCode.SharpDevelop.Gui.OptionPanels">
Grid.Column="0" Grid.Column="0"
Grid.Row="1" Grid.Row="1"
Grid.ColumnSpan="3" Grid.ColumnSpan="3"
Margin="0,15,0,0" Margin="0,5,0,0"
HorizontalAlignment="Stretch"> HorizontalAlignment="Stretch">
<Grid ShowGridLines="True" Background="AliceBlue"> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition></RowDefinition> <RowDefinition></RowDefinition>
<RowDefinition></RowDefinition> <RowDefinition></RowDefinition>
@ -123,9 +127,15 @@ xmlns:local="clr-namespace:ICSharpCode.SharpDevelop.Gui.OptionPanels">
Text="{Binding StartWorkingDirectory.Value, UpdateSourceTrigger=PropertyChanged}"> Text="{Binding StartWorkingDirectory.Value, UpdateSourceTrigger=PropertyChanged}">
</TextBox> </TextBox>
<Button Grid.Row="1" Grid.Column="3" Margin="5" Content="..."></Button> <Button Grid.Row="1" Grid.Column="3" Margin="5"
Click="BrwoseForFolder_Click"
Content="...">
</Button>
</Grid> </Grid>
</GroupBox> </GroupBox>
<local:WebProjectOptionsPanel Grid.Row="2" Margin="5"
Visibility="{Binding IsWebProject}" >
</local:WebProjectOptionsPanel>
</Grid> </Grid>
</optionpanels:ProjectOptionPanel> </optionpanels:ProjectOptionPanel>

5
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ProjectOptionPanel.cs

@ -149,6 +149,11 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
} }
} }
public string BaseDirectory
{
get {return project.Directory;}
}
public event EventHandler IsDirtyChanged; public event EventHandler IsDirtyChanged;
#region Manage MSBuild properties #region Manage MSBuild properties

41
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/StorageLocationConverter.cs

@ -0,0 +1,41 @@
/*
* Created by SharpDevelop.
* User: Peter Forstmeier
* Date: 14.11.2011
* Time: 19:48
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Collections;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Forms;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{
public class StorageLocationConverter:System.Windows.Data.IMultiValueConverter
{
public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
// Console.WriteLine ("Convert");
// foreach (var element in values) {
// Console.WriteLine(element.ToString());
// }
return values[0];
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
{
var s = Array.ConvertAll<Type, Object>(targetTypes, t => value);
return s;
}
}
}

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

@ -15,10 +15,22 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{ {
private readonly aaDebugOptions parentPanel; private readonly aaDebugOptions parentPanel;
public WebProjectOptionsPanel(aaDebugOptions parentPanel) public WebProjectOptionsPanel()
{ {
InitializeComponent(); InitializeComponent();
// this.parentPanel = parentPanel;
if (CurrentProjectDebugData == null)
CurrentProjectDebugData = new WebProjectDebugData();
Loaded += OnLoaded;
}
public WebProjectOptionsPanel(aaDebugOptions parentPanel):this()
{
// InitializeComponent();
this.parentPanel = parentPanel; this.parentPanel = parentPanel;
if (CurrentProjectDebugData == null) if (CurrentProjectDebugData == null)

Loading…
Cancel
Save