diff --git a/Application/App.xaml.cs b/Application/App.xaml.cs
index 92b491d..2e10bc0 100644
--- a/Application/App.xaml.cs
+++ b/Application/App.xaml.cs
@@ -88,10 +88,6 @@ namespace FeedCenter
// Set whether we should auto-start
Current.SetStartWithWindows(Settings.Default.StartWithWindows);
- // Set whether we should be the default feed reader
- if (Settings.Default.RegisterAsDefaultFeedReader)
- SystemConfiguration.SetDefaultFeedReader();
-
// Initialize the window
mainWindow.Initialize();
diff --git a/Application/FeedErrorWindow.xaml b/Application/FeedErrorWindow.xaml
index b0b52a0..2b68e79 100644
--- a/Application/FeedErrorWindow.xaml
+++ b/Application/FeedErrorWindow.xaml
@@ -7,7 +7,7 @@
WindowStartupLocation="CenterOwner"
Icon="/FeedCenter;component/Resources/Application.ico"
xmlns:my="clr-namespace:FeedCenter.Properties"
- xmlns:LinkControl="clr-namespace:Common.Wpf.LinkControl;assembly=Common.Wpf"
+ xmlns:linkControl="clr-namespace:Common.Wpf.LinkControl;assembly=Common.Wpf"
WindowStyle="ToolWindow">
@@ -16,7 +16,7 @@
-
-
-
+
-
-
+
-
-
+
-
-
+
-
+
diff --git a/Application/FeedErrorWindow.xaml.cs b/Application/FeedErrorWindow.xaml.cs
index ed32295..270eae0 100644
--- a/Application/FeedErrorWindow.xaml.cs
+++ b/Application/FeedErrorWindow.xaml.cs
@@ -26,8 +26,8 @@ namespace FeedCenter
_collectionViewSource.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
// Bind to the list
- feedDataGrid.ItemsSource = _collectionViewSource.View;
- feedDataGrid.SelectedIndex = 0;
+ FeedDataGrid.ItemsSource = _collectionViewSource.View;
+ FeedDataGrid.SelectedIndex = 0;
// Set the window owner
Owner = owner;
@@ -55,10 +55,10 @@ namespace FeedCenter
private void EditSelectedFeed()
{
- if (feedDataGrid.SelectedItem == null)
+ if (FeedDataGrid.SelectedItem == null)
return;
- var feed = (Feed) feedDataGrid.SelectedItem;
+ var feed = (Feed) FeedDataGrid.SelectedItem;
var feedWindow = new FeedWindow();
@@ -67,7 +67,7 @@ namespace FeedCenter
private void DeleteSelectedFeed()
{
- var feed = (Feed) feedDataGrid.SelectedItem;
+ var feed = (Feed) FeedDataGrid.SelectedItem;
_database.Feeds.Remove(feed);
@@ -76,22 +76,22 @@ namespace FeedCenter
private void SetFeedButtonStates()
{
- editFeedButton.IsEnabled = (feedDataGrid.SelectedItem != null);
- deleteFeedButton.IsEnabled = (feedDataGrid.SelectedItem != null);
- refreshCurrent.IsEnabled = (feedDataGrid.SelectedItem != null);
- openPage.IsEnabled = (feedDataGrid.SelectedItem != null);
- openFeed.IsEnabled = (feedDataGrid.SelectedItem != null);
+ EditFeedButton.IsEnabled = (FeedDataGrid.SelectedItem != null);
+ DeleteFeedButton.IsEnabled = (FeedDataGrid.SelectedItem != null);
+ RefreshCurrent.IsEnabled = (FeedDataGrid.SelectedItem != null);
+ OpenPage.IsEnabled = (FeedDataGrid.SelectedItem != null);
+ OpenFeed.IsEnabled = (FeedDataGrid.SelectedItem != null);
}
private void HandleOpenPageButtonClick(object sender, RoutedEventArgs e)
{
- var feed = (Feed) feedDataGrid.SelectedItem;
+ var feed = (Feed) FeedDataGrid.SelectedItem;
BrowserCommon.OpenLink(feed.Link);
}
private void HandleOpenFeedButtonClick(object sender, RoutedEventArgs e)
{
- var feed = (Feed) feedDataGrid.SelectedItem;
+ var feed = (Feed) FeedDataGrid.SelectedItem;
BrowserCommon.OpenLink(feed.Source);
}
@@ -109,7 +109,7 @@ namespace FeedCenter
{
Mouse.OverrideCursor = Cursors.Wait;
- var feed = (Feed) feedDataGrid.SelectedItem;
+ var feed = (Feed) FeedDataGrid.SelectedItem;
feed.Read(_database, true);
_collectionViewSource.View.Refresh();
diff --git a/Application/Feeds/FeedItem.cs b/Application/Feeds/FeedItem.cs
index 2b061e4..6c4ed69 100644
--- a/Application/Feeds/FeedItem.cs
+++ b/Application/Feeds/FeedItem.cs
@@ -1,5 +1,4 @@
using System;
-using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace FeedCenter
@@ -51,19 +50,19 @@ namespace FeedCenter
return title;
}
- public void ProcessActions(IEnumerable feedActions)
- {
- foreach (FeedAction feedAction in feedActions)
- {
- switch (feedAction.Field)
- {
- case 1:
+ //public void ProcessActions(IEnumerable feedActions)
+ //{
+ // foreach (FeedAction feedAction in feedActions)
+ // {
+ // switch (feedAction.Field)
+ // {
+ // case 1:
- Title = Regex.Replace(Title, feedAction.Search, feedAction.Replace);
- break;
- }
- }
- }
+ // Title = Regex.Replace(Title, feedAction.Search, feedAction.Replace);
+ // break;
+ // }
+ // }
+ //}
#endregion
}
diff --git a/Application/MainWindow.xaml b/Application/MainWindow.xaml
index 6116065..e495b80 100644
--- a/Application/MainWindow.xaml
+++ b/Application/MainWindow.xaml
@@ -1,14 +1,14 @@
-
-
-
+
-
+
-
-
-
-
+
-
-
+
+
-
-
-
+
+
-
+
-
-
+
+
-
-
-
+
+
-
-
+
-
+ IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=WindowLocked}" />
-
-
-
+
+
-
-
+
-
+
diff --git a/Application/MainWindow.xaml.cs b/Application/MainWindow.xaml.cs
index e45396d..511628c 100644
--- a/Application/MainWindow.xaml.cs
+++ b/Application/MainWindow.xaml.cs
@@ -81,8 +81,8 @@ namespace FeedCenter
LoadWindowSettings();
// Set the foreground color to something that can be seen
- linkTextList.Foreground = (System.Drawing.SystemColors.Desktop.GetBrightness() < 0.5) ? Brushes.White : Brushes.Black;
- headerLabel.Foreground = linkTextList.Foreground;
+ LinkTextList.Foreground = (System.Drawing.SystemColors.Desktop.GetBrightness() < 0.5) ? Brushes.White : Brushes.Black;
+ HeaderLabel.Foreground = LinkTextList.Foreground;
// Create the background worker that does the actual reading
_feedReadWorker = new BackgroundWorker { WorkerReportsProgress = true, WorkerSupportsCancellation = true };
@@ -112,7 +112,7 @@ namespace FeedCenter
// Show the link if updates are available
if (UpdateCheck.UpdateAvailable)
- newVersionLink.Visibility = Visibility.Visible;
+ NewVersionLink.Visibility = Visibility.Visible;
Tracer.WriteLine("MainForm creation finished");
}
@@ -192,11 +192,11 @@ namespace FeedCenter
switch (Settings.Default.ToolbarLocation)
{
case Dock.Top:
- Grid.SetRow(navigationToolbarTray, mainGrid.GetRowIndex(topToolbarRow));
+ Grid.SetRow(NavigationToolbarTray, MainGrid.GetRowIndex(TopToolbarRow));
break;
case Dock.Bottom:
- Grid.SetRow(navigationToolbarTray, mainGrid.GetRowIndex(bottomToolbarRow));
+ Grid.SetRow(NavigationToolbarTray, MainGrid.GetRowIndex(BottomToolbarRow));
break;
}
}
@@ -229,10 +229,10 @@ namespace FeedCenter
switch (Settings.Default.ToolbarLocation)
{
case Dock.Top:
- Grid.SetRow(navigationToolbarTray, mainGrid.GetRowIndex(topToolbarRow));
+ Grid.SetRow(NavigationToolbarTray, MainGrid.GetRowIndex(TopToolbarRow));
break;
case Dock.Bottom:
- Grid.SetRow(navigationToolbarTray, mainGrid.GetRowIndex(bottomToolbarRow));
+ Grid.SetRow(NavigationToolbarTray, MainGrid.GetRowIndex(BottomToolbarRow));
break;
}
@@ -249,7 +249,7 @@ namespace FeedCenter
Settings.Default.WindowSize = new Size(Width, Height);
// Save the dock on the navigation tray
- Settings.Default.ToolbarLocation = Grid.GetRow(navigationToolbarTray) == mainGrid.GetRowIndex(topToolbarRow) ? Dock.Top : Dock.Bottom;
+ Settings.Default.ToolbarLocation = Grid.GetRow(NavigationToolbarTray) == MainGrid.GetRowIndex(TopToolbarRow) ? Dock.Top : Dock.Bottom;
// Save settings
Settings.Default.Save();
@@ -261,7 +261,7 @@ namespace FeedCenter
ResizeMode = Settings.Default.WindowLocked ? ResizeMode.NoResize : ResizeMode.CanResize;
// Show or hide the border
- windowBorder.BorderBrush = Settings.Default.WindowLocked ? SystemColors.ActiveBorderBrush : Brushes.Transparent;
+ WindowBorder.BorderBrush = Settings.Default.WindowLocked ? SystemColors.ActiveBorderBrush : Brushes.Transparent;
// Update the borders
UpdateBorder();
@@ -324,7 +324,7 @@ namespace FeedCenter
StopTimer();
// Move to the next feed if the scroll interval has expired and the mouse isn't hovering
- if (linkTextList.IsMouseOver)
+ if (LinkTextList.IsMouseOver)
_lastFeedDisplay = DateTime.Now;
else if (DateTime.Now - _lastFeedDisplay >= Settings.Default.FeedScrollInterval)
NextFeed();
@@ -347,14 +347,14 @@ namespace FeedCenter
var feedCount = _database.Feeds.Count();
// Set button states
- previousToolbarButton.IsEnabled = (feedCount > 1);
- nextToolbarButton.IsEnabled = (feedCount > 1);
- refreshToolbarButton.IsEnabled = (feedCount > 0);
- feedButton.IsEnabled = (feedCount > 0);
- openAllToolbarButton.IsEnabled = (feedCount > 0);
- markReadToolbarButton.IsEnabled = (feedCount > 0);
- feedLabel.Visibility = (feedCount == 0 ? Visibility.Hidden : Visibility.Visible);
- feedButton.Visibility = (feedCount > 1 ? Visibility.Hidden : Visibility.Visible);
+ PreviousToolbarButton.IsEnabled = (feedCount > 1);
+ NextToolbarButton.IsEnabled = (feedCount > 1);
+ RefreshToolbarButton.IsEnabled = (feedCount > 0);
+ FeedButton.IsEnabled = (feedCount > 0);
+ OpenAllToolbarButton.IsEnabled = (feedCount > 0);
+ MarkReadToolbarButton.IsEnabled = (feedCount > 0);
+ FeedLabel.Visibility = (feedCount == 0 ? Visibility.Hidden : Visibility.Visible);
+ FeedButton.Visibility = (feedCount > 1 ? Visibility.Hidden : Visibility.Visible);
}
private void InitializeFeed()
@@ -365,7 +365,7 @@ namespace FeedCenter
var feedCount = _database.Feeds.Count();
// Clear the link list
- linkTextList.Items.Clear();
+ LinkTextList.Items.Clear();
// Reset the feed index
_feedIndex = -1;
@@ -518,10 +518,10 @@ namespace FeedCenter
switch (multipleOpenAction)
{
case MultipleOpenAction.IndividualPages:
- openAllToolbarButton.ToolTip = Properties.Resources.openAllMultipleToolbarButton;
+ OpenAllToolbarButton.ToolTip = Properties.Resources.openAllMultipleToolbarButton;
break;
case MultipleOpenAction.SinglePage:
- openAllToolbarButton.ToolTip = Properties.Resources.openAllSingleToolbarButton;
+ OpenAllToolbarButton.ToolTip = Properties.Resources.openAllSingleToolbarButton;
break;
}
}
@@ -531,19 +531,19 @@ namespace FeedCenter
// Just clear the display if we have no feed
if (_currentFeed == null)
{
- feedLabel.Text = string.Empty;
- feedButton.Visibility = Visibility.Hidden;
- linkTextList.Items.Clear();
+ FeedLabel.Text = string.Empty;
+ FeedButton.Visibility = Visibility.Hidden;
+ LinkTextList.Items.Clear();
return;
}
// Set the header to the feed title
- feedLabel.Text = (_currentFeed.Name.Length > 0 ? _currentFeed.Name : _currentFeed.Title);
- feedButton.Visibility = _database.Feeds.Count() > 1 ? Visibility.Visible : Visibility.Hidden;
+ FeedLabel.Text = (_currentFeed.Name.Length > 0 ? _currentFeed.Name : _currentFeed.Title);
+ FeedButton.Visibility = _database.Feeds.Count() > 1 ? Visibility.Visible : Visibility.Hidden;
// Clear the current list
- linkTextList.Items.Clear();
+ LinkTextList.Items.Clear();
// Sort the items by sequence
var sortedItems = _currentFeed.Items.Where(item => !item.BeenRead).OrderBy(item => item.Sequence);
@@ -552,7 +552,7 @@ namespace FeedCenter
foreach (var feedItem in sortedItems)
{
// Add the list item
- linkTextList.Items.Add(feedItem);
+ LinkTextList.Items.Add(feedItem);
}
UpdateOpenAllButton();
@@ -561,14 +561,14 @@ namespace FeedCenter
private void MarkAllItemsAsRead()
{
// Loop over all items and mark them as read
- foreach (FeedItem feedItem in linkTextList.Items)
+ foreach (FeedItem feedItem in LinkTextList.Items)
feedItem.BeenRead = true;
// Save the changes
_database.SaveChanges();
// Clear the list
- linkTextList.Items.Clear();
+ LinkTextList.Items.Clear();
}
#endregion
@@ -586,13 +586,13 @@ namespace FeedCenter
// Reset the progress bar if we need it
if (value)
{
- feedReadProgress.Value = 0;
- feedReadProgress.Maximum = feedCount + 2;
- feedReadProgress.Visibility = Visibility.Visible;
+ FeedReadProgress.Value = 0;
+ FeedReadProgress.Maximum = feedCount + 2;
+ FeedReadProgress.Visibility = Visibility.Visible;
}
else
{
- feedReadProgress.Visibility = Visibility.Collapsed;
+ FeedReadProgress.Visibility = Visibility.Collapsed;
}
}
@@ -639,7 +639,7 @@ namespace FeedCenter
private void HandleFeedReadWorkerProgressChanged(object sender, ProgressChangedEventArgs e)
{
// Set progress
- feedReadProgress.Value = e.ProgressPercentage;
+ FeedReadProgress.Value = e.ProgressPercentage;
}
private void HandleFeedReadWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
@@ -661,7 +661,7 @@ namespace FeedCenter
// Check for update
if (UpdateCheck.UpdateAvailable)
- newVersionLink.Visibility = Visibility.Visible;
+ NewVersionLink.Visibility = Visibility.Visible;
UpdateErrorLink();
}
@@ -671,10 +671,10 @@ namespace FeedCenter
var feedErrorCount = _database.Feeds.Count(f => f.LastReadResult != FeedReadResult.Success);
// Set the visibility of the error link
- feedErrorsLink.Visibility = feedErrorCount == 0 ? Visibility.Collapsed : Visibility.Visible;
+ FeedErrorsLink.Visibility = feedErrorCount == 0 ? Visibility.Collapsed : Visibility.Visible;
// Set the text to match the number of errors
- feedErrorsLink.Text = feedErrorCount == 1
+ FeedErrorsLink.Text = feedErrorCount == 1
? Properties.Resources.FeedErrorLink
: string.Format(Properties.Resources.FeedErrorsLink, feedErrorCount);
}
@@ -923,7 +923,7 @@ namespace FeedCenter
}
}
- private void HandleLinkTextListListItemMouseUp(object sender, MouseButtonEventArgs e)
+ private void HandleItemMouseUp(object sender, MouseButtonEventArgs e)
{
// Only handle the middle button
if (e.ChangedButton != MouseButton.Middle)
@@ -937,14 +937,14 @@ namespace FeedCenter
feedItem.New = false;
// Remove the item from the list
- linkTextList.Items.Remove(feedItem);
+ LinkTextList.Items.Remove(feedItem);
// Save the changes
_database.SaveChanges();
}
- private void HandleLinkTextListListItemMouseDoubleClick(object sender, MouseButtonEventArgs e)
+ private void HandleItemMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
// Get the feed item
var feedItem = (FeedItem) ((ListBoxItem) sender).DataContext;
@@ -957,7 +957,7 @@ namespace FeedCenter
feedItem.New = false;
// Remove the item from the list
- linkTextList.Items.Remove(feedItem);
+ LinkTextList.Items.Remove(feedItem);
// Save the changes
_database.SaveChanges();
@@ -1067,7 +1067,7 @@ namespace FeedCenter
if (rectangle.Bottom != screen.WorkingArea.Bottom)
borderThickness.Bottom = 1;
- windowBorder.BorderThickness = borderThickness;
+ WindowBorder.BorderThickness = borderThickness;
}
private DelayedMethod _windowStateDelay;
@@ -1125,7 +1125,7 @@ namespace FeedCenter
private void OpenAllFeedItemsIndividually()
{
// Create a new list of feed items
- var feedItems = (from FeedItem feedItem in linkTextList.Items select feedItem).ToList();
+ var feedItems = (from FeedItem feedItem in LinkTextList.Items select feedItem).ToList();
// Get the browser
var browser = BrowserCommon.FindBrowser(Settings.Default.Browser);
@@ -1146,7 +1146,7 @@ namespace FeedCenter
feedItem.BeenRead = true;
// Remove the item
- linkTextList.Items.Remove(feedItem);
+ LinkTextList.Items.Remove(feedItem);
}
// Wait a little bit
@@ -1209,9 +1209,9 @@ namespace FeedCenter
{
var menuItem = (MenuItem) e.Source;
- if (Equals(menuItem, menuRefresh))
+ if (Equals(menuItem, MenuRefresh))
ReadCurrentFeed(true);
- else if (Equals(menuItem, menuRefreshAll))
+ else if (Equals(menuItem, MenuRefreshAll))
ReadFeeds(true);
}
@@ -1224,9 +1224,9 @@ namespace FeedCenter
{
var menuItem = (MenuItem) e.Source;
- if (Equals(menuItem, menuOpenAllSinglePage))
+ if (Equals(menuItem, MenuOpenAllSinglePage))
OpenAllFeedItemsOnSinglePage();
- else if (Equals(menuItem, menuOpenAllMultiplePages))
+ else if (Equals(menuItem, MenuOpenAllMultiplePages))
OpenAllFeedItemsIndividually();
}
diff --git a/Application/Options/AboutOptionsPanel.xaml b/Application/Options/AboutOptionsPanel.xaml
index 1a53792..269c270 100644
--- a/Application/Options/AboutOptionsPanel.xaml
+++ b/Application/Options/AboutOptionsPanel.xaml
@@ -1,24 +1,24 @@
-
+ Name="ApplicationNameLabel"
+ VerticalAlignment="Top"
+ FontWeight="Bold" />
+ Margin="0,22,0,0"
+ Name="VersionLabel"
+ VerticalAlignment="Top" />
+ Margin="0,44,0,0"
+ Name="CompanyLabel"
+ VerticalAlignment="Top" />
-
+
diff --git a/Application/Options/AboutOptionsPanel.xaml.cs b/Application/Options/AboutOptionsPanel.xaml.cs
index 3484e7d..44cbef4 100644
--- a/Application/Options/AboutOptionsPanel.xaml.cs
+++ b/Application/Options/AboutOptionsPanel.xaml.cs
@@ -14,12 +14,12 @@ namespace FeedCenter.Options
{
base.LoadPanel(database);
- applicationNameLabel.Text = Properties.Resources.ApplicationDisplayName;
+ ApplicationNameLabel.Text = Properties.Resources.ApplicationDisplayName;
string version = UpdateCheck.LocalVersion.ToString();
- versionLabel.Text = string.Format(Properties.Resources.Version, version);
+ VersionLabel.Text = string.Format(Properties.Resources.Version, version);
- companyLabel.Text = ((AssemblyCompanyAttribute) Assembly.GetEntryAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false)[0]).Company;
+ CompanyLabel.Text = ((AssemblyCompanyAttribute) Assembly.GetEntryAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false)[0]).Company;
}
public override bool ValidatePanel()
@@ -31,9 +31,6 @@ namespace FeedCenter.Options
{
}
- public override string CategoryName
- {
- get { return Properties.Resources.optionCategoryAbout; }
- }
+ public override string CategoryName => Properties.Resources.optionCategoryAbout;
}
}
diff --git a/Application/Options/BulkFeedWindow.xaml b/Application/Options/BulkFeedWindow.xaml
index 7817c57..0210c17 100644
--- a/Application/Options/BulkFeedWindow.xaml
+++ b/Application/Options/BulkFeedWindow.xaml
@@ -5,12 +5,11 @@
Height="300"
Width="500"
xmlns:my="clr-namespace:FeedCenter.Properties"
- xmlns:Options="clr-namespace:FeedCenter.Options"
- xmlns:LinkControl="clr-namespace:Common.Wpf.LinkControl;assembly=Common.Wpf"
+ xmlns:linkControl="clr-namespace:Common.Wpf.LinkControl;assembly=Common.Wpf"
xmlns:feedCenter="clr-namespace:FeedCenter"
WindowStartupLocation="CenterOwner"
Icon="/FeedCenter;component/Resources/Application.ico"
- FocusManager.FocusedElement="{Binding ElementName=feedLinkFilterText}">
+ FocusManager.FocusedElement="{Binding ElementName=FeedLinkFilterText}">
@@ -23,17 +22,18 @@
-
+
@@ -42,8 +42,8 @@
-
-
+
+
-
-
-
+
-
-
+
-
+
-
+
diff --git a/Application/Options/DisplayOptionsPanel.xaml.cs b/Application/Options/DisplayOptionsPanel.xaml.cs
index 9efef11..75bf39c 100644
--- a/Application/Options/DisplayOptionsPanel.xaml.cs
+++ b/Application/Options/DisplayOptionsPanel.xaml.cs
@@ -15,10 +15,10 @@ namespace FeedCenter.Options
{
base.LoadPanel(database);
- lockWindowCheckBox.IsChecked = Settings.Default.WindowLocked;
- displayEmptyFeedsCheckBox.IsChecked = Settings.Default.DisplayEmptyFeeds;
- toolbarLocationComboBox.SelectedItem = toolbarLocationComboBox.Items.Cast().First(comboBoxItem => (Dock) comboBoxItem.Tag == Settings.Default.ToolbarLocation);
- multipleLineDisplayComboBox.SelectedItem = multipleLineDisplayComboBox.Items.Cast().First(comboBoxItem => (MultipleLineDisplay) comboBoxItem.Tag == Settings.Default.MultipleLineDisplay);
+ LockWindowCheckBox.IsChecked = Settings.Default.WindowLocked;
+ DisplayEmptyFeedsCheckBox.IsChecked = Settings.Default.DisplayEmptyFeeds;
+ ToolbarLocationComboBox.SelectedItem = ToolbarLocationComboBox.Items.Cast().First(comboBoxItem => (Dock) comboBoxItem.Tag == Settings.Default.ToolbarLocation);
+ MultipleLineDisplayComboBox.SelectedItem = MultipleLineDisplayComboBox.Items.Cast().First(comboBoxItem => (MultipleLineDisplay) comboBoxItem.Tag == Settings.Default.MultipleLineDisplay);
}
public override bool ValidatePanel()
@@ -28,22 +28,19 @@ namespace FeedCenter.Options
public override void SavePanel()
{
- if (lockWindowCheckBox.IsChecked.HasValue && Settings.Default.WindowLocked != lockWindowCheckBox.IsChecked.Value)
- Settings.Default.WindowLocked = lockWindowCheckBox.IsChecked.Value;
+ if (LockWindowCheckBox.IsChecked.HasValue && Settings.Default.WindowLocked != LockWindowCheckBox.IsChecked.Value)
+ Settings.Default.WindowLocked = LockWindowCheckBox.IsChecked.Value;
- if (displayEmptyFeedsCheckBox.IsChecked.HasValue && Settings.Default.DisplayEmptyFeeds != displayEmptyFeedsCheckBox.IsChecked.Value)
- Settings.Default.DisplayEmptyFeeds = displayEmptyFeedsCheckBox.IsChecked.Value;
+ if (DisplayEmptyFeedsCheckBox.IsChecked.HasValue && Settings.Default.DisplayEmptyFeeds != DisplayEmptyFeedsCheckBox.IsChecked.Value)
+ Settings.Default.DisplayEmptyFeeds = DisplayEmptyFeedsCheckBox.IsChecked.Value;
- var dock = (Dock) ((ComboBoxItem) toolbarLocationComboBox.SelectedItem).Tag;
+ var dock = (Dock) ((ComboBoxItem) ToolbarLocationComboBox.SelectedItem).Tag;
Settings.Default.ToolbarLocation = dock;
- var multipleLineDisplay = (MultipleLineDisplay) ((ComboBoxItem) multipleLineDisplayComboBox.SelectedItem).Tag;
+ var multipleLineDisplay = (MultipleLineDisplay) ((ComboBoxItem) MultipleLineDisplayComboBox.SelectedItem).Tag;
Settings.Default.MultipleLineDisplay = multipleLineDisplay;
}
- public override string CategoryName
- {
- get { return Properties.Resources.optionCategoryDisplay; }
- }
+ public override string CategoryName => Properties.Resources.optionCategoryDisplay;
}
}
diff --git a/Application/Options/FeedWindow.xaml b/Application/Options/FeedWindow.xaml
index 9779e00..a9db278 100644
--- a/Application/Options/FeedWindow.xaml
+++ b/Application/Options/FeedWindow.xaml
@@ -1,20 +1,19 @@
-
-
+
+
-
-
+
+
@@ -26,37 +25,37 @@
-
-
-
-
-
-
-
+
-
+
@@ -99,29 +97,28 @@
-
-
-
-
-
-
+
+
@@ -132,61 +129,58 @@
-
-
-
-
-
-
-
-
diff --git a/Application/Options/FeedWindow.xaml.cs b/Application/Options/FeedWindow.xaml.cs
index 87d588b..d3edee3 100644
--- a/Application/Options/FeedWindow.xaml.cs
+++ b/Application/Options/FeedWindow.xaml.cs
@@ -20,7 +20,7 @@ namespace FeedCenter.Options
database.Categories.Load();
// Bind the category combo box
- categoryComboBox.ItemsSource = database.Categories.Local;
+ CategoryComboBox.ItemsSource = database.Categories.Local;
// Set the data context
DataContext = feed;
@@ -56,7 +56,7 @@ namespace FeedCenter.Options
var firstErrorElement = bindingExpressions.First(b => b.BindingExpression.HasError).FrameworkElement;
// Loop over each tab item
- foreach (TabItem tabItem in optionsTabControl.Items)
+ foreach (TabItem tabItem in OptionsTabControl.Items)
{
// Cast the content as visual
var content = (Visual) tabItem.Content;
diff --git a/Application/Options/FeedsOptionsPanel.xaml b/Application/Options/FeedsOptionsPanel.xaml
index 6316243..44952bd 100644
--- a/Application/Options/FeedsOptionsPanel.xaml
+++ b/Application/Options/FeedsOptionsPanel.xaml
@@ -1,11 +1,11 @@
-
@@ -19,7 +19,7 @@
-
@@ -53,7 +53,7 @@
-
@@ -94,68 +94,66 @@
BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}">
-
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+ Text="{x:Static properties:Resources.MultipleEditLink}"
+ ToolTip="{x:Static properties:Resources.MultipleEditButton}">
+
-
-
-
+
+
-
-
+
+
-
+ Text="{x:Static properties:Resources.DeleteLink}"
+ ToolTip="{x:Static properties:Resources.DeleteCategoryButton}">
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/Application/Options/FeedsOptionsPanel.xaml.cs b/Application/Options/FeedsOptionsPanel.xaml.cs
index 22bc1d9..f3efe91 100644
--- a/Application/Options/FeedsOptionsPanel.xaml.cs
+++ b/Application/Options/FeedsOptionsPanel.xaml.cs
@@ -31,8 +31,8 @@ namespace FeedCenter.Options
collectionViewSource.SortDescriptions.Add(new SortDescription("SortKey", ListSortDirection.Ascending));
collectionViewSource.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
- categoryListBox.ItemsSource = collectionViewSource.View;
- categoryListBox.SelectedIndex = 0;
+ CategoryListBox.ItemsSource = collectionViewSource.View;
+ CategoryListBox.SelectedIndex = 0;
}
public override bool ValidatePanel()
@@ -43,10 +43,7 @@ namespace FeedCenter.Options
public override void SavePanel()
{ }
- public override string CategoryName
- {
- get { return Properties.Resources.optionCategoryFeeds; }
- }
+ public override string CategoryName => Properties.Resources.optionCategoryFeeds;
#endregion
@@ -54,16 +51,16 @@ namespace FeedCenter.Options
private void SetFeedButtonStates()
{
- addFeedButton.IsEnabled = true;
- editFeedButton.IsEnabled = (feedListBox.SelectedItem != null);
- deleteFeedButton.IsEnabled = (feedListBox.SelectedItem != null);
+ AddFeedButton.IsEnabled = true;
+ EditFeedButton.IsEnabled = (FeedListBox.SelectedItem != null);
+ DeleteFeedButton.IsEnabled = (FeedListBox.SelectedItem != null);
}
private void AddFeed()
{
var feed = Feed.Create(Database);
- var category = (Category) categoryListBox.SelectedItem;
+ var category = (Category) CategoryListBox.SelectedItem;
feed.Category = category;
@@ -75,7 +72,7 @@ namespace FeedCenter.Options
{
Database.Feeds.Add(feed);
- feedListBox.SelectedItem = feed;
+ FeedListBox.SelectedItem = feed;
SetFeedButtonStates();
}
@@ -83,10 +80,10 @@ namespace FeedCenter.Options
private void EditSelectedFeed()
{
- if (feedListBox.SelectedItem == null)
+ if (FeedListBox.SelectedItem == null)
return;
- var feed = (Feed) feedListBox.SelectedItem;
+ var feed = (Feed) FeedListBox.SelectedItem;
var feedWindow = new FeedWindow();
@@ -95,7 +92,7 @@ namespace FeedCenter.Options
private void DeleteSelectedFeed()
{
- var feed = (Feed) feedListBox.SelectedItem;
+ var feed = (Feed) FeedListBox.SelectedItem;
Database.Feeds.Remove(feed);
@@ -291,9 +288,9 @@ namespace FeedCenter.Options
private void SetCategoryButtonStates()
{
- addCategoryButton.IsEnabled = true;
- editCategoryButton.IsEnabled = (categoryListBox.SelectedItem != null);
- deleteCategoryButton.IsEnabled = (categoryListBox.SelectedItem != null);
+ AddCategoryButton.IsEnabled = true;
+ EditCategoryButton.IsEnabled = (CategoryListBox.SelectedItem != null);
+ DeleteCategoryButton.IsEnabled = (CategoryListBox.SelectedItem != null);
}
private void AddCategory()
@@ -308,7 +305,7 @@ namespace FeedCenter.Options
{
Database.Categories.Add(category);
- categoryListBox.SelectedItem = category;
+ CategoryListBox.SelectedItem = category;
SetCategoryButtonStates();
}
@@ -316,10 +313,10 @@ namespace FeedCenter.Options
private void EditSelectedCategory()
{
- if (categoryListBox.SelectedItem == null)
+ if (CategoryListBox.SelectedItem == null)
return;
- var category = (Category) categoryListBox.SelectedItem;
+ var category = (Category) CategoryListBox.SelectedItem;
var categoryWindow = new CategoryWindow();
@@ -328,7 +325,7 @@ namespace FeedCenter.Options
private void DeleteSelectedCategory()
{
- var category = (Category) categoryListBox.SelectedItem;
+ var category = (Category) CategoryListBox.SelectedItem;
Database.Categories.Remove(category);
@@ -366,20 +363,20 @@ namespace FeedCenter.Options
_collectionViewSource.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
_collectionViewSource.Filter += HandleCollectionViewSourceFilter;
- feedListBox.ItemsSource = _collectionViewSource.View;
+ FeedListBox.ItemsSource = _collectionViewSource.View;
}
_collectionViewSource.View.Refresh();
- if (feedListBox.Items.Count > 0)
- feedListBox.SelectedIndex = 0;
+ if (FeedListBox.Items.Count > 0)
+ FeedListBox.SelectedIndex = 0;
SetFeedButtonStates();
}
private void HandleCollectionViewSourceFilter(object sender, FilterEventArgs e)
{
- var selectedCategory = (Category) categoryListBox.SelectedItem;
+ var selectedCategory = (Category) CategoryListBox.SelectedItem;
var feed = (Feed) e.Item;
@@ -404,9 +401,9 @@ namespace FeedCenter.Options
{
if (e.LeftButton == MouseButtonState.Pressed)
{
- var selectedItems = feedListBox.SelectedItems.Cast().ToList();
+ var selectedItems = FeedListBox.SelectedItems.Cast().ToList();
- DragDrop.DoDragDrop(feedListBox, selectedItems, DragDropEffects.Move);
+ DragDrop.DoDragDrop(FeedListBox, selectedItems, DragDropEffects.Move);
}
}
diff --git a/Application/Options/GeneralOptionsPanel.xaml b/Application/Options/GeneralOptionsPanel.xaml
index 1b24af7..e4142a0 100644
--- a/Application/Options/GeneralOptionsPanel.xaml
+++ b/Application/Options/GeneralOptionsPanel.xaml
@@ -1,21 +1,22 @@
-
+
-
-
+
-
+
diff --git a/Application/Options/GeneralOptionsPanel.xaml.cs b/Application/Options/GeneralOptionsPanel.xaml.cs
index b848c28..7d8e397 100644
--- a/Application/Options/GeneralOptionsPanel.xaml.cs
+++ b/Application/Options/GeneralOptionsPanel.xaml.cs
@@ -16,8 +16,7 @@ namespace FeedCenter.Options
var settings = Properties.Settings.Default;
- startWithWindowsCheckBox.IsChecked = settings.StartWithWindows;
- registerAsDefaultFeedReaderCheckBox.IsChecked = settings.RegisterAsDefaultFeedReader;
+ StartWithWindowsCheckBox.IsChecked = settings.StartWithWindows;
}
public override bool ValidatePanel()
@@ -29,21 +28,12 @@ namespace FeedCenter.Options
{
var settings = Properties.Settings.Default;
- if (startWithWindowsCheckBox.IsChecked.HasValue && settings.StartWithWindows != startWithWindowsCheckBox.IsChecked.Value)
- settings.StartWithWindows = startWithWindowsCheckBox.IsChecked.Value;
-
- if (registerAsDefaultFeedReaderCheckBox.IsChecked.HasValue && settings.RegisterAsDefaultFeedReader != registerAsDefaultFeedReaderCheckBox.IsChecked.Value)
- settings.RegisterAsDefaultFeedReader = registerAsDefaultFeedReaderCheckBox.IsChecked.Value;
+ if (StartWithWindowsCheckBox.IsChecked.HasValue && settings.StartWithWindows != StartWithWindowsCheckBox.IsChecked.Value)
+ settings.StartWithWindows = StartWithWindowsCheckBox.IsChecked.Value;
Application.Current.SetStartWithWindows(settings.StartWithWindows);
-
- if (settings.RegisterAsDefaultFeedReader)
- SystemConfiguration.SetDefaultFeedReader();
}
- public override string CategoryName
- {
- get { return Properties.Resources.optionCategoryGeneral; }
- }
+ public override string CategoryName => Properties.Resources.optionCategoryGeneral;
}
}
diff --git a/Application/Options/OptionsPanelBase.cs b/Application/Options/OptionsPanelBase.cs
index 817b767..d51409a 100644
--- a/Application/Options/OptionsPanelBase.cs
+++ b/Application/Options/OptionsPanelBase.cs
@@ -5,7 +5,7 @@ namespace FeedCenter.Options
{
public class OptionsPanelBase : UserControl
{
- protected FeedCenterEntities Database { get; set; }
+ protected FeedCenterEntities Database { get; private set; }
public virtual void LoadPanel(FeedCenterEntities database)
{
@@ -22,9 +22,6 @@ namespace FeedCenter.Options
throw new NotImplementedException();
}
- public virtual string CategoryName
- {
- get { return null; }
- }
+ public virtual string CategoryName => null;
}
}
diff --git a/Application/Options/OptionsWindow.xaml b/Application/Options/OptionsWindow.xaml
index e29f360..a625f40 100644
--- a/Application/Options/OptionsWindow.xaml
+++ b/Application/Options/OptionsWindow.xaml
@@ -1,8 +1,8 @@
-
-
-
-
-
-
+
diff --git a/Application/Options/ReadingOptionsPanel.xaml.cs b/Application/Options/ReadingOptionsPanel.xaml.cs
index 680a707..9ea94fd 100644
--- a/Application/Options/ReadingOptionsPanel.xaml.cs
+++ b/Application/Options/ReadingOptionsPanel.xaml.cs
@@ -18,7 +18,7 @@ namespace FeedCenter.Options
var settings = Properties.Settings.Default;
- LoadBrowserComboBox(browserComboBox, settings.Browser);
+ LoadBrowserComboBox(BrowserComboBox, settings.Browser);
}
public override bool ValidatePanel()
@@ -30,7 +30,7 @@ namespace FeedCenter.Options
{
var settings = Properties.Settings.Default;
- var browser = (string) ((ComboBoxItem) browserComboBox.SelectedItem).Tag;
+ var browser = (string) ((ComboBoxItem) BrowserComboBox.SelectedItem).Tag;
settings.Browser = browser;
@@ -38,10 +38,7 @@ namespace FeedCenter.Options
this.UpdateAllSources(expressions);
}
- public override string CategoryName
- {
- get { return Properties.Resources.optionCategoryReading; }
- }
+ public override string CategoryName => Properties.Resources.optionCategoryReading;
private static void LoadBrowserComboBox(ComboBox comboBox, string selected)
{
diff --git a/Application/Options/UpdateOptionsPanel.xaml b/Application/Options/UpdateOptionsPanel.xaml
index d915e9b..708be0c 100644
--- a/Application/Options/UpdateOptionsPanel.xaml
+++ b/Application/Options/UpdateOptionsPanel.xaml
@@ -1,20 +1,23 @@
-
+
-
-
-
+
diff --git a/Application/Options/UpdateOptionsPanel.xaml.cs b/Application/Options/UpdateOptionsPanel.xaml.cs
index be6be57..32f5b88 100644
--- a/Application/Options/UpdateOptionsPanel.xaml.cs
+++ b/Application/Options/UpdateOptionsPanel.xaml.cs
@@ -13,7 +13,7 @@ namespace FeedCenter.Options
{
base.LoadPanel(database);
- checkVersionOnStartupCheckBox.IsChecked = Properties.Settings.Default.CheckVersionAtStartup;
+ CheckVersionOnStartupCheckBox.IsChecked = Properties.Settings.Default.CheckVersionAtStartup;
}
public override bool ValidatePanel()
@@ -23,14 +23,11 @@ namespace FeedCenter.Options
public override void SavePanel()
{
- if (checkVersionOnStartupCheckBox.IsChecked.HasValue && Properties.Settings.Default.CheckVersionAtStartup != checkVersionOnStartupCheckBox.IsChecked.Value)
- Properties.Settings.Default.CheckVersionAtStartup = checkVersionOnStartupCheckBox.IsChecked.Value;
+ if (CheckVersionOnStartupCheckBox.IsChecked.HasValue && Properties.Settings.Default.CheckVersionAtStartup != CheckVersionOnStartupCheckBox.IsChecked.Value)
+ Properties.Settings.Default.CheckVersionAtStartup = CheckVersionOnStartupCheckBox.IsChecked.Value;
}
- public override string CategoryName
- {
- get { return Properties.Resources.optionCategoryUpdate; }
- }
+ public override string CategoryName => Properties.Resources.optionCategoryUpdate;
private void HandleCheckVersionNowButtonClick(object sender, System.Windows.RoutedEventArgs e)
{
diff --git a/Application/Properties/Settings.Designer.cs b/Application/Properties/Settings.Designer.cs
index b0feb84..890bdb8 100644
--- a/Application/Properties/Settings.Designer.cs
+++ b/Application/Properties/Settings.Designer.cs
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.34209
+// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -12,7 +12,7 @@ namespace FeedCenter.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -221,19 +221,6 @@ namespace FeedCenter.Properties {
}
}
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Configuration.SettingsProviderAttribute(typeof(Common.Settings.GenericSettingsProvider))]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool RegisterAsDefaultFeedReader {
- get {
- return ((bool)(this["RegisterAsDefaultFeedReader"]));
- }
- set {
- this["RegisterAsDefaultFeedReader"] = value;
- }
- }
-
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(Common.Settings.GenericSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
diff --git a/Application/Properties/Settings.settings b/Application/Properties/Settings.settings
index 9dbaea6..79f4c09 100644
--- a/Application/Properties/Settings.settings
+++ b/Application/Properties/Settings.settings
@@ -53,9 +53,6 @@
500
-
- False
-
diff --git a/Application/SplashWindow.xaml b/Application/SplashWindow.xaml
index 78625e6..d0eaaba 100644
--- a/Application/SplashWindow.xaml
+++ b/Application/SplashWindow.xaml
@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:Properties="clr-namespace:FeedCenter.Properties"
+ xmlns:properties="clr-namespace:FeedCenter.Properties"
mc:Ignorable="d"
Title="Splash"
WindowStartupLocation="CenterScreen"
@@ -21,9 +21,8 @@
BorderBrush="{x:Static SystemColors.ActiveBorderBrush}"
Padding="3">
-
-
Environment.CommandLine.IndexOf("/debugPath", StringComparison.InvariantCultureIgnoreCase) != -1;
public static string DataDirectory => UseDebugPath ? Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) : UserSettingsPath;
diff --git a/Application/app.config b/Application/app.config
index 0eddb15..230b03b 100644
--- a/Application/app.config
+++ b/Application/app.config
@@ -48,9 +48,6 @@
500
-
- False
-