Browse Source

BuildOptionsXaml.xaml

pull/30/head
PeterForstmeier 13 years ago
parent
commit
5597d5f9ac
  1. 6
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptionsXaml.xaml
  2. 39
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptionsXaml.xaml.cs

6
src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptionsXaml.xaml

@ -271,11 +271,14 @@
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Content="{core:Localize Dialog.ProjectOptions.Build.FileAlignment}"></Label> Content="{core:Localize Dialog.ProjectOptions.Build.FileAlignment}"></Label>
<!-- ????? -->
<ComboBox <ComboBox
x:Name="fileAlignmentComboBox" x:Name="fileAlignmentComboBox"
Grid.Row="3" Grid.Row="3"
Grid.Column="2" Grid.Column="2"
ItemsSource="{Binding Path=DataContext.FileAlign}" ItemsSource="{Binding Path=DataContext.FileAlign}"
SelectedValue="{Binding Path=SelectedFileAlign}"
DisplayMemberPath="DisplayValue" DisplayMemberPath="DisplayValue"
SelectedValuePath="Key" SelectedValuePath="Key"
SelectedIndex="3"></ComboBox> SelectedIndex="3"></ComboBox>
@ -359,13 +362,14 @@
<Label <Label
Grid.Column="1" Grid.Column="1"
Content="{core:Localize Dialog.ProjectOptions.Build.WarningLevel}"></Label> Content="{core:Localize Dialog.ProjectOptions.Build.WarningLevel}"></Label>
<!-- Bad Ischl -->
<ComboBox <ComboBox
x:Name="warningLevelComboBox" x:Name="warningLevelComboBox"
Width="50" Width="50"
Grid.Column="2" Grid.Column="2"
HorizontalAlignment="Left" HorizontalAlignment="Left"
ItemsSource="{Binding Path=DataContext.WarnLevel}" ItemsSource="{Binding Path=DataContext.WarnLevel}"
SelectedValue="{Binding Path=DataContext.SelectedWarningLevel}"
DisplayMemberPath="DisplayValue" DisplayMemberPath="DisplayValue"
SelectedValuePath="Key" SelectedValuePath="Key"
SelectedIndex="4"></ComboBox> SelectedIndex="4"></ComboBox>

39
src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptionsXaml.xaml.cs

@ -5,6 +5,7 @@
* Time: 19:54 * Time: 19:54
* To change this template use Tools | Options | Coding | Edit Standard Headers. * To change this template use Tools | Options | Coding | Edit Standard Headers.
*/ */
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.IO; using System.IO;
@ -92,7 +93,6 @@ namespace CSharpBinding.OptionPanels
this.warnLevel.Add(new KeyItemPair("4","4")); this.warnLevel.Add(new KeyItemPair("4","4"));
this.WarnLevel = warnLevel; this.WarnLevel = warnLevel;
SetTreatWarningAsErrorRadioButtons(); SetTreatWarningAsErrorRadioButtons();
LoadWarningsLevel();
base.RaisePropertyChanged(string.Empty); base.RaisePropertyChanged(string.Empty);
} }
@ -139,6 +139,12 @@ namespace CSharpBinding.OptionPanels
public ProjectProperty<string> RegisterForComInterop { public ProjectProperty<string> RegisterForComInterop {
get {return GetProperty("RegisterForComInterop","",TextBoxEditMode.EditRawProperty ); } get {return GetProperty("RegisterForComInterop","",TextBoxEditMode.EditRawProperty ); }
} }
public ProjectProperty<string> FileAlignment {
get {return GetProperty("FileAlignment","",TextBoxEditMode.EditRawProperty ); }
}
// Fehlt noch // Fehlt noch
public ProjectProperty<string> BaseAddress { public ProjectProperty<string> BaseAddress {
get {return GetProperty("BaseAddress","0x400000",TextBoxEditMode.EditRawProperty ); } get {return GetProperty("BaseAddress","0x400000",TextBoxEditMode.EditRawProperty ); }
@ -298,6 +304,16 @@ namespace CSharpBinding.OptionPanels
} }
} }
public string SelectedFileAlign
{
get {return this.FileAlignment.Value;}
set {this.FileAlignment.Value = value;
base.RaisePropertyChanged(()=> SelectedFileAlign);
}
}
#endregion #endregion
#region BaseIntermediateOutputPath #region BaseIntermediateOutputPath
@ -344,23 +360,16 @@ namespace CSharpBinding.OptionPanels
} }
} }
private void LoadWarningsLevel ()
{ public string SelectedWarningLevel {
string val = WarningLevel.Value; get {
System.Console.WriteLine(val); return this.WarningLevel.Value; }
var i = WarnLevel.FindIndex( set {
delegate(KeyItemPair pair) WarningLevel.Value = value;
{ base.RaisePropertyChanged(() => SelectedWarningLevel);
return pair.Key == val;
} }
);
} }
private void SaveWarningsLevel()
{
}
#endregion #endregion
#region SpecificWarnings TreatWarningsAsErrors #region SpecificWarnings TreatWarningsAsErrors

Loading…
Cancel
Save