-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f157afc
commit 29fcdd8
Showing
8 changed files
with
162 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Runtime.CompilerServices; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using MetroTrilithon.Serialization; | ||
|
||
namespace NotifyEx.Models.Settings | ||
{ | ||
public static class NotifierSettings | ||
{ | ||
#region Ship count notifier settings | ||
|
||
public static SerializableProperty<bool> EnabledShipNotifier { get; } | ||
= new SerializableProperty<bool>(GetKey(), Provider.Roaming, Properties.Settings.Default.EnabledShipNotifier) { AutoSave = true }; | ||
|
||
public static SerializableProperty<uint> ShipWarningCount { get; } | ||
= new SerializableProperty<uint>(GetKey(), Provider.Roaming, Properties.Settings.Default.WarningShipCount) { AutoSave = true }; | ||
|
||
public static SerializableProperty<bool> EnabledEventShipNotifier { get; } | ||
= new SerializableProperty<bool>(GetKey(), Provider.Roaming, Properties.Settings.Default.EnabledEventShipNotifier) { AutoSave = true }; | ||
|
||
public static SerializableProperty<uint> EventShipWarningCount { get; } | ||
= new SerializableProperty<uint>(GetKey(), Provider.Roaming, Properties.Settings.Default.EventWarningShipCount) { AutoSave = true }; | ||
|
||
#endregion | ||
|
||
#region Slot count notifier settings | ||
|
||
public static SerializableProperty<bool> EnabledSlotNotifier { get; } | ||
= new SerializableProperty<bool>(GetKey(), Provider.Roaming, Properties.Settings.Default.EnabledSlotNotifier) { AutoSave = true }; | ||
|
||
public static SerializableProperty<uint> SlotWarningCount { get; } | ||
= new SerializableProperty<uint>(GetKey(), Provider.Roaming, Properties.Settings.Default.WarningShipCount) { AutoSave = true }; | ||
|
||
public static SerializableProperty<bool> EnabledEventSlotNotifier { get; } | ||
= new SerializableProperty<bool>(GetKey(), Provider.Roaming, Properties.Settings.Default.EnabledEventSlotNotifier) { AutoSave = true }; | ||
|
||
public static SerializableProperty<uint> EventSlotWarningCount { get; } | ||
= new SerializableProperty<uint>(GetKey(), Provider.Roaming, Properties.Settings.Default.EventWarningSlotCount) { AutoSave = true }; | ||
|
||
#endregion | ||
|
||
#region Heavily damaged notifier settings | ||
|
||
public static SerializableProperty<bool> EnabledLowHpNotifier { get; } | ||
= new SerializableProperty<bool>(GetKey(), Provider.Roaming, Properties.Settings.Default.EnabledLowHpNotifier) { AutoSave = true }; | ||
|
||
public static SerializableProperty<bool> EnabledShowDamageControl { get; } | ||
= new SerializableProperty<bool>(GetKey(), Provider.Roaming, Properties.Settings.Default.EnabledShowDamageControl) { AutoSave = true }; | ||
|
||
#endregion | ||
|
||
#region Lack of supply notifier | ||
|
||
public static SerializableProperty<bool> EnabledSupplyNotifier { get; } | ||
= new SerializableProperty<bool>(GetKey(), Provider.Roaming, Properties.Settings.Default.EnabledSupplyNotifier) { AutoSave = true }; | ||
|
||
public static SerializableProperty<bool> EnabledSortieSupplyNotifier { get; } | ||
= new SerializableProperty<bool>(GetKey(), Provider.Roaming, Properties.Settings.Default.EnabledSortieSupplyNotifier) { AutoSave = true }; | ||
|
||
public static SerializableProperty<bool> EnabledExerciseSupplyNotifier { get; } | ||
= new SerializableProperty<bool>(GetKey(), Provider.Roaming, Properties.Settings.Default.EnabledExerciseSupplyNotifier) { AutoSave = true }; | ||
|
||
public static SerializableProperty<bool> EnabledExpenditionSupplyNotifier { get; } | ||
= new SerializableProperty<bool>(GetKey(), Provider.Roaming, Properties.Settings.Default.EnabledExpenditionSupplyNotifier) { AutoSave = true }; | ||
|
||
#endregion | ||
|
||
private static string GetKey([CallerMemberName] string propertyName = "") | ||
{ | ||
return $"{nameof(NotifierSettings)}.{propertyName}"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using MetroTrilithon.Serialization; | ||
|
||
namespace NotifyEx.Models.Settings | ||
{ | ||
public static class Provider | ||
{ | ||
public static string RoamingPath { get; } = Path.Combine(Environment.GetFolderPath( | ||
Environment.SpecialFolder.ApplicationData), | ||
"grabacr.net", "KanColleViewer", "NotifyEx.xaml"); | ||
|
||
public static ISerializationProvider Roaming { get; } = new FileSettingsProvider(RoamingPath); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.