Permalink
Browse files

BuildOptionsXaml.xaml add Multibinding

  • Loading branch information...
1 parent 872c673 commit b55cbb1887f26d16cfd526316a1ae4b8071476b0 @PeterForstmeier PeterForstmeier committed May 24, 2012
@@ -11,6 +11,8 @@
xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets">
<optionpanels:ProjectOptionPanel.Resources>
+ <optionpanels:StorageLocationConverter
+ x:Key="converter" />
<optionpanels:StringToBoolConverter
x:Key="strTobool"></optionpanels:StringToBoolConverter>
</optionpanels:ProjectOptionPanel.Resources>
@@ -186,7 +188,7 @@
Margin="3,0,3,0"></Button>
</StackPanel>
<GroupBox Grid.Row="5" Grid.ColumnSpan="3" Margin="5,10,0,0"
- Header="{core:Localize Dialog.ProjectOptions.Build.Advanced}">
+ Header="{core:Localize Dialog.ProjectOptions.Build.Advanced}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition
@@ -220,12 +222,25 @@
Width="50"></ColumnDefinition>
</Grid.ColumnDefinitions>
- <!-- location multibinding http://dotnet-forum.de/blogs/larsschmitt/archive/2009/11/07/wpf-multibinding.aspx -->
- <optionpanels:StorageLocationPicker
- Grid.Row="2"
- Location="{Binding dddddd.Location}"
- DockPanel.Dock="Left" />
+ <optionpanels:StorageLocationPicker Grid.Row="1" VerticalAlignment="Center">
+ <optionpanels:StorageLocationPicker.Location>
+ <MultiBinding
+ Converter="{StaticResource converter}">
+ <Binding
+ Path="RegisterForComInterop.Location" />
+ <Binding
+ Path="GenerateSerializationAssemblies.Location" />
+ <Binding
+ Path="PlatformTarget.Location" />
+ <Binding
+ Path="FileAlignment.Location" />
+ <Binding
+ Path="BaseAddress.Location" />
+ </MultiBinding>
+ </optionpanels:StorageLocationPicker.Location>
+
+ </optionpanels:StorageLocationPicker>
<CheckBox
x:Name="registerCOMInteropCheckBox"
@@ -247,7 +262,7 @@
DisplayMemberPath="DisplayValue"
SelectedValuePath="Key"
SelectedIndex="2"></ComboBox>
-
+
<Label
Grid.Row="2"
Grid.Column="1"
@@ -296,7 +311,7 @@
<local:HexValidator />
</Binding.ValidationRules>
</Binding>
- </TextBox.Text>
+ </TextBox.Text>
</TextBox>
<!-- location multibinding -->
@@ -97,14 +97,8 @@ private void Initialize()
this.Optimize.Location = PropertyStorageLocations.ConfigurationSpecific;
this.AllowUnsafeBlocks.Location = PropertyStorageLocations.ConfigurationSpecific;
this.CheckForOverflowUnderflow.Location = PropertyStorageLocations.ConfigurationSpecific;
- base.RaisePropertyChanged(string.Empty);
- var s = BaseAddress.Value;
- int val;
- if (!int.TryParse(s, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out val)) {
- val = 32;
- }
- var x = val;
- var y = "0x" + val.ToString("x", NumberFormatInfo.InvariantInfo);
+ //base.RaisePropertyChanged(string.Empty);
+ //IsDirty = false;
}
#region properties
@@ -146,7 +140,7 @@ private void Initialize()
get {return GetProperty("DebugType",ICSharpCode.SharpDevelop.Project.DebugSymbolType.Full ); }
}
-
+ // used in multibinding
public ProjectProperty<string> RegisterForComInterop {
get {return GetProperty("RegisterForComInterop","",TextBoxEditMode.EditRawProperty ); }
}
@@ -165,8 +159,7 @@ private void Initialize()
get {return GetProperty("FileAlignment","",TextBoxEditMode.EditRawProperty ); }
}
-
- // Fehlt noch
+
public ProjectProperty<string> BaseAddress {
get {return GetProperty("BaseAddress","0x400000",TextBoxEditMode.EditRawProperty ); }
}
@@ -292,7 +285,6 @@ private void ChangeOutputPathExecute()
#endregion
-
#region SerializationInfo
public List<KeyItemPair> SerializationInfo {
@@ -24,7 +24,7 @@ public override ValidationResult Validate(object value, CultureInfo cultureInfo)
var y = 0;
var res = Int32.TryParse(str,NumberStyles.HexNumber,CultureInfo.InvariantCulture,out y);
if (!res) {
- result = new ValidationResult(false, "No Valid hex Digit");
+ result = new ValidationResult(false, "No valid Hex Digit");
}
return result;
}

0 comments on commit b55cbb1

Please sign in to comment.