mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-02-16 10:58:31 -05:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9e2e7aabe8 | |||
| 7ee84f079b | |||
| 8f70003bef | |||
| 38f093dc5c | |||
| e5bdc80d10 | |||
| 260268194a | |||
| 8ecde89be0 |
@@ -34,7 +34,7 @@
|
|||||||
<PackageReference Include="ChrisKaczor.Wpf.Controls.Toolbar" Version="1.0.3" />
|
<PackageReference Include="ChrisKaczor.Wpf.Controls.Toolbar" Version="1.0.3" />
|
||||||
<PackageReference Include="ChrisKaczor.Wpf.Validation" Version="1.0.4" />
|
<PackageReference Include="ChrisKaczor.Wpf.Validation" Version="1.0.4" />
|
||||||
<PackageReference Include="ChrisKaczor.Wpf.Windows.ControlBox" Version="1.0.3" />
|
<PackageReference Include="ChrisKaczor.Wpf.Windows.ControlBox" Version="1.0.3" />
|
||||||
<PackageReference Include="ChrisKaczor.Wpf.Windows.SnappingWindow" Version="1.0.3" />
|
<PackageReference Include="ChrisKaczor.Wpf.Windows.SnappingWindow" Version="1.0.4" />
|
||||||
<PackageReference Include="Dapper" Version="2.0.123" />
|
<PackageReference Include="Dapper" Version="2.0.123" />
|
||||||
<PackageReference Include="DebounceThrottle" Version="2.0.0" />
|
<PackageReference Include="DebounceThrottle" Version="2.0.0" />
|
||||||
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.0.108" />
|
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.0.108" />
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
<PackageReference Include="Microsoft.SqlServer.Compact" Version="4.0.8876.1" GeneratePathProperty="true">
|
<PackageReference Include="Microsoft.SqlServer.Compact" Version="4.0.8876.1" GeneratePathProperty="true">
|
||||||
<NoWarn>NU1701</NoWarn>
|
<NoWarn>NU1701</NoWarn>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Windows.Compatibility" Version="7.0.1" />
|
<PackageReference Include="Microsoft.Windows.Compatibility" Version="7.0.6" />
|
||||||
<PackageReference Include="NameBasedGrid" Version="0.10.1">
|
<PackageReference Include="NameBasedGrid" Version="0.10.1">
|
||||||
<NoWarn>NU1701</NoWarn>
|
<NoWarn>NU1701</NoWarn>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -356,6 +356,9 @@ public partial class Feed : RealmObject, INotifyDataErrorInfo
|
|||||||
{
|
{
|
||||||
switch (httpRequestException.StatusCode)
|
switch (httpRequestException.StatusCode)
|
||||||
{
|
{
|
||||||
|
case HttpStatusCode.TooManyRequests:
|
||||||
|
return Tuple.Create(FeedReadResult.TooManyRequests, string.Empty);
|
||||||
|
|
||||||
case HttpStatusCode.ServiceUnavailable:
|
case HttpStatusCode.ServiceUnavailable:
|
||||||
return Tuple.Create(FeedReadResult.TemporarilyUnavailable, string.Empty);
|
return Tuple.Create(FeedReadResult.TemporarilyUnavailable, string.Empty);
|
||||||
|
|
||||||
|
|||||||
@@ -15,5 +15,6 @@ public enum FeedReadResult
|
|||||||
ConnectionFailed,
|
ConnectionFailed,
|
||||||
ServerError,
|
ServerError,
|
||||||
Moved,
|
Moved,
|
||||||
TemporarilyUnavailable
|
TemporarilyUnavailable,
|
||||||
|
TooManyRequests
|
||||||
}
|
}
|
||||||
@@ -24,17 +24,18 @@ public partial class MainWindow
|
|||||||
{
|
{
|
||||||
StopTimer();
|
StopTimer();
|
||||||
|
|
||||||
_mainTimer.Dispose();
|
_mainTimer?.Dispose();
|
||||||
|
_mainTimer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StartTimer()
|
private void StartTimer()
|
||||||
{
|
{
|
||||||
_mainTimer.Start();
|
_mainTimer?.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StopTimer()
|
private void StopTimer()
|
||||||
{
|
{
|
||||||
_mainTimer.Stop();
|
_mainTimer?.Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleMainTimerElapsed(object sender, EventArgs e)
|
private void HandleMainTimerElapsed(object sender, EventArgs e)
|
||||||
|
|||||||
@@ -166,6 +166,12 @@ public partial class MainWindow
|
|||||||
|
|
||||||
// Delete the feed
|
// Delete the feed
|
||||||
_database.SaveChanges(() => _database.Feeds.Remove(feedToDelete));
|
_database.SaveChanges(() => _database.Feeds.Remove(feedToDelete));
|
||||||
|
|
||||||
|
// Refresh the database to current settings
|
||||||
|
ResetDatabase();
|
||||||
|
|
||||||
|
// Re-initialize the feed display
|
||||||
|
DisplayFeed();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OpenAllFeedItemsOnSinglePage()
|
private void OpenAllFeedItemsOnSinglePage()
|
||||||
|
|||||||
@@ -49,14 +49,14 @@ public partial class MainWindow
|
|||||||
{
|
{
|
||||||
// Set the last window location
|
// Set the last window location
|
||||||
Settings.Default.WindowLocation = new Point(Left, Top);
|
Settings.Default.WindowLocation = new Point(Left, Top);
|
||||||
|
Settings.Default.Save();
|
||||||
|
|
||||||
// Set the last window size
|
// Set the last window size
|
||||||
Settings.Default.WindowSize = new Size(Width, Height);
|
Settings.Default.WindowSize = new Size(Width, Height);
|
||||||
|
Settings.Default.Save();
|
||||||
|
|
||||||
// Save the dock on the navigation tray
|
// Save the dock on the navigation tray
|
||||||
Settings.Default.ToolbarLocation = NameBasedGrid.NameBasedGrid.GetRow(NavigationToolbarTray) == "TopToolbarRow" ? Dock.Top : Dock.Bottom;
|
Settings.Default.ToolbarLocation = NameBasedGrid.NameBasedGrid.GetRow(NavigationToolbarTray) == "TopToolbarRow" ? Dock.Top : Dock.Bottom;
|
||||||
|
|
||||||
// Save settings
|
|
||||||
Settings.Default.Save();
|
Settings.Default.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
18
Application/Properties/Resources.Designer.cs
generated
18
Application/Properties/Resources.Designer.cs
generated
@@ -840,6 +840,15 @@ namespace FeedCenter.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Temporarily unavailable.
|
||||||
|
/// </summary>
|
||||||
|
public static string FeedReadResult_TemporarilyUnavailable {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("FeedReadResult_TemporarilyUnavailable", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Timeout.
|
/// Looks up a localized string similar to Timeout.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -849,6 +858,15 @@ namespace FeedCenter.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Too many requests.
|
||||||
|
/// </summary>
|
||||||
|
public static string FeedReadResult_TooManyRequests {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("FeedReadResult_TooManyRequests", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Not authorized.
|
/// Looks up a localized string similar to Not authorized.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -555,4 +555,10 @@ All feeds currently in category "{0}" will be moved to the default category.</va
|
|||||||
<data name="userAgentLabel" xml:space="preserve">
|
<data name="userAgentLabel" xml:space="preserve">
|
||||||
<value>User agent</value>
|
<value>User agent</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="FeedReadResult_TemporarilyUnavailable" xml:space="preserve">
|
||||||
|
<value>Temporarily unavailable</value>
|
||||||
|
</data>
|
||||||
|
<data name="FeedReadResult_TooManyRequests" xml:space="preserve">
|
||||||
|
<value>Too many requests</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -36,6 +36,9 @@ public static class SettingsStore
|
|||||||
// Try to get the setting from the database that matches the name and version
|
// Try to get the setting from the database that matches the name and version
|
||||||
var setting = entities.Settings.FirstOrDefault(s => s.Name == name);
|
var setting = entities.Settings.FirstOrDefault(s => s.Name == name);
|
||||||
|
|
||||||
|
if (setting?.Value == value)
|
||||||
|
return;
|
||||||
|
|
||||||
entities.SaveChanges(() =>
|
entities.SaveChanges(() =>
|
||||||
{
|
{
|
||||||
// If there was no setting we need to create it
|
// If there was no setting we need to create it
|
||||||
|
|||||||
Reference in New Issue
Block a user