Merge branch 'develop'

This commit is contained in:
Nicola Pievani
2024-04-09 16:45:16 +02:00
4 changed files with 85 additions and 18 deletions
+2 -2
View File
@@ -223,8 +223,8 @@ Public Class MainWindowM
' Verifico abilitazione nesting automatico
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2603, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2603, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2604, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2604, 1, m_nKeyOptions)
' Verifico abilitazione prodotto
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
' Inizializzazione generale di EgtInterface
+2 -2
View File
@@ -69,6 +69,6 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.6.3.1")>
<Assembly: AssemblyFileVersion("2.6.3.1")>
<Assembly: AssemblyVersion("2.6.4.1")>
<Assembly: AssemblyFileVersion("2.6.4.1")>
+22 -5
View File
@@ -47,12 +47,27 @@ Public Class MySceneHostVM
' Problemi
' Se manca la chiave
If OmagOFFICEMap.refMainWindowVM.MainWindowM.nKeyLevel = -1 Or OmagOFFICEMap.refMainWindowVM.MainWindowM.nKeyLevel = -2 Then
EgtOutLog("Missing Dongle")
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
If Not EgtGetNetHwKey() Then
EgtOutLog("Missing Dongle")
' Box di avviso chiave mancante : "Chiave non presente. \nInserirla e riavviare il programma." "Errore"
Dim sText As String = EgtMsg(10102) & vbCrLf & EgtMsg(10103)
Dim sTitle As String = EgtMsg(10101)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
Else
EgtOutLog("NetDongle is full")
' Box di avviso slot chiave di rete occupato : "Chiave di Rete completamente occupata. \n Uscire dal programma su un altro PC." "Errore"
Dim sText As String = EgtMsg(10110) & vbCrLf & EgtMsg(10111)
Dim sTitle As String = EgtMsg(10101)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
End If
' Se altrimenti manca il collegamento con la chiave di rete
ElseIf OmagOFFICEMap.refMainWindowVM.MainWindowM.nKeyLevel = -9 Then
EgtOutLog("Missing Link with Net Dongle")
' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore"
Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109)
Dim sTitle As String = EgtMsg(10101)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
' Altrimenti manca la licenza
' Altrimenti manca la licenza
Else
EgtOutLog("Problems with Licence")
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
@@ -719,6 +734,8 @@ Public Class MySceneHostVM
End Sub
Private Sub OnSavingProject(ByVal sender As Object, sFile As String)
' Salvo le info del progetto
TopCommandBarVM.SetInfoProj(sFile)
' Recupero tutti i file di texture associabili ai gruppi di lavoro del progetto
Dim sDirToSearch As String = Path.GetDirectoryName(sFile)
Dim sFileToSearch As String = Path.GetFileNameWithoutExtension(sFile) & "." & PHOTO_NAME & "*"
+59 -9
View File
@@ -74,12 +74,12 @@ Public Class TopCommandBarVM
End Property
Public ReadOnly Property ExportToolTip As String
Get
Return EgtMsg( 91505) 'Esporta in macchina
Return EgtMsg(91505) 'Esporta in macchina
End Get
End Property
Public ReadOnly Property DxfOutToolTip As String
Get
Return EgtMsg( 91506) 'Esporta DXF
Return EgtMsg(91506) 'Esporta DXF
End Get
End Property
Public ReadOnly Property OptionsToolTip As String
@@ -226,8 +226,20 @@ Public Class TopCommandBarVM
''' Execute the SaveAs. This method is invoked by the SaveAsCommand.
''' </summary>
Public Sub SaveAs(ByVal param As Object)
'Dim SaveFileDialog As New System.Windows.Forms.SaveFileDialog()
'SaveFileDialog.Filter = "(*.nge) |*.nge"
'SaveFileDialog.FilterIndex = 2
'' avvio la ricerca nell'ultimo direttorio aperto
'Dim sFilePath As String = String.Empty
'EgtGetCurrFilePath(sFilePath)
'SaveFileDialog.InitialDirectory = Path.GetExtension(sFilePath)
'SaveFileDialog.FileName = Path.GetFileName(sFilePath)
'' apro la finestra di dialogo
'Dim bChangeProject As Boolean = True
'If SaveFileDialog.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then Return
'Dim sNewFilePath As String = SaveFileDialog.FileName
' non posso avere la stessa lastra in due progetti -> gestita da DataBase
OmagOFFICEMap.refSceneHostVM.SaveAsProject()
OmagOFFICEMap.refSceneHostVM.SaveAsProject_1()
End Sub
#End Region ' SaveAsCommand
@@ -238,12 +250,12 @@ Public Class TopCommandBarVM
''' Returns a command that do Export.
''' </summary>
Public ReadOnly Property ExportCommand As ICommand
Get
If m_cmdExport Is Nothing Then
m_cmdExport = New Command(AddressOf Export)
End If
Return m_cmdExport
End Get
Get
If m_cmdExport Is Nothing Then
m_cmdExport = New Command(AddressOf Export)
End If
Return m_cmdExport
End Get
End Property
''' <summary>
@@ -436,4 +448,42 @@ Public Class TopCommandBarVM
#End Region ' Commands
Public Shared Sub SetInfoProj(Optional sFilePath As String = "")
EgtOutLog(" *** SAVE PROJECT ***")
' Recupero l'ID della macchinata corrente
Dim CurrGrpId As Integer = EgtGetCurrMachGroup()
' Path completa del progetto corrente
If String.IsNullOrEmpty(sFilePath) Then EgtGetCurrFilePath(sFilePath)
Dim nPartInRawsProj As Integer = 0
Dim nGrpId = EgtGetFirstMachGroup()
While nGrpId <> GDB_ID.NULL
' Imposto la macchinata corrente
EgtSetCurrMachGroup(nGrpId)
' recupero il primo grezzo della macchinata corrente
Dim nRawId As Integer = EgtGetFirstRawPart()
While nRawId <> GDB_ID.NULL
nPartInRawsProj += EgtGetPartInRawPartCount(nRawId)
nRawId = EgtGetNextRawPart(nRawId)
End While
nGrpId = EgtGetNextMachGroup(nGrpId)
End While
nGrpId = EgtGetFirstMachGroup()
While nGrpId <> GDB_ID.NULL
' percorso progetto
EgtSetInfo(nGrpId, "ProjPath", sFilePath)
' Anno/Mese/Giorno/Ora/min di salvataggio
EgtSetInfo(nGrpId, "Released", DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"))
' numero di pezzi presenti nel progetto
EgtSetInfo(nGrpId, "NbrProjParts", nPartInRawsProj.ToString)
nGrpId = EgtGetNextMachGroup(nGrpId)
End While
EgtOutLog(" ProjPath:" & sFilePath)
EgtOutLog(" Released:" & DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"))
EgtOutLog(" NbrProjParts:" & nPartInRawsProj.ToString)
' Reimposto la macchina corrente
EgtSetCurrMachGroup(CurrGrpId)
End Sub
End Class