TestEIn 1.9d1 :
- aggiornamento.
This commit is contained in:
+26
-20
@@ -270,6 +270,8 @@ Public Class Controller
|
||||
|
||||
Public Function InsertProject(Optional ByVal sDir As String = "", Optional ByVal bWithDlg As Boolean = True) As Boolean
|
||||
Dim sFile As String = sDir
|
||||
' Reset controller e scena
|
||||
ResetStatus()
|
||||
' Scelta file con dialogo
|
||||
If bWithDlg Then
|
||||
Dim OpenFileDialog As New OpenFileDialog With {
|
||||
@@ -317,6 +319,8 @@ Public Class Controller
|
||||
If String.IsNullOrWhiteSpace(sCurrFile) Or EgtGetFileType(sCurrFile) <> FT.NGE Then
|
||||
Return SaveAsProject(sCurrFile, nType)
|
||||
Else
|
||||
' Reset controller e scena
|
||||
ResetStatus()
|
||||
' Prima del salvataggio
|
||||
RaiseEvent OnSavingProject(Me, sCurrFile)
|
||||
' Salvataggio del progetto
|
||||
@@ -334,40 +338,40 @@ Public Class Controller
|
||||
End Function
|
||||
|
||||
Public Function SaveAsProject(Optional ByVal sFile As String = "", Optional ByVal nType As NGE = NGE.CMPTEXT) As Boolean
|
||||
'Se nome vuoto, assegno "New"
|
||||
If String.IsNullOrWhiteSpace(sFile) Then
|
||||
sFile = "New.nge"
|
||||
End If
|
||||
'Eventuale sistemazione estensione
|
||||
' Reset controller e scena
|
||||
ResetStatus()
|
||||
' Se nome vuoto, assegno "New"
|
||||
If String.IsNullOrWhiteSpace(sFile) Then sFile = "New.nge"
|
||||
' Eventuale sistemazione estensione
|
||||
sFile = IO.Path.ChangeExtension(sFile, "nge")
|
||||
'Assegnazione nome file con dialogo
|
||||
' Assegnazione nome file con dialogo
|
||||
Dim SaveFileDialog As New SaveFileDialog With {
|
||||
.Title = "Save",
|
||||
.Filter = "New geometry EgalTech(*.nge)|*.nge",
|
||||
.FileName = sFile,
|
||||
.InitialDirectory = IO.Path.GetDirectoryName(sFile)
|
||||
}
|
||||
If SaveFileDialog.ShowDialog <> Windows.Forms.DialogResult.OK Then
|
||||
Return True
|
||||
End If
|
||||
If SaveFileDialog.ShowDialog <> Windows.Forms.DialogResult.OK Then Return True
|
||||
Dim sFileName As String = SaveFileDialog.FileName
|
||||
'Prima del salvataggio
|
||||
' Prima del salvataggio
|
||||
RaiseEvent OnSavingProject(Me, sFileName)
|
||||
'Salvataggio del progetto
|
||||
' Salvataggio del progetto
|
||||
Cursor.Current = Cursors.WaitCursor
|
||||
EnableCommandLog()
|
||||
Dim bOk As Boolean = EgtSaveFile(sFileName, nType)
|
||||
DisableCommandLog()
|
||||
'Aggiorno
|
||||
' Aggiorno
|
||||
RaiseEvent UpdateUI(Me, False)
|
||||
Cursor.Current = Cursors.Default
|
||||
'Gestione risultato
|
||||
' Gestione risultato
|
||||
RaiseEvent OnSavedProject(Me, sFileName, bOk)
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Public Function SaveObject(ByVal nId As Integer, Optional ByVal sDir As String = "", Optional ByVal nType As NGE = NGE.CMPTEXT) As Boolean
|
||||
'Creo nome di default
|
||||
' Reset controller e scena
|
||||
ResetStatus()
|
||||
' Creo nome di default
|
||||
Dim sName As String = String.Empty
|
||||
If Not EgtGetName(nId, sName) Then
|
||||
Dim nObjType As Integer = EgtGetType(nId)
|
||||
@@ -387,14 +391,14 @@ Public Class Controller
|
||||
sName = "Unknown" & nId.ToString()
|
||||
End If
|
||||
End If
|
||||
'Sistemo path
|
||||
' Sistemo path
|
||||
Dim sFile As String
|
||||
If String.IsNullOrWhiteSpace(sDir) Then
|
||||
sFile = sName
|
||||
Else
|
||||
sFile = sDir.TrimEnd("\") & "\" & sName
|
||||
End If
|
||||
'Assegnazione nome file con dialogo
|
||||
' Assegnazione nome file con dialogo
|
||||
Dim SaveFileDialog As New SaveFileDialog With {
|
||||
.Title = "Save Object",
|
||||
.Filter = "New geometry EgalTech(*.nge)|*.nge",
|
||||
@@ -405,17 +409,17 @@ Public Class Controller
|
||||
Return True
|
||||
End If
|
||||
Dim sFileName As String = SaveFileDialog.FileName
|
||||
'Prima del salvataggio
|
||||
' Prima del salvataggio
|
||||
RaiseEvent OnSavingObject(Me, sFileName)
|
||||
'Salvataggio dell'oggetto con la sua ascendenza
|
||||
' Salvataggio dell'oggetto con la sua ascendenza
|
||||
Cursor.Current = Cursors.WaitCursor
|
||||
EnableCommandLog()
|
||||
Dim bOk As Boolean = EgtSaveObjToFile(nId, sFileName, nType)
|
||||
DisableCommandLog()
|
||||
'Aggiorno
|
||||
' Aggiorno
|
||||
RaiseEvent UpdateUI(Me, False)
|
||||
Cursor.Current = Cursors.Default
|
||||
'Gestione risultato
|
||||
' Gestione risultato
|
||||
RaiseEvent OnSavedObject(Me, sFileName, bOk)
|
||||
Return bOk
|
||||
End Function
|
||||
@@ -496,6 +500,8 @@ Public Class Controller
|
||||
End Function
|
||||
|
||||
Public Function ExportProject(Optional ByVal sFile As String = "") As Boolean
|
||||
' Reset controller e scena
|
||||
ResetStatus()
|
||||
'Assegnazione nome file con dialogo
|
||||
Dim SaveFileDialog As New SaveFileDialog With {
|
||||
.Title = "Export",
|
||||
|
||||
@@ -12357,6 +12357,11 @@ End Enum
|
||||
Public Enum MCH_MORTISE_WS As Integer
|
||||
LEFT = 1
|
||||
RIGHT = 2
|
||||
End Enum
|
||||
'Tipo di lavorazione a step
|
||||
Public Enum MCH_MORTISE_ST As Integer
|
||||
ZIGZAG = 0
|
||||
ONEWAY = 1
|
||||
End Enum
|
||||
'Tipo di lavorazione faccia
|
||||
Public Enum MCH_MORTISE_FU As Integer
|
||||
|
||||
@@ -46,5 +46,5 @@ Imports System.Runtime.InteropServices
|
||||
' utilizzando l'asterisco (*) come descritto di seguito:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.9.3.5")>
|
||||
<Assembly: AssemblyFileVersion("1.9.3.5")>
|
||||
<Assembly: AssemblyVersion("1.9.4.1")>
|
||||
<Assembly: AssemblyFileVersion("1.9.4.1")>
|
||||
|
||||
Reference in New Issue
Block a user