More modernization

- Split generic "common" libraries into specific libraries
- Use other packages in lieu of custom code
- General cleanup
This commit is contained in:
2023-04-05 16:06:38 -04:00
parent f480a6c373
commit b5f570688d
46 changed files with 1210 additions and 656 deletions

View File

@@ -1,4 +1,5 @@
using FeedCenter.Options;
using CKaczor.InstalledBrowsers;
using FeedCenter.Options;
using FeedCenter.Properties;
using System.IO;
using System.Linq;
@@ -26,9 +27,6 @@ namespace FeedCenter
// Create a new list of feed items
var feedItems = (from FeedItem feedItem in LinkTextList.Items select feedItem).ToList();
// Get the browser
var browser = BrowserCommon.FindBrowser(Settings.Default.Browser);
// Cache the settings object
var settings = Settings.Default;
@@ -39,7 +37,7 @@ namespace FeedCenter
foreach (var feedItem in feedItems)
{
// Try to open the link
if (BrowserCommon.OpenLink(browser, feedItem.Link))
if (InstalledBrowser.OpenLink(Settings.Default.Browser, feedItem.Link))
{
// Mark the feed as read
_database.SaveChanges(() => feedItem.BeenRead = true);
@@ -236,9 +234,9 @@ namespace FeedCenter
textWriter.Flush();
textWriter.Close();
BrowserCommon.OpenLink(fileName);
InstalledBrowser.OpenLink(Settings.Default.Browser, fileName);
MarkAllItemsAsRead();
}
}
}
}