Icarus :
- eliminata opzione CreateJson su Shift+Save perchè serviva solo per debug iniziale.
This commit is contained in:
@@ -248,37 +248,9 @@ Public Class ProjManagerVM
|
||||
''' Execute the Save. This method is invoked by the SaveCommand.
|
||||
''' </summary>
|
||||
Public Sub Save()
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||
CreateJson()
|
||||
End If
|
||||
Map.refSceneHostVM.SaveProject()
|
||||
End Sub
|
||||
|
||||
Private Function CreateJson() As Boolean
|
||||
' creo json
|
||||
Dim LayerList As New List(Of JsonLayer)
|
||||
For Each Layer In Map.refTFSEditorVM.LayerList
|
||||
LayerList.Add(Layer.ConvertToJsonLayer())
|
||||
Next
|
||||
Dim json As String = JsonConvert.SerializeObject(LayerList, Formatting.Indented)
|
||||
Dim sProjName As String = ""
|
||||
EgtGetCurrFilePath(sProjName)
|
||||
If Not String.IsNullOrWhiteSpace(sProjName) Then
|
||||
sProjName = Path.ChangeExtension(sProjName, ".json")
|
||||
If File.Exists(sProjName) Then
|
||||
Try
|
||||
File.Delete(sProjName)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End If
|
||||
Try
|
||||
File.AppendAllText(sProjName, json)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Json writing error!")
|
||||
End Try
|
||||
End If
|
||||
End Function
|
||||
|
||||
#End Region ' SaveCommand
|
||||
|
||||
#Region "SaveAsCommand"
|
||||
|
||||
Reference in New Issue
Block a user