UI rework and fixes

This commit is contained in:
2023-04-12 17:13:43 -04:00
parent 242663c3e5
commit 68aec56824
12 changed files with 207 additions and 175 deletions

View File

@@ -146,7 +146,7 @@ namespace FeedCenter
private void ResetDatabase()
{
// Get the ID of the current feed
var currentId = _currentFeed?.Id ?? Guid.Empty;
var currentId = _currentFeed?.IsValid ?? false ? _currentFeed.Id : Guid.Empty;
// Create a new database object
_database.Refresh();

View File

@@ -1,12 +1,12 @@
using ChrisKaczor.InstalledBrowsers;
using FeedCenter.Options;
using FeedCenter.Properties;
using System.IO;
using System.IO;
using System.Linq;
using System.Threading;
using System.Web.UI;
using System.Windows;
using System.Windows.Controls;
using ChrisKaczor.InstalledBrowsers;
using FeedCenter.Options;
using FeedCenter.Properties;
namespace FeedCenter
{
@@ -59,18 +59,16 @@ namespace FeedCenter
// Create the options form
var optionsWindow = new OptionsWindow { Owner = this };
// Show the options form and get the result
var result = optionsWindow.ShowDialog();
// Show the options window
optionsWindow.ShowDialog();
// If okay was selected
if (result.HasValue && result.Value)
{
// Refresh the database to current settings
ResetDatabase();
// Refresh the database to current settings
ResetDatabase();
// Re-initialize the feed display
DisplayFeed();
}
// Re-initialize the feed display
DisplayFeed();
UpdateErrorLink();
}
private void HandleMarkReadToolbarButtonClick(object sender, RoutedEventArgs e)
@@ -84,19 +82,15 @@ namespace FeedCenter
var feedErrorWindow = new FeedErrorWindow();
// Display the window
var result = feedErrorWindow.Display(this);
feedErrorWindow.Display(this);
// If okay was selected
if (result.GetValueOrDefault())
{
// Refresh the database to current settings
ResetDatabase();
// Refresh the database to current settings
ResetDatabase();
// Re-initialize the feed display
DisplayFeed();
// Re-initialize the feed display
DisplayFeed();
UpdateErrorLink();
}
UpdateErrorLink();
}
private void HandleRefreshMenuItemClick(object sender, RoutedEventArgs e)