Icarus :
- correzioni per salvataggio file che non sovrascriva il file importato - eliminazione costanti per INI di programma inutili - aggiornamento caption con Title.
This commit is contained in:
@@ -20,27 +20,15 @@ Public Module ConstIni
|
||||
'Public Const K_LICENCE As String = "Licence"
|
||||
'Public Const K_USERLEVEL As String = "UserLevel"
|
||||
'Public Const K_MAXINST As String = "MaxInstances"
|
||||
Public Const K_MAXCAMINST As String = "MaxCamInstances"
|
||||
Public Const K_VIEWOPTIM_INSTANCES As String = "ViewOptimInstances"
|
||||
Public Const K_SUPERVISOR_INSTANCES As String = "SupervisorInstances"
|
||||
'Public Const K_INSTANCES As String = "Instances"
|
||||
'Public Const K_COMMANDLOG As String = "CommandLog"
|
||||
'Public Const K_MESSAGESDIR As String = "MessagesDir"
|
||||
'Public Const K_MESSAGES As String = "Messages"
|
||||
'Public Const K_WINPLACE As String = "WinPlace"
|
||||
'Public Const K_LASTPROJ As String = "LastProj"
|
||||
Public Const K_LASTNGEDIR As String = "LastNgeDir"
|
||||
'Public Const K_AUTOLOADLASTPROJ As String = "AutoLoadLastProj"
|
||||
Public Const K_LASTIMPDIR As String = "LastImpDir"
|
||||
Public Const K_LASTNGEXPDIR As String = "LastNgexpDir"
|
||||
Public Const K_LASTUPDATEDIR As String = "LastUpdateDir"
|
||||
Public Const K_PROJSINDEX As String = "ProjsIndex"
|
||||
Public Const K_PRODSINDEX As String = "ProdsIndex"
|
||||
'Public Const K_SUPPORT As String = "Support"
|
||||
Public Const K_WAREHOUSE As String = "Warehouse"
|
||||
Public Const K_DBADDRESS As String = "DbAddress"
|
||||
Public Const K_DBMASTERKEY As String = "DbMasterKey"
|
||||
Public Const K_UPDATEBTL As String = "UpdateBtl"
|
||||
Public Const K_DATADIR As String = "DataDir"
|
||||
|
||||
'Public Const S_LANGUAGES As String = "Languages"
|
||||
'Public Const K_LANGUAGE As String = "Language"
|
||||
@@ -68,7 +56,6 @@ Public Module ConstIni
|
||||
'Public Const K_MARK As String = "Mark"
|
||||
'Public Const K_SELSURF As String = "SelSurf"
|
||||
'Public Const K_SHOWMODE As String = "ShowMode"
|
||||
Public Const K_SHOWBUILDING As String = "ShowBuilding"
|
||||
'Public Const K_CURVEDIR As String = "CurveDir"
|
||||
'Public Const K_SHOWTRIAADV As String = "ShowTriaAdv"
|
||||
Public Const K_LINEWIDTH As String = "LineWidth"
|
||||
|
||||
@@ -183,7 +183,7 @@ Public Class DispositionPanelVM
|
||||
EgtSelectObj(Map.refTopPanelVM.SelPart.nPartId)
|
||||
End Sub
|
||||
|
||||
Friend Sub UpdateUi()
|
||||
Friend Sub UpdateUI()
|
||||
RefreshPos()
|
||||
If m_bRotating Then
|
||||
m_bRotating = False
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Resources\Icarus.ico</ApplicationIcon>
|
||||
@@ -563,6 +564,9 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\AboutBoxImage.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\TopPanel\Edit.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR64.exe
|
||||
|
||||
@@ -273,12 +273,12 @@ Public Class MainWindowM
|
||||
' Prima istanza
|
||||
m_nInstance = 1
|
||||
' Aggiorno stato istanze attive
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_VIEWOPTIM_INSTANCES, m_nInstance.ToString())
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_INSTANCES, m_nInstance.ToString())
|
||||
Else
|
||||
' Leggo il massimo numero di istanze ammesse
|
||||
Dim nMaxInst As Integer = GetMaxInstances()
|
||||
' Cerco il primo indice di istanza libero
|
||||
Dim nTmp As Integer = GetMainPrivateProfileInt(S_GENERAL, K_VIEWOPTIM_INSTANCES, 0)
|
||||
Dim nTmp As Integer = GetMainPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
|
||||
m_nInstance = 1
|
||||
Dim nMask As Integer = 1
|
||||
While (nTmp And nMask) <> 0 And m_nInstance <= MAX_INST
|
||||
@@ -314,7 +314,7 @@ Public Class MainWindowM
|
||||
End If
|
||||
' Aggiorno stato istanze attive
|
||||
nTmp += (1 << (m_nInstance - 1))
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_VIEWOPTIM_INSTANCES, nTmp.ToString())
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -328,20 +328,14 @@ Public Class MainWindowM
|
||||
Return 1 ' Max(1, Min(nMaxInst, MAX_INST))
|
||||
End Function
|
||||
|
||||
Friend Function GetMaxCamInstances() As Integer
|
||||
' Leggo il massimo numero di istanze ammesse
|
||||
Dim nMaxInst As Integer = GetMainPrivateProfileInt(S_GENERAL, K_MAXCAMINST, 1)
|
||||
Return Max(1, Min(nMaxInst, MAX_INST))
|
||||
End Function
|
||||
|
||||
Friend Sub Close()
|
||||
' Terminazione generale di EgtInterface
|
||||
EgtExit()
|
||||
' Aggiorno istanze usate
|
||||
m_objMutex.WaitOne(1000)
|
||||
Dim nTmp As Integer = GetMainPrivateProfileInt(S_GENERAL, K_VIEWOPTIM_INSTANCES, 0)
|
||||
Dim nTmp As Integer = GetMainPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
|
||||
nTmp -= (1 << (m_nInstance - 1))
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_VIEWOPTIM_INSTANCES, nTmp.ToString())
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
|
||||
m_objMutex.ReleaseMutex()
|
||||
' Rilascio mutex
|
||||
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
|
||||
|
||||
@@ -353,13 +353,13 @@ Public Class ProjManagerVM
|
||||
' Recupero file del progetto corrente
|
||||
Dim sCurrProject As String = String.Empty
|
||||
EgtGetCurrFilePath(sCurrProject)
|
||||
' se nome file vuoto, chiedo se si vuole salvare
|
||||
If String.IsNullOrWhiteSpace(sCurrProject) Then
|
||||
' se nome file vuoto o con estensione non valida, chiedo se si vuole salvare
|
||||
If String.IsNullOrWhiteSpace(sCurrProject) Or EgtGetFileType(sCurrProject) <> FT.NGE Then
|
||||
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
Map.refSceneHostVM.SaveProject()
|
||||
End If
|
||||
EgtGetCurrFilePath(sCurrProject)
|
||||
' se modificato, chiedo se si vuole salvare
|
||||
' se modificato, chiedo se si vuole salvare
|
||||
Else
|
||||
If EgtGetModified() Then
|
||||
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 748 B |
@@ -481,7 +481,7 @@ Public Class RibPanelVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Sub UpdateUi()
|
||||
Friend Sub UpdateUI()
|
||||
' se attiva operazione in piu' passaggi, esco
|
||||
If Map.refSceneHostVM.MainController.GetContinue() Then Return
|
||||
End Sub
|
||||
|
||||
@@ -214,9 +214,6 @@ Public Class MySceneHostVM
|
||||
EgtSetTextureMaxLinPixels(nTxrMaxLinPix)
|
||||
' tipo snap point
|
||||
MainScene.SetSnapPointType(SP.PT_SKETCH)
|
||||
' visualizzazione assemblato
|
||||
Dim nShowBuilding As Boolean = GetMainPrivateProfileInt(S_SCENE, K_SHOWBUILDING, 0) <> 0
|
||||
'Map.refShowBeamPanelVM.SetShowBuilding(nShowBuilding)
|
||||
' nascondo input box
|
||||
'Map.refFreeContourInputVM.ResetInputBox()
|
||||
End Sub
|
||||
@@ -745,7 +742,6 @@ Public Class MySceneHostVM
|
||||
End Sub
|
||||
|
||||
Private Sub OnOpenProject(sender As Object, sFile As String, bOk As Boolean)
|
||||
EgtZoom(ZM.ALL)
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_LASTNGEDIR, Path.GetDirectoryName(sFile))
|
||||
If bOk Then
|
||||
Map.refProjManagerVM.MruFiles.Add(sFile)
|
||||
@@ -783,12 +779,18 @@ Public Class MySceneHostVM
|
||||
Map.refTopPanelVM.PartList.Add(NewPart)
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
|
||||
' seleziono primo pezzo trovato
|
||||
Map.refTopPanelVM.SelFirstPart()
|
||||
|
||||
' Impongo visualizzazione tavola
|
||||
Dim nTabLayerId As Integer = EgtGetFirstNameInGroup( GDB_ID.ROOT, TABLE)
|
||||
EgtSetStatus( nTabLayerId, GDB_ST.ON_)
|
||||
|
||||
' imposto modalita' modifica
|
||||
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
||||
|
||||
EgtZoom(ZM.ALL)
|
||||
|
||||
MainScene.SetStatusNull()
|
||||
End Sub
|
||||
|
||||
@@ -878,12 +880,12 @@ Public Class MySceneHostVM
|
||||
Select Case Map.refTopPanelVM.SelModifyMode.ModifyMode
|
||||
'Case ModifyModes.SELECT_
|
||||
Case ModifyModes.DISPOSITION
|
||||
Map.refDispositionPanelVM.UpdateUi()
|
||||
Map.refDispositionPanelVM.UpdateUI()
|
||||
Case ModifyModes.REFERENCE
|
||||
Case ModifyModes.STARTMACH
|
||||
Map.refStartMachPanelVM.UpdateUi()
|
||||
Map.refStartMachPanelVM.UpdateUI()
|
||||
Case ModifyModes.RIBS
|
||||
Map.refRibPanelVM.UpdateUi()
|
||||
Map.refRibPanelVM.UpdateUI()
|
||||
Case ModifyModes.SHELLNUMBER
|
||||
Case ModifyModes.AUXSOLIDS
|
||||
End Select
|
||||
|
||||
@@ -149,6 +149,8 @@ Public Class SliceManagerVM
|
||||
MessageBox.Show("Error in code generation! See log file.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
End If
|
||||
' Aggiorno intestazione programma
|
||||
Map.refSceneHostVM.EmitTitle()
|
||||
Return bok
|
||||
End Function
|
||||
|
||||
|
||||
@@ -12,13 +12,6 @@ Public Class Printing3DPanelVM
|
||||
End Property
|
||||
|
||||
Sub New()
|
||||
' Inizializzo i bottoni leggendoli da file ini
|
||||
Dim BtnIndex As Integer = 1
|
||||
Dim CurrBtn As ButtonItem = Nothing
|
||||
While GetPrivateProfileButton(S_PRINTING3D, K_BUTTON & BtnIndex, Map.refMainWindowVM.MainWindowM.s3dPrintingDir, CurrBtn)
|
||||
m_ButtonList.Add(CurrBtn)
|
||||
BtnIndex += 1
|
||||
End While
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -351,7 +351,7 @@ Public Class StartMachPanelVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Sub UpdateUi()
|
||||
Friend Sub UpdateUI()
|
||||
' se attiva operazione in piu' passaggi, esco
|
||||
If Map.refSceneHostVM.MainController.GetContinue() Then Return
|
||||
Dim NewEntity As StartEntity = Nothing
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
<Button Grid.Column="1"
|
||||
Command="{Binding MaterialDb_Command}"
|
||||
Style="{StaticResource PrintParamDb_Button}">
|
||||
<Image Source="/Resources/DrawPanel/Line2P.png"/>
|
||||
<Image Source="/Resources/TopPanel/Edit.png"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Border Grid.Column="3"
|
||||
@@ -123,7 +123,7 @@
|
||||
<Button Grid.Column="1"
|
||||
Command="{Binding PrintParamDb_Command}"
|
||||
Style="{StaticResource PrintParamDb_Button}">
|
||||
<Image Source="/Resources/DrawPanel/Line2P.png"/>
|
||||
<Image Source="/Resources/TopPanel/Edit.png"/>
|
||||
</Button>
|
||||
<ToggleButton Grid.Column="2"
|
||||
x:Name="MachiningBtn"
|
||||
|
||||
Reference in New Issue
Block a user