Browse Source

Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ProjectOptionPanel.cs can hide header, cleanup

pull/30/head
PeterForstmeier 13 years ago
parent
commit
ee0ff78f99
  1. 12
      src/AddIns/BackendBindings/CppBinding/CppBinding/Project/LinkerOptionsXaml.xaml
  2. 5
      src/AddIns/BackendBindings/CppBinding/CppBinding/Project/LinkerOptionsXaml.xaml.cs
  3. 7
      src/AddIns/BackendBindings/CppBinding/CppBinding/Project/PreprocessorOptions.xaml.cs
  4. 17
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ProjectOptionPanel.cs
  5. 4
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ProjectOptionPanel.xaml

12
src/AddIns/BackendBindings/CppBinding/CppBinding/Project/LinkerOptionsXaml.xaml

@ -26,11 +26,11 @@ @@ -26,11 +26,11 @@
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition Width="50"></ColumnDefinition>
</Grid.ColumnDefinitions>
<CheckBox x:Name="debugInfoCheckBox" Margin="0,15,0,0"
<CheckBox x:Name="debugInfoCheckBox" Margin="5,15,0,0"
IsChecked="{Binding CheckBoxChecked}"
Content="{core:Localize ICSharpCode.CppBinding.ProjectOptions.Linker.GenerateDebugInfo}"></CheckBox>
<Label Grid.Row="1" Content="{core:Localize ICSharpCode.CppBinding.ProjectOptions.Linker.Library}"></Label>
<Label Grid.Row="1" Margin="5,5,0,0" Content="{core:Localize ICSharpCode.CppBinding.ProjectOptions.Linker.Library}"></Label>
<TextBox x:Name="libraryPathTextBox" Grid.Row="2"
Text="{Binding LibraryPath.Value, UpdateSourceTrigger=PropertyChanged}"></TextBox>
@ -39,19 +39,19 @@ @@ -39,19 +39,19 @@
Height="20"
Grid.Column="1" Content="...."></Button>
<Label Grid.Row="3" Content="{core:Localize ICSharpCode.CppBinding.ProjectOptions.Linker.AdditionalLibs}"></Label>
<Label Grid.Row="3" Margin="5,5,0,0" Content="{core:Localize ICSharpCode.CppBinding.ProjectOptions.Linker.AdditionalLibs}"></Label>
<TextBox x:Name="additionalLibsTextBox" Grid.Row="4"></TextBox>
<Button x:Name="additionalLibsButton" Click="AdditionalLibsButton_Click" Grid.Row="4" Grid.Column="1" Margin="5" Content="...." ></Button>
<Label Grid.Row="5" Content="{core:Localize ICSharpCode.CppBinding.ProjectOptions.Linker.AddModule}"></Label>
<Label Grid.Row="5" Margin="5,5,0,0" Content="{core:Localize ICSharpCode.CppBinding.ProjectOptions.Linker.AddModule}"></Label>
<TextBox x:Name="addModuleTextBox" Grid.Row="6"></TextBox>
<Button x:Name="addModuleButton" Click="AddModuleButton_Click" Grid.Row="6" Grid.Column="1" Margin="5" Content="...."></Button>
<Label Grid.Row="7" Content="{core:Localize ICSharpCode.CppBinding.ProjectOptions.Linker.ManagedResourceFile}" ></Label>
<Label Grid.Row="7" Margin="5,5,0,0" Content="{core:Localize ICSharpCode.CppBinding.ProjectOptions.Linker.ManagedResourceFile}" ></Label>
<TextBox x:Name="resourceFileTextBox" Grid.Row="8"></TextBox>
<Button x:Name="resourceFileButton" Click="ResourceFileButton_Click" Grid.Row="8" Grid.Column="1" Margin="5" Content="...."></Button>
<Label Grid.Row="9" Content="{core:Localize ICSharpCode.CppBinding.ProjectOptions.AdditionalOptions}"></Label>
<Label Grid.Row="9" Margin="5,5,0,0" Content="{core:Localize ICSharpCode.CppBinding.ProjectOptions.AdditionalOptions}"></Label>
<TextBox x:Name="additionalOptionsTextBox" Grid.Row="10" Grid.ColumnSpan="2"></TextBox>
</Grid>

5
src/AddIns/BackendBindings/CppBinding/CppBinding/Project/LinkerOptionsXaml.xaml.cs

@ -83,6 +83,11 @@ namespace ICSharpCode.CppBinding.Project @@ -83,6 +83,11 @@ namespace ICSharpCode.CppBinding.Project
#endregion
#region Save/Load
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
HideHeader();
}
protected override void Load(MSBuildBasedProject project, string configuration, string platform)
{

7
src/AddIns/BackendBindings/CppBinding/CppBinding/Project/PreprocessorOptions.xaml.cs

@ -74,8 +74,13 @@ namespace ICSharpCode.CppBinding.Project @@ -74,8 +74,13 @@ namespace ICSharpCode.CppBinding.Project
#endregion
#region Save/Load
#region overrides
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
HideHeader();
}
protected override void Load(MSBuildBasedProject project, string configuration, string platform)
{
base.Load(project, configuration, platform);

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

@ -7,6 +7,8 @@ using System.ComponentModel; @@ -7,6 +7,8 @@ using System.ComponentModel;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Shapes;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project;
@ -34,6 +36,9 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -34,6 +36,9 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
string activePlatform;
bool resettingIndex;
StackPanel configStackPanel;
Line headerline;
protected virtual void Load(MSBuildBasedProject project, string configuration, string platform)
{
foreach (IProjectProperty p in projectProperties.Values)
@ -49,13 +54,25 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -49,13 +54,25 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
return true;
}
public void HideHeader ()
{
configStackPanel.Visibility = Visibility.Hidden;
headerline.Visibility = Visibility.Hidden;
}
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
configurationComboBox = Template.FindName("PART_configuration", this) as ComboBox;
platformComboBox = Template.FindName("PART_platform", this) as ComboBox;
headerline = Template.FindName("PART_headerline", this) as Line;
configStackPanel = Template.FindName("PART_stackpanel", this) as StackPanel;
}
object owner;
object IOptionPanel.Owner {

4
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ProjectOptionPanel.xaml

@ -11,13 +11,13 @@ @@ -11,13 +11,13 @@
Background="{TemplateBinding Panel.Background}"
SnapsToDevicePixels="True">
<DockPanel>
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
<StackPanel x:Name="PART_stackpanel" DockPanel.Dock="Top" Orientation="Horizontal">
<Label Content="{core:StringParse ${res:Dialog.ProjectOptions.Configuration}:}" Target="{Binding ElementName=PART_configuration}" />
<ComboBox Name="PART_configuration" Width="120" />
<Label Content="{core:StringParse ${res:Dialog.ProjectOptions.Platform}:}" Target="{Binding ElementName=PART_platform}" />
<ComboBox Name="PART_platform" Width="120" />
</StackPanel>
<Line X1="0" X2="1" Margin="0,4" StrokeThickness="3" Stroke="Gray" DockPanel.Dock="Top" Stretch="Fill"/>
<Line x:Name="PART_headerline" X1="0" X2="1" Margin="0,4" StrokeThickness="3" Stroke="Gray" DockPanel.Dock="Top" Stretch="Fill"/>
<ContentPresenter Content="{TemplateBinding ContentControl.Content}"
ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"

Loading…
Cancel
Save