mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-02-05 09:35:41 -05:00
More ReSharper suggestions
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
<Windows:SnappingWindow x:Class="FeedCenter.MainWindow"
|
||||
<windows:SnappingWindow x:Class="FeedCenter.MainWindow"
|
||||
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:Windows="clr-namespace:Common.Wpf.Windows;assembly=Common.Wpf"
|
||||
xmlns:Toolbar="clr-namespace:Common.Wpf.Toolbar;assembly=Common.Wpf"
|
||||
xmlns:SplitButton="clr-namespace:Common.Wpf.Toolbar.SplitButton;assembly=Common.Wpf"
|
||||
xmlns:Markup="clr-namespace:Common.Wpf.MarkupExtensions;assembly=Common.Wpf.MarkupExtensions"
|
||||
xmlns:LinkControl="clr-namespace:Common.Wpf.LinkControl;assembly=Common.Wpf"
|
||||
xmlns:HtmlTextBlock="clr-namespace:Common.Wpf.HtmlTextBlock;assembly=Common.Wpf"
|
||||
xmlns:System="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:properties="clr-namespace:FeedCenter.Properties"
|
||||
xmlns:windows="clr-namespace:Common.Wpf.Windows;assembly=Common.Wpf"
|
||||
xmlns:toolbar="clr-namespace:Common.Wpf.Toolbar;assembly=Common.Wpf"
|
||||
xmlns:splitButton="clr-namespace:Common.Wpf.Toolbar.SplitButton;assembly=Common.Wpf"
|
||||
xmlns:markup="clr-namespace:Common.Wpf.MarkupExtensions;assembly=Common.Wpf.MarkupExtensions"
|
||||
xmlns:linkControl="clr-namespace:Common.Wpf.LinkControl;assembly=Common.Wpf"
|
||||
xmlns:htmlTextBlock="clr-namespace:Common.Wpf.HtmlTextBlock;assembly=Common.Wpf"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
Title="MainWindow"
|
||||
Height="360"
|
||||
Width="252"
|
||||
@@ -21,7 +21,7 @@
|
||||
ShowInTaskbar="False">
|
||||
<Window.Resources>
|
||||
<Style TargetType="{x:Type ToolBar}">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToolBar}">
|
||||
<ToolBarPanel IsItemsHost="True"
|
||||
@@ -34,45 +34,45 @@
|
||||
</Window.Resources>
|
||||
<Border BorderBrush="{x:Static SystemColors.ActiveBorderBrush}"
|
||||
BorderThickness="1"
|
||||
Name="windowBorder"
|
||||
Name="WindowBorder"
|
||||
Padding="0"
|
||||
Background="{x:Static SystemColors.DesktopBrush}">
|
||||
<Grid Name="mainGrid">
|
||||
<Grid Name="MainGrid">
|
||||
<Grid.RowDefinitions>
|
||||
<!-- ReSharper disable UnusedMember.Global -->
|
||||
<RowDefinition Height="Auto"
|
||||
Name="headerRow" />
|
||||
Name="HeaderRow" />
|
||||
<RowDefinition Height="Auto"
|
||||
Name="newVersionRow" />
|
||||
Name="NewVersionRow" />
|
||||
<RowDefinition Height="Auto"
|
||||
Name="feedRow" />
|
||||
Name="FeedRow" />
|
||||
<RowDefinition Height="Auto"
|
||||
Name="topToolbarRow" />
|
||||
Name="TopToolbarRow" />
|
||||
<RowDefinition Height="*"
|
||||
Name="feedListRow" />
|
||||
Name="FeedListRow" />
|
||||
<RowDefinition Height="Auto"
|
||||
Name="progressRow" />
|
||||
Name="ProgressRow" />
|
||||
<RowDefinition Height="Auto"
|
||||
Name="bottomToolbarRow" />
|
||||
Name="BottomToolbarRow" />
|
||||
<RowDefinition Height="Auto"
|
||||
Name="feedErrorsRow" />
|
||||
Name="FeedErrorsRow" />
|
||||
<!-- ReSharper restore UnusedMember.Global -->
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Height="21"
|
||||
Name="headerGrid"
|
||||
Grid.Row="{Markup:GridRow RowName=headerRow}">
|
||||
Grid.Row="{markup:GridRow RowName=HeaderRow}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="21" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Content="{x:Static Properties:Resources.ApplicationDisplayName}"
|
||||
Name="headerLabel"
|
||||
<Label Content="{x:Static properties:Resources.ApplicationDisplayName}"
|
||||
Name="HeaderLabel"
|
||||
Padding="3,0"
|
||||
FontWeight="Bold"
|
||||
Foreground="White"
|
||||
MouseLeftButtonDown="HandleHeaderLabelMouseLeftButtonDown"
|
||||
VerticalContentAlignment="Center"
|
||||
Grid.Column="0" />
|
||||
<Button Name="closeButton"
|
||||
Width="13"
|
||||
<Button Width="13"
|
||||
Height="13"
|
||||
Click="HandleCloseButtonClick"
|
||||
FontFamily="Marlett"
|
||||
@@ -80,25 +80,24 @@
|
||||
FontSize="8"
|
||||
Grid.Column="1"></Button>
|
||||
</Grid>
|
||||
<LinkControl:LinkControl Name="newVersionLink"
|
||||
<linkControl:LinkControl Name="NewVersionLink"
|
||||
Height="21"
|
||||
Grid.Row="{Markup:GridRow newVersionRow}"
|
||||
Text="{x:Static Properties:Resources.NewVersionLink}"
|
||||
Grid.Row="{markup:GridRow NewVersionRow}"
|
||||
Text="{x:Static properties:Resources.NewVersionLink}"
|
||||
Background="AntiqueWhite"
|
||||
VerticalContentAlignment="Center"
|
||||
HorizontalContentAlignment="Center"
|
||||
Visibility="Collapsed"
|
||||
Click="HandleNewVersionLinkClick">
|
||||
</LinkControl:LinkControl>
|
||||
</linkControl:LinkControl>
|
||||
<Grid Height="21"
|
||||
Name="feedGrid"
|
||||
Grid.Row="{Markup:GridRow RowName=feedRow}">
|
||||
Grid.Row="{markup:GridRow RowName=FeedRow}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="21" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="*Feed Name"
|
||||
Name="feedLabel"
|
||||
Name="FeedLabel"
|
||||
Padding="3,0"
|
||||
FontWeight="Bold"
|
||||
Foreground="White"
|
||||
@@ -109,7 +108,7 @@
|
||||
TextTrimming="CharacterEllipsis"
|
||||
MouseDown="HandleFeedLabelMouseDown"
|
||||
Grid.Column="0" />
|
||||
<Button Name="feedButton"
|
||||
<Button Name="FeedButton"
|
||||
Width="13"
|
||||
Height="13"
|
||||
Click="HandleFeedButtonClick"
|
||||
@@ -118,24 +117,24 @@
|
||||
FontSize="8"
|
||||
Grid.Column="1" />
|
||||
</Grid>
|
||||
<ListBox Name="linkTextList"
|
||||
<ListBox Name="LinkTextList"
|
||||
BorderThickness="0"
|
||||
Background="{x:Static SystemColors.DesktopBrush}"
|
||||
MouseUp="HandleLinkTextListMouseUp"
|
||||
Foreground="White"
|
||||
Grid.Row="{Markup:GridRow RowName=feedListRow}"
|
||||
Grid.Row="{markup:GridRow RowName=FeedListRow}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
||||
<ListBoxItem Content="Test item" />
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<HtmlTextBlock:HtmlTextBlock Html="{Binding}"
|
||||
<htmlTextBlock:HtmlTextBlock Html="{Binding}"
|
||||
TextWrapping="Wrap"
|
||||
Margin="0,1" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<Border BorderThickness="{TemplateBinding Border.BorderThickness}"
|
||||
@@ -154,7 +153,7 @@
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Selector.IsMouseOver">
|
||||
<Trigger.Value>
|
||||
<System:Boolean>True</System:Boolean>
|
||||
<system:Boolean>True</system:Boolean>
|
||||
</Trigger.Value>
|
||||
<Setter Property="Panel.Background"
|
||||
TargetName="Bd">
|
||||
@@ -177,110 +176,108 @@
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<EventSetter Event="MouseDoubleClick"
|
||||
Handler="HandleLinkTextListListItemMouseDoubleClick" />
|
||||
Handler="HandleItemMouseDoubleClick" />
|
||||
<EventSetter Event="MouseUp"
|
||||
Handler="HandleLinkTextListListItemMouseUp" />
|
||||
Handler="HandleItemMouseUp" />
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
<ProgressBar Name="feedReadProgress"
|
||||
<ProgressBar Name="FeedReadProgress"
|
||||
Height="15"
|
||||
Visibility="Collapsed"
|
||||
Grid.Row="{Markup:GridRow RowName=progressRow}" />
|
||||
<ToolBarTray Name="navigationToolbarTray"
|
||||
Grid.Row="{markup:GridRow RowName=ProgressRow}" />
|
||||
<ToolBarTray Name="NavigationToolbarTray"
|
||||
Background="Transparent"
|
||||
Orientation="Horizontal"
|
||||
Grid.Row="{Markup:GridRow RowName=bottomToolbarRow}">
|
||||
<ToolBar Name="navigationToolbar"
|
||||
ToolBarTray.IsLocked="True"
|
||||
Grid.Row="{markup:GridRow RowName=BottomToolbarRow}">
|
||||
<ToolBar ToolBarTray.IsLocked="True"
|
||||
Background="Transparent"
|
||||
ToolBar.OverflowMode="Never">
|
||||
<Toolbar:ImageButton Height="20"
|
||||
<toolbar:ImageButton Height="20"
|
||||
Width="20"
|
||||
Name="previousToolbarButton"
|
||||
Name="PreviousToolbarButton"
|
||||
Click="HandlePreviousToolbarButtonClick"
|
||||
ToolTip="{x:Static Properties:Resources.previousToolbarButton}"
|
||||
ToolTip="{x:Static properties:Resources.previousToolbarButton}"
|
||||
ImageSource="Resources/Left.ico" />
|
||||
<Toolbar:ImageButton Height="20"
|
||||
<toolbar:ImageButton Height="20"
|
||||
Width="20"
|
||||
Name="nextToolbarButton"
|
||||
Name="NextToolbarButton"
|
||||
Click="HandleNextToolbarButtonClick"
|
||||
ToolTip="{x:Static Properties:Resources.nextToolbarButton}"
|
||||
ToolTip="{x:Static properties:Resources.nextToolbarButton}"
|
||||
ImageSource="Resources/Right.ico" />
|
||||
<SplitButton:SplitButton Name="refreshToolbarButton"
|
||||
<splitButton:SplitButton Name="RefreshToolbarButton"
|
||||
Image="Resources/Rss-Download.ico"
|
||||
ToolTip="{x:Static Properties:Resources.refreshAllToolbarButton}"
|
||||
ToolTip="{x:Static properties:Resources.refreshAllToolbarButton}"
|
||||
Height="20"
|
||||
MinWidth="35"
|
||||
Margin="5,0,0,0"
|
||||
Click="HandleRefreshToolbarButtonClick">
|
||||
<SplitButton:SplitButton.DropDownContextMenu>
|
||||
<splitButton:SplitButton.DropDownContextMenu>
|
||||
<ContextMenu MenuItem.Click="HandleRefreshMenuItemClick">
|
||||
<MenuItem Name="menuRefreshAll"
|
||||
Header="{x:Static Properties:Resources.refreshAllToolbarButton}" />
|
||||
<MenuItem Name="menuRefresh"
|
||||
Header="{x:Static Properties:Resources.refreshToolbarButton}" />
|
||||
<MenuItem Name="MenuRefreshAll"
|
||||
Header="{x:Static properties:Resources.refreshAllToolbarButton}" />
|
||||
<MenuItem Name="MenuRefresh"
|
||||
Header="{x:Static properties:Resources.refreshToolbarButton}" />
|
||||
</ContextMenu>
|
||||
</SplitButton:SplitButton.DropDownContextMenu>
|
||||
</SplitButton:SplitButton>
|
||||
<SplitButton:SplitButton Name="openAllToolbarButton"
|
||||
</splitButton:SplitButton.DropDownContextMenu>
|
||||
</splitButton:SplitButton>
|
||||
<splitButton:SplitButton Name="OpenAllToolbarButton"
|
||||
Image="Resources/News.ico"
|
||||
ToolTip="{x:Static Properties:Resources.openAllMultipleToolbarButton}"
|
||||
ToolTip="{x:Static properties:Resources.openAllMultipleToolbarButton}"
|
||||
Height="20"
|
||||
MinWidth="35"
|
||||
Margin="5,0,0,0"
|
||||
Click="HandleOpenAllToolbarButtonClick">
|
||||
<SplitButton:SplitButton.DropDownContextMenu>
|
||||
<splitButton:SplitButton.DropDownContextMenu>
|
||||
<ContextMenu MenuItem.Click="HandleOpenAllMenuItemClick">
|
||||
<MenuItem Name="menuOpenAllMultiplePages"
|
||||
Header="{x:Static Properties:Resources.openAllMultipleToolbarButton}" />
|
||||
<MenuItem Name="menuOpenAllSinglePage"
|
||||
Header="{x:Static Properties:Resources.openAllSingleToolbarButton}" />
|
||||
<MenuItem Name="MenuOpenAllMultiplePages"
|
||||
Header="{x:Static properties:Resources.openAllMultipleToolbarButton}" />
|
||||
<MenuItem Name="MenuOpenAllSinglePage"
|
||||
Header="{x:Static properties:Resources.openAllSingleToolbarButton}" />
|
||||
</ContextMenu>
|
||||
</SplitButton:SplitButton.DropDownContextMenu>
|
||||
</SplitButton:SplitButton>
|
||||
<Toolbar:ImageButton Height="20"
|
||||
</splitButton:SplitButton.DropDownContextMenu>
|
||||
</splitButton:SplitButton>
|
||||
<toolbar:ImageButton Height="20"
|
||||
Width="20"
|
||||
Margin="5,0,0,0"
|
||||
Name="markReadToolbarButton"
|
||||
Name="MarkReadToolbarButton"
|
||||
Click="HandleMarkReadToolbarButtonClick"
|
||||
ToolTip="{x:Static Properties:Resources.markReadToolbarButton}"
|
||||
ToolTip="{x:Static properties:Resources.markReadToolbarButton}"
|
||||
ImageSource="Resources/Comments-edit.ico" />
|
||||
<SplitButton:SplitButton Height="20"
|
||||
<splitButton:SplitButton Height="20"
|
||||
MinWidth="35"
|
||||
Margin="5,0,0,0"
|
||||
Name="optionsToolbarButton"
|
||||
Click="HandleOptionsToolbarButtonClick"
|
||||
ToolTip="{x:Static Properties:Resources.optionsToolbarButton}"
|
||||
ToolTip="{x:Static properties:Resources.optionsToolbarButton}"
|
||||
Image="Resources/Compile.ico">
|
||||
<SplitButton:SplitButton.DropDownContextMenu>
|
||||
<splitButton:SplitButton.DropDownContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static Properties:Resources.lockWindowCheckBox}"
|
||||
<MenuItem Header="{x:Static properties:Resources.lockWindowCheckBox}"
|
||||
IsCheckable="True"
|
||||
IsChecked="{Binding Source={x:Static Properties:Settings.Default}, Path=WindowLocked}" />
|
||||
IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=WindowLocked}" />
|
||||
<Separator />
|
||||
<MenuItem Header="{x:Static Properties:Resources.CurrentFeed}">
|
||||
<MenuItem Header="{x:Static Properties:Resources.EditMenu}"
|
||||
<MenuItem Header="{x:Static properties:Resources.CurrentFeed}">
|
||||
<MenuItem Header="{x:Static properties:Resources.EditMenu}"
|
||||
Click="HandleEditCurrentFeedMenuItemClick" />
|
||||
<MenuItem Header="{x:Static Properties:Resources.DeleteMenu}"
|
||||
<MenuItem Header="{x:Static properties:Resources.DeleteMenu}"
|
||||
Click="HandleDeleteCurrentFeedMenuItemClick" />
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</SplitButton:SplitButton.DropDownContextMenu>
|
||||
</SplitButton:SplitButton>
|
||||
</splitButton:SplitButton.DropDownContextMenu>
|
||||
</splitButton:SplitButton>
|
||||
</ToolBar>
|
||||
</ToolBarTray>
|
||||
<LinkControl:LinkControl Name="feedErrorsLink"
|
||||
<linkControl:LinkControl Name="FeedErrorsLink"
|
||||
Height="21"
|
||||
Grid.Row="{Markup:GridRow feedErrorsRow}"
|
||||
Text="{x:Static Properties:Resources.FeedErrorsLink}"
|
||||
ToolTip="{x:Static Properties:Resources.showErrorsToolbarButton}"
|
||||
Grid.Row="{markup:GridRow FeedErrorsRow}"
|
||||
Text="{x:Static properties:Resources.FeedErrorsLink}"
|
||||
ToolTip="{x:Static properties:Resources.showErrorsToolbarButton}"
|
||||
Background="AntiqueWhite"
|
||||
VerticalContentAlignment="Center"
|
||||
HorizontalContentAlignment="Center"
|
||||
Visibility="Collapsed"
|
||||
Click="HandleShowErrorsButtonClick">
|
||||
</LinkControl:LinkControl>
|
||||
</linkControl:LinkControl>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Windows:SnappingWindow>
|
||||
</windows:SnappingWindow>
|
||||
|
||||
Reference in New Issue
Block a user