More ReSharper suggestions

This commit is contained in:
2015-11-02 21:21:57 -05:00
parent d8d7a9b5ba
commit 87c218de3c
32 changed files with 475 additions and 584 deletions

View File

@@ -1,20 +1,19 @@
<Window x:Class="FeedCenter.Options.FeedWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Properties="clr-namespace:FeedCenter.Properties"
xmlns:properties="clr-namespace:FeedCenter.Properties"
xmlns:feedCenter="clr-namespace:FeedCenter"
Title="FeedWindow"
Height="300"
Width="450"
WindowStartupLocation="CenterOwner"
Icon="/FeedCenter;component/Resources/Application.ico"
FocusManager.FocusedElement="{Binding ElementName=urlTextBox}">
<Grid Name="mainGrid">
<TabControl Name="optionsTabControl"
FocusManager.FocusedElement="{Binding ElementName=UrlTextBox}">
<Grid>
<TabControl Name="OptionsTabControl"
Margin="12,12,12,41">
<TabItem Header="{x:Static Properties:Resources.generalTab}"
Name="generalTab">
<Grid Name="generalGrid">
<TabItem Header="{x:Static properties:Resources.generalTab}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
@@ -26,37 +25,37 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Content="{x:Static Properties:Resources.feedUrlLabel}"
Name="urlLabel"
<Label Content="{x:Static properties:Resources.feedUrlLabel}"
VerticalContentAlignment="Center"
Target="{Binding ElementName=urlTextBox}"
Target="{Binding ElementName=UrlTextBox}"
Margin="6"
Padding="0" />
<TextBox Name="urlTextBox"
<TextBox Name="UrlTextBox"
Grid.Row="0"
Grid.Column="1"
Text="{Binding Path=Source, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=True}"
Margin="6" />
<Label Content="{x:Static Properties:Resources.feedNameLabel}"
Name="nameLabel"
<Label Content="{x:Static properties:Resources.feedNameLabel}"
VerticalContentAlignment="Center"
Target="{Binding ElementName=nameTextBox}"
Target="{Binding ElementName=NameTextBox}"
Grid.Row="1"
Grid.Column="0"
Margin="6"
Padding="0" />
<TextBox Name="nameTextBox"
<TextBox Name="NameTextBox"
Grid.Column="1"
Text="{Binding Path=Name, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=true}"
Grid.Row="1"
Margin="6" />
<Label Content="{x:Static Properties:Resources.feedCategoryLabel}"
Name="feedCategoryLabel"
Target="{Binding ElementName=categoryComboBox}"
<Label Content="{x:Static properties:Resources.feedCategoryLabel}"
Target="{Binding ElementName=CategoryComboBox}"
VerticalContentAlignment="Center"
Grid.Row="2"
Grid.Column="0"
Margin="6"
Padding="0" />
<ComboBox Grid.Column="1"
Name="categoryComboBox"
Name="CategoryComboBox"
DisplayMemberPath="Name"
SelectedValuePath="ID"
SelectedValue="{Binding Path=Category.ID}"
@@ -64,22 +63,22 @@
Margin="6" />
<CheckBox Grid.ColumnSpan="2"
Name="readIntervalCheckBox"
Grid.Column="0"
Name="ReadIntervalCheckBox"
VerticalContentAlignment="Center"
IsChecked="{Binding Path=Enabled, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=True}"
Grid.Row="3"
Margin="6">
<DockPanel>
<Label Content="{x:Static Properties:Resources.feedReadIntervalPrefix}"
<Label Content="{x:Static properties:Resources.feedReadIntervalPrefix}"
HorizontalAlignment="Left"
Margin="0,0,5,0"
VerticalAlignment="Center"
Padding="0" />
<TextBox Width="50"
Name="readIntervalTextBox"
Text="{Binding Path=CheckInterval, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=True}"
IsEnabled="{Binding ElementName=readIntervalCheckBox, Path=IsChecked}" />
<Label Content="{x:Static Properties:Resources.feedReadIntervalSuffix}"
IsEnabled="{Binding ElementName=ReadIntervalCheckBox, Path=IsChecked}" />
<Label Content="{x:Static properties:Resources.feedReadIntervalSuffix}"
HorizontalAlignment="Left"
Margin="5,0,0,0"
VerticalAlignment="Center"
@@ -88,8 +87,7 @@
</CheckBox>
</Grid>
</TabItem>
<TabItem Header="{x:Static Properties:Resources.readingTab}"
Name="readingTab">
<TabItem Header="{x:Static properties:Resources.readingTab}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -99,29 +97,28 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Content="{x:Static Properties:Resources.openLabel}"
Name="openLabel"
Target="{Binding ElementName=openComboBox}"
<Label Content="{x:Static properties:Resources.openLabel}"
Target="{Binding ElementName=OpenComboBox}"
Padding="0"
VerticalContentAlignment="Center"
Margin="6" />
<ComboBox Name="openComboBox"
<ComboBox Name="OpenComboBox"
VerticalContentAlignment="Center"
SelectedValue="{Binding Path=MultipleOpenAction, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=true}"
SelectedValuePath="Tag"
Grid.Row="0"
Grid.Column="1"
Margin="6">
<ComboBoxItem Content="{x:Static Properties:Resources.openAllSingleToolbarButton}"
<ComboBoxItem Content="{x:Static properties:Resources.openAllSingleToolbarButton}"
Tag="{x:Static feedCenter:MultipleOpenAction.SinglePage}" />
<ComboBoxItem Content="{x:Static Properties:Resources.openAllMultipleToolbarButton}"
<ComboBoxItem Content="{x:Static properties:Resources.openAllMultipleToolbarButton}"
Tag="{x:Static feedCenter:MultipleOpenAction.IndividualPages}" />
</ComboBox>
</Grid>
</TabItem>
<TabItem Header="{x:Static Properties:Resources.authenticationTab}"
Name="authenticationTab">
<Grid Name="authenticationGrid">
<TabItem Header="{x:Static properties:Resources.authenticationTab}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
@@ -132,61 +129,58 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<CheckBox Content="{x:Static Properties:Resources.requiresAuthenticationCheckBox}"
Name="requiresAuthenticationCheckBox"
<CheckBox Content="{x:Static properties:Resources.requiresAuthenticationCheckBox}"
Name="RequiresAuthenticationCheckBox"
Grid.ColumnSpan="2"
Grid.Row="0"
Grid.Column="0"
IsChecked="{Binding Path=Authenticate, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=True}"
Margin="6" />
<Label Content="{x:Static Properties:Resources.authenticationUserNameLabel}"
Name="authenticationUserNameLabel"
Target="{Binding ElementName=authenticationUserNameTextBox}"
<Label Content="{x:Static properties:Resources.authenticationUserNameLabel}"
Target="{Binding ElementName=AuthenticationUserNameTextBox}"
VerticalContentAlignment="Center"
IsEnabled="{Binding ElementName=requiresAuthenticationCheckBox, Path=IsChecked}"
IsEnabled="{Binding ElementName=RequiresAuthenticationCheckBox, Path=IsChecked}"
Grid.Row="1"
Grid.Column="0"
Margin="6"
Padding="20,0,0,0" />
<TextBox Name="authenticationUserNameTextBox"
<TextBox Name="AuthenticationUserNameTextBox"
Text="{Binding Path=UserName, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=True}"
Grid.Column="1"
IsEnabled="{Binding ElementName=requiresAuthenticationCheckBox, Path=IsChecked}"
IsEnabled="{Binding ElementName=RequiresAuthenticationCheckBox, Path=IsChecked}"
Grid.Row="1"
Margin="6" />
<Label Content="{x:Static Properties:Resources.authenticationPasswordLabel}"
Name="authenticationPasswordLabel"
Target="{Binding ElementName=authenticationPasswordTextBox}"
<Label Content="{x:Static properties:Resources.authenticationPasswordLabel}"
Target="{Binding ElementName=AuthenticationPasswordTextBox}"
VerticalContentAlignment="Center"
IsEnabled="{Binding ElementName=requiresAuthenticationCheckBox, Path=IsChecked}"
IsEnabled="{Binding ElementName=RequiresAuthenticationCheckBox, Path=IsChecked}"
Grid.Row="2"
Grid.Column="0"
Margin="6"
Padding="20,0,0,0" />
<TextBox Name="authenticationPasswordTextBox"
<TextBox Name="AuthenticationPasswordTextBox"
Text="{Binding Path=Password, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=True}"
Grid.Column="1"
IsEnabled="{Binding ElementName=requiresAuthenticationCheckBox, Path=IsChecked}"
IsEnabled="{Binding ElementName=RequiresAuthenticationCheckBox, Path=IsChecked}"
Grid.Row="2"
Margin="6" />
</Grid>
</TabItem>
</TabControl>
<Button Content="{x:Static Properties:Resources.OkayButton}"
<Button Content="{x:Static properties:Resources.OkayButton}"
Height="23"
HorizontalAlignment="Right"
Name="okButton"
VerticalAlignment="Bottom"
Width="75"
IsDefault="True"
Margin="0,0,93,12"
Click="HandleOkayButtonClick" />
<Button Content="{x:Static Properties:Resources.CancelButton}"
<Button Content="{x:Static properties:Resources.CancelButton}"
Height="23"
HorizontalAlignment="Right"
Name="cancelButton"
VerticalAlignment="Bottom"
Width="75"
IsCancel="True"
Margin="0,0,12,12" />
</Grid>
</Window>