mirror of
https://github.com/ckaczor/FloatingStatusWindow.git
synced 2026-03-10 19:48:48 -04:00
Add template project
This commit is contained in:
21
Template/Data.cs
Normal file
21
Template/Data.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Text.Json;
|
||||
using Template.Properties;
|
||||
|
||||
namespace Template;
|
||||
|
||||
internal static class Data
|
||||
{
|
||||
internal static ObservableCollection<ItemEntry> ItemEntries { get; private set; }
|
||||
|
||||
internal static void Load()
|
||||
{
|
||||
ItemEntries = JsonSerializer.Deserialize<ObservableCollection<ItemEntry>>(Settings.Default.Items);
|
||||
}
|
||||
|
||||
internal static void Save()
|
||||
{
|
||||
Settings.Default.Items = JsonSerializer.Serialize(ItemEntries);
|
||||
Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user