mirror of
https://github.com/ckaczor/WorldClockStatusWindow.git
synced 2026-01-13 17:23:18 -05:00
21 lines
580 B
C#
21 lines
580 B
C#
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();
|
|
}
|
|
} |