// Decompiled with JetBrains decompiler // Type: ClientStorage // Assembly: Raton, Version=0.4.0.0, Culture=neutral, PublicKeyToken=null // MVID: 36C4E416-7F8D-4D23-930F-B5CCB0D810E7 // Assembly location: C:\Users\user\Desktop\v3.8.0 Deluxe Plugins (v4.0.0) cracked\Raton.exe using System; using System.Collections.Generic; using System.IO; using System.Text.Json; using WpfApp1; #nullable disable public static class ClientStorage { private static string FilePath = Path.Combine(MainWindow.appData, "clients.json"); public static List Clients = new List(); public static void Load() { if (!Directory.Exists(MainWindow.appData)) Directory.CreateDirectory(MainWindow.appData); if (!File.Exists(ClientStorage.FilePath)) ClientStorage.Clients = new List(); else ClientStorage.Clients = JsonSerializer.Deserialize>(File.ReadAllText(ClientStorage.FilePath)) ?? new List(); } public static void Save() { if (!Directory.Exists(MainWindow.appData)) Directory.CreateDirectory(MainWindow.appData); string contents = JsonSerializer.Serialize>(ClientStorage.Clients, new JsonSerializerOptions() { WriteIndented = true }); File.WriteAllText(ClientStorage.FilePath, contents); } public static void Add(StoredClient client) { ClientStorage.Clients.Add(client); ClientStorage.Save(); } public static void DeleteUID(string uid) { ClientStorage.Clients.RemoveAll((Predicate) (x => x.UID == uid)); ClientStorage.Save(); } }