diff --git a/Controller.vb b/Controller.vb index 896ddb7..e9d69e2 100644 --- a/Controller.vb +++ b/Controller.vb @@ -208,7 +208,7 @@ Public Class Controller ResetStatus() m_Scene.ResetStatus(False) ' eseguo - m_Scene.Cursor = Cursors.WaitCursor + Cursor.Current = Cursors.WaitCursor EnableCommandLog() Dim bOk As Boolean = EgtNewFile() If bOk And bCreatePart Then @@ -224,10 +224,11 @@ Public Class Controller EgtResetModified() End If DisableCommandLog() + ' Aggiornamento RaiseEvent UpdateUI(Me, True) + Cursor.Current = Cursors.Default ' Gestione risultato RaiseEvent OnNewProject(Me, bOk) - m_Scene.Cursor = Cursors.Default Return bOk End Function @@ -256,15 +257,15 @@ Public Class Controller ' Prima del caricamento RaiseEvent OnOpeningProject(Me) ' Caricamento del progetto - m_Scene.Cursor = Cursors.WaitCursor + Cursor.Current = Cursors.WaitCursor EnableCommandLog() Dim bOk As Boolean = EgtOpenFile(sFile) DisableCommandLog() ' Aggiornamento RaiseEvent UpdateUI(Me, True) + Cursor.Current = Cursors.Default ' Gestione risultato RaiseEvent OnOpenProject(Me, sFile, bOk) - m_Scene.Cursor = Cursors.Default Return bOk End Function @@ -288,7 +289,7 @@ Public Class Controller End If 'Inserimento del progetto Dim bOk As Boolean = False - m_Scene.Cursor = Cursors.WaitCursor + Cursor.Current = Cursors.WaitCursor EnableCommandLog() Dim nFileType As Integer = EgtGetFileType(sFile) If nFileType = FT.DXF Then @@ -304,9 +305,9 @@ Public Class Controller DisableCommandLog() ' Aggiornamento RaiseEvent UpdateUI(Me, True) + Cursor.Current = Cursors.Default ' Gestione risultato RaiseEvent OnInsertedProject(Me, sFile, bOk) - m_Scene.Cursor = Cursors.Default Return bOk End Function @@ -318,13 +319,13 @@ Public Class Controller ' Prima del salvataggio RaiseEvent OnSavingProject(Me, sCurrFile) ' Salvataggio del progetto - m_Scene.Cursor = Cursors.WaitCursor + Cursor.Current = Cursors.WaitCursor EnableCommandLog() Dim bOk As Boolean = EgtSaveFile(sCurrFile, nType) DisableCommandLog() - m_Scene.Cursor = Cursors.Default ' Aggiorno RaiseEvent UpdateUI(Me, False) + Cursor.Current = Cursors.Default ' Gestione risultato RaiseEvent OnSavedProject(Me, sCurrFile, bOk) Return bOk @@ -351,13 +352,13 @@ Public Class Controller 'Prima del salvataggio RaiseEvent OnSavingProject(Me, sFileName) 'Salvataggio del progetto - m_Scene.Cursor = Cursors.WaitCursor + Cursor.Current = Cursors.WaitCursor EnableCommandLog() Dim bOk As Boolean = EgtSaveFile(sFileName, nType) DisableCommandLog() - m_Scene.Cursor = Cursors.Default 'Aggiorno RaiseEvent UpdateUI(Me, False) + Cursor.Current = Cursors.Default 'Gestione risultato RaiseEvent OnSavedProject(Me, sFileName, bOk) Return bOk @@ -404,13 +405,13 @@ Public Class Controller 'Prima del salvataggio RaiseEvent OnSavingObject(Me, sFileName) 'Salvataggio dell'oggetto con la sua ascendenza - m_Scene.Cursor = Cursors.WaitCursor + Cursor.Current = Cursors.WaitCursor EnableCommandLog() Dim bOk As Boolean = EgtSaveObjToFile(nId, sFileName, nType) DisableCommandLog() - m_Scene.Cursor = Cursors.Default 'Aggiorno RaiseEvent UpdateUI(Me, False) + Cursor.Current = Cursors.Default 'Gestione risultato RaiseEvent OnSavedObject(Me, sFileName, bOk) Return bOk @@ -418,9 +419,7 @@ Public Class Controller Public Function ImportProject(Optional ByVal sDir As String = "", Optional ByVal bWithDlg As Boolean = True) As Boolean ' gestisco eventuale file corrente modificato - If Not ManageModified() Then - Return False - End If + If Not ManageModified() Then Return False ' reset controller e scena ResetStatus() m_Scene.ResetStatus(False) @@ -451,11 +450,9 @@ Public Class Controller 'Prima del caricamento Dim nFlag As Integer = 0 RaiseEvent OnImportingProject(Me, nFileType, nFlag) - If Not bOkType Then - Return False - End If + If Not bOkType Then Return False 'Pulizia GeomDB - m_Scene.Cursor = Cursors.WaitCursor + Cursor.Current = Cursors.WaitCursor 'Importazione EnableCommandLog() Dim bOk As Boolean = EgtNewFile() @@ -474,9 +471,9 @@ Public Class Controller DisableCommandLog() ' Aggiornamento RaiseEvent UpdateUI(Me, True) + Cursor.Current = Cursors.Default ' Gestione risultato RaiseEvent OnImportedProject(Me, sFile, bOk) - m_Scene.Cursor = Cursors.Default Return bOk End Function @@ -503,7 +500,7 @@ Public Class Controller 'Prima dell'esportazione RaiseEvent OnExportingProject(Me) 'Esportazione del progetto - m_Scene.Cursor = Cursors.WaitCursor + Cursor.Current = Cursors.WaitCursor EnableCommandLog() Dim bOk As Boolean = False If nFileType = FT.DXF Then @@ -515,9 +512,9 @@ Public Class Controller m_nImgWidth, m_nImgHeight, sFileName) End If DisableCommandLog() - m_Scene.Cursor = Cursors.Default 'Aggiornamento RaiseEvent UpdateUI(Me, False) + Cursor.Current = Cursors.Default 'Gestione risultato RaiseEvent OnExportedProject(Me, sFileName, bOk) Return bOk @@ -553,7 +550,7 @@ Public Class Controller 'Prima dell'esecuzione RaiseEvent OnExecutingScript(Me) 'Esecuzione - m_Scene.Cursor = Cursors.WaitCursor + Cursor.Current = Cursors.WaitCursor EnableCommandLog() Dim bOk As Boolean = False If sExt = ".LUA" Then @@ -562,9 +559,9 @@ Public Class Controller bOk = EgtTscExecFile(sFile) End If DisableCommandLog() - m_Scene.Cursor = Cursors.Default ' Aggiornamento RaiseEvent UpdateUI(Me, True) + Cursor.Current = Cursors.Default 'Gestione risultato Dim sError As String = String.Empty If Not bOk Then @@ -4026,9 +4023,11 @@ Public Class Controller EgtGetCalcColor(EgtGetLastSelectedObj(), colObj) SetInputBoxInteger(colObj.A) Case 1 - ' non accetto valori inferiori a 10 (troppo trasparente) - If m_nLast < 10 Then + ' non accetto valori fuori dall'intervallo 10-100 a parte 0 + If m_nLast <> 0 And m_nLast < 10 Then m_nLast = 10 + ElseIf m_nLast > 100 Then + m_nLast = 100 End If ' assegnazione trasparenza EnableCommandLog() diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 4cce284..ab5c0b6 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -46,5 +46,5 @@ Imports System.Runtime.InteropServices ' utilizzando l'asterisco (*) come descritto di seguito: ' - - + +