Rework database loading/migration

This commit is contained in:
2023-04-06 17:20:38 -04:00
parent b5f570688d
commit 6514f23329
21 changed files with 561 additions and 569 deletions

View File

@@ -29,7 +29,7 @@ namespace FeedCenter.Options
private void HandleOkayButtonClick(object sender, RoutedEventArgs e)
{
if (!this.Validate())
if (!this.IsValid())
return;
// Dialog is good

View File

@@ -54,8 +54,6 @@ namespace FeedCenter.Options
var expressions = this.GetBindingExpressions(new[] { UpdateSourceTrigger.Explicit });
this.UpdateAllSources(expressions);
this.Validate();
}
public override string CategoryName => Properties.Resources.optionCategoryGeneral;
@@ -106,22 +104,22 @@ namespace FeedCenter.Options
{
var userAgents = new List<UserAgentItem>
{
new UserAgentItem
new()
{
Caption = Properties.Resources.DefaultUserAgentCaption,
UserAgent = string.Empty
},
new UserAgentItem
new()
{
Caption = "Windows RSS Platform 2.0",
UserAgent = "Windows-RSS-Platform/2.0 (MSIE 9.0; Windows NT 6.1)"
},
new UserAgentItem
new()
{
Caption = "Feedly 1.0",
UserAgent = "Feedly/1.0"
},
new UserAgentItem
new()
{
Caption = "curl",
UserAgent = "curl/7.47.0"

View File

@@ -9,7 +9,7 @@ namespace FeedCenter.Options
{
#region Member variables
private readonly List<OptionsPanelBase> _optionPanels = new List<OptionsPanelBase>();
private readonly List<OptionsPanelBase> _optionPanels = new();
private readonly FeedCenterEntities _database = Database.Entities;