public static void Load()
        {
            if (File.Exists(FILENAME))
                AlertConfig = UserConfigService.Encrypted
                    ? JsonConvert.DeserializeObject<AlertConfig>(EncryptionService.AesDecryptString(File.ReadAllText(FILENAME)))
                    : JsonConvert.DeserializeObject<AlertConfig>(File.ReadAllText(FILENAME));
            else
                Create();

            AlertConfig.Alerts.ForEach(x => x.LastOperator = null);
        }
Example #2
0
 private static List <CoinConfig> LoadEncrypted(string portfolio)
 {
     return(JsonConvert.DeserializeObject <List <CoinConfig> >(EncryptionService.AesDecryptString(File.ReadAllText(portfolio))) ?? new List <CoinConfig>());
 }