Skip to content

Commit

Permalink
The user should not be able to change the validation checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirk Rombauts committed Dec 11, 2014
1 parent f379c0c commit eb778a3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Pickles/Pickles.UserInterface/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@
<Label Content="Feature Directory" Grid.Column="0" Grid.Row="1" VerticalAlignment="Top" />
<TextBox Text="{Binding FeatureFolder}" Grid.Column="1" Grid.Row="1" mahapps:TextBoxHelper.Watermark="Browse To The Location Of Your Feature Files" VerticalAlignment="Top" />
<Button Command="{Binding BrowseForFeatureFolder}" Content="Browse ..." Grid.Row="1" Grid.Column="2" VerticalAlignment="Top" />
<CheckBox Template="{StaticResource ResourceKey=myCheckBox}" Grid.Column="3" Grid.Row="1" IsChecked="{Binding Path=IsFeatureDirectoryValid}" VerticalAlignment="Top" />
<CheckBox Template="{StaticResource ResourceKey=myCheckBox}" Grid.Column="3" Grid.Row="1" IsChecked="{Binding Path=IsFeatureDirectoryValid}" IsEnabled="False" VerticalAlignment="Top" />

<Label Content="Output Directory" Grid.Column="0" Grid.Row="2" VerticalAlignment="Top" />
<TextBox Text="{Binding OutputFolder}" Grid.Column="1" Grid.Row="2" mahapps:TextBoxHelper.Watermark="Browse To The Location Of The Living Documentation" VerticalAlignment="Top" />
<Button Command="{Binding BrowseForOutputFolder}" Content="Browse ..." Grid.Column="2" Grid.Row="2" HorizontalAlignment="Left" Width="62" VerticalAlignment="Top" />
<CheckBox Template="{StaticResource ResourceKey=myCheckBox}" Grid.Column="3" Grid.Row="2" IsChecked="{Binding Path=IsOutputDirectoryValid}" VerticalAlignment="Top"/>
<CheckBox Template="{StaticResource ResourceKey=myCheckBox}" Grid.Column="3" Grid.Row="2" IsChecked="{Binding Path=IsOutputDirectoryValid}" IsEnabled="False" VerticalAlignment="Top"/>

<mahapps:ToggleSwitch Header="Create Directory For Each Output Format" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" IsChecked="{Binding Path=CreateDirectoryForEachOutputFormat, Mode=TwoWay}" Margin="0,0,0,5" />

Expand All @@ -86,19 +86,19 @@

<Label Content="Project Name" Grid.Column="0" Grid.Row="4" VerticalAlignment="Top" />
<TextBox Text="{Binding ProjectName}" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="2" mahapps:TextBoxHelper.Watermark="Enter The Name Of Your Project Here" VerticalAlignment="Top" />
<CheckBox Template="{StaticResource ResourceKey=myCheckBox}" Grid.Column="3" Grid.Row="4" IsChecked="{Binding Path=IsProjectNameValid}" VerticalAlignment="Top"/>
<CheckBox Template="{StaticResource ResourceKey=myCheckBox}" Grid.Column="3" Grid.Row="4" IsChecked="{Binding Path=IsProjectNameValid}" IsEnabled="False" VerticalAlignment="Top"/>

<Label Content="Project Version" Grid.Column="0" Grid.Row="5" VerticalAlignment="Top" />
<TextBox Text="{Binding ProjectVersion}" Grid.Column="1" Grid.Row="5" Grid.ColumnSpan="2" mahapps:TextBoxHelper.Watermark="Enter The Version Of Your Project Here" VerticalAlignment="Top" />
<CheckBox Template="{StaticResource ResourceKey=myCheckBox}" Grid.Column="3" Grid.Row="5" IsChecked="{Binding Path=IsProjectVersionValid}" VerticalAlignment="Top"/>
<CheckBox Template="{StaticResource ResourceKey=myCheckBox}" Grid.Column="3" Grid.Row="5" IsChecked="{Binding Path=IsProjectVersionValid}" IsEnabled="False" VerticalAlignment="Top"/>

<Label Content="Include Test Results" Grid.Column="0" Grid.Row="7" Visibility="Hidden" />
<mahapps:ToggleSwitch Header="Include Test Results" Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2" IsChecked="{Binding Path=IncludeTests, Mode=TwoWay}" Margin="0,0,0,5" />

<Label Content="Test Results File" Grid.Column="0" Grid.Row="7" VerticalAlignment="Top" />
<TextBox Text="{Binding TestResultsFile}" Grid.Column="1" Grid.Row="7" IsEnabled="{Binding Path=IncludeTests}" mahapps:TextBoxHelper.Watermark="Browse To The Location Of Your Test Results File" VerticalAlignment="Top" />
<Button Command="{Binding BrowseForTestResultsFile}" Content="Browse" Grid.Row="7" Grid.Column="2" IsEnabled="{Binding Path=IncludeTests}" VerticalAlignment="Top" />
<CheckBox Template="{StaticResource ResourceKey=myCheckBox}" Grid.Column="3" Grid.Row="7" IsChecked="{Binding Path=IsTestResultsFileValid}" Visibility="{Binding Path=IncludeTests, Converter={StaticResource ResourceKey=booleanToVisibilityConverter}}"/>
<CheckBox Template="{StaticResource ResourceKey=myCheckBox}" Grid.Column="3" Grid.Row="7" IsChecked="{Binding Path=IsTestResultsFileValid}" Visibility="{Binding Path=IncludeTests, Converter={StaticResource ResourceKey=booleanToVisibilityConverter}}" IsEnabled="False" />

<Label Content="Test Results Format" Grid.Column="0" Grid.Row="8" VerticalAlignment="Top"/>
<ListBox ItemsSource="{Binding TestResultsFormatValues}" Grid.Column="1" Grid.Row="8" Grid.ColumnSpan="2" IsEnabled="{Binding Path=IncludeTests}" VerticalAlignment="Top">
Expand All @@ -113,11 +113,11 @@
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<CheckBox Template="{StaticResource ResourceKey=myCheckBox}" Grid.Column="3" Grid.Row="8" IsChecked="{Binding Path=IsTestResultsFormatValid}" Visibility="{Binding Path=IncludeTests, Converter={StaticResource ResourceKey=booleanToVisibilityConverter}}"/>
<CheckBox Template="{StaticResource ResourceKey=myCheckBox}" Grid.Column="3" Grid.Row="8" IsChecked="{Binding Path=IsTestResultsFormatValid}" Visibility="{Binding Path=IncludeTests, Converter={StaticResource ResourceKey=booleanToVisibilityConverter}}" IsEnabled="False" />

<Label Content="Gherkin Language" Grid.Column="0" Grid.Row="9" VerticalAlignment="Top" />
<ComboBox ItemsSource="{Binding LanguageValues}" Grid.Column="1" SelectedItem="{Binding SelectedLanguage}" Grid.Row="9" Grid.ColumnSpan="2" DisplayMemberPath="NativeName" VerticalAlignment="Top"/>
<CheckBox Template="{StaticResource ResourceKey=myCheckBox}" Grid.Column="3" Grid.Row="9" IsChecked="{Binding Path=IsLanguageValid}" VerticalAlignment="Top"/>
<CheckBox Template="{StaticResource ResourceKey=myCheckBox}" Grid.Column="3" Grid.Row="9" IsChecked="{Binding Path=IsLanguageValid}" IsEnabled="False" VerticalAlignment="Top"/>



Expand Down

0 comments on commit eb778a3

Please sign in to comment.