bcd5ca43e5
- aggiunta funzione lua per aprire finestra ripartenza - aggiunti bottoni per gestione variabili di partenza - aggiunta descrizione porta lungo la linea - aggiunta finestra di ripartenza
61 lines
1.3 KiB
VB.net
61 lines
1.3 KiB
VB.net
Imports Newtonsoft.Json
|
|
Imports System.Collections.ObjectModel
|
|
Imports System.IO
|
|
|
|
Public Class RestartWndVM
|
|
|
|
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
|
|
|
' Definizione comandi
|
|
Private m_cmdOk As ICommand
|
|
|
|
#Region "CONSTRUCTOR"
|
|
|
|
Sub New()
|
|
Dim sBackupFilePath As String = ""
|
|
GetPluginPrivateProfileString("General", "BackupDir", "", sBackupFilePath)
|
|
sBackupFilePath &= "/LuaBackup.json"
|
|
|
|
|
|
|
|
If File.Exists(sBackupFilePath) Then
|
|
Dim sReadedFile As String = File.ReadAllText(sBackupFilePath)
|
|
|
|
Dim JsonDoorList As List(Of LuaDoor) = JsonConvert.DeserializeObject(Of List(Of LuaDoor))(sReadedFile)
|
|
'JsonDoorList = JsonDoorList.OrderBy(Of Integer)(Function(x) x.nListIndex).ToList()
|
|
|
|
'm_DoorList = New ObservableCollection(Of Door)((From JsonDoor In JsonDoorList
|
|
' Select New Door(JsonDoor)).ToList())
|
|
End If
|
|
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
#End Region ' CONSTRUCTOR
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "Ok"
|
|
|
|
Public ReadOnly Property Ok_Command As ICommand
|
|
Get
|
|
If m_cmdOk Is Nothing Then
|
|
m_cmdOk = New Command(AddressOf Ok)
|
|
End If
|
|
Return m_cmdOk
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub Ok()
|
|
RaiseEvent m_CloseWindow(True)
|
|
End Sub
|
|
|
|
#End Region ' Ok
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class
|