Imports System.IO Imports Newtonsoft.Json.Linq Imports Pilz.Cryptography Public Class UpdateConfig Public Property UpdateUrl As String Public Property WebdavURL As SecureString Public Property WebdavUsername As SecureString Public Property WebdavPassword As SecureString Public Sub SaveToFile(filePath As string) File.WriteAllText(filePath, JObject.FromObject(Me).ToString) End Sub Public Shared Function LoadFromFile(filePath As String) As UpdateConfig Return JObject.Parse(File.ReadAllText(filePath)).ToObject(Of UpdateConfig) End Function End Class