mirror of
https://github.com/ckaczor/WorldClockStatusWindow.git
synced 2026-01-13 17:23:18 -05:00
Add time zones settings panel
This commit is contained in:
21
Data.cs
Normal file
21
Data.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Text.Json;
|
||||
using WorldClockStatusWindow.Properties;
|
||||
|
||||
namespace WorldClockStatusWindow;
|
||||
|
||||
internal static class Data
|
||||
{
|
||||
internal static ObservableCollection<TimeZoneEntry> TimeZoneEntries { get; set; }
|
||||
|
||||
internal static void Load()
|
||||
{
|
||||
TimeZoneEntries = JsonSerializer.Deserialize<ObservableCollection<TimeZoneEntry>>(Settings.Default.TimeZones);
|
||||
}
|
||||
|
||||
internal static void Save()
|
||||
{
|
||||
Settings.Default.TimeZones = JsonSerializer.Serialize(TimeZoneEntries);
|
||||
Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user