update structure
This commit is contained in:
22
ModpackUpdater.Model/UpdateConfig.vb
Normal file
22
ModpackUpdater.Model/UpdateConfig.vb
Normal file
@@ -0,0 +1,22 @@
|
||||
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
|
||||
Reference in New Issue
Block a user