Compare commits
108 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 52461712a8 | |||
| a814b83e87 | |||
| 316374761d | |||
| a53f9ff352 | |||
| 5d32bb9ddf | |||
| 8006b66a01 | |||
| a97f84f49b | |||
| 98a16e0828 | |||
| e4390636fe | |||
| faa6bd2b8c | |||
| dd8be77fb5 | |||
| 301ec52bf3 | |||
| ee5a14a8f8 | |||
| dbc2b88e51 | |||
| 11a270febf | |||
| 03f8312a3d | |||
| 61310b1579 | |||
| ac9f8354cc | |||
| 1d65a311f3 | |||
| 3fb5e636bf | |||
| 621bd11b3d | |||
| 22941facd2 | |||
| 90a898f25a | |||
| 062c19ff6f | |||
| ef29a33418 | |||
| ab097ff0f0 | |||
| 68ccdd17bd | |||
| 41f5c23479 | |||
| 04d76a6f62 | |||
| 72cfd8ff7d | |||
| 8284811a4b | |||
| 4143ea0389 | |||
| a4202d0be1 | |||
| 2730d1ad32 | |||
| a6492ac6e1 | |||
| 1fb0c4bd09 | |||
| 5f71f7dfa3 | |||
| 86b2e011e0 | |||
| b16d860805 | |||
| 774c64678f | |||
| 34472efbc2 | |||
| 6ddc0f305b | |||
| 9edda7ead3 | |||
| a6890f804a | |||
| 9b89b68684 | |||
| bdc22318dc | |||
| 0c1e267540 | |||
| afe4769bf0 | |||
| da9c0416c5 | |||
| 9dc427da4d | |||
| fe403db43a | |||
| ac48e9c706 | |||
| e4c76f8d88 | |||
| 0a59263410 | |||
| f507d0be44 | |||
| d2c87c76b5 | |||
| a4c6de1bee | |||
| b4b3447730 | |||
| 1c1ef08caf | |||
| c7068ddac5 | |||
| 07cabcf3d4 | |||
| dd9cf064b2 | |||
| 27fb494f66 | |||
| 32cff06df5 | |||
| 07e19039ea | |||
| 8fe9728eb5 | |||
| 336f8b73e8 | |||
| b2d793b61b | |||
| 98c29fc84a | |||
| d3d7fbacd4 | |||
| 201cf2ddf1 | |||
| cb66dfb636 | |||
| 80c3634506 | |||
| 43bc9d7e59 | |||
| 27ce1ae461 | |||
| 4ab6a1a393 | |||
| 929966c456 | |||
| 65f8b72488 | |||
| d73ca948c9 | |||
| 9bc09a73b2 | |||
| 2ba7424137 | |||
| aea8143807 | |||
| 79151af902 | |||
| 5bf6b4acd4 | |||
| 2c95ccefea | |||
| 0e7764b9df | |||
| c745c69ad2 | |||
| 30a5b5ed49 | |||
| 467874aa93 | |||
| ae2d1e427b | |||
| c12c8f296a | |||
| 901e151399 | |||
| 81711ec12e | |||
| e6ed99afca | |||
| be57be1e27 | |||
| 9853d78cf9 | |||
| f43134d996 | |||
| 3d259cfb9f | |||
| 10bf8719bd | |||
| 9b0ce1a094 | |||
| 47e84044f9 | |||
| a82ded8b77 | |||
| 915e3f32db | |||
| c24f12a208 | |||
| f3a53efa42 | |||
| 1e75e0073c | |||
| e0281a3f46 | |||
| cf07c578a0 |
@@ -15,11 +15,24 @@ Public Class AboutBoxV
|
|||||||
Dim sOpts As String = IniFile.m_nKeyOptions.ToString()
|
Dim sOpts As String = IniFile.m_nKeyOptions.ToString()
|
||||||
KeyLbl.Text = sKey & " - " & sKlev & " - " & sOpts
|
KeyLbl.Text = sKey & " - " & sKlev & " - " & sOpts
|
||||||
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
|
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
|
||||||
Dim sInfo As String = "DataRoot " & IniFile.m_sDataRoot & vbCrLf
|
Dim sInfo As String = If( EgtIsDebug(), "*** Debug Libraries ***" & vbCrLf, "")
|
||||||
|
sInfo &= "DataRoot " & IniFile.m_sDataRoot & vbCrLf
|
||||||
sInfo &= "Doors " & IniFile.m_sDoorsDirPath & vbCrLf
|
sInfo &= "Doors " & IniFile.m_sDoorsDirPath & vbCrLf
|
||||||
If OptionModule.m_MaterialList.Count = 1 Then
|
If OptionModule.m_MaterialList.Count = 1 Then
|
||||||
sInfo &= "Material " & OptionModule.m_MaterialList(0).Name
|
sInfo &= "Material " & OptionModule.m_MaterialList(0).Name
|
||||||
End If
|
End If
|
||||||
|
Dim sOpSys As String = String.Empty
|
||||||
|
EgtGetOsInfo( sOpSys)
|
||||||
|
sInfo &= sOpSys & Environment.NewLine
|
||||||
|
Dim sCPU As String = String.Empty
|
||||||
|
EgtGetCpuInfo( sCPU)
|
||||||
|
sInfo &= sCPU & Environment.NewLine
|
||||||
|
Dim sMem As String = String.Empty
|
||||||
|
EgtGetMemoryInfo( sMem)
|
||||||
|
sInfo &= sMem & Environment.NewLine
|
||||||
|
Dim sScene As String = String.Empty
|
||||||
|
EgtGetSceneInfo(sScene)
|
||||||
|
sInfo &= sScene
|
||||||
InfoLbl.Text = sInfo
|
InfoLbl.Text = sInfo
|
||||||
ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok
|
ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
+8
-3
@@ -9,10 +9,15 @@ Class Application
|
|||||||
MyBase.OnStartup(e)
|
MyBase.OnStartup(e)
|
||||||
ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
|
ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
|
||||||
' Creo la View principale
|
' Creo la View principale
|
||||||
Me.MainWindow = New MainWindowV
|
Me.MainWindow = New MainWindowV(e.Args)
|
||||||
System.Windows.Forms.Integration.ElementHost.EnableModelessKeyboardInterop(Me.MainWindow)
|
System.Windows.Forms.Integration.ElementHost.EnableModelessKeyboardInterop(Me.MainWindow)
|
||||||
' Mostro la View principale
|
If OptionModule.AdjustDDT Then
|
||||||
Me.MainWindow.Show()
|
Me.MainWindow.Hide()
|
||||||
|
Else
|
||||||
|
Me.MainWindow.Show()
|
||||||
|
End If
|
||||||
|
'' Mostro la View principale
|
||||||
|
'Me.MainWindow.Show()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
+87
-15
@@ -31,6 +31,13 @@ Public Class Assembly
|
|||||||
' tutte queste proprietà interagiscono direttamente con le dimensioni del TELAIO
|
' tutte queste proprietà interagiscono direttamente con le dimensioni del TELAIO
|
||||||
' per questo motivo la funzione set può ospitare la chiamata ad una funzione che modifica le dimensioni della porta
|
' per questo motivo la funzione set può ospitare la chiamata ad una funzione che modifica le dimensioni della porta
|
||||||
|
|
||||||
|
Private m_AssemblyUnit As String = ConstGen.VAL_INCHES
|
||||||
|
Public ReadOnly Property AssemblyUnit As String
|
||||||
|
Get
|
||||||
|
Return m_AssemblyUnit
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#Region "GENERAL"
|
#Region "GENERAL"
|
||||||
|
|
||||||
#Region "Light Up/Bottom"
|
#Region "Light Up/Bottom"
|
||||||
@@ -1051,6 +1058,8 @@ Public Class Assembly
|
|||||||
If Not File.Exists(sPathDDF) Then
|
If Not File.Exists(sPathDDF) Then
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
' verifico se il file è un template
|
||||||
|
Dim bIsTemplate As Boolean = (Path.GetExtension(sPathDDF).ToLower = ".ddt")
|
||||||
ReadAssembly.FileContent = File.ReadAllLines(sPathDDF)
|
ReadAssembly.FileContent = File.ReadAllLines(sPathDDF)
|
||||||
' se il file esiste ma è vuoto
|
' se il file esiste ma è vuoto
|
||||||
If ReadAssembly.FileContent.Count = 0 Then
|
If ReadAssembly.FileContent.Count = 0 Then
|
||||||
@@ -1073,7 +1082,7 @@ Public Class Assembly
|
|||||||
Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nNothingSelected
|
Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nNothingSelected
|
||||||
Else
|
Else
|
||||||
Map.refSceneManagerVM.EnableRefresh = False
|
Map.refSceneManagerVM.EnableRefresh = False
|
||||||
If ReadAssembly.GetDDFDoor(IndexLine, sErrorInfo) = -1 Then
|
If ReadAssembly.GetDDFDoor(IndexLine, sErrorInfo, bIsTemplate) = -1 Then
|
||||||
' errore nella lettura di un part: blocco tutto
|
' errore nella lettura di un part: blocco tutto
|
||||||
ReadAssembly = Nothing
|
ReadAssembly = Nothing
|
||||||
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = False
|
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = False
|
||||||
@@ -1109,6 +1118,28 @@ Public Class Assembly
|
|||||||
' se non carico nessuna informazione allora non è un assemblato, esco
|
' se non carico nessuna informazione allora non è un assemblato, esco
|
||||||
If IndexLine = 0 Then Return ResultReadingAssembInfo.MissingAssembInfo
|
If IndexLine = 0 Then Return ResultReadingAssembInfo.MissingAssembInfo
|
||||||
|
|
||||||
|
' Measure
|
||||||
|
If IndexLine < FileContent.Count - 1 Then
|
||||||
|
If SearchKey(FileContent(IndexLine), "Unit") Then
|
||||||
|
' leggo le dimemensioni dei Jamb e restituisco la riga successiva
|
||||||
|
IndexLine = GetUnit(IndexLine + 1)
|
||||||
|
If IndexLine = -1 Then
|
||||||
|
' 50102: Failed reading DDF file. Missing needed parameter {0}.
|
||||||
|
sErrorInfo += String.Format(EgtMsg(50102), "measures" + vbCrLf)
|
||||||
|
Return ResultReadingAssembInfo.ErrorInAssembInfo
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
IndexLine = GetUnitFromDoor(IndexLine)
|
||||||
|
If IndexLine = -1 Then
|
||||||
|
' 50102: Failed reading DDF file. Missing needed parameter {0}.
|
||||||
|
sErrorInfo += String.Format(EgtMsg(50102), "measures" + vbCrLf)
|
||||||
|
Return ResultReadingAssembInfo.ErrorInAssembInfo
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
IndexLine = SkipWhiteSpace(IndexLine)
|
||||||
|
If IndexLine = 0 Then Return ResultReadingAssembInfo.MissingAssembInfo
|
||||||
' Size
|
' Size
|
||||||
If IndexLine < FileContent.Count - 1 Then
|
If IndexLine < FileContent.Count - 1 Then
|
||||||
If SearchKey(FileContent(IndexLine), ConstIni.S_SIZE_INI) Then
|
If SearchKey(FileContent(IndexLine), ConstIni.S_SIZE_INI) Then
|
||||||
@@ -1184,7 +1215,7 @@ Public Class Assembly
|
|||||||
If IndexLine < FileContent.Count Then
|
If IndexLine < FileContent.Count Then
|
||||||
If SearchKey(FileContent(IndexLine), ConstIni.S_DOORS_ASSEMBY) Then
|
If SearchKey(FileContent(IndexLine), ConstIni.S_DOORS_ASSEMBY) Then
|
||||||
' assegno ad una variabile il valore in lettura
|
' assegno ad una variabile il valore in lettura
|
||||||
IndexLine = GetValue(IndexLine, ConstIni.S_DOORS_ASSEMBY, m_DoorNumber)
|
IndexLine = GetValue(IndexLine, ConstIni.S_DOORS_ASSEMBY, m_DoorNumber, False)
|
||||||
' assegno il numero di ante
|
' assegno il numero di ante
|
||||||
SetDoorNumber(m_DoorNumber)
|
SetDoorNumber(m_DoorNumber)
|
||||||
If IndexLine = -1 Then
|
If IndexLine = -1 Then
|
||||||
@@ -1237,7 +1268,7 @@ Public Class Assembly
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
' funzione per la ricerca dei valori, restituice la riga successiva
|
' funzione per la ricerca dei valori, restituice la riga successiva
|
||||||
Private Function GetValue(Index As Integer, Name As String, ByRef Var As String) As Integer
|
Private Function GetValue(Index As Integer, Name As String, ByRef Var As String, Optional bConvertUnit As Boolean = True) As Integer
|
||||||
If Index = -1 Then Return -1
|
If Index = -1 Then Return -1
|
||||||
Dim Local_Var As String = GetValueWithKey(FileContent(Index), Name)
|
Dim Local_Var As String = GetValueWithKey(FileContent(Index), Name)
|
||||||
If String.IsNullOrWhiteSpace(Local_Var) Then
|
If String.IsNullOrWhiteSpace(Local_Var) Then
|
||||||
@@ -1245,6 +1276,7 @@ Public Class Assembly
|
|||||||
If Not SearchKey(FileContent(Index), Name) Then Return -1
|
If Not SearchKey(FileContent(Index), Name) Then Return -1
|
||||||
' altrimenti lascia il valore vuoto
|
' altrimenti lascia il valore vuoto
|
||||||
Else
|
Else
|
||||||
|
If bConvertUnit Then ConvertDDFValueIntoCurrentUnit(m_AssemblyUnit, Local_Var)
|
||||||
Var = Local_Var
|
Var = Local_Var
|
||||||
End If
|
End If
|
||||||
Return Index + 1
|
Return Index + 1
|
||||||
@@ -1330,6 +1362,35 @@ Public Class Assembly
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' Unit (Metadati Assembly)
|
||||||
|
Private Function GetUnit(Index As Integer) As Integer
|
||||||
|
If Index = -1 Then Return -1
|
||||||
|
Dim PreviuosIndex As Integer = Index
|
||||||
|
Index = GetValue(Index, "measures", m_AssemblyUnit, False)
|
||||||
|
Return Index
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' Measures (Parametri Door)
|
||||||
|
Private Function GetUnitFromDoor(Index As Integer) As Integer
|
||||||
|
' inizio la ricerca all'interno del file
|
||||||
|
Dim PreviuosIndex As Integer = Index
|
||||||
|
Dim bUnitFound As Boolean = False
|
||||||
|
' cerco la prima porta e recupero la sua unità di misura
|
||||||
|
While Not SearchKey(FileContent(Index), "measures") And Index < FileContent.Count - 1
|
||||||
|
Index += 1
|
||||||
|
End While
|
||||||
|
If SearchKey(FileContent(Index), "measures") Then
|
||||||
|
m_AssemblyUnit = GetValueWithKey(FileContent(Index), "measures")
|
||||||
|
bUnitFound = True
|
||||||
|
End If
|
||||||
|
If bUnitFound Then
|
||||||
|
Index = PreviuosIndex
|
||||||
|
Else
|
||||||
|
Index = -1
|
||||||
|
End If
|
||||||
|
Return Index
|
||||||
|
End Function
|
||||||
|
|
||||||
' Size
|
' Size
|
||||||
Private Function GetSize(Index As Integer) As Integer
|
Private Function GetSize(Index As Integer) As Integer
|
||||||
If Index = -1 Then Return -1
|
If Index = -1 Then Return -1
|
||||||
@@ -1409,10 +1470,11 @@ Public Class Assembly
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
' dopo la lettura delle informazioni dell'assemblato
|
' dopo la lettura delle informazioni dell'assemblato
|
||||||
Private Function GetDDFDoor(IndexLine As Integer, ByRef sErrorInfo As String) As Integer
|
Private Function GetDDFDoor(IndexLine As Integer, ByRef sErrorInfo As String, Optional ByVal bIsTemplate As Boolean = False) As Integer
|
||||||
Dim Line As Integer = IndexLine
|
Dim Line As Integer = IndexLine
|
||||||
While Line < FileContent.Count - 1 AndAlso Not Search3Dots(FileContent(Line))
|
While Line < FileContent.Count - 1 AndAlso Not Search3Dots(FileContent(Line))
|
||||||
Dim Local_PartDoor As New PartDoor
|
Dim Local_PartDoor As New PartDoor
|
||||||
|
Local_PartDoor.IsTemplate = bIsTemplate
|
||||||
Dim Local_Door As New Part(Local_PartDoor)
|
Dim Local_Door As New Part(Local_PartDoor)
|
||||||
' carcio la liste delle propiretà
|
' carcio la liste delle propiretà
|
||||||
'CreateNewPropertiesList(Local_Door.PropertiesList, Local_Door.SelectedMaterial)
|
'CreateNewPropertiesList(Local_Door.PropertiesList, Local_Door.SelectedMaterial)
|
||||||
@@ -2774,7 +2836,7 @@ Public Class Assembly
|
|||||||
If TBoxPar.EnableCopy Then
|
If TBoxPar.EnableCopy Then
|
||||||
TBoxNewPar.SetValue(TBoxPar.Value)
|
TBoxNewPar.SetValue(TBoxPar.Value)
|
||||||
TBoxNewPar.SetIsActive(TBoxPar.IsActive)
|
TBoxNewPar.SetIsActive(TBoxPar.IsActive)
|
||||||
End If
|
End If
|
||||||
ElseIf TypeOf PrecCompo.CompoParamList(IndexParam) Is TextBoxParam AndAlso
|
ElseIf TypeOf PrecCompo.CompoParamList(IndexParam) Is TextBoxParam AndAlso
|
||||||
PrecCompo.CompoParamList(IndexParam).DDFName = NewCompo.CompoParamList(IndexParam).DDFName Then
|
PrecCompo.CompoParamList(IndexParam).DDFName = NewCompo.CompoParamList(IndexParam).DDFName Then
|
||||||
Dim TBoxPar As TextBoxParam = DirectCast(PrecCompo.CompoParamList(IndexParam), TextBoxParam)
|
Dim TBoxPar As TextBoxParam = DirectCast(PrecCompo.CompoParamList(IndexParam), TextBoxParam)
|
||||||
@@ -2796,7 +2858,7 @@ Public Class Assembly
|
|||||||
Dim CBoxNewPar As ComboBoxParam = DirectCast(NewCompo.CompoParamList(IndexParam), ComboBoxParam)
|
Dim CBoxNewPar As ComboBoxParam = DirectCast(NewCompo.CompoParamList(IndexParam), ComboBoxParam)
|
||||||
If CBoxNewPar.EnableCopy Then
|
If CBoxNewPar.EnableCopy Then
|
||||||
CBoxNewPar.SetSelItem(CBoxNewPar.ItemList(CBoxNewPar.ItemList.IndexOf(CBoxPar.SelItem)))
|
CBoxNewPar.SetSelItem(CBoxNewPar.ItemList(CBoxNewPar.ItemList.IndexOf(CBoxPar.SelItem)))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
@@ -3529,9 +3591,14 @@ Public Class Assembly
|
|||||||
If Not bRabbet Then
|
If Not bRabbet Then
|
||||||
'Map.refPartPageVM.CurrPart = Jamb
|
'Map.refPartPageVM.CurrPart = Jamb
|
||||||
CurrCompo = Jamb.AddNewCompo(Map.refCompoPanelVM.CompoTypeList(IndexCompoPanel), True)
|
CurrCompo = Jamb.AddNewCompo(Map.refCompoPanelVM.CompoTypeList(IndexCompoPanel), True)
|
||||||
DirectCast(CurrCompo.CompoParamList(0), ComboBoxParam).SelItem = DirectCast(CurrCompo.CompoParamList(0), ComboBoxParam).ItemList(0)
|
If Not IsNothing(CurrCompo) Then
|
||||||
|
DirectCast(CurrCompo.CompoParamList(0), ComboBoxParam).SelItem = DirectCast(CurrCompo.CompoParamList(0), ComboBoxParam).ItemList(0)
|
||||||
|
Else
|
||||||
|
' 50180=Warning : {0} does not exist.
|
||||||
|
MessageBox.Show(String.Format(EgtMsg(50180), Map.refCompoPanelVM.CompoTypeList(IndexCompoPanel).Name & ".frame"), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
CurrCompo = Jamb.CompoList(IndexCompo)
|
CurrCompo = Jamb.CompoList(IndexCompo)
|
||||||
End If
|
End If
|
||||||
' mofico la componete rabbet
|
' mofico la componete rabbet
|
||||||
If Not IsNothing(CurrCompo) Then
|
If Not IsNothing(CurrCompo) Then
|
||||||
@@ -3670,9 +3737,14 @@ Public Class Assembly
|
|||||||
If Not bRabbet Then
|
If Not bRabbet Then
|
||||||
' lo aggiungo
|
' lo aggiungo
|
||||||
Local_Compo = Jamb.AddNewCompo(Map.refCompoPanelVM.CompoTypeList(CompoListIndex), True)
|
Local_Compo = Jamb.AddNewCompo(Map.refCompoPanelVM.CompoTypeList(CompoListIndex), True)
|
||||||
DirectCast(Local_Compo.CompoParamList(0), ComboBoxParam).SetSelItem(DirectCast(Local_Compo.CompoParamList(0), ComboBoxParam).ItemList(nIndexSide))
|
If Not IsNothing(Local_Compo) Then
|
||||||
|
DirectCast(Local_Compo.CompoParamList(0), ComboBoxParam).SetSelItem(DirectCast(Local_Compo.CompoParamList(0), ComboBoxParam).ItemList(nIndexSide))
|
||||||
|
Else
|
||||||
|
' 50180=Warning : {0} does not exist.
|
||||||
|
MessageBox.Show(String.Format(EgtMsg(50180), Map.refCompoPanelVM.CompoTypeList(CompoListIndex).Name & ".frame"), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
Local_Compo = Jamb.CompoList(IndexCompo)
|
Local_Compo = Jamb.CompoList(IndexCompo)
|
||||||
End If
|
End If
|
||||||
If Not IsNothing(Local_Compo) Then
|
If Not IsNothing(Local_Compo) Then
|
||||||
Dim dVal1 As Double = 0
|
Dim dVal1 As Double = 0
|
||||||
@@ -3735,8 +3807,8 @@ Public Class Assembly
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
' rimuovo dalla lista
|
' rimuovo dalla lista
|
||||||
If bRabbet Then Jamb.CompoList.RemoveAt(IndexCompo)
|
If bRabbet Then Jamb.CompoList.RemoveAt(IndexCompo)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -3763,9 +3835,9 @@ Public Class Assembly
|
|||||||
TextParam.m_Value = DoubleToString(dDeltaT + dThicknessDoor, 4)
|
TextParam.m_Value = DoubleToString(dDeltaT + dThicknessDoor, 4)
|
||||||
End If
|
End If
|
||||||
TextParam.NotifyPropertyChanged("Value")
|
TextParam.NotifyPropertyChanged("Value")
|
||||||
End If
|
End If
|
||||||
' depth
|
' depth
|
||||||
CurrCompoParam = CurrCompo.CompoParamList(2)
|
CurrCompoParam = CurrCompo.CompoParamList(2)
|
||||||
If TypeOf DirectCast(CurrCompoParam, CompoParam) Is TextBoxParam Then
|
If TypeOf DirectCast(CurrCompoParam, CompoParam) Is TextBoxParam Then
|
||||||
Dim TextParam As TextBoxParam = DirectCast(CurrCompoParam, TextBoxParam)
|
Dim TextParam As TextBoxParam = DirectCast(CurrCompoParam, TextBoxParam)
|
||||||
Dim sRabbetDepth As String = sOverlap
|
Dim sRabbetDepth As String = sOverlap
|
||||||
|
|||||||
@@ -415,17 +415,17 @@
|
|||||||
|
|
||||||
<Grid Margin="0,0,0,2" >
|
<Grid Margin="0,0,0,2" >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
<ColumnDefinition Width="20"/>
|
<ColumnDefinition Width="20"/>
|
||||||
<ColumnDefinition Width="10"/>
|
<ColumnDefinition Width="7"/>
|
||||||
<ColumnDefinition Width="{Binding}"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
<ColumnDefinition Width="10"/>
|
<ColumnDefinition Width="7"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="10"/>
|
<ColumnDefinition Width="7"/>
|
||||||
<ColumnDefinition Width="{Binding}"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
<ColumnDefinition Width="10"/>
|
<ColumnDefinition Width="7"/>
|
||||||
<ColumnDefinition Width="20"/>
|
<ColumnDefinition Width="20"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="3*"/>
|
<RowDefinition Height="3*"/>
|
||||||
@@ -566,7 +566,7 @@
|
|||||||
Command="{Binding DataContext.JambBtnCommand,
|
Command="{Binding DataContext.JambBtnCommand,
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||||
CommandParameter="{Binding Type}"
|
CommandParameter="{Binding Type}"
|
||||||
Width="100"
|
Width="140"
|
||||||
Style="{StaticResource DoorButton}"
|
Style="{StaticResource DoorButton}"
|
||||||
IsEnabled="{Binding IsChecked, ElementName=DoorChk}"
|
IsEnabled="{Binding IsChecked, ElementName=DoorChk}"
|
||||||
Grid.Column="0" />
|
Grid.Column="0" />
|
||||||
|
|||||||
@@ -7,6 +7,16 @@ Imports EgtWPFLib5
|
|||||||
Public Class PartDoor
|
Public Class PartDoor
|
||||||
Inherits VMBase
|
Inherits VMBase
|
||||||
|
|
||||||
|
Private m_IsTemplate As Boolean = False
|
||||||
|
Public Property IsTemplate As Boolean
|
||||||
|
Get
|
||||||
|
Return m_IsTemplate
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_IsTemplate = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_Door As Part
|
Private m_Door As Part
|
||||||
Public Property Door As Part
|
Public Property Door As Part
|
||||||
Get
|
Get
|
||||||
|
|||||||
@@ -22,23 +22,25 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<ListBox ItemsSource="{Binding CurrProject.AssemblyList}"
|
|
||||||
SelectedItem="{Binding CurrProject.SelAssemblyName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
<ListBox PreviewMouseWheel="ListBox_PreviewMouseWheel"
|
||||||
Style="{StaticResource DoorListBox}" Name="AssemblyList" Grid.ColumnSpan="2" Margin="0,0,28,0.4" Grid.RowSpan="2">
|
ItemsSource="{Binding CurrProject.AssemblyList}"
|
||||||
|
SelectedItem="{Binding CurrProject.SelAssemblyName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Style="{StaticResource DoorListBox}" Name="AssemblyList" Grid.ColumnSpan="2" Margin="0,0,28,0.4" Grid.RowSpan="2">
|
||||||
<!--SelectionChanged="AssemblyList_SelectedItem"-->
|
<!--SelectionChanged="AssemblyList_SelectedItem"-->
|
||||||
<Interactivity:Interaction.Behaviors>
|
<Interactivity:Interaction.Behaviors>
|
||||||
<EgtDOORCreator:ScrollIntoViewForListBox/>
|
<EgtDOORCreator:ScrollIntoViewForListBox/>
|
||||||
</Interactivity:Interaction.Behaviors>
|
</Interactivity:Interaction.Behaviors>
|
||||||
<ListBox.ItemsPanel>
|
<ListBox.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<VirtualizingStackPanel IsItemsHost="True" Orientation="Horizontal"/>
|
<VirtualizingStackPanel Name="MyVirtual" IsItemsHost="True" Orientation="Horizontal" VirtualizationMode="Recycling"/>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ListBox.ItemsPanel>
|
</ListBox.ItemsPanel>
|
||||||
<ListBox.ItemContainerStyle>
|
<ListBox.ItemContainerStyle>
|
||||||
<Style TargetType="ListBoxItem">
|
<Style TargetType="ListBoxItem">
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="ListBoxItem">
|
<ControlTemplate TargetType="ListBoxItem">
|
||||||
<ContentPresenter/>
|
<ContentPresenter/>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
@@ -53,7 +55,7 @@
|
|||||||
Style="{StaticResource {x:Type ToggleButton}}"
|
Style="{StaticResource {x:Type ToggleButton}}"
|
||||||
IsChecked="{Binding Path=IsSelected, RelativeSource={
|
IsChecked="{Binding Path=IsSelected, RelativeSource={
|
||||||
RelativeSource AncestorType={x:Type ListBoxItem}}}">
|
RelativeSource AncestorType={x:Type ListBoxItem}}}">
|
||||||
<RadioButton.Content>
|
<RadioButton.Content>
|
||||||
<TextBlock Text="{Binding GraphicName}"/>
|
<TextBlock Text="{Binding GraphicName}"/>
|
||||||
</RadioButton.Content>
|
</RadioButton.Content>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
@@ -68,7 +70,7 @@
|
|||||||
Focusable="False" Grid.RowSpan="2">
|
Focusable="False" Grid.RowSpan="2">
|
||||||
<Image Source="/Resources/TopCommandBar/Add.png" Stretch="Uniform"/>
|
<Image Source="/Resources/TopCommandBar/Add.png" Stretch="Uniform"/>
|
||||||
<!--<Image Source="/Resources/TopCommandBar/NewFile.png" Stretch="Uniform"/>-->
|
<!--<Image Source="/Resources/TopCommandBar/NewFile.png" Stretch="Uniform"/>-->
|
||||||
</Button>
|
</Button>
|
||||||
<Button Grid.Column="2"
|
<Button Grid.Column="2"
|
||||||
Height="20" Width="20" VerticalAlignment="Center"
|
Height="20" Width="20" VerticalAlignment="Center"
|
||||||
Margin="0,5,4.8,5.4" Command="{Binding RemoveAssembly_Command}"
|
Margin="0,5,4.8,5.4" Command="{Binding RemoveAssembly_Command}"
|
||||||
@@ -76,7 +78,7 @@
|
|||||||
Focusable="False" Grid.RowSpan="2">
|
Focusable="False" Grid.RowSpan="2">
|
||||||
<Image Source="/Resources/TopCommandBar/Remove.png" Stretch="Uniform"/>
|
<Image Source="/Resources/TopCommandBar/Remove.png" Stretch="Uniform"/>
|
||||||
<!--<Image Source="/Resources/TopCommandBar/Delete.png" Stretch="Uniform"/>-->
|
<!--<Image Source="/Resources/TopCommandBar/Delete.png" Stretch="Uniform"/>-->
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -2,26 +2,46 @@
|
|||||||
|
|
||||||
Private Sub Door_MouseLeftButtonUp(sender As Object, e As MouseButtonEventArgs)
|
Private Sub Door_MouseLeftButtonUp(sender As Object, e As MouseButtonEventArgs)
|
||||||
Dim Item As ListBoxItem = DirectCast(sender, ListBoxItem)
|
Dim Item As ListBoxItem = DirectCast(sender, ListBoxItem)
|
||||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) then
|
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
|
||||||
e.Handled=True
|
e.Handled = True
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Gestisco porta corrente modificata
|
' Gestisco porta corrente modificata
|
||||||
If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified then
|
If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified Then
|
||||||
If Not Map.refAssemblyManagerVM.ManageModified() Then
|
If Not Map.refAssemblyManagerVM.ManageModified() Then
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
Item.IsSelected=Not Map.refAssemblyManagerVM.CurrProject.IsBlockedSelAssemblyName(DirectCast(Item.DataContext, AssemblyName))
|
Item.IsSelected = Not Map.refAssemblyManagerVM.CurrProject.IsBlockedSelAssemblyName(DirectCast(Item.DataContext, AssemblyName))
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' verifico se il progetto cliccato è quello già selezionato
|
' verifico se il progetto cliccato è quello già selezionato
|
||||||
'If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName Is DirectCast(Item.DataContext, AssemblyName) Then
|
'If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName Is DirectCast(Item.DataContext, AssemblyName) Then
|
||||||
' ricarico la porta
|
' ricarico la porta
|
||||||
e.Handled= Map.refAssemblyManagerVM.CurrProject.IsBlockedSelAssemblyName(DirectCast(Item.DataContext, AssemblyName))
|
e.Handled = Map.refAssemblyManagerVM.CurrProject.IsBlockedSelAssemblyName(DirectCast(Item.DataContext, AssemblyName))
|
||||||
'End If
|
'End If
|
||||||
'If IsModified Then
|
'If IsModified Then
|
||||||
' Map.refAssemblyManagerVM.CurrProject.SelAssemblyName = DirectCast(Item.DataContext, AssemblyName)
|
' Map.refAssemblyManagerVM.CurrProject.SelAssemblyName = DirectCast(Item.DataContext, AssemblyName)
|
||||||
'End If
|
'End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ListBox_PreviewMouseWheel(sender As Object, e As MouseWheelEventArgs)
|
||||||
|
Dim MyList As ListBox = DirectCast(sender, ListBox)
|
||||||
|
Dim Index As Integer = 0
|
||||||
|
Dim nCountChildren As Integer = VisualTreeHelper.GetChildrenCount(MyList) - 1
|
||||||
|
Dim MyScroll As ScrollViewer
|
||||||
|
For Index = 0 To nCountChildren
|
||||||
|
If TypeOf VisualTreeHelper.GetChild(MyList, Index) Is ScrollViewer Then
|
||||||
|
MyScroll = DirectCast(VisualTreeHelper.GetChild(MyList, Index), ScrollViewer)
|
||||||
|
If e.Delta > 0 Then
|
||||||
|
MyScroll.LineLeft()
|
||||||
|
Else
|
||||||
|
MyScroll.LineRight()
|
||||||
|
End If
|
||||||
|
e.Handled = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Public Class AssemblyManagerVM
|
|||||||
Private m_VisibilityDoorList As Visibility = Visibility.Collapsed
|
Private m_VisibilityDoorList As Visibility = Visibility.Collapsed
|
||||||
Public Property VisibilityDoorList As Visibility
|
Public Property VisibilityDoorList As Visibility
|
||||||
Get
|
Get
|
||||||
Return m_VisibilityDoorList
|
Return m_VisibilityDoorList
|
||||||
End Get
|
End Get
|
||||||
Set(value As Visibility)
|
Set(value As Visibility)
|
||||||
m_VisibilityDoorList = value
|
m_VisibilityDoorList = value
|
||||||
@@ -81,7 +81,9 @@ Public Class AssemblyManagerVM
|
|||||||
If OptionModule.m_ConfigurationSoftware = ConfigType.Door Then
|
If OptionModule.m_ConfigurationSoftware = ConfigType.Door Then
|
||||||
' ricarico la lista completa degli swing
|
' ricarico la lista completa degli swing
|
||||||
NewAssName.SelAssembly.ListPartDoor(0).Door.SwingTypeList = OptionModule.m_SwingTypeList
|
NewAssName.SelAssembly.ListPartDoor(0).Door.SwingTypeList = OptionModule.m_SwingTypeList
|
||||||
NewAssName.SelAssembly.ListPartDoor(0).Door.SetSwing(OptionModule.m_Swing)
|
If String.IsNullOrEmpty(NewAssName.SelAssembly.ListPartDoor(0).Door.Swing) Then
|
||||||
|
NewAssName.SelAssembly.ListPartDoor(0).Door.SetSwing(OptionModule.m_Swing)
|
||||||
|
End If
|
||||||
DdfFile.WriteDDFPart(NewAssName.SelAssembly.ListPartDoor(0).Door, sTempFile, False, False)
|
DdfFile.WriteDDFPart(NewAssName.SelAssembly.ListPartDoor(0).Door, sTempFile, False, False)
|
||||||
' assegno la porte salvata nel CurrPart.ddf come porta corrente del progetto
|
' assegno la porte salvata nel CurrPart.ddf come porta corrente del progetto
|
||||||
Map.refPartPageVM.CurrPart = NewAssName.SelAssembly.ListPartDoor(0).Door
|
Map.refPartPageVM.CurrPart = NewAssName.SelAssembly.ListPartDoor(0).Door
|
||||||
@@ -157,7 +159,7 @@ Public Class AssemblyManagerVM
|
|||||||
DdfFile.SaveErrorCompo = False
|
DdfFile.SaveErrorCompo = False
|
||||||
End If
|
End If
|
||||||
' controllo che il salvataggio sia andato a buon fine
|
' controllo che il salvataggio sia andato a buon fine
|
||||||
|
|
||||||
If bConfirmSavin Then
|
If bConfirmSavin Then
|
||||||
SavedAssName.IsModified = False
|
SavedAssName.IsModified = False
|
||||||
' ogni progetto salvato è l'ultimo da aprire, anche se il programma è chiuso dall'HardwareManager
|
' ogni progetto salvato è l'ultimo da aprire, anche se il programma è chiuso dall'HardwareManager
|
||||||
@@ -321,18 +323,18 @@ Public Class AssemblyManagerVM
|
|||||||
End Select
|
End Select
|
||||||
Map.refMainWindowVM.selectedWatcher = MainWindowVM.WatcherCalling.NoEvents
|
Map.refMainWindowVM.selectedWatcher = MainWindowVM.WatcherCalling.NoEvents
|
||||||
' se sono in modalità hardware allora esco senza caricare l'elenco delle porte
|
' se sono in modalità hardware allora esco senza caricare l'elenco delle porte
|
||||||
If Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage then Return true
|
If Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage Then Return True
|
||||||
'-------------------------------------------------------------------------------------------------------------------------------------------------
|
'-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
' devo ricalcolare l'elenco delle porte nel progetto corrente:
|
' devo ricalcolare l'elenco delle porte nel progetto corrente:
|
||||||
If OptionModule.m_SingleDoor then Return True
|
If OptionModule.m_SingleDoor Then Return True
|
||||||
' calcolo l'elenco delle porte solo dopo il salvataggio della porta corrente
|
' calcolo l'elenco delle porte solo dopo il salvataggio della porta corrente
|
||||||
If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified then Return true
|
If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified Then Return True
|
||||||
If Not IsNothing( Map.refAssemblyManagerVM.CurrProject) andAlso Not String.IsNullOrEmpty(Map.refAssemblyManagerVM.CurrProject.Name) then
|
If Not IsNothing(Map.refAssemblyManagerVM.CurrProject) AndAlso Not String.IsNullOrEmpty(Map.refAssemblyManagerVM.CurrProject.Name) Then
|
||||||
Dim CurrAssemblyName As String = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name
|
Dim CurrAssemblyName As String = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name
|
||||||
Map.refAssemblyManagerVM.CurrProject.AssemblyList = New ObservableCollection(Of AssemblyName)
|
Map.refAssemblyManagerVM.CurrProject.AssemblyList = New ObservableCollection(Of AssemblyName)
|
||||||
Dim DDFArray()as String = Directory.GetFiles(Map.refAssemblyManagerVM.CurrProject.Name)
|
Dim DDFArray() As String = Directory.GetFiles(Map.refAssemblyManagerVM.CurrProject.Name)
|
||||||
For IndexFile As Integer = 0 to DDFArray.Count - 1
|
For IndexFile As Integer = 0 To DDFArray.Count - 1
|
||||||
If Path.GetExtension(DDFArray(IndexFile)) <> DDF_EXTENSION then
|
If Path.GetExtension(DDFArray(IndexFile)) <> DDF_EXTENSION Then
|
||||||
Continue For
|
Continue For
|
||||||
End If
|
End If
|
||||||
Dim NewAssembly As New AssemblyName
|
Dim NewAssembly As New AssemblyName
|
||||||
@@ -340,12 +342,12 @@ Public Class AssemblyManagerVM
|
|||||||
NewAssembly.IsModified = False
|
NewAssembly.IsModified = False
|
||||||
Map.refAssemblyManagerVM.CurrProject.AssemblyList.Add(NewAssembly)
|
Map.refAssemblyManagerVM.CurrProject.AssemblyList.Add(NewAssembly)
|
||||||
Next
|
Next
|
||||||
If Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) then
|
If Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
|
||||||
Try
|
Try
|
||||||
'Map.refAssemblyManagerVM.CurrProject = LocalCurrProject
|
'Map.refAssemblyManagerVM.CurrProject = LocalCurrProject
|
||||||
'LocalCurrProject.SelAssemblyName = LocalCurrProject.AssemblyList.First(Function(x) x.Name = Local_AssemblyName.Name)
|
'LocalCurrProject.SelAssemblyName = LocalCurrProject.AssemblyList.First(Function(x) x.Name = Local_AssemblyName.Name)
|
||||||
Map.refAssemblyManagerVM.CurrProject = Map.refAssemblyManagerVM.CurrProject
|
Map.refAssemblyManagerVM.CurrProject = Map.refAssemblyManagerVM.CurrProject
|
||||||
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName = Map.refAssemblyManagerVM.CurrProject.AssemblyList.First(Function(x) x.Name = CurrAssemblyName)
|
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName = Map.refAssemblyManagerVM.CurrProject.AssemblyList.First(Function(x) x.Name = CurrAssemblyName)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
EgtOutLog("Aggiornamento Progetto Corrente: impossibile caricare ultima porta")
|
EgtOutLog("Aggiornamento Progetto Corrente: impossibile caricare ultima porta")
|
||||||
End Try
|
End Try
|
||||||
@@ -372,8 +374,8 @@ Public Class AssemblyManagerVM
|
|||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' ricerca il tipo di compoente chiamato
|
' ricerca il tipo di compoente chiamato
|
||||||
@@ -446,7 +448,7 @@ Public Class AssemblyManagerVM
|
|||||||
If Not bBrandExists OrElse Not bFileExists Then
|
If Not bBrandExists OrElse Not bFileExists Then
|
||||||
'' se la compoenente che sto caricando era corretta
|
'' se la compoenente che sto caricando era corretta
|
||||||
'ErrCompo.LoadByDefault = True
|
'ErrCompo.LoadByDefault = True
|
||||||
' se il brand non esiste, ma è selezionato
|
' se il brand non esiste, ma è selezionato
|
||||||
If Not bBrandExists Then
|
If Not bBrandExists Then
|
||||||
ErrCompo.MissingDirectory = True
|
ErrCompo.MissingDirectory = True
|
||||||
ErrCompo.MissingFile = True
|
ErrCompo.MissingFile = True
|
||||||
@@ -752,6 +754,30 @@ Public Class AssemblyManagerVM
|
|||||||
NewList(IndexParam).ErrorInReading = True
|
NewList(IndexParam).ErrorInReading = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ElseIf TypeOf OldList(IndexParam) Is ComboBoxOnOffParam Then
|
||||||
|
Dim OldParam As ComboBoxOnOffParam = DirectCast(OldList(IndexParam), ComboBoxOnOffParam)
|
||||||
|
Dim NewParam As ComboBoxOnOffParam = DirectCast(NewList(IndexParam), ComboBoxOnOffParam)
|
||||||
|
|
||||||
|
If OldParam.ItemList.Count > OldParam.ItemListDDF.Count Then
|
||||||
|
NewParam.ItemList.Add(OldParam.ItemList.Last)
|
||||||
|
NewParam.SetSelItem(NewParam.ItemList.Last)
|
||||||
|
NewList(IndexParam).ErrorInReading = True
|
||||||
|
End If
|
||||||
|
Dim IndexItem As Integer = -1
|
||||||
|
For IndexItem = 0 To OldParam.ItemListDDF.Count - 1
|
||||||
|
If OldParam.SelItem = OldParam.ItemList(IndexItem) Then
|
||||||
|
NewList(IndexParam).ErrorInReading = False
|
||||||
|
NewParam.MissingParameterInReading = OldParam.MissingParameterInReading
|
||||||
|
NewParam.SetSelItem(NewParam.ItemList(IndexItem))
|
||||||
|
If OldParam.ItemList.Count > OldParam.ItemListDDF.Count Then
|
||||||
|
OldParam.ItemList.RemoveAt(OldParam.ItemList.Count - 1)
|
||||||
|
NewParam.ItemList.RemoveAt(NewParam.ItemList.Count - 1)
|
||||||
|
End If
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
NewParam.SetIsActive(OldParam.IsActive)
|
||||||
|
|
||||||
ElseIf TypeOf OldList(IndexParam) Is ComboBoxParam Then
|
ElseIf TypeOf OldList(IndexParam) Is ComboBoxParam Then
|
||||||
Dim OldParam As ComboBoxParam = DirectCast(OldList(IndexParam), ComboBoxParam)
|
Dim OldParam As ComboBoxParam = DirectCast(OldList(IndexParam), ComboBoxParam)
|
||||||
Dim NewParam As ComboBoxParam = DirectCast(NewList(IndexParam), ComboBoxParam)
|
Dim NewParam As ComboBoxParam = DirectCast(NewList(IndexParam), ComboBoxParam)
|
||||||
@@ -774,17 +800,7 @@ Public Class AssemblyManagerVM
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
'ElseIf TypeOf ErrCompo.CompoParamList(IndexParam) Is ComboBoxOnOffParam Then
|
|
||||||
' Dim Param As ComboBoxOnOffParam = DirectCast(ErrCompo.CompoParamList(IndexParam), ComboBoxOnOffParam)
|
|
||||||
' For Each Item In Param.ItemListDDF
|
|
||||||
' If Param.SelItem = Item Then
|
|
||||||
' If Param.ItemList.Count > Param.ItemListDDF.Count Then
|
|
||||||
' Param.ItemList.RemoveAt(Param.ItemList.Count - 1)
|
|
||||||
' End If
|
|
||||||
' Param.ErrorInReading = False
|
|
||||||
' Exit For
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
@@ -965,6 +981,12 @@ Public Class AssemblyManagerVM
|
|||||||
OpenedAssName.IsModified = Part.FirstReadingEdge
|
OpenedAssName.IsModified = Part.FirstReadingEdge
|
||||||
If OptionModule.m_ConfigurationSoftware = ConfigType.Door Then
|
If OptionModule.m_ConfigurationSoftware = ConfigType.Door Then
|
||||||
DdfFile.WriteDDFPart(OpenedAssName.SelAssembly.ListPartDoor(0).Door, sTempFile, True, False)
|
DdfFile.WriteDDFPart(OpenedAssName.SelAssembly.ListPartDoor(0).Door, sTempFile, True, False)
|
||||||
|
If OptionModule.AdjustDDT Then
|
||||||
|
DdfFile.WriteDDFPart(OpenedAssName.SelAssembly.ListPartDoor(0).Door, OptionModule.SaveFileNameFromArgs, True, False)
|
||||||
|
' TERMINO TUTTO SUBITO
|
||||||
|
BlindProgLog("Scrittura file '.ddf' terminata")
|
||||||
|
End
|
||||||
|
End If
|
||||||
' aggiorno elenco quotature
|
' aggiorno elenco quotature
|
||||||
Map.refDimensioningPanelVM.LoadHardwareDimList()
|
Map.refDimensioningPanelVM.LoadHardwareDimList()
|
||||||
ExecDoors(Map.refSceneManagerVM.ProjectScene, sTempFile, False)
|
ExecDoors(Map.refSceneManagerVM.ProjectScene, sTempFile, False)
|
||||||
@@ -1058,7 +1080,7 @@ Public Class AssemblyManagerVM
|
|||||||
|
|
||||||
Public Function ManageModified() As Boolean
|
Public Function ManageModified() As Boolean
|
||||||
' verifico se selezionato esiste e modificato
|
' verifico se selezionato esiste e modificato
|
||||||
If Not IsNothing (m_CurrProject) AndAlso Not IsNothing(m_CurrProject.SelAssemblyName) AndAlso m_CurrProject.SelAssemblyName.IsModified Then
|
If Not IsNothing(m_CurrProject) AndAlso Not IsNothing(m_CurrProject.SelAssemblyName) AndAlso m_CurrProject.SelAssemblyName.IsModified Then
|
||||||
Dim sText As String = String.Format(EgtMsg(50109), Path.GetFileNameWithoutExtension(m_CurrProject.SelAssemblyName.Name))
|
Dim sText As String = String.Format(EgtMsg(50109), Path.GetFileNameWithoutExtension(m_CurrProject.SelAssemblyName.Name))
|
||||||
Select Case MessageBox.Show(sText, "", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
|
Select Case MessageBox.Show(sText, "", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
|
||||||
Case MessageBoxResult.Yes
|
Case MessageBoxResult.Yes
|
||||||
@@ -1289,7 +1311,8 @@ Public Class AssemblyManagerVM
|
|||||||
' creo le Ante
|
' creo le Ante
|
||||||
For IndexDoor As Integer = 0 To nDoorNumber - 1
|
For IndexDoor As Integer = 0 To nDoorNumber - 1
|
||||||
Dim Type As String = ConstGen.PART_DO_ & IndexDoor + 1
|
Dim Type As String = ConstGen.PART_DO_ & IndexDoor + 1
|
||||||
If IsNothing(ReserchPartDoor(Type)) Then
|
Dim _PartDoor As PartDoor = ReserchPartDoor(Type)
|
||||||
|
If IsNothing(_PartDoor) Then
|
||||||
Dim Local_PartDoor As New PartDoor
|
Dim Local_PartDoor As New PartDoor
|
||||||
Local_PartDoor.Door = New Part(Local_PartDoor)
|
Local_PartDoor.Door = New Part(Local_PartDoor)
|
||||||
Local_PartDoor.Door.TypePart = Type
|
Local_PartDoor.Door.TypePart = Type
|
||||||
@@ -1299,7 +1322,7 @@ Public Class AssemblyManagerVM
|
|||||||
'CreateNewPropertiesList(Local_PartDoor.Door.PropertiesList, Local_PartDoor.Door.SelectedMaterial)
|
'CreateNewPropertiesList(Local_PartDoor.Door.PropertiesList, Local_PartDoor.Door.SelectedMaterial)
|
||||||
CurrAssembly.ListPartDoor.Add(Local_PartDoor)
|
CurrAssembly.ListPartDoor.Add(Local_PartDoor)
|
||||||
Else
|
Else
|
||||||
'CurrAssembly.ListPartDoor.Add(ReserchPartDoor(Type))
|
CurrAssembly.ListPartDoor.Add(_PartDoor)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -1596,7 +1619,7 @@ Public Class AssemblyManagerVM
|
|||||||
SaveFileDialog.FileName &= DDF_EXTENSION
|
SaveFileDialog.FileName &= DDF_EXTENSION
|
||||||
End If
|
End If
|
||||||
' verifico che non sia bloccato (in fase di creazione di una nuova porta posso avere il file .lck senza il ddf)
|
' verifico che non sia bloccato (in fase di creazione di una nuova porta posso avere il file .lck senza il ddf)
|
||||||
If Utility.IsFileLocked(Path.GetDirectoryName(SaveFileDialog.FileName), Path.GetFileNameWithoutExtension(SaveFileDialog.FileName)) then
|
If Utility.IsFileLocked(Path.GetDirectoryName(SaveFileDialog.FileName), Path.GetFileNameWithoutExtension(SaveFileDialog.FileName)) Then
|
||||||
If Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
|
If Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
|
||||||
Utility.OutLog("Apertura progetto : " & Map.refAssemblyManagerVM.CurrProject.Name)
|
Utility.OutLog("Apertura progetto : " & Map.refAssemblyManagerVM.CurrProject.Name)
|
||||||
Utility.LockDir(Map.refAssemblyManagerVM.CurrProject.Name, Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.GraphicName)
|
Utility.LockDir(Map.refAssemblyManagerVM.CurrProject.Name, Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.GraphicName)
|
||||||
@@ -1640,7 +1663,7 @@ Public Class AssemblyManagerVM
|
|||||||
' aggiorno la lista
|
' aggiorno la lista
|
||||||
'------------------------------------------------------------------------------------------------------------------------------------------------
|
'------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
' LETTURA DI UN FILE DI TIPO TEMPLATE
|
' LETTURA DI UN FILE DI TIPO TEMPLATE
|
||||||
If ImportTemplate(sImportTemplate) Then
|
If ImportTemplate(sImportTemplate) Then
|
||||||
Utility.OutLog("Apertura progetto : " & Local_AssemblyName.Name)
|
Utility.OutLog("Apertura progetto : " & Local_AssemblyName.Name)
|
||||||
Utility.LockDir(Path.GetDirectoryName(Local_AssemblyName.Name), Path.GetFileNameWithoutExtension(Local_AssemblyName.Name))
|
Utility.LockDir(Path.GetDirectoryName(Local_AssemblyName.Name), Path.GetFileNameWithoutExtension(Local_AssemblyName.Name))
|
||||||
' carico il nome come Assemblato selezionato
|
' carico il nome come Assemblato selezionato
|
||||||
|
|||||||
@@ -17,6 +17,16 @@ Public Class AssemblyName
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_OrigTemplate As String = String.Empty
|
||||||
|
Public Property OrigTemplate As String
|
||||||
|
Get
|
||||||
|
Return m_OrigTemplate
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_OrigTemplate = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_IsModified As Boolean
|
Private m_IsModified As Boolean
|
||||||
Public Property IsModified As Boolean
|
Public Property IsModified As Boolean
|
||||||
Get
|
Get
|
||||||
|
|||||||
@@ -33,7 +33,16 @@
|
|||||||
Command="{Binding DataContext.CompoBtnCommand,
|
Command="{Binding DataContext.CompoBtnCommand,
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||||
CommandParameter="{Binding}"
|
CommandParameter="{Binding}"
|
||||||
Focusable="False"/>
|
Focusable="False">
|
||||||
|
|
||||||
|
<Button.ToolTip>
|
||||||
|
<Image Source="{Binding ImageDoorHardware}"
|
||||||
|
MaxHeight="100"
|
||||||
|
MaxWidth="100"
|
||||||
|
Stretch="Uniform"/>
|
||||||
|
</Button.ToolTip>
|
||||||
|
|
||||||
|
</Button>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
|
|||||||
+105
-4
@@ -6,6 +6,13 @@ Imports System.IO
|
|||||||
Public Class CompoPanelVM
|
Public Class CompoPanelVM
|
||||||
Implements INotifyPropertyChanged
|
Implements INotifyPropertyChanged
|
||||||
|
|
||||||
|
Private m_ErroLoadCompo As String = String.Empty
|
||||||
|
Public ReadOnly Property ErrorLoadCompo As String
|
||||||
|
Get
|
||||||
|
Return m_ErroLoadCompo
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_PageName As String = String.Empty
|
Private m_PageName As String = String.Empty
|
||||||
|
|
||||||
Public ReadOnly Property GoToAssembly As String
|
Public ReadOnly Property GoToAssembly As String
|
||||||
@@ -66,6 +73,7 @@ Public Class CompoPanelVM
|
|||||||
Dim Index As Integer = 1
|
Dim Index As Integer = 1
|
||||||
Dim CompoName As String = String.Empty
|
Dim CompoName As String = String.Empty
|
||||||
Dim CompoNameDDF As String = String.Empty
|
Dim CompoNameDDF As String = String.Empty
|
||||||
|
Dim Image As String = String.Empty
|
||||||
Dim Side As String = String.Empty
|
Dim Side As String = String.Empty
|
||||||
Dim FolderName As String = String.Empty
|
Dim FolderName As String = String.Empty
|
||||||
' Carico un vettore con il nome delle Path delle componenti
|
' Carico un vettore con il nome delle Path delle componenti
|
||||||
@@ -75,26 +83,91 @@ Public Class CompoPanelVM
|
|||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
Dim CompoArray() As String = Directory.GetDirectories(IniFile.m_CompoDir)
|
Dim CompoArray() As String = Directory.GetDirectories(IniFile.m_CompoDir)
|
||||||
|
Dim ListCompoToInsert As New List(Of VerifyCompo)
|
||||||
|
For Ind As Integer = 0 To DdfFile.CompoListOrder.Count - 1
|
||||||
|
ListCompoToInsert.Add(New VerifyCompo(DdfFile.CompoListOrder(Ind), False))
|
||||||
|
Next
|
||||||
|
|
||||||
|
' Verifico che la lista Panel abbia un numero di elementi uguale o minore di quella DDF
|
||||||
|
If OptionModule.m_CompoPaneOrder.Count > DdfFile.CompoListOrder.Count Then
|
||||||
|
Dim ListCompoToShow As New List(Of VerifyCompo)
|
||||||
|
For Ind As Integer = 0 To OptionModule.m_CompoPaneOrder.Count - 1
|
||||||
|
ListCompoToShow.Add(New VerifyCompo(OptionModule.m_CompoPaneOrder(Ind), False))
|
||||||
|
Next
|
||||||
|
' cerco quali sono le componenti in esubero nella lista CompoPane
|
||||||
|
For Each ItemCompoPane As String In DdfFile.CompoListOrder
|
||||||
|
ListCompoToShow.Find(Function(x) x.sName = ItemCompoPane).SetExists(True)
|
||||||
|
Next
|
||||||
|
' recupero i nomi delle componenti non presenti nell'elenco DDF
|
||||||
|
Dim sMissingCompoInDDFList As String = String.Empty
|
||||||
|
For Each Item As VerifyCompo In ListCompoToShow
|
||||||
|
If Not Item.bExists Then
|
||||||
|
If String.IsNullOrEmpty(sMissingCompoInDDFList) Then
|
||||||
|
sMissingCompoInDDFList = Item.sName
|
||||||
|
Else
|
||||||
|
sMissingCompoInDDFList &= ", " & Item.sName
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
m_ErroLoadCompo = "Verify component in CompoPanelOrder: " & sMissingCompoInDDFList
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
' carico i valori dei bottoni con un preciso ordine
|
' carico i valori dei bottoni con un preciso ordine
|
||||||
Dim CompoPanelList As List(Of String) = OptionModule.m_CompoPaneOrder
|
Dim CompoPanelList As List(Of String) = OptionModule.m_CompoPaneOrder
|
||||||
For IndexCompoOrder = 0 To DdfFile.CompoListOrder.Count - 1
|
For IndexCompoOrder = 0 To CompoPanelList.Count() - 1 ' DdfFile.CompoListOrder.Count - 1
|
||||||
For Index = 0 To CompoArray.Count - 1
|
For Index = 0 To CompoArray.Count - 1
|
||||||
' apro ogni directory e cerco un file di testo di nome Config.ini
|
' apro ogni directory e cerco un file di testo di nome Config.ini
|
||||||
Dim CurrCompoPath As String = CompoArray(Index) & "\" & ConstCompo.CONFIGINI_FILE_NAME
|
Dim CurrCompoPath As String = CompoArray(Index) & "\" & ConstCompo.CONFIGINI_FILE_NAME
|
||||||
If File.Exists(CurrCompoPath) Then
|
If File.Exists(CurrCompoPath) Then
|
||||||
|
Image = String.Empty
|
||||||
GetPrivateProfileCompoName(ConstCompo.S_COMPO, ConstCompo.K_NAME, CompoNameDDF, CompoName, CurrCompoPath)
|
GetPrivateProfileCompoName(ConstCompo.S_COMPO, ConstCompo.K_NAME, CompoNameDDF, CompoName, CurrCompoPath)
|
||||||
|
GetPrivateProfileCompoImage(ConstCompo.S_COMPO, ConstCompo.K_IMAGE, Image, CurrCompoPath)
|
||||||
GetPrivateProfileJambSide(S_POSITIONSIDE, K_SIDE, Side, CurrCompoPath)
|
GetPrivateProfileJambSide(S_POSITIONSIDE, K_SIDE, Side, CurrCompoPath)
|
||||||
GetPrivateProfileFolderName(S_TEMPLATE, K_FOLDER_NAME, FolderName, CurrCompoPath)
|
GetPrivateProfileFolderName(S_TEMPLATE, K_FOLDER_NAME, FolderName, CurrCompoPath)
|
||||||
If CompoPanelList(IndexCompoOrder) = CompoNameDDF Then
|
If CompoPanelList(IndexCompoOrder) = CompoNameDDF Then
|
||||||
m_CompoTypeList.Add(New CompoType(CompoName, CompoNameDDF, CompoArray(Index), Side, FolderName))
|
Dim Local_NewCompoType As CompoType
|
||||||
|
If Not String.IsNullOrEmpty(Image) Then
|
||||||
|
Local_NewCompoType = New CompoType(CompoName, CompoNameDDF, CompoArray(Index), Image, Side, FolderName, "wood")
|
||||||
|
Else
|
||||||
|
Local_NewCompoType = New CompoType(CompoName, CompoNameDDF, CompoArray(Index), Side, FolderName)
|
||||||
|
End If
|
||||||
|
m_CompoTypeList.Add(Local_NewCompoType)
|
||||||
|
ListCompoToInsert.Find(Function(x) x.sName = CompoNameDDF).SetExists(True)
|
||||||
' aggiungere il caricamento delle liste
|
' aggiungere il caricamento delle liste
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
|
' verifica nella lista di partenza quali sono i componenti che non sono stati caricati
|
||||||
|
m_ErroLoadCompo = String.Empty
|
||||||
|
' cerco eventuali discrepanze tra la lista DDF e la lista Panel
|
||||||
|
Dim sMissingCompoInPanel As String = String.Empty
|
||||||
|
For nInd As Integer = 0 To ListCompoToInsert.Count - 1
|
||||||
|
Dim DDFCompoName As String = ListCompoToInsert(nInd).sName
|
||||||
|
If IsNothing(CompoPanelList.Find(Function(x) x = DDFCompoName)) Then
|
||||||
|
If String.IsNullOrEmpty(sMissingCompoInPanel) Then
|
||||||
|
sMissingCompoInPanel = "Missing component Panel button: " & vbCrLf & " - " & DDFCompoName
|
||||||
|
Else
|
||||||
|
sMissingCompoInPanel &= vbCrLf & " - " & DDFCompoName
|
||||||
|
End If
|
||||||
|
ListCompoToInsert(nInd).SetExists(True)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' cerco discrepanze tra la lista dei bottoni e direttori
|
||||||
|
For Each Item As VerifyCompo In ListCompoToInsert
|
||||||
|
If Not Item.bExists Then
|
||||||
|
If String.IsNullOrEmpty(m_ErroLoadCompo) Then
|
||||||
|
m_ErroLoadCompo = "Missing component Directory: " & vbCrLf & " - " & Item.sName
|
||||||
|
Else
|
||||||
|
m_ErroLoadCompo &= vbCrLf & " - " & Item.sName
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Not String.IsNullOrEmpty(sMissingCompoInPanel) Then
|
||||||
|
m_ErroLoadCompo &= vbCrLf & sMissingCompoInPanel
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
@@ -215,3 +288,31 @@ Public Class CompoPanelVM
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
Public Class VerifyCompo
|
||||||
|
|
||||||
|
Private m_sName As String
|
||||||
|
Public ReadOnly Property sName As String
|
||||||
|
Get
|
||||||
|
Return m_sName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_bExists As Boolean = False
|
||||||
|
Public ReadOnly Property bExists As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bExists
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub SetExists(Exists As Boolean)
|
||||||
|
m_bExists = Exists
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New(Name As String, Exists As Boolean)
|
||||||
|
m_sName = Name
|
||||||
|
m_bExists = Exists
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
+46
-1
@@ -79,6 +79,28 @@ Public Class CompoType
|
|||||||
m_Path = Path
|
m_Path = Path
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private m_ImageDoorHardware As String
|
||||||
|
Public ReadOnly Property ImageDoorHardware As String
|
||||||
|
Get
|
||||||
|
Return m_ImageDoorHardware
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public Sub SetImageDoorHarware(Image As String)
|
||||||
|
m_ImageDoorHardware = Image
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_ShowToolTipImag As Visibility = Visibility.Collapsed
|
||||||
|
Public ReadOnly Property ShowToolTipImg As Visibility
|
||||||
|
Get
|
||||||
|
If Not String.IsNullOrEmpty(m_ImageDoorHardware) Then
|
||||||
|
m_ShowToolTipImag = Visibility.Visible
|
||||||
|
Else
|
||||||
|
m_ShowToolTipImag = Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
Return m_ShowToolTipImag
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_JambSide As String
|
Private m_JambSide As String
|
||||||
Public ReadOnly Property JambSide As String
|
Public ReadOnly Property JambSide As String
|
||||||
Get
|
Get
|
||||||
@@ -99,6 +121,17 @@ Public Class CompoType
|
|||||||
m_FolderName = FolderName
|
m_FolderName = FolderName
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private m_DDFMaterial As String
|
||||||
|
Public ReadOnly Property DDFMaterial As String
|
||||||
|
Get
|
||||||
|
Return m_DDFMaterial
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub SetDDFMaterial(DDFMaterial As String)
|
||||||
|
m_DDFMaterial = DDFMaterial
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Function LoadListTemplate() As Boolean
|
Public Function LoadListTemplate() As Boolean
|
||||||
FolderList.Clear()
|
FolderList.Clear()
|
||||||
m_HardwareFolderList.Clear()
|
m_HardwareFolderList.Clear()
|
||||||
@@ -114,12 +147,24 @@ Public Class CompoType
|
|||||||
Return other
|
Return other
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Sub New(sName As String, sDDFName As String, sPath As String, sJambSide As String, sFolderName As String)
|
Sub New(sName As String, sDDFName As String, sPath As String, sJambSide As String, sFolderName As String, Optional sDDFMaterial As String = "wood")
|
||||||
m_Name = sName
|
m_Name = sName
|
||||||
m_DDFName = sDDFName
|
m_DDFName = sDDFName
|
||||||
m_Path = sPath
|
m_Path = sPath
|
||||||
m_JambSide = sJambSide
|
m_JambSide = sJambSide
|
||||||
m_FolderName = sFolderName
|
m_FolderName = sFolderName
|
||||||
|
m_DDFMaterial = sDDFMaterial
|
||||||
|
LoadListTemplate()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New(sName As String, sDDFName As String, sPath As String, sImage As String, sJambSide As String, sFolderName As String, Optional sDDFMaterial As String = "wood")
|
||||||
|
m_Name = sName
|
||||||
|
m_DDFName = sDDFName
|
||||||
|
m_Path = sPath
|
||||||
|
m_ImageDoorHardware = sImage
|
||||||
|
m_JambSide = sJambSide
|
||||||
|
m_FolderName = sFolderName
|
||||||
|
m_DDFMaterial = sDDFMaterial
|
||||||
LoadListTemplate()
|
LoadListTemplate()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
+13
-2
@@ -16,6 +16,7 @@ Module ConstCompo
|
|||||||
' Sezioni e chiavi standard del file DDF
|
' Sezioni e chiavi standard del file DDF
|
||||||
Public Const S_GENERALINI As String = "General"
|
Public Const S_GENERALINI As String = "General"
|
||||||
Public Const K_MMUNITSINI As String = "MmUnits"
|
Public Const K_MMUNITSINI As String = "MmUnits"
|
||||||
|
Public Const S_VERSION As String = "version"
|
||||||
Public Const S_PRODUCE As String = "produce"
|
Public Const S_PRODUCE As String = "produce"
|
||||||
Public Const S_MEASURES As String = "measures"
|
Public Const S_MEASURES As String = "measures"
|
||||||
Public Const S_CODE As String = "code"
|
Public Const S_CODE As String = "code"
|
||||||
@@ -47,8 +48,9 @@ Module ConstCompo
|
|||||||
Public Const K_LOCKEDGE As String = "lockedge"
|
Public Const K_LOCKEDGE As String = "lockedge"
|
||||||
Public Const K_HINGEEDGE As String = "hingeedge"
|
Public Const K_HINGEEDGE As String = "hingeedge"
|
||||||
Public Const K_TOP As String = "top"
|
Public Const K_TOP As String = "top"
|
||||||
Public Const K_BOTTOM As String = "bottom"
|
Public Const K_BOTTOM As String = "bottom"
|
||||||
Public Const K_MACHINING As String = "machining"
|
Public Const K_TYPEEDGE As String = "type"
|
||||||
|
Public Const K_MACHINING As String = "machining"
|
||||||
Public Const K_OVERMATERIAL As String = "overmaterial"
|
Public Const K_OVERMATERIAL As String = "overmaterial"
|
||||||
Public Const K_IDCODECOMPONENT As String = "IdCodeComponent"
|
Public Const K_IDCODECOMPONENT As String = "IdCodeComponent"
|
||||||
Public Const K_OTHERDOOR As String = "other_door"
|
Public Const K_OTHERDOOR As String = "other_door"
|
||||||
@@ -59,11 +61,14 @@ Module ConstCompo
|
|||||||
Public Const K_THICKNESS_BOTTOM As String = "thickness bottom"
|
Public Const K_THICKNESS_BOTTOM As String = "thickness bottom"
|
||||||
Public Const K_DEPTH_BOTTOM As String = "depth bottom"
|
Public Const K_DEPTH_BOTTOM As String = "depth bottom"
|
||||||
Public Const K_DELTA_BOTTOM As String = "delta bottom"
|
Public Const K_DELTA_BOTTOM As String = "delta bottom"
|
||||||
|
Public Const K_HARDWARE As String = "hardware"
|
||||||
|
Public Const K_OPTIONS As String = "options"
|
||||||
|
|
||||||
' Nome, sezioni e chiavi del file Config.ini
|
' Nome, sezioni e chiavi del file Config.ini
|
||||||
Public Const CONFIGINI_FILE_NAME As String = "Config.ini"
|
Public Const CONFIGINI_FILE_NAME As String = "Config.ini"
|
||||||
Public Const S_COMPO As String = "Compo"
|
Public Const S_COMPO As String = "Compo"
|
||||||
Public Const K_NAME As String = "Name"
|
Public Const K_NAME As String = "Name"
|
||||||
|
Public Const K_IMAGE As String = "Image"
|
||||||
Public Const S_TEMPLATE As String = "Template"
|
Public Const S_TEMPLATE As String = "Template"
|
||||||
Public Const K_ISACTIVE As String = "IsActive"
|
Public Const K_ISACTIVE As String = "IsActive"
|
||||||
Public Const K_MATERIAL As String = "Material"
|
Public Const K_MATERIAL As String = "Material"
|
||||||
@@ -105,8 +110,12 @@ Module ConstCompo
|
|||||||
|
|
||||||
' Alcune stringhe notevoli dei file DDF
|
' Alcune stringhe notevoli dei file DDF
|
||||||
Public Const DDF_HYPHEN As String = " - "
|
Public Const DDF_HYPHEN As String = " - "
|
||||||
|
Public Const DDF_HYPHEN_2 As String = " - "
|
||||||
|
Public Const DDF_SPACE2 As String = " "
|
||||||
Public Const DDF_SPACE3 As String = " "
|
Public Const DDF_SPACE3 As String = " "
|
||||||
|
Public Const DDF_SPACE4 As String = " "
|
||||||
Public Const DDF_SPACE5 As String = " "
|
Public Const DDF_SPACE5 As String = " "
|
||||||
|
Public Const DDF_SPACE6 As String = " "
|
||||||
Public Const DDF_METADATA As String = "##"
|
Public Const DDF_METADATA As String = "##"
|
||||||
Public Const DDF_ON As String = "ON"
|
Public Const DDF_ON As String = "ON"
|
||||||
Public Const DDF_OFF As String = "OFF"
|
Public Const DDF_OFF As String = "OFF"
|
||||||
@@ -135,9 +144,11 @@ Module ConstCompo
|
|||||||
Public Const INI_COMBOBOX_ONOFF As String = "ComboBoxOnOff"
|
Public Const INI_COMBOBOX_ONOFF As String = "ComboBoxOnOff"
|
||||||
Public Const INI_COMBOBOX_LUA As String = "ComboBoxLua"
|
Public Const INI_COMBOBOX_LUA As String = "ComboBoxLua"
|
||||||
Public Const INI_TEXTBOX As String = "TextBox"
|
Public Const INI_TEXTBOX As String = "TextBox"
|
||||||
|
Public Const INI_TEXTBOX_D As String = "TextBox_d"
|
||||||
Public Const INI_TEXTBOXDGC As String = "TextBoxDGC"
|
Public Const INI_TEXTBOXDGC As String = "TextBoxDGC"
|
||||||
Public Const INI_TEXTBOXTHICKNESS As String = "TextBoxThickness"
|
Public Const INI_TEXTBOXTHICKNESS As String = "TextBoxThickness"
|
||||||
Public Const INI_TEXTBOX_ONOFF As String = "TextBoxOnOff"
|
Public Const INI_TEXTBOX_ONOFF As String = "TextBoxOnOff"
|
||||||
|
Public Const INI_TEXTBOX_ONOFF_D As String = "TextBoxOnOff_d"
|
||||||
Public Const INI_TEXTBOXNGE As String = "TextBoxNge"
|
Public Const INI_TEXTBOXNGE As String = "TextBoxNge"
|
||||||
Public Const INI_TEXTBOXLUA As String = "TextBoxLua"
|
Public Const INI_TEXTBOXLUA As String = "TextBoxLua"
|
||||||
Public Const INI_CHECKBOX As String = "CheckBox"
|
Public Const INI_CHECKBOX As String = "CheckBox"
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ Module ConstGen
|
|||||||
Public Const LIC_FILE_NAME As String = "EgtDOORCreator.lic"
|
Public Const LIC_FILE_NAME As String = "EgtDOORCreator.lic"
|
||||||
Public Const S_LICENCE As String = "Licence"
|
Public Const S_LICENCE As String = "Licence"
|
||||||
Public Const K_KEY As String = "Key"
|
Public Const K_KEY As String = "Key"
|
||||||
|
Public Const K_NETKEY As String = "NetKey"
|
||||||
|
Public Const K_LOCKID As String = "LockId"
|
||||||
|
Public Const K_NESTKEY As String = "NestKey"
|
||||||
|
|
||||||
' File di log generale
|
' File di log generale
|
||||||
Public Const GENLOG_FILE_NAME As String = "EgtDOORCreatorLog#.txt"
|
Public Const GENLOG_FILE_NAME As String = "EgtDOORCreatorLog#.txt"
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ Module ConstIni
|
|||||||
Public Const K_ASKMEAGAINCONFIRM As String = "AskMeAgainConfirm"
|
Public Const K_ASKMEAGAINCONFIRM As String = "AskMeAgainConfirm"
|
||||||
Public Const K_EGTCAMEXE As String = "EgtCam5Exe"
|
Public Const K_EGTCAMEXE As String = "EgtCam5Exe"
|
||||||
Public Const K_REFRESHTIME As String = "RefreshTime"
|
Public Const K_REFRESHTIME As String = "RefreshTime"
|
||||||
|
Public Const K_DDFVERSION As String = "DDFVersion"
|
||||||
|
|
||||||
Public Const S_LANGUAGES As String = "Languages"
|
Public Const S_LANGUAGES As String = "Languages"
|
||||||
Public Const K_LANGUAGE As String = "Language"
|
Public Const K_LANGUAGE As String = "Language"
|
||||||
@@ -89,7 +90,9 @@ Module ConstIni
|
|||||||
Public Const K_DDFFUNCTION As String = "DdfFun"
|
Public Const K_DDFFUNCTION As String = "DdfFun"
|
||||||
Public Const K_MYPROJECTDIR As String = "ProjectDirectory"
|
Public Const K_MYPROJECTDIR As String = "ProjectDirectory"
|
||||||
Public Const K_TEMPLATEDIR As String = "TemplateDirectory"
|
Public Const K_TEMPLATEDIR As String = "TemplateDirectory"
|
||||||
Public Const K_MACHINDIR As String = "MachinDirectory"
|
' Correzione nome Chiave valore ver 2.6k2 "MachineDirectory"
|
||||||
|
Public Const K_MACHINDIR As String = "MachineDirectory"
|
||||||
|
Public Const K_MTABLE As String = "MTable"
|
||||||
|
|
||||||
Public Const S_REPORT As String = "Report"
|
Public Const S_REPORT As String = "Report"
|
||||||
Public Const K_REPORTDIR As String = "ReportDirectory"
|
Public Const K_REPORTDIR As String = "ReportDirectory"
|
||||||
|
|||||||
+323
-160
@@ -64,15 +64,27 @@ Friend Module DdfFile
|
|||||||
Dim Config As String = IniFile.m_sDoorsDirPath
|
Dim Config As String = IniFile.m_sDoorsDirPath
|
||||||
Config = Path.GetFileName(Config)
|
Config = Path.GetFileName(Config)
|
||||||
DdfFileContent.Add("#Config: " & Config)
|
DdfFileContent.Add("#Config: " & Config)
|
||||||
|
' versione 2.6g1: salvo il nome del template da cui è genetato il file corrente
|
||||||
|
If Not String.IsNullOrEmpty(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.OrigTemplate) Then
|
||||||
|
DdfFileContent.Add("#OrigTemplate: " & Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.OrigTemplate)
|
||||||
|
End If
|
||||||
If Not IsNothing(Part.TypePart) Then
|
If Not IsNothing(Part.TypePart) Then
|
||||||
DdfFileContent.Add("#" & PrintTitleDDFPart(Part.TypePart))
|
DdfFileContent.Add("#" & PrintTitleDDFPart(Part.TypePart))
|
||||||
End If
|
End If
|
||||||
DdfFileContent.Add("")
|
DdfFileContent.Add("")
|
||||||
|
' dal 20/04/2023 inserita gestione della versione (da configurare nel programma)
|
||||||
|
If OptionModule.m_sVersionDDF <> "1" Then
|
||||||
|
DdfFileContent.Add("version: " & OptionModule.m_sVersionDDF)
|
||||||
|
End If
|
||||||
|
DdfFileContent.Add("")
|
||||||
|
' definisco se il pezzo deve essere prodotto
|
||||||
DdfFileContent.Add("produce: " & If(Part.IsActive, "true", "false"))
|
DdfFileContent.Add("produce: " & If(Part.IsActive, "true", "false"))
|
||||||
'Genero una lista di stringhe
|
'Genero una lista di stringhe
|
||||||
DdfFileContent.Add("")
|
DdfFileContent.Add("")
|
||||||
If IsNothing(Part.Measure) Then Part.Measure = ConvertMmUnitsToString(OptionModule.m_bIsMmUnit)
|
'If IsNothing(Part.Measure) Then Part.Measure = ConvertMmUnitsToString(OptionModule.m_bIsMmUnit)
|
||||||
DdfFileContent.Add(ConstCompo.S_MEASURES & ": " & Part.Measure)
|
'DdfFileContent.Add(ConstCompo.S_MEASURES & ": " & Part.Measure)
|
||||||
|
DdfFileContent.Add(ConstCompo.S_MEASURES & ": " & ConvertMmUnitsToString(OptionModule.m_bIsMmUnit))
|
||||||
|
|
||||||
' 50200=Unit measure
|
' 50200=Unit measure
|
||||||
CompoDoorReport.CompoParameterList.Add(New ReportParameter(EgtMsg(50200), Part.Measure))
|
CompoDoorReport.CompoParameterList.Add(New ReportParameter(EgtMsg(50200), Part.Measure))
|
||||||
|
|
||||||
@@ -101,52 +113,52 @@ Friend Module DdfFile
|
|||||||
TOrder.Order_ParametersList.Add(New ReportParameter("Door", Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.GraphicName))
|
TOrder.Order_ParametersList.Add(New ReportParameter("Door", Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.GraphicName))
|
||||||
' Probabilmente da cambiare
|
' Probabilmente da cambiare
|
||||||
If Not IsNothing(Part.Customer) Then
|
If Not IsNothing(Part.Customer) Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_CUSTOMER & ": " & Part.Customer)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_CUSTOMER & ": " & Part.Customer)
|
||||||
' 50070=Customer
|
' 50070=Customer
|
||||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50070), Part.Customer))
|
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50070), Part.Customer))
|
||||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50070), Part.Customer))
|
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50070), Part.Customer))
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_CUSTOMER & ": ")
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_CUSTOMER & ": ")
|
||||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50070), ""))
|
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50070), ""))
|
||||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50070), ""))
|
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50070), ""))
|
||||||
End If
|
End If
|
||||||
If Not IsNothing(Part.Elevation) Then
|
If Not IsNothing(Part.Elevation) Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_ELEVATION & ": " & Part.Elevation)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_ELEVATION & ": " & Part.Elevation)
|
||||||
' 50406=Elevation
|
' 50406=Elevation
|
||||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50406), Part.Elevation))
|
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50406), Part.Elevation))
|
||||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50406), Part.Elevation))
|
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50406), Part.Elevation))
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_ELEVATION & ": ")
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_ELEVATION & ": ")
|
||||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50406), ""))
|
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50406), ""))
|
||||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50406), ""))
|
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50406), ""))
|
||||||
End If
|
End If
|
||||||
If Not IsNothing(Part.Project) Then
|
If Not IsNothing(Part.Project) Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_PROJECT & ": " & Part.Project)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_PROJECT & ": " & Part.Project)
|
||||||
' 50407=Project
|
' 50407=Project
|
||||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50407), Part.Project))
|
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50407), Part.Project))
|
||||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50407), Part.Project))
|
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50407), Part.Project))
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_PROJECT & ": ")
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_PROJECT & ": ")
|
||||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50407), ""))
|
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50407), ""))
|
||||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50407), ""))
|
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50407), ""))
|
||||||
End If
|
End If
|
||||||
If Not IsNothing(Part.PO) Then
|
If Not IsNothing(Part.PO) Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_PO & ": " & Part.PO)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_PO & ": " & Part.PO)
|
||||||
' 50408=PO
|
' 50408=PO
|
||||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50408), Part.PO))
|
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50408), Part.PO))
|
||||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50408), Part.PO))
|
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50408), Part.PO))
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_PO & ": ")
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_PO & ": ")
|
||||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50408), ""))
|
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50408), ""))
|
||||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50408), ""))
|
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50408), ""))
|
||||||
End If
|
End If
|
||||||
If Not IsNothing(Part.Line) Then
|
If Not IsNothing(Part.Line) Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_LINE & ": " & Part.Line)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_LINE & ": " & Part.Line)
|
||||||
' 50409=Line
|
' 50409=Line
|
||||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50409), Part.Line))
|
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50409), Part.Line))
|
||||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50409), Part.Line))
|
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50409), Part.Line))
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_LINE & ": ")
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_LINE & ": ")
|
||||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50409), ""))
|
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50409), ""))
|
||||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50409), ""))
|
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50409), ""))
|
||||||
End If
|
End If
|
||||||
@@ -165,9 +177,9 @@ Friend Module DdfFile
|
|||||||
' il posizionamento della prima porta sta nell'origine
|
' il posizionamento della prima porta sta nell'origine
|
||||||
If Part.TypePart = ConstGen.PART_DO_ & "1" Then
|
If Part.TypePart = ConstGen.PART_DO_ & "1" Then
|
||||||
DdfFileContent.Add("position: ")
|
DdfFileContent.Add("position: ")
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "x: " & "0")
|
DdfFileContent.Add(m_sSpace1Tab & "x: " & "0")
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "y: " & "0")
|
DdfFileContent.Add(m_sSpace1Tab & "y: " & "0")
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "z: " & "0")
|
DdfFileContent.Add(m_sSpace1Tab & "z: " & "0")
|
||||||
ElseIf Part.TypePart = ConstGen.PART_DO_ & "2" Then
|
ElseIf Part.TypePart = ConstGen.PART_DO_ & "2" Then
|
||||||
' si trova traslata verso destra dello spessore DO_1 sommato a LightLock"
|
' si trova traslata verso destra dello spessore DO_1 sommato a LightLock"
|
||||||
Dim x_DO_1 As Double = 0.0
|
Dim x_DO_1 As Double = 0.0
|
||||||
@@ -179,30 +191,30 @@ Friend Module DdfFile
|
|||||||
StringToDouble(Map.refAssemblyPageVM.CurrAssembly.LightLock, dLightLock)
|
StringToDouble(Map.refAssemblyPageVM.CurrAssembly.LightLock, dLightLock)
|
||||||
Dim x As String = DoubleToString(x_DO_1 + dLightLock, 4)
|
Dim x As String = DoubleToString(x_DO_1 + dLightLock, 4)
|
||||||
DdfFileContent.Add("position: ")
|
DdfFileContent.Add("position: ")
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "x: " & x)
|
DdfFileContent.Add(m_sSpace1Tab & "x: " & x)
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "y: " & "0")
|
DdfFileContent.Add(m_sSpace1Tab & "y: " & "0")
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "z: " & "0")
|
DdfFileContent.Add(m_sSpace1Tab & "z: " & "0")
|
||||||
' Jamb Sinistro serratura
|
' Jamb Sinistro serratura
|
||||||
ElseIf Part.TypePart.Contains(ConstGen.PART_FRAME_LEFT) Then
|
ElseIf Part.TypePart.Contains(ConstGen.PART_FRAME_LEFT) Then
|
||||||
DdfFileContent.Add("position: ")
|
DdfFileContent.Add("position: ")
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "x: " & PositionJamb_X(Part))
|
DdfFileContent.Add(m_sSpace1Tab & "x: " & PositionJamb_X(Part))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "y: " & PositionJamb_Y(Part))
|
DdfFileContent.Add(m_sSpace1Tab & "y: " & PositionJamb_Y(Part))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "z: " & PositionJamb_Z(Part))
|
DdfFileContent.Add(m_sSpace1Tab & "z: " & PositionJamb_Z(Part))
|
||||||
ElseIf Part.TypePart.Contains(ConstGen.PART_FRAME_RIGHT) Then
|
ElseIf Part.TypePart.Contains(ConstGen.PART_FRAME_RIGHT) Then
|
||||||
DdfFileContent.Add("position: ")
|
DdfFileContent.Add("position: ")
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "x: " & PositionJamb_X(Part))
|
DdfFileContent.Add(m_sSpace1Tab & "x: " & PositionJamb_X(Part))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "y: " & PositionJamb_Y(Part))
|
DdfFileContent.Add(m_sSpace1Tab & "y: " & PositionJamb_Y(Part))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "z: " & PositionJamb_Z(Part))
|
DdfFileContent.Add(m_sSpace1Tab & "z: " & PositionJamb_Z(Part))
|
||||||
ElseIf Part.TypePart.Contains(ConstGen.PART_FRAME_TOP) Then
|
ElseIf Part.TypePart.Contains(ConstGen.PART_FRAME_TOP) Then
|
||||||
DdfFileContent.Add("position: ")
|
DdfFileContent.Add("position: ")
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "x: " & PositionJamb_X(Part))
|
DdfFileContent.Add(m_sSpace1Tab & "x: " & PositionJamb_X(Part))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "y: " & PositionJamb_Y(Part))
|
DdfFileContent.Add(m_sSpace1Tab & "y: " & PositionJamb_Y(Part))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "z: " & PositionJamb_Z(Part))
|
DdfFileContent.Add(m_sSpace1Tab & "z: " & PositionJamb_Z(Part))
|
||||||
ElseIf Part.TypePart.Contains(ConstGen.PART_FRAME_BOTTOM) Then
|
ElseIf Part.TypePart.Contains(ConstGen.PART_FRAME_BOTTOM) Then
|
||||||
DdfFileContent.Add("position: ")
|
DdfFileContent.Add("position: ")
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "x: " & PositionJamb_X(Part))
|
DdfFileContent.Add(m_sSpace1Tab & "x: " & PositionJamb_X(Part))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "y: " & PositionJamb_Y(Part))
|
DdfFileContent.Add(m_sSpace1Tab & "y: " & PositionJamb_Y(Part))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "z: " & PositionJamb_Z(Part))
|
DdfFileContent.Add(m_sSpace1Tab & "z: " & PositionJamb_Z(Part))
|
||||||
End If
|
End If
|
||||||
DdfFileContent.Add("")
|
DdfFileContent.Add("")
|
||||||
End If
|
End If
|
||||||
@@ -216,9 +228,9 @@ Friend Module DdfFile
|
|||||||
Return
|
Return
|
||||||
Else
|
Else
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_WIDTH & ": " & DoubleToString(dVal, 5))
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_WIDTH & ": " & DoubleToString(dVal, 5))
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_WIDTH & ": " & Part.Width)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_WIDTH & ": " & Part.Width)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' 50001=Width
|
' 50001=Width
|
||||||
@@ -230,9 +242,9 @@ Friend Module DdfFile
|
|||||||
Return
|
Return
|
||||||
Else
|
Else
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_HEIGHT & ": " & DoubleToString(dVal, 5))
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HEIGHT & ": " & DoubleToString(dVal, 5))
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_HEIGHT & ": " & Part.Height)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HEIGHT & ": " & Part.Height)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' 50002=Height
|
' 50002=Height
|
||||||
@@ -244,9 +256,9 @@ Friend Module DdfFile
|
|||||||
Return
|
Return
|
||||||
Else
|
Else
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_THICKNESS & ": " & DoubleToString(dVal, 5))
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_THICKNESS & ": " & DoubleToString(dVal, 5))
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_THICKNESS & ": " & Part.Thickness)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_THICKNESS & ": " & Part.Thickness)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' 50003=Thickness
|
' 50003=Thickness
|
||||||
@@ -355,53 +367,68 @@ Friend Module DdfFile
|
|||||||
DdfFileContent.Add("" & ConstCompo.S_PROFILES & ":")
|
DdfFileContent.Add("" & ConstCompo.S_PROFILES & ":")
|
||||||
Dim TProfile As New TableProfile
|
Dim TProfile As New TableProfile
|
||||||
Dim BevelDDF As String = SetBevel(Part.TypePart, Part.LockEdgeType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name, Part.InvertBevel)
|
Dim BevelDDF As String = SetBevel(Part.TypePart, Part.LockEdgeType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name, Part.InvertBevel)
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_LOCKEDGE & ": " & BevelDDF)
|
If OptionModule.m_sVersionDDF = "2" Then ' K_TYPE
|
||||||
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_LOCKEDGE & ": ")
|
||||||
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_TYPEEDGE & ": " & BevelDDF)
|
||||||
|
Else
|
||||||
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_LOCKEDGE & ": " & BevelDDF)
|
||||||
|
End If
|
||||||
' 50005=Lock edge
|
' 50005=Lock edge
|
||||||
CompoDoorReport.CompoParameterList.Add(New ReportParameter(EgtMsg(50005), BevelDDF))
|
CompoDoorReport.CompoParameterList.Add(New ReportParameter(EgtMsg(50005), BevelDDF))
|
||||||
TProfile.Profile_ParametersList.Add(New ReportParameter(EgtMsg(50005), BevelDDF))
|
TProfile.Profile_ParametersList.Add(New ReportParameter(EgtMsg(50005), BevelDDF))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.LockEdgeMachining))
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.LockEdgeMachining))
|
||||||
If Not StringToDouble(Part.LockEdgeOverMaterial, dVal) Then
|
If Not StringToDouble(Part.LockEdgeOverMaterial, dVal) Then
|
||||||
MessageBox.Show(String.Format(EgtMsg(50141), K_LOCKEDGEOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(String.Format(EgtMsg(50141), K_LOCKEDGEOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
Return
|
Return
|
||||||
Else
|
Else
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & Part.LockEdgeOverMaterial)
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & Part.LockEdgeOverMaterial)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
BevelDDF = SetBevel(Part.TypePart, Part.HingeEdgeType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name)
|
BevelDDF = SetBevel(Part.TypePart, Part.HingeEdgeType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name)
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_HINGEEDGE & ": " & BevelDDF)
|
If OptionModule.m_sVersionDDF = "2" Then
|
||||||
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HINGEEDGE & ": ")
|
||||||
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_TYPEEDGE & ": " & BevelDDF)
|
||||||
|
Else
|
||||||
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HINGEEDGE & ": " & BevelDDF)
|
||||||
|
End If
|
||||||
' 50006=Hinge edge
|
' 50006=Hinge edge
|
||||||
CompoDoorReport.CompoParameterList.Add(New ReportParameter(EgtMsg(50006), BevelDDF))
|
CompoDoorReport.CompoParameterList.Add(New ReportParameter(EgtMsg(50006), BevelDDF))
|
||||||
TProfile.Profile_ParametersList.Add(New ReportParameter(EgtMsg(50006), BevelDDF))
|
TProfile.Profile_ParametersList.Add(New ReportParameter(EgtMsg(50006), BevelDDF))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.HingeEdgeMachining))
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.HingeEdgeMachining))
|
||||||
If Not StringToDouble(Part.HingeEdgeOverMaterial, dVal) Then
|
If Not StringToDouble(Part.HingeEdgeOverMaterial, dVal) Then
|
||||||
MessageBox.Show(String.Format(EgtMsg(50141), K_HINGEDGEOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(String.Format(EgtMsg(50141), K_HINGEDGEOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
Return
|
Return
|
||||||
Else
|
Else
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & Part.HingeEdgeOverMaterial)
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & Part.HingeEdgeOverMaterial)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
BevelDDF = SetBevel(Part.TypePart, Part.TopType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name)
|
BevelDDF = SetBevel(Part.TypePart, Part.TopType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name)
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_TOP & ": " & BevelDDF)
|
If OptionModule.m_sVersionDDF = "2" Then
|
||||||
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_TOP & ": ")
|
||||||
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_TYPEEDGE & ": " & BevelDDF)
|
||||||
|
Else
|
||||||
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_TOP & ": " & BevelDDF)
|
||||||
|
End If
|
||||||
' 50007=Top
|
' 50007=Top
|
||||||
CompoDoorReport.CompoParameterList.Add(New ReportParameter(EgtMsg(50007), BevelDDF))
|
CompoDoorReport.CompoParameterList.Add(New ReportParameter(EgtMsg(50007), BevelDDF))
|
||||||
TProfile.Profile_ParametersList.Add(New ReportParameter(EgtMsg(50007), BevelDDF))
|
TProfile.Profile_ParametersList.Add(New ReportParameter(EgtMsg(50007), BevelDDF))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.TopMachining))
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.TopMachining))
|
||||||
If Not StringToDouble(Part.TopOverMaterial, dVal) Then
|
If Not StringToDouble(Part.TopOverMaterial, dVal) Then
|
||||||
MessageBox.Show(String.Format(EgtMsg(50141), K_TOPOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(String.Format(EgtMsg(50141), K_TOPOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
Return
|
Return
|
||||||
Else
|
Else
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & Part.TopOverMaterial)
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & Part.TopOverMaterial)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -411,9 +438,9 @@ Friend Module DdfFile
|
|||||||
Return
|
Return
|
||||||
Else
|
Else
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_RADIUS & ": " & DoubleToString(dVal, 5))
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_RADIUS & ": " & DoubleToString(dVal, 5))
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_RADIUS & ": " & Part.Radius)
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_RADIUS & ": " & Part.Radius)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -422,9 +449,9 @@ Friend Module DdfFile
|
|||||||
Return
|
Return
|
||||||
Else
|
Else
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_POSX & ": " & DoubleToString(dVal, 5))
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_POSX & ": " & DoubleToString(dVal, 5))
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_POSX & ": " & Part.Posx)
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_POSX & ": " & Part.Posx)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' 50707=Top Arc
|
' 50707=Top Arc
|
||||||
@@ -444,9 +471,9 @@ Friend Module DdfFile
|
|||||||
Return
|
Return
|
||||||
Else
|
Else
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_POSX & ": " & DoubleToString(dVal, 5))
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_POSX & ": " & DoubleToString(dVal, 5))
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_POSX & ": " & Part.PosxAngle)
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_POSX & ": " & Part.PosxAngle)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -455,9 +482,9 @@ Friend Module DdfFile
|
|||||||
Return
|
Return
|
||||||
Else
|
Else
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_ANGLE & ": " & DoubleToString(dVal, 5))
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_ANGLE & ": " & DoubleToString(dVal, 5))
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_ANGLE & ": " & Part.Angle)
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_ANGLE & ": " & Part.Angle)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' 50708=Top Angle
|
' 50708=Top Angle
|
||||||
@@ -472,28 +499,43 @@ Friend Module DdfFile
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
BevelDDF = SetBevel(Part.TypePart, Part.BottomType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name)
|
BevelDDF = SetBevel(Part.TypePart, Part.BottomType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name)
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_BOTTOM & ": " & BevelDDF)
|
If OptionModule.m_sVersionDDF = "2" Then
|
||||||
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_BOTTOM & ": ")
|
||||||
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_TYPEEDGE & ": " & BevelDDF)
|
||||||
|
Else
|
||||||
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_BOTTOM & ": " & BevelDDF)
|
||||||
|
End If
|
||||||
' 50008=Bottom
|
' 50008=Bottom
|
||||||
CompoDoorReport.CompoParameterList.Add(New ReportParameter(EgtMsg(50008), BevelDDF))
|
CompoDoorReport.CompoParameterList.Add(New ReportParameter(EgtMsg(50008), BevelDDF))
|
||||||
TProfile.Profile_ParametersList.Add(New ReportParameter(EgtMsg(50008), BevelDDF))
|
TProfile.Profile_ParametersList.Add(New ReportParameter(EgtMsg(50008), BevelDDF))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.BottomMachining))
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.BottomMachining))
|
||||||
If Not StringToDouble(Part.BottomOverMaterial, dVal) Then
|
If Not StringToDouble(Part.BottomOverMaterial, dVal) Then
|
||||||
MessageBox.Show(String.Format(EgtMsg(50141), K_BOTTOMOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(String.Format(EgtMsg(50141), K_BOTTOMOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
Return
|
Return
|
||||||
Else
|
Else
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & Part.BottomOverMaterial)
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & Part.BottomOverMaterial)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
DoorExists = True
|
DoorExists = True
|
||||||
|
|
||||||
|
DdfFileContent.Add(" ")
|
||||||
|
If OptionModule.m_sVersionDDF = "2" Then
|
||||||
|
DdfFileContent.Add(ConstCompo.K_HARDWARE & ": ")
|
||||||
|
End If
|
||||||
' Riordino e stampo le compo
|
' Riordino e stampo le compo
|
||||||
SearchCompo(DdfFileContent, Part, bIsDDF)
|
SearchCompo(DdfFileContent, Part, bIsDDF)
|
||||||
If Not Directory.Exists(Path.GetDirectoryName(sPath)) Then
|
If Not Directory.Exists(Path.GetDirectoryName(sPath)) Then
|
||||||
Directory.CreateDirectory(Path.GetDirectoryName(sPath))
|
Directory.CreateDirectory(Path.GetDirectoryName(sPath))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If OptionModule.m_sVersionDDF = "2" Then
|
||||||
|
DdfFileContent.Add(ConstCompo.K_OPTIONS & ": ")
|
||||||
|
DdfFileContent.Add(Part.sOptions)
|
||||||
|
End If
|
||||||
|
|
||||||
DdfFileContent.Add(" ")
|
DdfFileContent.Add(" ")
|
||||||
DdfFileContent.Add("# End Part")
|
DdfFileContent.Add("# End Part")
|
||||||
' se sono arrivato fin qui significa che tutto è andato a buon fine (posso quindisalvare il file corrente)
|
' se sono arrivato fin qui significa che tutto è andato a buon fine (posso quindisalvare il file corrente)
|
||||||
@@ -530,6 +572,11 @@ Friend Module DdfFile
|
|||||||
If Not String.IsNullOrEmpty(CurrHardwareReference) Then
|
If Not String.IsNullOrEmpty(CurrHardwareReference) Then
|
||||||
DdfFileContent.Add("#" & CurrHardwareReference)
|
DdfFileContent.Add("#" & CurrHardwareReference)
|
||||||
End If
|
End If
|
||||||
|
' dal 20/04/2023 inserita gestione della versione (da configurare nel programma)
|
||||||
|
If OptionModule.m_sVersionDDF <> "1" Then
|
||||||
|
DdfFileContent.Add("")
|
||||||
|
DdfFileContent.Add("version: " & OptionModule.m_sVersionDDF)
|
||||||
|
End If
|
||||||
DdfFileContent.Add("")
|
DdfFileContent.Add("")
|
||||||
DdfFileContent.Add("produce: " & If(Part.IsActive, "true", "false"))
|
DdfFileContent.Add("produce: " & If(Part.IsActive, "true", "false"))
|
||||||
'Genero una lista di stringhe
|
'Genero una lista di stringhe
|
||||||
@@ -556,29 +603,29 @@ Friend Module DdfFile
|
|||||||
DdfFileContent.Add(ConstCompo.S_ORDER & ":")
|
DdfFileContent.Add(ConstCompo.S_ORDER & ":")
|
||||||
' Probabilmente da cambiare
|
' Probabilmente da cambiare
|
||||||
If Not IsNothing(Part.Customer) Then
|
If Not IsNothing(Part.Customer) Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_CUSTOMER & ": " & Part.Customer)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_CUSTOMER & ": " & Part.Customer)
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_CUSTOMER & ": ")
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_CUSTOMER & ": ")
|
||||||
End If
|
End If
|
||||||
If Not IsNothing(Part.Elevation) Then
|
If Not IsNothing(Part.Elevation) Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_ELEVATION & ": " & Part.Elevation)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_ELEVATION & ": " & Part.Elevation)
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_ELEVATION & ": ")
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_ELEVATION & ": ")
|
||||||
End If
|
End If
|
||||||
If Not IsNothing(Part.Project) Then
|
If Not IsNothing(Part.Project) Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_PROJECT & ": " & Part.Project)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_PROJECT & ": " & Part.Project)
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_PROJECT & ": ")
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_PROJECT & ": ")
|
||||||
End If
|
End If
|
||||||
If Not IsNothing(Part.PO) Then
|
If Not IsNothing(Part.PO) Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_PO & ": " & Part.PO)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_PO & ": " & Part.PO)
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_PO & ": ")
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_PO & ": ")
|
||||||
End If
|
End If
|
||||||
If Not IsNothing(Part.Line) Then
|
If Not IsNothing(Part.Line) Then
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_LINE & ": " & Part.Line)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_LINE & ": " & Part.Line)
|
||||||
Else
|
Else
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_LINE & ": ")
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_LINE & ": ")
|
||||||
End If
|
End If
|
||||||
' aggiungo una riga vuota per separare la lista successiva
|
' aggiungo una riga vuota per separare la lista successiva
|
||||||
DdfFileContent.Add("")
|
DdfFileContent.Add("")
|
||||||
@@ -600,11 +647,11 @@ Friend Module DdfFile
|
|||||||
' ConvertCurrentUnitMeasure(sVal)
|
' ConvertCurrentUnitMeasure(sVal)
|
||||||
'Part.SetWidth(sVal)
|
'Part.SetWidth(sVal)
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_WIDTH & ": " & DoubleToString(dVal, 5))
|
'DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_WIDTH & ": " & DoubleToString(dVal, 5))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_WIDTH & ": " & sVal)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_WIDTH & ": " & sVal)
|
||||||
Else
|
Else
|
||||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_WIDTH & ": " & Part.Width)
|
'DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_WIDTH & ": " & Part.Width)
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_WIDTH & ": " & sVal)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_WIDTH & ": " & sVal)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -616,11 +663,11 @@ Friend Module DdfFile
|
|||||||
' ConvertCurrentUnitMeasure(sVal)
|
' ConvertCurrentUnitMeasure(sVal)
|
||||||
'Part.SetHeight(sVal)
|
'Part.SetHeight(sVal)
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_HEIGHT & ": " & DoubleToString(dVal, 5))
|
'DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HEIGHT & ": " & DoubleToString(dVal, 5))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_HEIGHT & ": " & sVal)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HEIGHT & ": " & sVal)
|
||||||
Else
|
Else
|
||||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_HEIGHT & ": " & Part.Height)
|
'DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HEIGHT & ": " & Part.Height)
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_HEIGHT & ": " & sVal)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HEIGHT & ": " & sVal)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -633,11 +680,11 @@ Friend Module DdfFile
|
|||||||
' ConvertCurrentUnitMeasure(sVal)
|
' ConvertCurrentUnitMeasure(sVal)
|
||||||
'Part.SetThickness(sVal)
|
'Part.SetThickness(sVal)
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_THICKNESS & ": " & DoubleToString(dVal, 5))
|
'DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_THICKNESS & ": " & DoubleToString(dVal, 5))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_THICKNESS & ": " & sVal)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_THICKNESS & ": " & sVal)
|
||||||
Else
|
Else
|
||||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_THICKNESS & ": " & Part.Thickness)
|
'DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_THICKNESS & ": " & Part.Thickness)
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_THICKNESS & ": " & sVal)
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_THICKNESS & ": " & sVal)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' aggiungo una riga vuota per separare la lista successiva
|
' aggiungo una riga vuota per separare la lista successiva
|
||||||
@@ -662,8 +709,13 @@ Friend Module DdfFile
|
|||||||
End If
|
End If
|
||||||
'----------------------------------------------------------------------------------------------------------------------------------------------------
|
'----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
DdfFileContent.Add("" & ConstCompo.S_PROFILES & ":")
|
DdfFileContent.Add("" & ConstCompo.S_PROFILES & ":")
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_LOCKEDGE & ": " & SetBevel(Part.TypePart, Part.LockEdgeType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name, Part.InvertBevel))
|
If OptionModule.m_sVersionDDF = "2" Then ' K_TYPE
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.LockEdgeMachining))
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_LOCKEDGE & ": ")
|
||||||
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_TYPEEDGE & ": " & SetBevel(Part.TypePart, Part.LockEdgeType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name, Part.InvertBevel))
|
||||||
|
Else
|
||||||
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_LOCKEDGE & ": " & SetBevel(Part.TypePart, Part.LockEdgeType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name, Part.InvertBevel))
|
||||||
|
End If
|
||||||
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.LockEdgeMachining))
|
||||||
If Not StringToDouble(Part.LockEdgeOverMaterial, dVal) Then
|
If Not StringToDouble(Part.LockEdgeOverMaterial, dVal) Then
|
||||||
MessageBox.Show(String.Format(EgtMsg(50141), K_LOCKEDGEOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(String.Format(EgtMsg(50141), K_LOCKEDGEOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
Return
|
Return
|
||||||
@@ -671,15 +723,20 @@ Friend Module DdfFile
|
|||||||
sVal = Part.LockEdgeOverMaterial
|
sVal = Part.LockEdgeOverMaterial
|
||||||
' ConvertCurrentUnitMeasure(sVal)
|
' ConvertCurrentUnitMeasure(sVal)
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
'DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||||
Else
|
Else
|
||||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & Part.LockEdgeOverMaterial)
|
'DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & Part.LockEdgeOverMaterial)
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_HINGEEDGE & ": " & SetBevel(Part.TypePart, Part.HingeEdgeType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name))
|
If OptionModule.m_sVersionDDF = "2" Then ' K_TYPE
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.HingeEdgeMachining))
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HINGEEDGE & ": ")
|
||||||
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_TYPEEDGE & ": " & SetBevel(Part.TypePart, Part.HingeEdgeType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name))
|
||||||
|
Else
|
||||||
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HINGEEDGE & ": " & SetBevel(Part.TypePart, Part.HingeEdgeType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name))
|
||||||
|
End If
|
||||||
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.HingeEdgeMachining))
|
||||||
If Not StringToDouble(Part.HingeEdgeOverMaterial, dVal) Then
|
If Not StringToDouble(Part.HingeEdgeOverMaterial, dVal) Then
|
||||||
MessageBox.Show(String.Format(EgtMsg(50141), K_HINGEDGEOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(String.Format(EgtMsg(50141), K_HINGEDGEOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
Return
|
Return
|
||||||
@@ -687,15 +744,20 @@ Friend Module DdfFile
|
|||||||
sVal = Part.HingeEdgeOverMaterial
|
sVal = Part.HingeEdgeOverMaterial
|
||||||
ConvertCurrentUnitMeasure(sVal)
|
ConvertCurrentUnitMeasure(sVal)
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
'DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||||
Else
|
Else
|
||||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & Part.HingeEdgeOverMaterial)
|
'DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & Part.HingeEdgeOverMaterial)
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_TOP & ": " & SetBevel(Part.TypePart, Part.TopType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name))
|
If OptionModule.m_sVersionDDF = "2" Then ' K_TYPE
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.TopMachining))
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_TOP & ": ")
|
||||||
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_TYPEEDGE & ": " & SetBevel(Part.TypePart, Part.TopType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name))
|
||||||
|
Else
|
||||||
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_TOP & ": " & SetBevel(Part.TypePart, Part.TopType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name))
|
||||||
|
End If
|
||||||
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.TopMachining))
|
||||||
If Not StringToDouble(Part.TopOverMaterial, dVal) Then
|
If Not StringToDouble(Part.TopOverMaterial, dVal) Then
|
||||||
MessageBox.Show(String.Format(EgtMsg(50141), K_TOPOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(String.Format(EgtMsg(50141), K_TOPOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
Return
|
Return
|
||||||
@@ -703,15 +765,20 @@ Friend Module DdfFile
|
|||||||
sVal = Part.TopOverMaterial
|
sVal = Part.TopOverMaterial
|
||||||
' ConvertCurrentUnitMeasure(sVal)
|
' ConvertCurrentUnitMeasure(sVal)
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
'DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||||
Else
|
Else
|
||||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & Part.TopOverMaterial)
|
'DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & Part.TopOverMaterial)
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_BOTTOM & ": " & SetBevel(Part.TypePart, Part.BottomType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name))
|
If OptionModule.m_sVersionDDF = "2" Then ' K_TYPE
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.BottomMachining))
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_BOTTOM & ": ")
|
||||||
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_TYPEEDGE & ": " & SetBevel(Part.TypePart, Part.BottomType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name))
|
||||||
|
Else
|
||||||
|
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_BOTTOM & ": " & SetBevel(Part.TypePart, Part.BottomType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name))
|
||||||
|
End If
|
||||||
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.BottomMachining))
|
||||||
If Not StringToDouble(Part.BottomOverMaterial, dVal) Then
|
If Not StringToDouble(Part.BottomOverMaterial, dVal) Then
|
||||||
MessageBox.Show(String.Format(EgtMsg(50141), K_BOTTOMOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(String.Format(EgtMsg(50141), K_BOTTOMOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
Return
|
Return
|
||||||
@@ -719,13 +786,18 @@ Friend Module DdfFile
|
|||||||
sVal = Part.BottomOverMaterial
|
sVal = Part.BottomOverMaterial
|
||||||
' ConvertCurrentUnitMeasure(sVal)
|
' ConvertCurrentUnitMeasure(sVal)
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
'DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||||
Else
|
Else
|
||||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & Part.BottomOverMaterial)
|
'DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & Part.BottomOverMaterial)
|
||||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
DdfFileContent.Add(" ")
|
||||||
|
If OptionModule.m_sVersionDDF = "2" Then
|
||||||
|
DdfFileContent.Add(ConstCompo.K_HARDWARE & ": ")
|
||||||
|
End If
|
||||||
' Riordino e stampo le compo
|
' Riordino e stampo le compo
|
||||||
SearchCompo(DdfFileContent, Part, bIsDDF)
|
SearchCompo(DdfFileContent, Part, bIsDDF)
|
||||||
If Not Directory.Exists(Path.GetDirectoryName(sPath)) Then
|
If Not Directory.Exists(Path.GetDirectoryName(sPath)) Then
|
||||||
@@ -913,7 +985,7 @@ Friend Module DdfFile
|
|||||||
z = DoubleToString(-dDeltaThickness + dDeltaBottom, 4)
|
z = DoubleToString(-dDeltaThickness + dDeltaBottom, 4)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Return z
|
Return z
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region ' Funzioni per il posizionamento
|
#End Region ' Funzioni per il posizionamento
|
||||||
@@ -956,7 +1028,9 @@ Friend Module DdfFile
|
|||||||
Dim NewCompoNameDDF = False
|
Dim NewCompoNameDDF = False
|
||||||
Dim WritingError As String = String.Empty
|
Dim WritingError As String = String.Empty
|
||||||
Dim TempList As New ObservableCollection(Of Compo)
|
Dim TempList As New ObservableCollection(Of Compo)
|
||||||
DdfFileContent.Add("")
|
If OptionModule.m_sVersionDDF = "1" Then
|
||||||
|
DdfFileContent.Add("")
|
||||||
|
End If
|
||||||
'------------------------------------------------------------------------------------------------------------------------------------------
|
'------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
' cerco la prima componente da aggiungere alla lista delle componenti
|
' cerco la prima componente da aggiungere alla lista delle componenti
|
||||||
For Index1 = 0 To DdfFile.CompoListOrder.Count() - 1
|
For Index1 = 0 To DdfFile.CompoListOrder.Count() - 1
|
||||||
@@ -1007,10 +1081,32 @@ Friend Module DdfFile
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function AscendingOrder(List As ObservableCollection(Of Compo), DdfFileContent As List(Of String), bIsDDF As Boolean) As Boolean
|
' ritorna una lista con tutti i compo dello stesso tipo
|
||||||
|
Public Function GetCurrentListSameCompoType(ByVal ListCompo As ObservableCollection(Of Compo), sCompoTypeDDF As String) As ObservableCollection(Of Compo)
|
||||||
|
Dim TempList As New ObservableCollection(Of Compo)
|
||||||
|
For Index As Integer = 0 To ListCompo.Count - 1
|
||||||
|
If ListCompo(Index).CompoType.DDFName = sCompoTypeDDF Then
|
||||||
|
TempList.Add(ListCompo(Index))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return TempList
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' ritorna una lista con tutti i compo dello stesso tipo con lo stesso nome
|
||||||
|
Public Function GetCurrentListSameCompoDDFName(ByVal ListCompo As ObservableCollection(Of Compo), sSelFile As String, sSelBrand As String) As ObservableCollection(Of Compo)
|
||||||
|
Dim TempList As New ObservableCollection(Of Compo)
|
||||||
|
For Index As Integer = 0 To ListCompo.Count - 1
|
||||||
|
If ListCompo(Index).SelFile = sSelFile And ListCompo(Index).SelBrandPart = sSelBrand Then
|
||||||
|
TempList.Add(ListCompo(Index))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return TempList
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' data la lista compo dello stesso tipo, la riordino ( Config.ini → TidyLayer = ...)
|
||||||
|
Public Sub GetOrderedListSameCompo(ByRef List As ObservableCollection(Of Compo))
|
||||||
Dim tidyParamIndex1 As Integer = -1
|
Dim tidyParamIndex1 As Integer = -1
|
||||||
Dim tidyParamIndex2 As Integer = -1
|
Dim tidyParamIndex2 As Integer = -1
|
||||||
Dim WritingError As String = String.Empty
|
|
||||||
If List.Count >= 2 Then
|
If List.Count >= 2 Then
|
||||||
For IndexList1 As Integer = 0 To List.Count - 2
|
For IndexList1 As Integer = 0 To List.Count - 2
|
||||||
For IndexList2 As Integer = IndexList1 + 1 To List.Count - 1
|
For IndexList2 As Integer = IndexList1 + 1 To List.Count - 1
|
||||||
@@ -1043,6 +1139,66 @@ Friend Module DdfFile
|
|||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' rercupera indice nella lista corrente della componente passata
|
||||||
|
Public Function GetIndexInList(ListCompo As ObservableCollection(Of Compo), SelCompo As Compo) As Integer
|
||||||
|
' Se sono qui allora i compo devono avere lo stesso nome?.. Mettere controllo..
|
||||||
|
Dim bFoundSelCompo As Boolean = True
|
||||||
|
For Ind As Integer = 0 To ListCompo.Count - 1
|
||||||
|
For Ind2 As Integer = 0 To ListCompo(Ind).CompoParamList.Count - 1
|
||||||
|
' verifco che gli oggetti abbiano lo stesso nome?.. Metter controllo..
|
||||||
|
If TypeOf ListCompo(Ind).CompoParamList(Ind2) Is TextBoxOnOffParam And
|
||||||
|
TypeOf SelCompo.CompoParamList(Ind2) Is TextBoxOnOffParam Then
|
||||||
|
Dim Temp As TextBoxOnOffParam = DirectCast(ListCompo(Ind).CompoParamList(Ind2), TextBoxOnOffParam)
|
||||||
|
Dim SelTemp As TextBoxOnOffParam = DirectCast(SelCompo.CompoParamList(Ind2), TextBoxOnOffParam)
|
||||||
|
If Temp.Value <> SelTemp.Value Or Temp.IsActive <> SelTemp.IsActive Then
|
||||||
|
bFoundSelCompo = False
|
||||||
|
End If
|
||||||
|
ElseIf TypeOf ListCompo(Ind).CompoParamList(Ind2) Is TextBoxParam And
|
||||||
|
TypeOf SelCompo.CompoParamList(Ind2) Is TextBoxParam Then
|
||||||
|
Dim Temp As TextBoxParam = DirectCast(ListCompo(Ind).CompoParamList(Ind2), TextBoxParam)
|
||||||
|
Dim SelTemp As TextBoxParam = DirectCast(SelCompo.CompoParamList(Ind2), TextBoxParam)
|
||||||
|
If Temp.Value <> SelTemp.Value Then
|
||||||
|
bFoundSelCompo = False
|
||||||
|
End If
|
||||||
|
ElseIf TypeOf ListCompo(Ind).CompoParamList(Ind2) Is ComboBoxOnOffParam And
|
||||||
|
TypeOf SelCOmpo.CompoParamList(Ind2) Is ComboBoxOnOffParam Then
|
||||||
|
Dim Temp As ComboBoxOnOffParam = DirectCast(ListCompo(Ind).CompoParamList(Ind2), ComboBoxOnOffParam)
|
||||||
|
Dim SelTemp As ComboBoxOnOffParam = DirectCast(SelCompo.CompoParamList(Ind2), ComboBoxOnOffParam)
|
||||||
|
If Temp.SelItem <> SelTemp.SelItem Or Temp.IsActive <> SelTemp.IsActive Then
|
||||||
|
bFoundSelCompo = False
|
||||||
|
End If
|
||||||
|
ElseIf TypeOf ListCompo(Ind).CompoParamList(Ind2) Is ComboBoxParam And
|
||||||
|
TypeOf SelCompo.CompoParamList(Ind2) Is ComboBoxParam Then
|
||||||
|
Dim Temp As ComboBoxParam = DirectCast(ListCompo(Ind).CompoParamList(Ind2), ComboBoxParam)
|
||||||
|
Dim SelTemp As ComboBoxParam = DirectCast(SelCompo.CompoParamList(Ind2), ComboBoxParam)
|
||||||
|
If Temp.SelItem <> SelTemp.SelItem Then
|
||||||
|
bFoundSelCompo = False
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
' le componeti non sono dello stesso tipo!
|
||||||
|
Return -1
|
||||||
|
End If
|
||||||
|
' verifico che il parametro corrente è uguale a quello della compo selezionata
|
||||||
|
If Not bFoundSelCompo Then
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' verifico se ho trovato la compo
|
||||||
|
If Not bFoundSelCompo Then
|
||||||
|
bFoundSelCompo = True
|
||||||
|
Else
|
||||||
|
Return Ind
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' se esco senza aver trovato niente
|
||||||
|
Return -1
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function AscendingOrder(List As ObservableCollection(Of Compo), DdfFileContent As List(Of String), bIsDDF As Boolean) As Boolean
|
||||||
|
Dim WritingError As String = String.Empty
|
||||||
|
GetOrderedListSameCompo(List)
|
||||||
' stampa lista
|
' stampa lista
|
||||||
DdfFileContent.AddRange(GenerateCompolistDDF(List(0), WritingError, True, bIsDDF))
|
DdfFileContent.AddRange(GenerateCompolistDDF(List(0), WritingError, True, bIsDDF))
|
||||||
For IndexItem As Integer = 1 To List.Count - 1
|
For IndexItem As Integer = 1 To List.Count - 1
|
||||||
@@ -1063,15 +1219,15 @@ Friend Module DdfFile
|
|||||||
' se il nome non esiste ancora nella lista lo aggiungo
|
' se il nome non esiste ancora nella lista lo aggiungo
|
||||||
If bNewCompoNameDDF Then
|
If bNewCompoNameDDF Then
|
||||||
' aggiungo il nome DDF della componente
|
' aggiungo il nome DDF della componente
|
||||||
CompoListDDF.Add(Compo.CompoType.DDFName & ":")
|
CompoListDDF.Add(m_sSpaceTabCompo & Compo.CompoType.DDFName & ":")
|
||||||
End If
|
End If
|
||||||
' se esiste il template
|
' se esiste il template
|
||||||
If Not String.IsNullOrWhiteSpace(Compo.TemplateDDFName) Then
|
If Not String.IsNullOrWhiteSpace(Compo.TemplateDDFName) Then
|
||||||
' aggiungo " - nomeTemplate: TemplateSelezionato"
|
' aggiungo " - nomeTemplate: TemplateSelezionato"
|
||||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||||
CompoListDDF.Add(DDF_METADATA & DDF_HYPHEN & Compo.TemplateDDFName & ": " & Compo.TemplateSelItem)
|
CompoListDDF.Add(DDF_METADATA & OptionModule.m_sSpaceHype & Compo.TemplateDDFName & ": " & Compo.TemplateSelItem)
|
||||||
ElseIf Compo.LoadByDefault And SaveErrorCompo Then
|
ElseIf Compo.LoadByDefault And SaveErrorCompo Then
|
||||||
CompoListDDF.Add(DDF_HYPHEN & Compo.TemplateDDFName & ": " & Compo.TemplateSelItem)
|
CompoListDDF.Add(OptionModule.m_sSpaceHype & Compo.TemplateDDFName & ": " & Compo.TemplateSelItem)
|
||||||
If Not String.IsNullOrEmpty(sErrorList) Then sErrorList &= Environment.NewLine
|
If Not String.IsNullOrEmpty(sErrorList) Then sErrorList &= Environment.NewLine
|
||||||
' 50563=Compo {0} does not exist.
|
' 50563=Compo {0} does not exist.
|
||||||
sErrorList &= String.Format(EgtMsg(50563), Compo.SelBrandPart & "\" & Compo.SelFile)
|
sErrorList &= String.Format(EgtMsg(50563), Compo.SelBrandPart & "\" & Compo.SelFile)
|
||||||
@@ -1083,7 +1239,7 @@ Friend Module DdfFile
|
|||||||
End If
|
End If
|
||||||
ParamInCompoIsCorrect = False
|
ParamInCompoIsCorrect = False
|
||||||
Else
|
Else
|
||||||
CompoListDDF.Add(DDF_HYPHEN & Compo.TemplateDDFName & ": " & Compo.TemplateSelItem)
|
CompoListDDF.Add(OptionModule.m_sSpaceHype & Compo.TemplateDDFName & ": " & Compo.TemplateSelItem)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -1108,9 +1264,9 @@ Friend Module DdfFile
|
|||||||
' restituisco il valore DDF della lista associato all'indice passato
|
' restituisco il valore DDF della lista associato all'indice passato
|
||||||
Dim SelItemDDF As String = Trim(cbParam.ItemListDDF(IndexDDF))
|
Dim SelItemDDF As String = Trim(cbParam.ItemListDDF(IndexDDF))
|
||||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & cbParam.DDFName & ": " & SelItemDDF)
|
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & cbParam.DDFName & ": " & SelItemDDF)
|
||||||
Else
|
Else
|
||||||
CompoListDDF.Add(DDF_SPACE5 & cbParam.DDFName & ": " & SelItemDDF)
|
CompoListDDF.Add(m_sSpace3Tab & cbParam.DDFName & ": " & SelItemDDF)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
' se non è selezionato nessun elemento (cosa impossibile...)
|
' se non è selezionato nessun elemento (cosa impossibile...)
|
||||||
@@ -1136,9 +1292,9 @@ Friend Module DdfFile
|
|||||||
' restituisco il valore DDF della lista associato all'indice passato
|
' restituisco il valore DDF della lista associato all'indice passato
|
||||||
Dim SelItemDDF As String = Trim(cbParam.ItemListDDF(IndexDDF))
|
Dim SelItemDDF As String = Trim(cbParam.ItemListDDF(IndexDDF))
|
||||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & cbParam.DDFName & ": " & SelItemDDF)
|
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & cbParam.DDFName & ": " & SelItemDDF)
|
||||||
Else
|
Else
|
||||||
CompoListDDF.Add(DDF_SPACE5 & cbParam.DDFName & ": " & SelItemDDF)
|
CompoListDDF.Add(m_sSpace3Tab & cbParam.DDFName & ": " & SelItemDDF)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
' se non è selezionato nessun elemento (cosa impossibile...)
|
' se non è selezionato nessun elemento (cosa impossibile...)
|
||||||
@@ -1147,9 +1303,9 @@ Friend Module DdfFile
|
|||||||
sErrorList &= String.Format(EgtMsg(50125), cbParam.Name, Compo.CompoType.DDFName)
|
sErrorList &= String.Format(EgtMsg(50125), cbParam.Name, Compo.CompoType.DDFName)
|
||||||
ParamInCompoIsCorrect = False
|
ParamInCompoIsCorrect = False
|
||||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & cbParam.DDFName & ": " & cbParam.SelItem)
|
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||||
Else
|
Else
|
||||||
CompoListDDF.Add(DDF_SPACE5 & cbParam.DDFName & ": " & cbParam.SelItem)
|
CompoListDDF.Add(m_sSpace3Tab & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ElseIf Not cbParam.ErrorInReading And cbParam.MissingParameterInReading Then
|
ElseIf Not cbParam.ErrorInReading And cbParam.MissingParameterInReading Then
|
||||||
@@ -1164,9 +1320,9 @@ Friend Module DdfFile
|
|||||||
' restituisco il valore DDF della lista associato all'indice passato
|
' restituisco il valore DDF della lista associato all'indice passato
|
||||||
Dim SelItemDDF As String = Trim(cbParam.ItemListDDF(IndexDDF))
|
Dim SelItemDDF As String = Trim(cbParam.ItemListDDF(IndexDDF))
|
||||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & cbParam.DDFName & ": " & SelItemDDF)
|
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & cbParam.DDFName & ": " & SelItemDDF)
|
||||||
Else
|
Else
|
||||||
CompoListDDF.Add(DDF_SPACE5 & cbParam.DDFName & ": " & SelItemDDF)
|
CompoListDDF.Add(m_sSpace3Tab & cbParam.DDFName & ": " & SelItemDDF)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
' se non è selezionato nessun elemento (cosa impossibile...)
|
' se non è selezionato nessun elemento (cosa impossibile...)
|
||||||
@@ -1175,9 +1331,9 @@ Friend Module DdfFile
|
|||||||
sErrorList &= String.Format(EgtMsg(50125), cbParam.Name, Compo.CompoType.DDFName)
|
sErrorList &= String.Format(EgtMsg(50125), cbParam.Name, Compo.CompoType.DDFName)
|
||||||
ParamInCompoIsCorrect = False
|
ParamInCompoIsCorrect = False
|
||||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & cbParam.DDFName & ": " & cbParam.SelItem)
|
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||||
Else
|
Else
|
||||||
CompoListDDF.Add(DDF_SPACE5 & cbParam.DDFName & ": " & cbParam.SelItem)
|
CompoListDDF.Add(m_sSpace3Tab & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -1185,9 +1341,9 @@ Friend Module DdfFile
|
|||||||
sErrorList &= String.Format(EgtMsg(50125), cbParam.Name, Compo.CompoType.DDFName)
|
sErrorList &= String.Format(EgtMsg(50125), cbParam.Name, Compo.CompoType.DDFName)
|
||||||
ParamInCompoIsCorrect = False
|
ParamInCompoIsCorrect = False
|
||||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & cbParam.DDFName & ": " & cbParam.SelItem)
|
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||||
Else
|
Else
|
||||||
CompoListDDF.Add(DDF_SPACE5 & cbParam.DDFName & ": " & cbParam.SelItem)
|
CompoListDDF.Add(m_sSpace3Tab & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' TextBox Opzionale
|
' TextBox Opzionale
|
||||||
@@ -1200,24 +1356,24 @@ Friend Module DdfFile
|
|||||||
' 50122: Error reading {0} param in {1} compo.
|
' 50122: Error reading {0} param in {1} compo.
|
||||||
sErrorList &= String.Format(EgtMsg(50122), tboParam.Name, Compo.CompoType.DDFName)
|
sErrorList &= String.Format(EgtMsg(50122), tboParam.Name, Compo.CompoType.DDFName)
|
||||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tboParam.DDFName & ": ")
|
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tboParam.DDFName & ": ")
|
||||||
ParamInCompoIsCorrect = False
|
ParamInCompoIsCorrect = False
|
||||||
Else
|
Else
|
||||||
CompoListDDF.Add(DDF_SPACE5 & tboParam.DDFName & ": " & tboParam.Value)
|
CompoListDDF.Add(m_sSpace3Tab & tboParam.DDFName & ": " & tboParam.Value)
|
||||||
ParamInCompoIsCorrect = False
|
ParamInCompoIsCorrect = False
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tboParam.DDFName & ": " & tboParam.ToolTipValue)
|
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tboParam.DDFName & ": " & tboParam.ToolTipValue)
|
||||||
Else
|
Else
|
||||||
CompoListDDF.Add(DDF_SPACE5 & tboParam.DDFName & ": " & tboParam.ToolTipValue)
|
CompoListDDF.Add(m_sSpace3Tab & tboParam.DDFName & ": " & tboParam.ToolTipValue)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tboParam.DDFName & ": " & tboParam.Value)
|
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tboParam.DDFName & ": " & tboParam.Value)
|
||||||
Else
|
Else
|
||||||
CompoListDDF.Add(DDF_SPACE5 & tboParam.DDFName & ": " & tboParam.Value)
|
CompoListDDF.Add(m_sSpace3Tab & tboParam.DDFName & ": " & tboParam.Value)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -1235,24 +1391,24 @@ Friend Module DdfFile
|
|||||||
' 50122: Error reading {0} param in {1} compo.
|
' 50122: Error reading {0} param in {1} compo.
|
||||||
sErrorList &= String.Format(EgtMsg(50122), tbParam.Name, Compo.CompoType.DDFName)
|
sErrorList &= String.Format(EgtMsg(50122), tbParam.Name, Compo.CompoType.DDFName)
|
||||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||||
ParamInCompoIsCorrect = False
|
ParamInCompoIsCorrect = False
|
||||||
Else
|
Else
|
||||||
CompoListDDF.Add(DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
CompoListDDF.Add(m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||||
ParamInCompoIsCorrect = False
|
ParamInCompoIsCorrect = False
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.ToolTipValue)
|
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.ToolTipValue)
|
||||||
Else
|
Else
|
||||||
CompoListDDF.Add(DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.ToolTipValue)
|
CompoListDDF.Add(m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.ToolTipValue)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||||
Else
|
Else
|
||||||
CompoListDDF.Add(DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
CompoListDDF.Add(m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -1265,24 +1421,24 @@ Friend Module DdfFile
|
|||||||
' 50122: Error reading {0} param in {1} compo.
|
' 50122: Error reading {0} param in {1} compo.
|
||||||
sErrorList &= String.Format(EgtMsg(50122), tbParam.Name, Compo.CompoType.DDFName)
|
sErrorList &= String.Format(EgtMsg(50122), tbParam.Name, Compo.CompoType.DDFName)
|
||||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||||
ParamInCompoIsCorrect = False
|
ParamInCompoIsCorrect = False
|
||||||
Else
|
Else
|
||||||
CompoListDDF.Add(DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
CompoListDDF.Add(m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||||
ParamInCompoIsCorrect = False
|
ParamInCompoIsCorrect = False
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If bIsDDF Then
|
If bIsDDF Then
|
||||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.ToolTipValue)
|
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.ToolTipValue)
|
||||||
Else
|
Else
|
||||||
CompoListDDF.Add(DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.ToolTipValue)
|
CompoListDDF.Add(m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.ToolTipValue)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||||
Else
|
Else
|
||||||
CompoListDDF.Add(DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
CompoListDDF.Add(m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -1290,7 +1446,7 @@ Friend Module DdfFile
|
|||||||
If Not String.IsNullOrEmpty(sErrorList) Then sErrorList &= Environment.NewLine
|
If Not String.IsNullOrEmpty(sErrorList) Then sErrorList &= Environment.NewLine
|
||||||
' 50122: Error reading {0} param in {1} compo.
|
' 50122: Error reading {0} param in {1} compo.
|
||||||
sErrorList &= String.Format(EgtMsg(50122), tbParam.Name, Compo.CompoType.DDFName)
|
sErrorList &= String.Format(EgtMsg(50122), tbParam.Name, Compo.CompoType.DDFName)
|
||||||
CompoListDDF.Add(DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
CompoListDDF.Add(m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -1298,33 +1454,33 @@ Friend Module DdfFile
|
|||||||
If Not IsNothing(Compo.refJambCompo) Then
|
If Not IsNothing(Compo.refJambCompo) Then
|
||||||
' stampo una componente dell'anta
|
' stampo una componente dell'anta
|
||||||
If Not String.IsNullOrEmpty(Compo.IdCode) AndAlso Trim(Compo.refJambCompo.IdCode) = Trim(Compo.IdCode) Then
|
If Not String.IsNullOrEmpty(Compo.IdCode) AndAlso Trim(Compo.refJambCompo.IdCode) = Trim(Compo.IdCode) Then
|
||||||
CompoListDDF.Add(DDF_SPACE5 & "##IdCodeComponent : " & Compo.IdCode)
|
CompoListDDF.Add(m_sSpace3Tab & "##IdCodeComponent : " & Compo.IdCode)
|
||||||
Else
|
Else
|
||||||
Compo.IdCode = CStr(IdIndex)
|
Compo.IdCode = CStr(IdIndex)
|
||||||
Compo.refJambCompo.IdCode = Trim(Compo.IdCode)
|
Compo.refJambCompo.IdCode = Trim(Compo.IdCode)
|
||||||
CompoListDDF.Add(DDF_SPACE5 & "##IdCodeComponent : " & Compo.IdCode)
|
CompoListDDF.Add(m_sSpace3Tab & "##IdCodeComponent : " & Compo.IdCode)
|
||||||
End If
|
End If
|
||||||
IdIndex += 1
|
IdIndex += 1
|
||||||
ElseIf Not IsNothing(Compo.refCompoDoor) Then
|
ElseIf Not IsNothing(Compo.refCompoDoor) Then
|
||||||
' stampo una componente sul telaio
|
' stampo una componente sul telaio
|
||||||
If Not String.IsNullOrEmpty(Compo.refCompoDoor.IdCode) Then
|
If Not String.IsNullOrEmpty(Compo.refCompoDoor.IdCode) Then
|
||||||
If Compo.OtherDoor Then
|
If Compo.OtherDoor Then
|
||||||
CompoListDDF.Add(DDF_SPACE5 & "other_door: 1")
|
CompoListDDF.Add(m_sSpace3Tab & "other_door: 1")
|
||||||
End If
|
End If
|
||||||
Compo.IdCode = Compo.refCompoDoor.IdCode
|
Compo.IdCode = Compo.refCompoDoor.IdCode
|
||||||
If Compo.MatchedDoor Then
|
If Compo.MatchedDoor Then
|
||||||
' solo per il caso di sue ante
|
' solo per il caso di sue ante
|
||||||
CompoListDDF.Add(DDF_SPACE5 & "##IdCodeComponent : " & Compo.IdCode & " , Matched")
|
CompoListDDF.Add(m_sSpace3Tab & "##IdCodeComponent : " & Compo.IdCode & " , Matched")
|
||||||
Else
|
Else
|
||||||
CompoListDDF.Add(DDF_SPACE5 & "##IdCodeComponent : " & Compo.IdCode)
|
CompoListDDF.Add(m_sSpace3Tab & "##IdCodeComponent : " & Compo.IdCode)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
ElseIf Not String.IsNullOrEmpty(Compo.IdCode) Then
|
ElseIf Not String.IsNullOrEmpty(Compo.IdCode) Then
|
||||||
If Compo.OtherDoor Then
|
If Compo.OtherDoor Then
|
||||||
CompoListDDF.Add(DDF_SPACE5 & "other_door: 1")
|
CompoListDDF.Add(m_sSpace3Tab & "other_door: 1")
|
||||||
End If
|
End If
|
||||||
CompoListDDF.Add(DDF_SPACE5 & "##IdCodeComponent : " & Compo.IdCode)
|
CompoListDDF.Add(m_sSpace3Tab & "##IdCodeComponent : " & Compo.IdCode)
|
||||||
IdIndex += 1
|
IdIndex += 1
|
||||||
End If
|
End If
|
||||||
Return CompoListDDF
|
Return CompoListDDF
|
||||||
@@ -1440,18 +1596,18 @@ Friend Module DdfFile
|
|||||||
If InvertBevel Then
|
If InvertBevel Then
|
||||||
' If sCurrBevel = ConstGen.BEVEL_GRAPHIC And DispositionItem = ConstGen.BEVEL_DOWN Then
|
' If sCurrBevel = ConstGen.BEVEL_GRAPHIC And DispositionItem = ConstGen.BEVEL_DOWN Then
|
||||||
If sCurrBevel.Contains(ConstGen.BEVEL_GRAPHIC) And DispositionItem = ConstGen.BEVEL_DOWN Then
|
If sCurrBevel.Contains(ConstGen.BEVEL_GRAPHIC) And DispositionItem = ConstGen.BEVEL_DOWN Then
|
||||||
Return sCurrBevel.Replace(ConstGen.BEVEL_GRAPHIC, ConstGen.BEVEL_UP) & ConstCompo.DDF_SPACE3 & " ## Inverted"
|
Return sCurrBevel.Replace(ConstGen.BEVEL_GRAPHIC, ConstGen.BEVEL_UP) & m_sSpace1Tab & " ## Inverted"
|
||||||
' Return ConstGen.BEVEL_UP & ConstCompo.DDF_SPACE3 & " ## Inverted"
|
' Return ConstGen.BEVEL_UP & m_sSpace1Tab & " ## Inverted"
|
||||||
ElseIf sCurrBevel.Contains(ConstGen.BEVEL_GRAPHIC) And DispositionItem = ConstGen.BEVEL_UP Then
|
ElseIf sCurrBevel.Contains(ConstGen.BEVEL_GRAPHIC) And DispositionItem = ConstGen.BEVEL_UP Then
|
||||||
Return sCurrBevel.Replace(ConstGen.BEVEL_GRAPHIC, ConstGen.BEVEL_DOWN) & ConstCompo.DDF_SPACE3 & " ## Inverted"
|
Return sCurrBevel.Replace(ConstGen.BEVEL_GRAPHIC, ConstGen.BEVEL_DOWN) & m_sSpace1Tab & " ## Inverted"
|
||||||
'Return ConstGen.BEVEL_DOWN & ConstCompo.DDF_SPACE3 & " ## Inverted"
|
'Return ConstGen.BEVEL_DOWN & m_sSpace1Tab & " ## Inverted"
|
||||||
ElseIf sCurrBevel.Contains(ConstGen.BEVEL_GRAPHIC) And DispositionItem <> ConstGen.BEVEL_UP And DispositionItem <> ConstGen.BEVEL_DOWN Then
|
ElseIf sCurrBevel.Contains(ConstGen.BEVEL_GRAPHIC) And DispositionItem <> ConstGen.BEVEL_UP And DispositionItem <> ConstGen.BEVEL_DOWN Then
|
||||||
If sSwing.Contains(ConstGen.HAND_REVERSE) Then
|
If sSwing.Contains(ConstGen.HAND_REVERSE) Then
|
||||||
Return sCurrBevel.Replace(ConstGen.BEVEL_GRAPHIC, ConstGen.BEVEL_UP) & ConstCompo.DDF_SPACE3 & " ## Inverted"
|
Return sCurrBevel.Replace(ConstGen.BEVEL_GRAPHIC, ConstGen.BEVEL_UP) & m_sSpace1Tab & " ## Inverted"
|
||||||
'Return ConstGen.BEVEL_UP & ConstCompo.DDF_SPACE3 & " ## Inverted"
|
'Return ConstGen.BEVEL_UP & m_sSpace1Tab & " ## Inverted"
|
||||||
Else
|
Else
|
||||||
Return sCurrBevel.Replace(ConstGen.BEVEL_GRAPHIC, ConstGen.BEVEL_DOWN) & ConstCompo.DDF_SPACE3 & " ## Inverted"
|
Return sCurrBevel.Replace(ConstGen.BEVEL_GRAPHIC, ConstGen.BEVEL_DOWN) & m_sSpace1Tab & " ## Inverted"
|
||||||
'Return ConstGen.BEVEL_DOWN & ConstCompo.DDF_SPACE3 & " ## Inverted"
|
'Return ConstGen.BEVEL_DOWN & m_sSpace1Tab & " ## Inverted"
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Return sCurrBevel
|
Return sCurrBevel
|
||||||
@@ -1540,6 +1696,13 @@ Friend Module DdfFile
|
|||||||
GeneralAssembly.Add("#EGTDOORCREATOR")
|
GeneralAssembly.Add("#EGTDOORCREATOR")
|
||||||
GeneralAssembly.Add("#GENERAL ASSEMBLY")
|
GeneralAssembly.Add("#GENERAL ASSEMBLY")
|
||||||
GeneralAssembly.Add("#")
|
GeneralAssembly.Add("#")
|
||||||
|
|
||||||
|
' dalla veresione 2.4l1 per gestione conversione mm/inch e viceversa
|
||||||
|
GeneralAssembly.Add(ConstCompo.DDF_METADATA & "Unit : ")
|
||||||
|
GeneralAssembly.Add(ConstCompo.DDF_METADATA & "measures : " & ConvertMmUnitsToString(OptionModule.m_bIsMmUnit))
|
||||||
|
GeneralAssembly.Add(DDF_METADATA)
|
||||||
|
|
||||||
|
' dati assemblato
|
||||||
GeneralAssembly.Add(ConstCompo.DDF_METADATA & "Size : ")
|
GeneralAssembly.Add(ConstCompo.DDF_METADATA & "Size : ")
|
||||||
If StringToDouble(CurrAssembly.Thickness, dVal) Then
|
If StringToDouble(CurrAssembly.Thickness, dVal) Then
|
||||||
GeneralAssembly.Add(ConstCompo.DDF_METADATA & "thickness : " & DoubleToString(dVal, 5))
|
GeneralAssembly.Add(ConstCompo.DDF_METADATA & "thickness : " & DoubleToString(dVal, 5))
|
||||||
|
|||||||
+90
-12
@@ -10,11 +10,7 @@ Module Modified
|
|||||||
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
|
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
|
||||||
If Not IsNothing(Map.refPartPageVM) AndAlso Not IsNothing(Map.refPartPageVM.CurrPart) Then
|
If Not IsNothing(Map.refPartPageVM) AndAlso Not IsNothing(Map.refPartPageVM.CurrPart) Then
|
||||||
For Each Compo In Map.refPartPageVM.CurrPart.CompoList
|
For Each Compo In Map.refPartPageVM.CurrPart.CompoList
|
||||||
Compo.BorderColor = DirectCast(New BrushConverter().ConvertFrom("#DCDCDC"), SolidColorBrush)
|
Compo.ResetMark()
|
||||||
Compo.BackGroundColor = DirectCast(New BrushConverter().ConvertFrom("#FFFFFF"), SolidColorBrush)
|
|
||||||
Compo.Foreground = DirectCast(New BrushConverter().ConvertFrom("#000000"), SolidColorBrush)
|
|
||||||
Compo.BorderThickness = 1
|
|
||||||
Compo.FontBold = FontWeights.Normal
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -111,6 +107,32 @@ Public Class Compo
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Sub ResetMark()
|
||||||
|
m_BorderColor = DirectCast(New BrushConverter().ConvertFrom("#DCDCDC"), SolidColorBrush)
|
||||||
|
m_BackGroundColor = Brushes.White
|
||||||
|
m_Foreground = Brushes.Black
|
||||||
|
m_BorderThickness = 1
|
||||||
|
m_FontBold = FontWeights.Normal
|
||||||
|
NotifyPropertyChanged("BorderColor")
|
||||||
|
NotifyPropertyChanged("BackGroundColor")
|
||||||
|
NotifyPropertyChanged("Foreground")
|
||||||
|
NotifyPropertyChanged("BorderThickness")
|
||||||
|
NotifyPropertyChanged("FontBold")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub SetMark()
|
||||||
|
m_BorderColor = Brushes.DeepPink
|
||||||
|
m_BackGroundColor = Brushes.White
|
||||||
|
m_Foreground = Brushes.Gold
|
||||||
|
m_BorderThickness = 2
|
||||||
|
m_FontBold = FontWeights.Bold
|
||||||
|
NotifyPropertyChanged("BorderColor")
|
||||||
|
NotifyPropertyChanged("BackGroundColor")
|
||||||
|
NotifyPropertyChanged("Foreground")
|
||||||
|
NotifyPropertyChanged("BorderThickness")
|
||||||
|
NotifyPropertyChanged("FontBold")
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' Colori GroupBox
|
#End Region ' Colori GroupBox
|
||||||
|
|
||||||
#Region "CompoRef"
|
#Region "CompoRef"
|
||||||
@@ -1134,7 +1156,7 @@ Public Class Compo
|
|||||||
|
|
||||||
Return True
|
Return True
|
||||||
|
|
||||||
Case INI_TEXTBOX
|
Case INI_TEXTBOX, INI_TEXTBOX_D
|
||||||
' NomeDDF e Nome del Text
|
' NomeDDF e Nome del Text
|
||||||
Dim sTextList() As String = sItems(1).Split("/"c)
|
Dim sTextList() As String = sItems(1).Split("/"c)
|
||||||
Dim sDDFName As String = String.Empty
|
Dim sDDFName As String = String.Empty
|
||||||
@@ -1150,20 +1172,30 @@ Public Class Compo
|
|||||||
' Se ci sono 2 elementi "TextBox; NomeDDF/Nome"
|
' Se ci sono 2 elementi "TextBox; NomeDDF/Nome"
|
||||||
If sItems.Count < 3 Then
|
If sItems.Count < 3 Then
|
||||||
NewCompoParam = New TextBoxParam(sDDFName, sName, Me, "0.000", Nothing, Nothing)
|
NewCompoParam = New TextBoxParam(sDDFName, sName, Me, "0.000", Nothing, Nothing)
|
||||||
|
If Trim(sItems(0)).EndsWith("d"c) Then
|
||||||
|
Dim Loc_TextBox_d As TextBoxParam = DirectCast(NewCompoParam, TextBoxParam)
|
||||||
|
Loc_TextBox_d.bIsLen = False
|
||||||
|
NewCompoParam = Loc_TextBox_d
|
||||||
|
End If
|
||||||
' Errore nella lettura {0} nel parametro {1} della componente: non esiste il valore.
|
' Errore nella lettura {0} nel parametro {1} della componente: non esiste il valore.
|
||||||
sErrorList = ConcatErrorString(sErrorList, String.Format(EgtMsg(50125), sName, m_CompoType.DDFName))
|
sErrorList = ConcatErrorString(sErrorList, String.Format(EgtMsg(50125), sName, m_CompoType.DDFName))
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
' recupero il valore di default
|
' recupero il valore di default
|
||||||
Dim dHeight As Double = 500 ' Attenzione ai mm
|
Dim dHeight As Double = 500 ' Attenzione ai mm
|
||||||
If Not ConvertCompoConfig(sItems(2), dHeight) Then
|
If Not Trim(sItems(0)).EndsWith("d"c) AndAlso Not ConvertCompoConfig(sItems(2), dHeight) Then
|
||||||
sErrorList = ConcatErrorString(sErrorList, String.Format(EgtMsg(50147), sName, sItems(2)))
|
sErrorList = ConcatErrorString(sErrorList, String.Format(EgtMsg(50147), sName, sItems(2)))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
NewCompoParam = New TextBoxParam(sDDFName, sName, Me, sItems(2), Nothing, Nothing)
|
NewCompoParam = New TextBoxParam(sDDFName, sName, Me, sItems(2), Nothing, Nothing)
|
||||||
|
If Trim(sItems(0)).EndsWith("d"c) Then
|
||||||
|
Dim Loc_TextBox_d As TextBoxParam = DirectCast(NewCompoParam, TextBoxParam)
|
||||||
|
Loc_TextBox_d.bIsLen = False
|
||||||
|
NewCompoParam = Loc_TextBox_d
|
||||||
|
End If
|
||||||
Return True
|
Return True
|
||||||
|
|
||||||
Case INI_TEXTBOX_ONOFF
|
Case INI_TEXTBOX_ONOFF, INI_TEXTBOX_ONOFF_D
|
||||||
' NomeDDF e Nome del Text
|
' NomeDDF e Nome del Text
|
||||||
Dim sTextList() As String = sItems(1).Split("/"c)
|
Dim sTextList() As String = sItems(1).Split("/"c)
|
||||||
Dim sDDFName As String = String.Empty
|
Dim sDDFName As String = String.Empty
|
||||||
@@ -1179,6 +1211,11 @@ Public Class Compo
|
|||||||
' Se ci sono 2 elementi "TextBox; NomeDDF/Nome"
|
' Se ci sono 2 elementi "TextBox; NomeDDF/Nome"
|
||||||
If sItems.Count < 3 Then
|
If sItems.Count < 3 Then
|
||||||
NewCompoParam = New TextBoxOnOffParam(sDDFName, sName, Me, "0.000", Nothing, Nothing, False)
|
NewCompoParam = New TextBoxOnOffParam(sDDFName, sName, Me, "0.000", Nothing, Nothing, False)
|
||||||
|
If Trim(sItems(0)).EndsWith("d"c) Then
|
||||||
|
Dim Loc_TextBox_d As TextBoxOnOffParam = DirectCast(NewCompoParam, TextBoxOnOffParam)
|
||||||
|
Loc_TextBox_d.bIsLen = False
|
||||||
|
NewCompoParam = Loc_TextBox_d
|
||||||
|
End If
|
||||||
' Errore nella lettura {0} nel parametro {1} della componente: non esiste il valore.
|
' Errore nella lettura {0} nel parametro {1} della componente: non esiste il valore.
|
||||||
sErrorList = ConcatErrorString(sErrorList, String.Format(EgtMsg(50125), sName, m_CompoType.DDFName))
|
sErrorList = ConcatErrorString(sErrorList, String.Format(EgtMsg(50125), sName, m_CompoType.DDFName))
|
||||||
Return True
|
Return True
|
||||||
@@ -1191,12 +1228,16 @@ Public Class Compo
|
|||||||
|
|
||||||
' recupero il valore di default
|
' recupero il valore di default
|
||||||
Dim dHeight As Double = 500 ' Attenzione ai mm
|
Dim dHeight As Double = 500 ' Attenzione ai mm
|
||||||
If Not ConvertCompoConfig(sItems(2), dHeight) Then
|
If Not Trim(sItems(0)).EndsWith("d"c) AndAlso Not ConvertCompoConfig(sItems(2), dHeight) Then
|
||||||
sErrorList = ConcatErrorString(sErrorList, String.Format(EgtMsg(50147), sName, sItems(2)))
|
sErrorList = ConcatErrorString(sErrorList, String.Format(EgtMsg(50147), sName, sItems(2)))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
NewCompoParam = New TextBoxOnOffParam(sDDFName, sName, Me, sItems(2), Nothing, Nothing, bActiveBox)
|
NewCompoParam = New TextBoxOnOffParam(sDDFName, sName, Me, sItems(2), Nothing, Nothing, bActiveBox)
|
||||||
|
If Trim(sItems(0)).EndsWith("d"c) Then
|
||||||
|
Dim Loc_TextBox_d As TextBoxOnOffParam = DirectCast(NewCompoParam, TextBoxOnOffParam)
|
||||||
|
Loc_TextBox_d.bIsLen = False
|
||||||
|
NewCompoParam = Loc_TextBox_d
|
||||||
|
End If
|
||||||
Return True
|
Return True
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
@@ -1883,6 +1924,9 @@ Public Class Compo
|
|||||||
If Map.refMainWindowVM.SelectedPage <> MainWindowVM.ListPageEnum.nHardwarePage Then
|
If Map.refMainWindowVM.SelectedPage <> MainWindowVM.ListPageEnum.nHardwarePage Then
|
||||||
If Not TempParam.EnableCopy Then Return False
|
If Not TempParam.EnableCopy Then Return False
|
||||||
End If
|
End If
|
||||||
|
Dim sItems() As String = sValue.Split(";"c)
|
||||||
|
' estraggo il primo valore: -- NomeParamOnOff = inch(0.6); 0
|
||||||
|
sValue = sItems(0)
|
||||||
Dim ReadValue = RegexFunction.Brackets(sValue)
|
Dim ReadValue = RegexFunction.Brackets(sValue)
|
||||||
If ReadValue.Contains("DGD.dW") Then
|
If ReadValue.Contains("DGD.dW") Then
|
||||||
ReadValue = sValue.Replace(ReadValue & ")", "W")
|
ReadValue = sValue.Replace(ReadValue & ")", "W")
|
||||||
@@ -1898,7 +1942,17 @@ Public Class Compo
|
|||||||
End If
|
End If
|
||||||
Utility.ConvertCurrentUnitMeasure(ReadValue)
|
Utility.ConvertCurrentUnitMeasure(ReadValue)
|
||||||
TempParam.SetValue(ReadValue)
|
TempParam.SetValue(ReadValue)
|
||||||
TempParam.SetIsActive(True)
|
' verifico se deve essere attivata
|
||||||
|
If sItems.Count > 1 Then
|
||||||
|
If sItems(1).Trim <> "0" Then
|
||||||
|
TempParam.SetIsActive(True)
|
||||||
|
Else
|
||||||
|
TempParam.SetIsActive(False)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
TempParam.SetIsActive(True)
|
||||||
|
End If
|
||||||
|
TempParam.NotifyPropertyChanged("IsActive")
|
||||||
Return True
|
Return True
|
||||||
ElseIf TypeOf CurrCompoParam Is TextBoxParam Then
|
ElseIf TypeOf CurrCompoParam Is TextBoxParam Then
|
||||||
Dim TempParam As TextBoxParam = DirectCast(CurrCompoParam, TextBoxParam)
|
Dim TempParam As TextBoxParam = DirectCast(CurrCompoParam, TextBoxParam)
|
||||||
@@ -1926,11 +1980,24 @@ Public Class Compo
|
|||||||
If Map.refMainWindowVM.SelectedPage <> MainWindowVM.ListPageEnum.nHardwarePage Then
|
If Map.refMainWindowVM.SelectedPage <> MainWindowVM.ListPageEnum.nHardwarePage Then
|
||||||
If Not TempParam.EnableCopy Then Return False
|
If Not TempParam.EnableCopy Then Return False
|
||||||
End If
|
End If
|
||||||
|
Dim sItems() As String = sValue.Split(";"c)
|
||||||
|
' estraggo il primo valore: -- NomeParamOnOff = inch(0.6); 0
|
||||||
|
sValue = sItems(0)
|
||||||
Dim ReadValue = Trim(sValue)
|
Dim ReadValue = Trim(sValue)
|
||||||
For Each Item In TempParam.ItemListDDF
|
For Each Item In TempParam.ItemListDDF
|
||||||
If Trim(Item).ToLower = ReadValue.ToLower Then
|
If Trim(Item).ToLower = ReadValue.ToLower Then
|
||||||
TempParam.SetSelItem(TempParam.ItemList(TempParam.ItemListDDF.IndexOf(Item)))
|
TempParam.SetSelItem(TempParam.ItemList(TempParam.ItemListDDF.IndexOf(Item)))
|
||||||
TempParam.SetIsActive(True)
|
' verifico se deve essere attivata
|
||||||
|
If sItems.Count > 1 Then
|
||||||
|
If sItems(1).Trim <> "0" Then
|
||||||
|
TempParam.SetIsActive(True)
|
||||||
|
Else
|
||||||
|
TempParam.SetIsActive(False)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
TempParam.SetIsActive(True)
|
||||||
|
End If
|
||||||
|
TempParam.NotifyPropertyChanged("IsActive")
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -2341,6 +2408,17 @@ Public Class TextBoxParam
|
|||||||
Shared m_PrecCompoIdCode As String = "-1"
|
Shared m_PrecCompoIdCode As String = "-1"
|
||||||
Shared m_PrecNameParam As String = String.Empty
|
Shared m_PrecNameParam As String = String.Empty
|
||||||
|
|
||||||
|
' utilizzata per riconoscere se il valore della text deve essere convertito mm/inch o viceversa
|
||||||
|
Private m_bIsLen As Boolean = True
|
||||||
|
Public Property bIsLen As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bIsLen
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bIsLen = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
' utilizzato negli Hardware
|
' utilizzato negli Hardware
|
||||||
Private m_TypeVar As String
|
Private m_TypeVar As String
|
||||||
Public Property TypeVar As String
|
Public Property TypeVar As String
|
||||||
|
|||||||
+308
-43
@@ -2,6 +2,7 @@
|
|||||||
Imports System.ComponentModel
|
Imports System.ComponentModel
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
Imports System.Text.RegularExpressions
|
Imports System.Text.RegularExpressions
|
||||||
|
|
||||||
Public Class Part
|
Public Class Part
|
||||||
@@ -46,6 +47,18 @@ Public Class Part
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
' per sapere quale tipo versione è il file
|
||||||
|
Private m_Version As String = "1"
|
||||||
|
Public Property Version As String
|
||||||
|
Get
|
||||||
|
Return m_Version
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_Version = value
|
||||||
|
RegexFunction.sCurrVersionDoor = m_Version
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
' per sapere se il check è attivo (nella modalità assembalto)
|
' per sapere se il check è attivo (nella modalità assembalto)
|
||||||
Private m_IsActive As Boolean
|
Private m_IsActive As Boolean
|
||||||
Public Property IsActive As Boolean
|
Public Property IsActive As Boolean
|
||||||
@@ -1149,6 +1162,21 @@ Public Class Part
|
|||||||
|
|
||||||
#End Region ' Top Angle
|
#End Region ' Top Angle
|
||||||
|
|
||||||
|
#Region "OPTIONS"
|
||||||
|
|
||||||
|
Private m_sOptions As String = String.Empty
|
||||||
|
|
||||||
|
Public Property sOptions As String
|
||||||
|
Get
|
||||||
|
Return m_sOptions
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sOptions = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Options
|
||||||
|
|
||||||
#End Region ' General
|
#End Region ' General
|
||||||
|
|
||||||
' lista delle componenti
|
' lista delle componenti
|
||||||
@@ -1169,6 +1197,7 @@ Public Class Part
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Compo)
|
Set(value As Compo)
|
||||||
m_SelCompo = value
|
m_SelCompo = value
|
||||||
|
MarkCompoInScena()
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -1478,6 +1507,59 @@ Public Class Part
|
|||||||
|
|
||||||
#End Region 'AddCompo
|
#End Region 'AddCompo
|
||||||
|
|
||||||
|
#Region "Selection compo"
|
||||||
|
|
||||||
|
Public Sub ResetAllMark()
|
||||||
|
Dim nIdFirstPart As Integer = EgtGetFirstPart()
|
||||||
|
Dim nIdLay As Integer = EgtGetFirstLayer(nIdFirstPart)
|
||||||
|
While nIdLay <> GDB_ID.NULL
|
||||||
|
EgtResetMark(nIdLay)
|
||||||
|
nIdLay = EgtGetNextLayer(nIdLay)
|
||||||
|
End While
|
||||||
|
EgtDraw()
|
||||||
|
For Each ItemCompo As Compo In CompoList
|
||||||
|
ItemCompo.ResetMark()
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MarkCompoInScena()
|
||||||
|
If IsNothing(m_SelCompo) Then Return
|
||||||
|
If GetMainPrivateProfileInt(S_GENERAL, "MarkCompo", 0) = 0 Then Return
|
||||||
|
ResetAllMark()
|
||||||
|
' recupero la lista dei compo dello stesso tipo
|
||||||
|
Dim TempList As ObservableCollection(Of Compo) = DdfFile.GetCurrentListSameCompoType(m_CompoList, m_SelCompo.CompoType.DDFName)
|
||||||
|
' recupero la lista dei compo con lo stesso nome
|
||||||
|
TempList = DdfFile.GetCurrentListSameCompoDDFName(TempList, m_SelCompo.SelFile, m_SelCompo.SelBrandPart)
|
||||||
|
' riordino la lista appena trovata secondo le regole di stampa DDF
|
||||||
|
DdfFile.GetOrderedListSameCompo(TempList)
|
||||||
|
' ontengo la posizione prevista nella grafica
|
||||||
|
Dim IndexInList As Integer = DdfFile.GetIndexInList(TempList, m_SelCompo)
|
||||||
|
' recupero la lista ordinata
|
||||||
|
Dim sCompoName As String = m_SelCompo.TemplateSelItem
|
||||||
|
' recupero il primo part disponibile
|
||||||
|
Dim nIdFirstPart As Integer = EgtGetFirstPart()
|
||||||
|
Dim nIdLay As Integer = EgtGetFirstLayer(nIdFirstPart)
|
||||||
|
Dim IndexLay As Integer = 0
|
||||||
|
While nIdLay <> GDB_ID.NULL
|
||||||
|
Dim sInfoPath As String = String.Empty
|
||||||
|
If EgtGetInfo(nIdLay, "Path", sInfoPath) Then
|
||||||
|
Dim sNamePath As String = sInfoPath
|
||||||
|
If sNamePath.Contains(sCompoName) And IndexLay = IndexInList Then
|
||||||
|
EgtSetMark(nIdLay)
|
||||||
|
m_SelCompo.SetMark()
|
||||||
|
Exit While
|
||||||
|
ElseIf sNamePath.Contains(sCompoName) And IndexLay < IndexInList Then
|
||||||
|
IndexLay = IndexLay + 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
nIdLay = EgtGetNextLayer(nIdLay)
|
||||||
|
End While
|
||||||
|
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
#Region "RemoveCompo"
|
#Region "RemoveCompo"
|
||||||
|
|
||||||
Friend Sub RemoveCompo(CompoToRemove As Compo, Optional OnlyOnJamb As Boolean = False)
|
Friend Sub RemoveCompo(CompoToRemove As Compo, Optional OnlyOnJamb As Boolean = False)
|
||||||
@@ -1543,7 +1625,8 @@ Public Class Part
|
|||||||
'Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nNothingSelected
|
'Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nNothingSelected
|
||||||
ReadDoor.FileContent = ArrayFile
|
ReadDoor.FileContent = ArrayFile
|
||||||
ReadDoor.m_TypePart = ConstGen.PART_DO_ & "1"
|
ReadDoor.m_TypePart = ConstGen.PART_DO_ & "1"
|
||||||
|
' Imposto di default la porta in lettura è versione 1
|
||||||
|
ReadDoor.Version = "1"
|
||||||
' Se il file DDF è vuoto
|
' Se il file DDF è vuoto
|
||||||
If ReadDoor.FileContent.Count = 0 Then
|
If ReadDoor.FileContent.Count = 0 Then
|
||||||
' 50107 = Empty file.
|
' 50107 = Empty file.
|
||||||
@@ -1565,6 +1648,8 @@ Public Class Part
|
|||||||
' Processo la sezione
|
' Processo la sezione
|
||||||
Dim sSection As String = GetName(sLine)
|
Dim sSection As String = GetName(sLine)
|
||||||
Select Case sSection
|
Select Case sSection
|
||||||
|
Case S_VERSION
|
||||||
|
LineIndex = ReadDoor.GetVersion(LineIndex)
|
||||||
Case S_PRODUCE
|
Case S_PRODUCE
|
||||||
LineIndex = ReadDoor.GetProduce(LineIndex)
|
LineIndex = ReadDoor.GetProduce(LineIndex)
|
||||||
Case S_MEASURES
|
Case S_MEASURES
|
||||||
@@ -1685,6 +1770,10 @@ Public Class Part
|
|||||||
sErrorInfo &= LocalMsg
|
sErrorInfo &= LocalMsg
|
||||||
End If
|
End If
|
||||||
ReadDoorCompleted = True
|
ReadDoorCompleted = True
|
||||||
|
Case ConstCompo.K_HARDWARE
|
||||||
|
LineIndex = LineIndex + 1
|
||||||
|
Case ConstCompo.K_OPTIONS
|
||||||
|
LineIndex = ReadDoor.GetOptions(ReadDoor.NextIndex(LineIndex))
|
||||||
Case Else 'COMPONENTS
|
Case Else 'COMPONENTS
|
||||||
' Se sezione senza nome o altro errore
|
' Se sezione senza nome o altro errore
|
||||||
If String.IsNullOrWhiteSpace(sSection) Then
|
If String.IsNullOrWhiteSpace(sSection) Then
|
||||||
@@ -1800,6 +1889,24 @@ Public Class Part
|
|||||||
Return SkipWhiteSpace(FileContent, Index + 1)
|
Return SkipWhiteSpace(FileContent, Index + 1)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
' Leggo versione
|
||||||
|
Private Function GetVersion(Index As Integer) As Integer
|
||||||
|
Dim sVersion As String = GetValueWithKey(RemoveComment(FileContent(Index)), S_VERSION)
|
||||||
|
If String.IsNullOrWhiteSpace(sVersion) Then
|
||||||
|
m_Version = "1"
|
||||||
|
Else
|
||||||
|
' verifico che sia valido (dove leggo l'elenco delle versioni disponibili?)
|
||||||
|
If sVersion.Trim <> "2" Then
|
||||||
|
m_Version = "1"
|
||||||
|
Else
|
||||||
|
m_Version = sVersion.Trim
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
RegexFunction.sCurrVersionDoor = m_Version
|
||||||
|
' passo alla riga successiva
|
||||||
|
Return NextIndex(Index)
|
||||||
|
End Function
|
||||||
|
|
||||||
' Leggo il frame
|
' Leggo il frame
|
||||||
Private Function GetProduce(Index As Integer) As Integer
|
Private Function GetProduce(Index As Integer) As Integer
|
||||||
Dim sProduce As String = GetValueWithKey(RemoveComment(FileContent(Index)), S_PRODUCE)
|
Dim sProduce As String = GetValueWithKey(RemoveComment(FileContent(Index)), S_PRODUCE)
|
||||||
@@ -1931,6 +2038,9 @@ Public Class Part
|
|||||||
If Index > FileContent.Count() - 1 Then Return -1
|
If Index > FileContent.Count() - 1 Then Return -1
|
||||||
Dim sLine As String = RemoveComment(FileContent(Index))
|
Dim sLine As String = RemoveComment(FileContent(Index))
|
||||||
Dim Width As String = GetValueWithKey(sLine, K_WIDTH)
|
Dim Width As String = GetValueWithKey(sLine, K_WIDTH)
|
||||||
|
If m_refPartDoor.IsTemplate And OptionModule.AdjustDDT Then
|
||||||
|
Width = OptionModule.m_Width
|
||||||
|
End If
|
||||||
If String.IsNullOrWhiteSpace(Width) Then
|
If String.IsNullOrWhiteSpace(Width) Then
|
||||||
If Not SearchKey(sLine, K_WIDTH) Then Return -1
|
If Not SearchKey(sLine, K_WIDTH) Then Return -1
|
||||||
' altrimenti
|
' altrimenti
|
||||||
@@ -1940,6 +2050,7 @@ Public Class Part
|
|||||||
'50159= Missing parameter in ddf!
|
'50159= Missing parameter in ddf!
|
||||||
MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_WIDTH_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_WIDTH_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
Else
|
Else
|
||||||
|
ConvertDDFValueIntoCurrentUnit(m_Measure, Width)
|
||||||
SetWidth(Width)
|
SetWidth(Width)
|
||||||
End If
|
End If
|
||||||
Index = NextIndex(Index)
|
Index = NextIndex(Index)
|
||||||
@@ -1947,6 +2058,9 @@ Public Class Part
|
|||||||
If Index > FileContent.Count() - 1 Then Return -1
|
If Index > FileContent.Count() - 1 Then Return -1
|
||||||
sLine = RemoveComment(FileContent(Index))
|
sLine = RemoveComment(FileContent(Index))
|
||||||
Dim Height As String = GetValueWithKey(sLine, K_HEIGHT)
|
Dim Height As String = GetValueWithKey(sLine, K_HEIGHT)
|
||||||
|
If m_refPartDoor.IsTemplate And OptionModule.AdjustDDT Then
|
||||||
|
Height = OptionModule.m_Height
|
||||||
|
End If
|
||||||
If String.IsNullOrWhiteSpace(Height) Then
|
If String.IsNullOrWhiteSpace(Height) Then
|
||||||
If Not SearchKey(sLine, K_HEIGHT) Then Return -1
|
If Not SearchKey(sLine, K_HEIGHT) Then Return -1
|
||||||
' altrimenti
|
' altrimenti
|
||||||
@@ -1956,6 +2070,7 @@ Public Class Part
|
|||||||
' 50159 = Missing parameter in ddf!
|
' 50159 = Missing parameter in ddf!
|
||||||
MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_HEIGHT_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_HEIGHT_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
Else
|
Else
|
||||||
|
ConvertDDFValueIntoCurrentUnit(m_Measure, Height)
|
||||||
SetHeight(Height)
|
SetHeight(Height)
|
||||||
End If
|
End If
|
||||||
Index = NextIndex(Index)
|
Index = NextIndex(Index)
|
||||||
@@ -1963,6 +2078,9 @@ Public Class Part
|
|||||||
If Index > FileContent.Count() - 1 Then Return -1
|
If Index > FileContent.Count() - 1 Then Return -1
|
||||||
sLine = RemoveComment(FileContent(Index))
|
sLine = RemoveComment(FileContent(Index))
|
||||||
Dim Thickness As String = GetValueWithKey(sLine, K_THICKNESS)
|
Dim Thickness As String = GetValueWithKey(sLine, K_THICKNESS)
|
||||||
|
If m_refPartDoor.IsTemplate And OptionModule.AdjustDDT Then
|
||||||
|
Thickness = OptionModule.m_Thickness
|
||||||
|
End If
|
||||||
If String.IsNullOrWhiteSpace(Thickness) Then
|
If String.IsNullOrWhiteSpace(Thickness) Then
|
||||||
If Not SearchKey(sLine, K_THICKNESS) Then Return -1
|
If Not SearchKey(sLine, K_THICKNESS) Then Return -1
|
||||||
' altrimenti
|
' altrimenti
|
||||||
@@ -1972,6 +2090,7 @@ Public Class Part
|
|||||||
' 50159 = Missing parameter in ddf!
|
' 50159 = Missing parameter in ddf!
|
||||||
MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_THICKNESS_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_THICKNESS_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
Else
|
Else
|
||||||
|
ConvertDDFValueIntoCurrentUnit(m_Measure, Thickness)
|
||||||
SetThickness(Thickness)
|
SetThickness(Thickness)
|
||||||
End If
|
End If
|
||||||
Map.refAssemblyPageVM.CurrAssembly.SetVarAssembly()
|
Map.refAssemblyPageVM.CurrAssembly.SetVarAssembly()
|
||||||
@@ -2053,6 +2172,10 @@ Public Class Part
|
|||||||
MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_SWING_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_SWING_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
Else
|
Else
|
||||||
' carico il valore nella porta corrente
|
' carico il valore nella porta corrente
|
||||||
|
If m_refPartDoor.IsTemplate And OptionModule.AdjustDDT AndAlso Not String.IsNullOrEmpty(OptionModule.ForcesSideSwing) Then
|
||||||
|
Swing = Swing.Remove(0, 1)
|
||||||
|
Swing = OptionModule.ForcesSideSwing & Swing
|
||||||
|
End If
|
||||||
m_Swing = Swing
|
m_Swing = Swing
|
||||||
OptionModule.SetCurrSwing(m_SwingAlias, m_Swing)
|
OptionModule.SetCurrSwing(m_SwingAlias, m_Swing)
|
||||||
If IsNothing(m_SwingAlias) Then Return -1
|
If IsNothing(m_SwingAlias) Then Return -1
|
||||||
@@ -2167,6 +2290,28 @@ Public Class Part
|
|||||||
Return NextIndex(Index)
|
Return NextIndex(Index)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function GetOptions(Index As Integer) As Integer
|
||||||
|
If Index > FileContent.Count() - 1 Then Return Index
|
||||||
|
Dim sLine As String = RemoveComment(FileContent(Index))
|
||||||
|
' se stringa vuota passo alla riga successiva
|
||||||
|
If String.IsNullOrEmpty(sLine) Then
|
||||||
|
Return Index
|
||||||
|
End If
|
||||||
|
' procedo a leggere le options
|
||||||
|
Dim nCount As Integer = 0
|
||||||
|
m_sOptions = String.Empty
|
||||||
|
' sLine.StartsWith(OptionModule.m_sSpace1Tab)
|
||||||
|
While Not (Search3Hyphens(sLine) OrElse Search3Dots(sLine))
|
||||||
|
m_sOptions &= If(nCount > 0, vbCrLf, "") & sLine
|
||||||
|
Index = NextIndex(Index)
|
||||||
|
' se il file è terminatpo esco
|
||||||
|
If Index > FileContent.Count() - 1 Then Return Index
|
||||||
|
sLine = RemoveComment(FileContent(Index))
|
||||||
|
nCount = nCount + 1
|
||||||
|
End While
|
||||||
|
Return Index
|
||||||
|
End Function
|
||||||
|
|
||||||
' calcola la congruenza del posizionamento e del secure
|
' calcola la congruenza del posizionamento e del secure
|
||||||
Private Sub CalcBevelFromSecure()
|
Private Sub CalcBevelFromSecure()
|
||||||
' se sono nella configurazione assemblato e sto leggendo un frame
|
' se sono nella configurazione assemblato e sto leggendo un frame
|
||||||
@@ -2290,19 +2435,18 @@ Public Class Part
|
|||||||
refOptionsVM.RefreshEdgeTypeList()
|
refOptionsVM.RefreshEdgeTypeList()
|
||||||
End If
|
End If
|
||||||
Dim bError As Boolean = False
|
Dim bError As Boolean = False
|
||||||
|
'-------------------------------------------------------------------------------
|
||||||
' Lock
|
' Lock
|
||||||
If Index > FileContent.Count() - 1 Then Return -1
|
If Index > FileContent.Count() - 1 Then Return -1
|
||||||
Dim sLine As String = RemoveComment(FileContent(Index))
|
Dim sLine As String = RemoveComment(FileContent(Index))
|
||||||
m_LockEdgeType = m_LockEdgeTypeList(0)
|
m_LockEdgeType = m_LockEdgeTypeList(0)
|
||||||
Dim LockEdgeType As String = GetValueWithKey(sLine, K_LOCKEDGE)
|
' se vrsione 2 (20/04/2023) il tipo di bevel è inserito nella riga successiva con chaive K_TYPEEDGE
|
||||||
|
Dim nError As Integer = Index
|
||||||
|
Dim LockEdgeType As String = ManageProfileType(sLine, Index, nError, K_LOCKEDGE)
|
||||||
|
If nError = -1 Then Return -1
|
||||||
If String.IsNullOrWhiteSpace(LockEdgeType) Then
|
If String.IsNullOrWhiteSpace(LockEdgeType) Then
|
||||||
' se non c'è la parola chiave allora esco con errore
|
' se non c'è la parola chiave allora esco con errore
|
||||||
If Not SearchKey(sLine, K_LOCKEDGE) Then
|
If ManageProfileError(sLine, K_LOCKEDGE, SIDE_LOCK) = -1 Then Return -1
|
||||||
Return -1
|
|
||||||
Else
|
|
||||||
FirstReadingEdge = True
|
|
||||||
sErrorMsg = String.Format(EgtMsg(50523), SIDE_LOCK)
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
Try
|
Try
|
||||||
Dim sMetaData As String = Trim(RegexFunction.Metadata(sLine))
|
Dim sMetaData As String = Trim(RegexFunction.Metadata(sLine))
|
||||||
@@ -2332,7 +2476,6 @@ Public Class Part
|
|||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
If Not ControlProfileInList(LockEdgeTypeList, LockEdgeType) Then
|
If Not ControlProfileInList(LockEdgeTypeList, LockEdgeType) Then
|
||||||
' 50522=The profile {0} is not a member of the {1} list.
|
' 50522=The profile {0} is not a member of the {1} list.
|
||||||
sErrorMsg = String.Format(EgtMsg(50522), LockEdgeType, SIDE_LOCK)
|
sErrorMsg = String.Format(EgtMsg(50522), LockEdgeType, SIDE_LOCK)
|
||||||
@@ -2355,6 +2498,7 @@ Public Class Part
|
|||||||
If String.IsNullOrWhiteSpace(LockEdgeOverMaterial) Then
|
If String.IsNullOrWhiteSpace(LockEdgeOverMaterial) Then
|
||||||
If Not SearchKey(sLine, K_OVERMATERIAL) Then Return -1
|
If Not SearchKey(sLine, K_OVERMATERIAL) Then Return -1
|
||||||
Else
|
Else
|
||||||
|
ConvertDDFValueIntoCurrentUnit(m_Measure, LockEdgeOverMaterial)
|
||||||
m_LockEdgeOverMaterial = LockEdgeOverMaterial
|
m_LockEdgeOverMaterial = LockEdgeOverMaterial
|
||||||
End If
|
End If
|
||||||
Index = NextIndex(Index)
|
Index = NextIndex(Index)
|
||||||
@@ -2363,15 +2507,13 @@ Public Class Part
|
|||||||
If Index > FileContent.Count() - 1 Then Return -1
|
If Index > FileContent.Count() - 1 Then Return -1
|
||||||
sLine = RemoveComment(FileContent(Index))
|
sLine = RemoveComment(FileContent(Index))
|
||||||
m_HingeEdgeType = m_HingeEdgeTypeList(0)
|
m_HingeEdgeType = m_HingeEdgeTypeList(0)
|
||||||
Dim HingeEdgeType As String = GetValueWithKey(sLine, K_HINGEEDGE)
|
' se vrsione 2 (20/04/2023) il tipo di bevel è inserito nella riga successiva con chaive K_TYPEEDGE
|
||||||
|
nError = Index
|
||||||
|
Dim HingeEdgeType As String = ManageProfileType(sLine, Index, nError, K_HINGEEDGE)
|
||||||
|
If nError = -1 Then Return -1
|
||||||
If String.IsNullOrWhiteSpace(HingeEdgeType) Then
|
If String.IsNullOrWhiteSpace(HingeEdgeType) Then
|
||||||
' se non c'è la parola chiave allora esco con errore
|
' se non c'è la parola chiave allora esco con errore
|
||||||
If Not SearchKey(sLine, K_HINGEEDGE) Then
|
If ManageProfileError(sLine, K_HINGEEDGE, SIDE_HINGE) = -1 Then Return -1
|
||||||
Return -1
|
|
||||||
Else
|
|
||||||
FirstReadingEdge = True
|
|
||||||
sErrorMsg = String.Format(EgtMsg(50523), SIDE_HINGE)
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
Try
|
Try
|
||||||
m_HingeEdgeType = HingeEdgeTypeList.First(Function(x) x.Name = HingeEdgeType)
|
m_HingeEdgeType = HingeEdgeTypeList.First(Function(x) x.Name = HingeEdgeType)
|
||||||
@@ -2417,21 +2559,21 @@ Public Class Part
|
|||||||
If String.IsNullOrWhiteSpace(HingeEdgeOverMaterial) Then
|
If String.IsNullOrWhiteSpace(HingeEdgeOverMaterial) Then
|
||||||
If Not SearchKey(sLine, K_OVERMATERIAL) Then Return -1
|
If Not SearchKey(sLine, K_OVERMATERIAL) Then Return -1
|
||||||
Else
|
Else
|
||||||
|
ConvertDDFValueIntoCurrentUnit(m_Measure, HingeEdgeOverMaterial)
|
||||||
m_HingeEdgeOverMaterial = HingeEdgeOverMaterial
|
m_HingeEdgeOverMaterial = HingeEdgeOverMaterial
|
||||||
End If
|
End If
|
||||||
Index = NextIndex(Index)
|
Index = NextIndex(Index)
|
||||||
|
'-------------------------------------------------------------------------------
|
||||||
' Top
|
' Top
|
||||||
If Index > FileContent.Count() - 1 Then Return -1
|
If Index > FileContent.Count() - 1 Then Return -1
|
||||||
sLine = RemoveComment(FileContent(Index))
|
sLine = RemoveComment(FileContent(Index))
|
||||||
m_TopType = m_TopEdgeTypeList(0)
|
m_TopType = m_TopEdgeTypeList(0)
|
||||||
Dim TopType As String = GetValueWithKey(sLine, K_TOP)
|
' se vrsione 2 (20/04/2023) il tipo di bevel è inserito nella riga successiva con chaive K_TYPEEDGE
|
||||||
|
nError = Index
|
||||||
|
Dim TopType As String = ManageProfileType(sLine, Index, nError, K_TOP)
|
||||||
|
If nError = -1 Then Return -1
|
||||||
If String.IsNullOrWhiteSpace(TopType) Then
|
If String.IsNullOrWhiteSpace(TopType) Then
|
||||||
If Not SearchKey(sLine, K_TOP) Then
|
If ManageProfileError(sLine, K_TOP, SIDE_TOP) = -1 Then Return -1
|
||||||
Return -1
|
|
||||||
Else
|
|
||||||
FirstReadingEdge = True
|
|
||||||
sErrorMsg = String.Format(EgtMsg(50523), SIDE_TOP)
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
Try
|
Try
|
||||||
m_TopType = TopEdgeTypeList.First(Function(x) x.Name = TopType)
|
m_TopType = TopEdgeTypeList.First(Function(x) x.Name = TopType)
|
||||||
@@ -2476,12 +2618,14 @@ Public Class Part
|
|||||||
If String.IsNullOrWhiteSpace(TopOverMaterial) Then
|
If String.IsNullOrWhiteSpace(TopOverMaterial) Then
|
||||||
If Not SearchKey(sLine, K_OVERMATERIAL) Then Return -1
|
If Not SearchKey(sLine, K_OVERMATERIAL) Then Return -1
|
||||||
Else
|
Else
|
||||||
|
ConvertDDFValueIntoCurrentUnit(m_Measure, TopOverMaterial)
|
||||||
m_TopOverMaterial = TopOverMaterial
|
m_TopOverMaterial = TopOverMaterial
|
||||||
End If
|
End If
|
||||||
Index = NextIndex(Index)
|
Index = NextIndex(Index)
|
||||||
If Index > FileContent.Count() - 1 Then Return -1
|
If Index > FileContent.Count() - 1 Then Return -1
|
||||||
sLine = RemoveComment(FileContent(Index))
|
sLine = RemoveComment(FileContent(Index))
|
||||||
'-------------------------------------------------------------------------------
|
'-------------------------------------------------------------------------------
|
||||||
|
' Top Arc
|
||||||
Dim Radius As String = GetValueWithKey(sLine, ConstCompo.K_RADIUS)
|
Dim Radius As String = GetValueWithKey(sLine, ConstCompo.K_RADIUS)
|
||||||
If Not String.IsNullOrEmpty(Radius) Then
|
If Not String.IsNullOrEmpty(Radius) Then
|
||||||
Index = NextIndex(Index)
|
Index = NextIndex(Index)
|
||||||
@@ -2495,7 +2639,9 @@ Public Class Part
|
|||||||
Index = NextIndex(Index)
|
Index = NextIndex(Index)
|
||||||
Else
|
Else
|
||||||
Index = NextIndex(Index)
|
Index = NextIndex(Index)
|
||||||
|
ConvertDDFValueIntoCurrentUnit(m_Measure, Radius)
|
||||||
m_Radius = Radius
|
m_Radius = Radius
|
||||||
|
ConvertDDFValueIntoCurrentUnit(m_Measure, Posx)
|
||||||
m_Posx = Posx
|
m_Posx = Posx
|
||||||
TopArcIsChecked = True
|
TopArcIsChecked = True
|
||||||
TopShapeIsChecked = True
|
TopShapeIsChecked = True
|
||||||
@@ -2519,6 +2665,7 @@ Public Class Part
|
|||||||
Else
|
Else
|
||||||
Index = NextIndex(Index)
|
Index = NextIndex(Index)
|
||||||
m_Angle = Angle
|
m_Angle = Angle
|
||||||
|
ConvertDDFValueIntoCurrentUnit(m_Measure, PosxAngle)
|
||||||
m_PosxAngle = PosxAngle
|
m_PosxAngle = PosxAngle
|
||||||
TopAngleIsChecked = True
|
TopAngleIsChecked = True
|
||||||
SelectedShape = m_TopShapeList(1)
|
SelectedShape = m_TopShapeList(1)
|
||||||
@@ -2532,14 +2679,12 @@ Public Class Part
|
|||||||
If Index > FileContent.Count() - 1 Then Return -1
|
If Index > FileContent.Count() - 1 Then Return -1
|
||||||
sLine = RemoveComment(FileContent(Index))
|
sLine = RemoveComment(FileContent(Index))
|
||||||
m_BottomType = m_BottomEdgeTypeList(0)
|
m_BottomType = m_BottomEdgeTypeList(0)
|
||||||
Dim BottomType As String = GetValueWithKey(sLine, K_BOTTOM)
|
' se vrsione 2 (20/04/2023) il tipo di bevel è inserito nella riga successiva con chaive K_TYPEEDGE
|
||||||
|
nError = Index
|
||||||
|
Dim BottomType As String = ManageProfileType(sLine, Index, nError, K_BOTTOM)
|
||||||
|
If nError = -1 Then Return -1
|
||||||
If String.IsNullOrWhiteSpace(BottomType) Then
|
If String.IsNullOrWhiteSpace(BottomType) Then
|
||||||
If Not SearchKey(sLine, K_BOTTOM) Then
|
If ManageProfileError(sLine, K_BOTTOM, SIDE_BOTTOM) = -1 Then Return -1
|
||||||
Return -1
|
|
||||||
Else
|
|
||||||
FirstReadingEdge = True
|
|
||||||
sErrorMsg = String.Format(EgtMsg(50523), SIDE_BOTTOM)
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
Try
|
Try
|
||||||
m_BottomType = BottomEdgeTypeList.First(Function(x) x.Name = BottomType)
|
m_BottomType = BottomEdgeTypeList.First(Function(x) x.Name = BottomType)
|
||||||
@@ -2584,12 +2729,55 @@ Public Class Part
|
|||||||
If String.IsNullOrWhiteSpace(BottomOverMaterial) Then
|
If String.IsNullOrWhiteSpace(BottomOverMaterial) Then
|
||||||
If Not SearchKey(sLine, K_OVERMATERIAL) Then Return -1
|
If Not SearchKey(sLine, K_OVERMATERIAL) Then Return -1
|
||||||
Else
|
Else
|
||||||
|
ConvertDDFValueIntoCurrentUnit(m_Measure, BottomOverMaterial)
|
||||||
m_BottomOverMaterial = BottomOverMaterial
|
m_BottomOverMaterial = BottomOverMaterial
|
||||||
End If
|
End If
|
||||||
CalcBevelFromSecure()
|
CalcBevelFromSecure()
|
||||||
Return NextIndex(Index)
|
Return NextIndex(Index)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function ManageProfileType(ByRef sLine As String, ByRef Index As Integer, ByRef nError As Integer, sEdgeName As String) As String
|
||||||
|
Dim sVal As String = String.Empty
|
||||||
|
If m_Version = "2" Then
|
||||||
|
If SearchKey(sLine, sEdgeName) Then
|
||||||
|
' passo alla riga successiva
|
||||||
|
Index = NextIndex(Index)
|
||||||
|
If Index > FileContent.Count() - 1 Then
|
||||||
|
nError = -1
|
||||||
|
Return ""
|
||||||
|
End If
|
||||||
|
sLine = RemoveComment(FileContent(Index))
|
||||||
|
sVal = GetValueWithKey(sLine, K_TYPEEDGE)
|
||||||
|
Else
|
||||||
|
nError = -1
|
||||||
|
Return sVal
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
sVal = GetValueWithKey(sLine, sEdgeName)
|
||||||
|
End If
|
||||||
|
Return sVal
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function ManageProfileError(sLine As String, sEdgeName As String, sMsgName As String) As Integer
|
||||||
|
Dim nError As Integer = 0
|
||||||
|
If m_Version = "2" Then
|
||||||
|
If Not SearchKey(sLine, K_TYPEEDGE) Then
|
||||||
|
Return -1
|
||||||
|
Else
|
||||||
|
FirstReadingEdge = True
|
||||||
|
sErrorMsg = String.Format(EgtMsg(50523), sMsgName)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If Not SearchKey(sLine, sEdgeName) Then
|
||||||
|
Return -1
|
||||||
|
Else
|
||||||
|
FirstReadingEdge = True
|
||||||
|
sErrorMsg = String.Format(EgtMsg(50523), sMsgName)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return nError
|
||||||
|
End Function
|
||||||
|
|
||||||
' Leggo i dati del componente ( da senllire riutilizzando funzioni che già esistono)
|
' Leggo i dati del componente ( da senllire riutilizzando funzioni che già esistono)
|
||||||
Private Function GetCompo(Index As Integer, CompoNameDDF As String, ByRef sErrorInfo As String) As Integer
|
Private Function GetCompo(Index As Integer, CompoNameDDF As String, ByRef sErrorInfo As String) As Integer
|
||||||
' Controllo esistenza del componente
|
' Controllo esistenza del componente
|
||||||
@@ -2849,7 +3037,7 @@ Public Class Part
|
|||||||
While IndexLine < FileContent.Count - 1 AndAlso
|
While IndexLine < FileContent.Count - 1 AndAlso
|
||||||
Not (Search3Hyphens(RemoveComment(FileContent(IndexLine))) OrElse Search3Dots(RemoveComment(FileContent(IndexLine)))) AndAlso
|
Not (Search3Hyphens(RemoveComment(FileContent(IndexLine))) OrElse Search3Dots(RemoveComment(FileContent(IndexLine)))) AndAlso
|
||||||
Not Trim(RemoveComment(FileContent(IndexLine))).StartsWith("- ") AndAlso
|
Not Trim(RemoveComment(FileContent(IndexLine))).StartsWith("- ") AndAlso
|
||||||
RemoveComment(FileContent(IndexLine)).StartsWith(ConstCompo.DDF_SPACE3)
|
(RemoveComment(FileContent(IndexLine)).StartsWith(ConstCompo.DDF_SPACE3) Or RemoveComment(FileContent(IndexLine)).StartsWith(ConstCompo.DDF_SPACE2))
|
||||||
' salvo i commenti
|
' salvo i commenti
|
||||||
If String.IsNullOrWhiteSpace(FileContent(IndexLine)) Then
|
If String.IsNullOrWhiteSpace(FileContent(IndexLine)) Then
|
||||||
IndexLine += 1
|
IndexLine += 1
|
||||||
@@ -2955,7 +3143,13 @@ Public Class Part
|
|||||||
Dim sVal As String = GetValueWithoutKey(sLine)
|
Dim sVal As String = GetValueWithoutKey(sLine)
|
||||||
' per ora non esegue nessun tipo di controllo sui valori letti dal file DDF
|
' per ora non esegue nessun tipo di controllo sui valori letti dal file DDF
|
||||||
' DirectCast(CurrCompoParam, TextBoxParam).m_Value = sVal
|
' DirectCast(CurrCompoParam, TextBoxParam).m_Value = sVal
|
||||||
DirectCast(CurrCompoParam, TextBoxParam).Value = sVal
|
Dim Local_TextBoxParam As TextBoxParam = DirectCast(CurrCompoParam, TextBoxParam)
|
||||||
|
If Local_TextBoxParam.bIsLen Then
|
||||||
|
ConvertDDFValueIntoCurrentUnit(m_Measure, sVal)
|
||||||
|
Local_TextBoxParam.Value = sVal
|
||||||
|
Else
|
||||||
|
Local_TextBoxParam.Value = sVal
|
||||||
|
End If
|
||||||
' avviso che il file è modificato (in caso di chiusura del programma obbligo a passare dal salvataggio)
|
' avviso che il file è modificato (in caso di chiusura del programma obbligo a passare dal salvataggio)
|
||||||
Dim dVal As Double
|
Dim dVal As Double
|
||||||
If String.IsNullOrEmpty(sVal) OrElse Not StringToDouble(sVal, dVal) Then
|
If String.IsNullOrEmpty(sVal) OrElse Not StringToDouble(sVal, dVal) Then
|
||||||
@@ -3002,7 +3196,13 @@ Public Class Part
|
|||||||
If String.Equals(Trim(CompoTemplateItem.CompoParamList(IndexParam).DDFName), GetKey(sLine)) Then
|
If String.Equals(Trim(CompoTemplateItem.CompoParamList(IndexParam).DDFName), GetKey(sLine)) Then
|
||||||
' se la stringa c'è nel DDF vuol dire che è stata selezionata
|
' se la stringa c'è nel DDF vuol dire che è stata selezionata
|
||||||
Dim sVal As String = GetValueWithKey(sLine, Trim(CurrCompoParam.DDFName))
|
Dim sVal As String = GetValueWithKey(sLine, Trim(CurrCompoParam.DDFName))
|
||||||
DirectCast(CurrCompoParam, TextBoxOnOffParam).m_Value = sVal
|
Dim Local_TextBoxOnOffParam As TextBoxOnOffParam = DirectCast(CurrCompoParam, TextBoxOnOffParam)
|
||||||
|
If Local_TextBoxOnOffParam.bIsLen Then
|
||||||
|
ConvertDDFValueIntoCurrentUnit(m_Measure, sVal)
|
||||||
|
Local_TextBoxOnOffParam.m_Value = sVal
|
||||||
|
Else
|
||||||
|
Local_TextBoxOnOffParam.m_Value = sVal
|
||||||
|
End If
|
||||||
'DirectCast(CurrCompoParam, TextBoxOnOffParam).Value = sVal
|
'DirectCast(CurrCompoParam, TextBoxOnOffParam).Value = sVal
|
||||||
Dim dVal As Double
|
Dim dVal As Double
|
||||||
If String.IsNullOrEmpty(sVal) OrElse Not StringToDouble(sVal, dVal) Then
|
If String.IsNullOrEmpty(sVal) OrElse Not StringToDouble(sVal, dVal) Then
|
||||||
@@ -3059,6 +3259,7 @@ Public Class Part
|
|||||||
' assegno al parametro della compnente il valore "filtrato"
|
' assegno al parametro della compnente il valore "filtrato"
|
||||||
DirectCast(CurrCompoParam, ComboBoxOnOffParam).SetSelItem(SelItem)
|
DirectCast(CurrCompoParam, ComboBoxOnOffParam).SetSelItem(SelItem)
|
||||||
'DirectCast(CurrCompoParam, ComboBoxOnOffParam).SelItem = SelItem
|
'DirectCast(CurrCompoParam, ComboBoxOnOffParam).SelItem = SelItem
|
||||||
|
DirectCast(CurrCompoParam, ComboBoxOnOffParam).SetIsActive(True)
|
||||||
' se il nome esiste ma è sbagliato
|
' se il nome esiste ma è sbagliato
|
||||||
ElseIf Not String.IsNullOrWhiteSpace(GetKey(sLine)) Then
|
ElseIf Not String.IsNullOrWhiteSpace(GetKey(sLine)) Then
|
||||||
' significa che la TextBoxOnOff è stata disattivata
|
' significa che la TextBoxOnOff è stata disattivata
|
||||||
@@ -3118,8 +3319,8 @@ Public Class Part
|
|||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
' per riconoscere una componente: no spazi ad inizio riga, dopo i ":" riga vuota
|
' per riconoscere una componente: no spazi ad inizio riga, dopo i ":" riga vuota
|
||||||
If FileContent(IndexLine) = FileContent(IndexLine).Trim AndAlso
|
If FileContent(IndexLine).StartsWith(OptionModule.m_sSpaceTabCompo) AndAlso
|
||||||
GetValueWithoutKey(FileContent(IndexLine)) = String.Empty Then
|
GetValueWithoutKey(FileContent(IndexLine)) = String.Empty Then
|
||||||
m_StopNextIndexLine = True
|
m_StopNextIndexLine = True
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
@@ -3227,6 +3428,7 @@ Public Class Part
|
|||||||
|
|
||||||
' utilizzata per generare la porta/jamb dell'Hardware
|
' utilizzata per generare la porta/jamb dell'Hardware
|
||||||
Sub New(Hardware As String)
|
Sub New(Hardware As String)
|
||||||
|
|
||||||
If Not String.IsNullOrEmpty(Hardware) Then
|
If Not String.IsNullOrEmpty(Hardware) Then
|
||||||
Me.m_Width = OptionModule.m_WidthJamb
|
Me.m_Width = OptionModule.m_WidthJamb
|
||||||
Me.m_Height = OptionModule.m_Height
|
Me.m_Height = OptionModule.m_Height
|
||||||
@@ -3260,10 +3462,77 @@ Public Class Part
|
|||||||
Me.TypePart = ConstGen.PART_FRAME_LEFT
|
Me.TypePart = ConstGen.PART_FRAME_LEFT
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
Me.m_Width = OptionModule.m_Width
|
|
||||||
Me.m_Height = OptionModule.m_Height
|
Dim bCLoneDoor As Boolean = (GetMainPrivateProfileInt(S_GENERAL, "CloneDoor", 0) = 1)
|
||||||
Me.m_Thickness = OptionModule.m_Thickness
|
' Se abilitato in file Ini "DoorClone" allora verifico se esiste una porta corrente
|
||||||
Me.SetSwing(OptionModule.m_Swing)
|
If bCLoneDoor And Not IsNothing(Map.refAssemblyManagerVM) AndAlso Not IsNothing(Map.refAssemblyManagerVM.CurrProject) AndAlso
|
||||||
|
Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
|
||||||
|
Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly) AndAlso
|
||||||
|
Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor) Then
|
||||||
|
' Se presente una sola anta
|
||||||
|
Dim nPartDoor As Integer = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count
|
||||||
|
If nPartDoor = 1 Then
|
||||||
|
Dim LocalPartDoor As PartDoor = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0)
|
||||||
|
If Not IsNothing(LocalPartDoor.Door) Then
|
||||||
|
Me.m_Width = LocalPartDoor.Door.m_Width
|
||||||
|
Me.m_Height = LocalPartDoor.Door.m_Height
|
||||||
|
Me.m_Thickness = LocalPartDoor.Door.m_Thickness
|
||||||
|
Me.SetSwing(LocalPartDoor.Door.m_Swing)
|
||||||
|
Me.SetLockEdgeType(New EdgeType(LocalPartDoor.Door.LockEdgeType.Name, Visibility.Visible))
|
||||||
|
Me.SetHingeEdgeType(New EdgeType(LocalPartDoor.Door.HingeEdgeType.Name, Visibility.Visible))
|
||||||
|
Me.SetTopType(New EdgeType(LocalPartDoor.Door.TopType.Name, Visibility.Visible))
|
||||||
|
Me.SetBottomType(New EdgeType(LocalPartDoor.Door.BottomType.Name, Visibility.Visible))
|
||||||
|
Else
|
||||||
|
' Devo usare i parametri di default
|
||||||
|
Me.m_Width = OptionModule.m_Width
|
||||||
|
Me.m_Height = OptionModule.m_Height
|
||||||
|
Me.m_Thickness = OptionModule.m_Thickness
|
||||||
|
Me.SetSwing(OptionModule.m_Swing)
|
||||||
|
Me.SetLockEdgeType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
||||||
|
Me.SetHingeEdgeType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
||||||
|
Me.SetTopType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
||||||
|
Me.SetBottomType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
||||||
|
End If
|
||||||
|
|
||||||
|
ElseIf nPartDoor > 1 Then
|
||||||
|
' Assemblati
|
||||||
|
Dim WdSelPartV As New SelectPartV()
|
||||||
|
Dim WdSelPartVM As New SelectPartVM("Selezione della porta", "Selezione anta", nPartDoor, 1)
|
||||||
|
WdSelPartV.DataContext = WdSelPartVM
|
||||||
|
WdSelPartV.ShowDialog()
|
||||||
|
Dim nSelection As Integer = CInt(WdSelPartVM.Selection.Split(" "c)(1)) - 1
|
||||||
|
' Apro una finestra per chiedere quale anta usare come riferimento
|
||||||
|
Dim LocalPartDoor As PartDoor = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(nSelection)
|
||||||
|
Me.m_Width = LocalPartDoor.Door.m_Width
|
||||||
|
Me.m_Height = LocalPartDoor.Door.m_Height
|
||||||
|
Me.m_Thickness = LocalPartDoor.Door.m_Thickness
|
||||||
|
Me.SetSwing(LocalPartDoor.Door.m_Swing)
|
||||||
|
Me.SetLockEdgeType(New EdgeType(LocalPartDoor.Door.LockEdgeType.Name, Visibility.Visible))
|
||||||
|
Me.SetHingeEdgeType(New EdgeType(LocalPartDoor.Door.HingeEdgeType.Name, Visibility.Visible))
|
||||||
|
Me.SetTopType(New EdgeType(LocalPartDoor.Door.TopType.Name, Visibility.Visible))
|
||||||
|
Me.SetBottomType(New EdgeType(LocalPartDoor.Door.BottomType.Name, Visibility.Visible))
|
||||||
|
Else
|
||||||
|
' Devo usare i parametri di default
|
||||||
|
Me.m_Width = OptionModule.m_Width
|
||||||
|
Me.m_Height = OptionModule.m_Height
|
||||||
|
Me.m_Thickness = OptionModule.m_Thickness
|
||||||
|
Me.SetSwing(OptionModule.m_Swing)
|
||||||
|
Me.SetLockEdgeType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
||||||
|
Me.SetHingeEdgeType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
||||||
|
Me.SetTopType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
||||||
|
Me.SetBottomType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Me.m_Width = OptionModule.m_Width
|
||||||
|
Me.m_Height = OptionModule.m_Height
|
||||||
|
Me.m_Thickness = OptionModule.m_Thickness
|
||||||
|
Me.SetSwing(OptionModule.m_Swing)
|
||||||
|
Me.SetLockEdgeType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
||||||
|
Me.SetHingeEdgeType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
||||||
|
Me.SetTopType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
||||||
|
Me.SetBottomType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
||||||
|
End If
|
||||||
|
|
||||||
If Not IsNothing(OptionModule.m_CurrMaterial) Then
|
If Not IsNothing(OptionModule.m_CurrMaterial) Then
|
||||||
Try
|
Try
|
||||||
Me.SetMaterial(m_MaterialList.First(Function(x) x.Name = Trim(OptionModule.m_CurrMaterial.Name)))
|
Me.SetMaterial(m_MaterialList.First(Function(x) x.Name = Trim(OptionModule.m_CurrMaterial.Name)))
|
||||||
@@ -3276,10 +3545,6 @@ Public Class Part
|
|||||||
Me.m_IsActive = True
|
Me.m_IsActive = True
|
||||||
Me.m_Measure = ConvertMmUnitsToString(OptionModule.m_bIsMmUnit)
|
Me.m_Measure = ConvertMmUnitsToString(OptionModule.m_bIsMmUnit)
|
||||||
Me.m_Weight = OptionModule.m_Weight
|
Me.m_Weight = OptionModule.m_Weight
|
||||||
Me.SetLockEdgeType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
|
||||||
Me.SetHingeEdgeType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
|
||||||
Me.SetTopType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
|
||||||
Me.SetBottomType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
|
||||||
Me.m_LockEdgeMachining = OptionModule.m_LockEdgeMachining
|
Me.m_LockEdgeMachining = OptionModule.m_LockEdgeMachining
|
||||||
Me.m_HingeEdgeMachining = OptionModule.m_HingeEdgeMachining
|
Me.m_HingeEdgeMachining = OptionModule.m_HingeEdgeMachining
|
||||||
Me.m_TopMachining = OptionModule.m_TopMachining
|
Me.m_TopMachining = OptionModule.m_TopMachining
|
||||||
|
|||||||
@@ -12,16 +12,16 @@
|
|||||||
<EgtDOORCreator:TrueToFalse x:Key="TrueToFalse"/>
|
<EgtDOORCreator:TrueToFalse x:Key="TrueToFalse"/>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
|
|
||||||
<Grid IsEnabled="{Binding EnablePageDoor}">
|
<Grid Name="MainGrid" IsEnabled="{Binding EnablePageDoor}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="{Binding WidthColumn1}"/>
|
||||||
<ColumnDefinition Width="5*"/>
|
<ColumnDefinition Width="{Binding WidthColumn2}"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid Margin="0,0,0,0.2" Grid.Column="1" IsEnabled="{Binding IsReadOnly}">
|
<Grid Margin="0,0,0,0.2" Grid.Column="{Binding GridGeneralDiposition}" IsEnabled="{Binding IsReadOnly}">
|
||||||
<Grid.InputBindings>
|
<Grid.InputBindings>
|
||||||
<KeyBinding Key="Enter" Command="{Binding DataContext.RefreshCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
<KeyBinding Key="Enter" Command="{Binding DataContext.RefreshCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
||||||
<KeyBinding Key="F1" Command="{Binding DataContext.GuideCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
<KeyBinding Key="F1" Command="{Binding DataContext.GuideCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
||||||
@@ -893,7 +893,7 @@
|
|||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<ContentControl Grid.Column="0" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
|
<ContentControl Name="MainContentConrol" Grid.Column="{Binding CompoPanelDiposition}" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
|
||||||
<!--<EgtDOORCreator:CompoPanelV Grid.Column="0" DataContext="{Binding CompoPanelPartVM}"/>-->
|
<!--<EgtDOORCreator:CompoPanelV Grid.Column="0" DataContext="{Binding CompoPanelPartVM}"/>-->
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
Public Class PartPageV
|
Public Class PartPageV
|
||||||
|
|
||||||
Public Sub ItemsControl_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
|
Public Sub ItemsControl_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
|
||||||
Dim ListControl As ListBox=DirectCast(sender,listbox)
|
Dim ListControl As ListBox = DirectCast(sender, ListBox)
|
||||||
If Not IsNothing( ListControl.SelectedItem) Then
|
If Not IsNothing(ListControl.SelectedItem) Then
|
||||||
Dim SelectedItemIndex As Integer = ListControl.Items.IndexOf(ListControl.SelectedItem)
|
Dim SelectedItemIndex As Integer = ListControl.Items.IndexOf(ListControl.SelectedItem)
|
||||||
If SelectedItemIndex < 0 Then Return
|
If SelectedItemIndex < 0 Then Return
|
||||||
ListControl.Dispatcher.BeginInvoke(DirectCast(Sub()
|
ListControl.Dispatcher.BeginInvoke(DirectCast(Sub()
|
||||||
@@ -30,4 +30,5 @@
|
|||||||
Private Sub UserControl_IsEnabledChanged(sender As Object, e As DependencyPropertyChangedEventArgs)
|
Private Sub UserControl_IsEnabledChanged(sender As Object, e As DependencyPropertyChangedEventArgs)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -73,6 +73,50 @@ Public Class PartPageVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#Region "DISPOSITION SCREEN"
|
||||||
|
|
||||||
|
Public ReadOnly Property WidthColumn1 As String
|
||||||
|
Get
|
||||||
|
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
|
||||||
|
Return "1*"
|
||||||
|
Else
|
||||||
|
Return "5*"
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property WidthColumn2 As String
|
||||||
|
Get
|
||||||
|
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
|
||||||
|
Return "5*"
|
||||||
|
Else
|
||||||
|
Return "1*"
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property GridGeneralDiposition As String
|
||||||
|
Get
|
||||||
|
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
|
||||||
|
Return "1"
|
||||||
|
Else
|
||||||
|
Return "0"
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CompoPanelDiposition As String
|
||||||
|
Get
|
||||||
|
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
|
||||||
|
Return "0"
|
||||||
|
Else
|
||||||
|
Return "1"
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Disposition Screen
|
||||||
|
|
||||||
#Region "CONSTUCTOR"
|
#Region "CONSTUCTOR"
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ Public Module Doors
|
|||||||
Dim sExecName As String = String.Empty
|
Dim sExecName As String = String.Empty
|
||||||
GetMainPrivateProfileString(S_DOORS, K_DDFEXEC, "", sExecName)
|
GetMainPrivateProfileString(S_DOORS, K_DDFEXEC, "", sExecName)
|
||||||
sExecPath = IniFile.m_sDoorsDirPath & "\" & sExecName
|
sExecPath = IniFile.m_sDoorsDirPath & "\" & sExecName
|
||||||
|
EgtLuaCreateGlobTable("DGD")
|
||||||
|
EgtLuaSetGlobStringVar("DGD.BASEDIR", IniFile.m_sDoorsDirPath & "\")
|
||||||
If Not EgtLuaExecFile(sExecPath) Then Return False
|
If Not EgtLuaExecFile(sExecPath) Then Return False
|
||||||
' Setto variabili per quotatura Lua
|
' Setto variabili per quotatura Lua
|
||||||
For Each HardwareDimension In Map.refDimensioningPanelVM.HardwareDimensionList
|
For Each HardwareDimension In Map.refDimensioningPanelVM.HardwareDimensionList
|
||||||
|
|||||||
+13
-5
@@ -84,15 +84,15 @@
|
|||||||
<Reference Include="combit.ListLabel25.Wpf">
|
<Reference Include="combit.ListLabel25.Wpf">
|
||||||
<HintPath>..\..\EgtProg\EgtDOORCreator\combit.ListLabel25.Wpf.dll</HintPath>
|
<HintPath>..\..\EgtProg\EgtDOORCreator\combit.ListLabel25.Wpf.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="DotNetZip">
|
||||||
|
<HintPath>..\..\EgtProg\OmagCUT\DotNetZip.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="EgtUILib">
|
<Reference Include="EgtUILib">
|
||||||
<HintPath>..\..\EgtProg\Dll32\EgtUILib.dll</HintPath>
|
<HintPath>..\..\EgtProg\Dll32\EgtUILib.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="EgtWPFLib5">
|
<Reference Include="EgtWPFLib5">
|
||||||
<HintPath>..\..\EgtProg\Dll32\EgtWPFLib5.dll</HintPath>
|
<HintPath>..\..\EgtProg\Dll32\EgtWPFLib5.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Ionic.Zip">
|
|
||||||
<HintPath>..\..\EgtProg\EgtDOORCreator\Ionic.Zip.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Design" />
|
<Reference Include="System.Design" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
@@ -223,6 +223,10 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="ProjectManager\ProjectManagerVM.vb" />
|
<Compile Include="ProjectManager\ProjectManagerVM.vb" />
|
||||||
<Compile Include="ProjectManager\MySaveFileDialogVM.vb" />
|
<Compile Include="ProjectManager\MySaveFileDialogVM.vb" />
|
||||||
|
<Compile Include="ProjectManager\SelectPartV.xaml.vb">
|
||||||
|
<DependentUpon>SelectPartV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ProjectManager\SelectPartVM.vb" />
|
||||||
<Compile Include="RegexFunction.vb" />
|
<Compile Include="RegexFunction.vb" />
|
||||||
<Compile Include="ReportInfo\ReportCompo.vb" />
|
<Compile Include="ReportInfo\ReportCompo.vb" />
|
||||||
<Compile Include="SceneManager\DimensioningPanel\DimensioningPanelV.xaml.vb">
|
<Compile Include="SceneManager\DimensioningPanel\DimensioningPanelV.xaml.vb">
|
||||||
@@ -363,6 +367,10 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="ProjectManager\SelectPartV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="SceneManager\DimensioningPanel\DimensioningPanelV.xaml">
|
<Page Include="SceneManager\DimensioningPanel\DimensioningPanelV.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -619,8 +627,8 @@
|
|||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtDOORCreator\EgtDOORCreatorR32.exe
|
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) C:\EgtProg\EgtDOORCreator\EgtDOORCreatorR32.exe
|
||||||
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\EgtDOORCreator\EgtDOORCreatorD32.exe
|
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) C:\EgtProg\EgtDOORCreator\EgtDOORCreatorD32.exe
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
+10
-12
@@ -1,19 +1,17 @@
|
|||||||
<EgtWPFLib5:EgtCustomWindow x:Class="GuideV"
|
<EgtWPFLib5:EgtCustomWindow x:Class="GuideV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
Title="{Binding Title}" Icon="/Resources/EgtDOOR.ico"
|
Title="{Binding Title}" Icon="/Resources/EgtDOOR.ico"
|
||||||
TitleBarBrush="{StaticResource EgaltechBlue1}"
|
TitleBarBrush="{StaticResource EgaltechBlue1}"
|
||||||
BorderBrush="{StaticResource EgaltechBlue1}"
|
BorderBrush="{StaticResource EgaltechBlue1}"
|
||||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
|
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
|
||||||
IsMinimizable="True" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
IsMinimizable="True" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
||||||
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
||||||
Height="800" Width="1500">
|
Height="800" Width="1500">
|
||||||
|
|
||||||
|
|
||||||
<DockPanel Margin="5">
|
<DockPanel Margin="5">
|
||||||
<WebBrowser x:Name="DoorBrowser"/>
|
<WebBrowser x:Name="DoorBrowser"/>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|
||||||
|
|
||||||
</EgtWPFLib5:EgtCustomWindow>
|
</EgtWPFLib5:EgtCustomWindow>
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ Public Class GuideV
|
|||||||
Dim sHelpDir As String = String.Empty
|
Dim sHelpDir As String = String.Empty
|
||||||
If OptionModule.m_SmartHelp = HelpPage.LocalHost Then
|
If OptionModule.m_SmartHelp = HelpPage.LocalHost Then
|
||||||
sHelpDir = IniFile.m_sHelpDir.Replace("C:", "file://127.0.0.1/c$")
|
sHelpDir = IniFile.m_sHelpDir.Replace("C:", "file://127.0.0.1/c$")
|
||||||
DoorBrowser.Navigate(New Uri(sHelpDir & "\" & m_Language & "\" & GuideVM.m_AddressGuide & ".html"))
|
DoorBrowser.Source = New Uri(sHelpDir & "\" & m_Language & "\" & GuideVM.m_AddressGuide & ".html")
|
||||||
ElseIf OptionModule.m_SmartHelp = HelpPage.WebBrowserVB Then
|
ElseIf OptionModule.m_SmartHelp = HelpPage.WebBrowserVB Then
|
||||||
sHelpDir = IniFile.m_sHelpDir
|
sHelpDir = IniFile.m_sHelpDir
|
||||||
DoorBrowser.Navigate(New Uri(sHelpDir & "\" & m_Language & "\" & GuideVM.m_AddressGuide & ".html"))
|
DoorBrowser.Source = New Uri(sHelpDir & "\" & m_Language & "\" & GuideVM.m_AddressGuide & ".html")
|
||||||
Else
|
Else
|
||||||
sHelpDir = IniFile.m_sHelpDir
|
sHelpDir = IniFile.m_sHelpDir
|
||||||
Try
|
Try
|
||||||
|
|||||||
+161
-46
@@ -83,8 +83,8 @@ Public Class Hardware
|
|||||||
If Not IsNothing(value) Then
|
If Not IsNothing(value) Then
|
||||||
m_SelBrand = value
|
m_SelBrand = value
|
||||||
ElseIf Not IsNothing(value) AndAlso Not Directory.Exists(value.ModelDir) Then
|
ElseIf Not IsNothing(value) AndAlso Not Directory.Exists(value.ModelDir) Then
|
||||||
' 50542 = {0}: Directory does not exist!
|
' 50542 = {0}: Directory does not exist!
|
||||||
ErrorReading = String.Format(EgtMsg(50542),value.ModelDir)
|
ErrorReading = String.Format(EgtMsg(50542), value.ModelDir)
|
||||||
RefreshTemplateListEgtDOORCreator()
|
RefreshTemplateListEgtDOORCreator()
|
||||||
Else
|
Else
|
||||||
Return
|
Return
|
||||||
@@ -130,8 +130,8 @@ Public Class Hardware
|
|||||||
SelTemplate = String.Empty
|
SelTemplate = String.Empty
|
||||||
'Map.refSceneManagerVM.RefreshBtn()
|
'Map.refSceneManagerVM.RefreshBtn()
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
SelTemplate = String.Empty
|
SelTemplate = String.Empty
|
||||||
'Map.refSceneManagerVM.RefreshBtn()
|
'Map.refSceneManagerVM.RefreshBtn()
|
||||||
End If
|
End If
|
||||||
' termine della selezione
|
' termine della selezione
|
||||||
@@ -530,7 +530,9 @@ Public Class Hardware
|
|||||||
Else
|
Else
|
||||||
SwingTemplate = "RH"
|
SwingTemplate = "RH"
|
||||||
End If
|
End If
|
||||||
IniFile.StdTemplateGetPrivateProfileString("Hardware", "Swing", SwingTemplate, SwingTemplate)
|
If String.IsNullOrEmpty(SwingTemplate) Or Not (GetMainPrivateProfileInt(S_GENERAL, "CloneDoor", 0) = 1) Then
|
||||||
|
IniFile.StdTemplateGetPrivateProfileString("Hardware", "Swing", SwingTemplate, SwingTemplate)
|
||||||
|
End If
|
||||||
Map.refHardwarePageVM.GenericPart.SetSwing(SwingTemplate)
|
Map.refHardwarePageVM.GenericPart.SetSwing(SwingTemplate)
|
||||||
If bIsFrame Then
|
If bIsFrame Then
|
||||||
IniFile.StdTemplateGetPrivateProfileString("Hardware", "SwingFrame", "RH", SwingTemplate)
|
IniFile.StdTemplateGetPrivateProfileString("Hardware", "SwingFrame", "RH", SwingTemplate)
|
||||||
@@ -555,17 +557,17 @@ Public Class Hardware
|
|||||||
If Map.refHardwarePageVM.GenericPart.CompoList.Count < 1 Then Return
|
If Map.refHardwarePageVM.GenericPart.CompoList.Count < 1 Then Return
|
||||||
'If String.IsNullOrEmpty(HardwareGeneral.JambSide) Then
|
'If String.IsNullOrEmpty(HardwareGeneral.JambSide) Then
|
||||||
For Each Item In Map.refHardwarePageVM.GenericPart.CompoList(0).CompoParamList
|
For Each Item In Map.refHardwarePageVM.GenericPart.CompoList(0).CompoParamList
|
||||||
If TypeOf Item Is ComboBoxParam AndAlso
|
If TypeOf Item Is ComboBoxParam AndAlso
|
||||||
Item.DDFName = "side" Then
|
Item.DDFName = "side" Then
|
||||||
Dim CBoxPar As ComboBoxParam = DirectCast(Item, ComboBoxParam)
|
Dim CBoxPar As ComboBoxParam = DirectCast(Item, ComboBoxParam)
|
||||||
Dim IndexItem As Integer = CBoxPar.ItemList.IndexOf(CBoxPar.SelItem)
|
Dim IndexItem As Integer = CBoxPar.ItemList.IndexOf(CBoxPar.SelItem)
|
||||||
If IndexItem > -1 Then
|
If IndexItem > -1 Then
|
||||||
HardwareGeneral.SetJambSide(CBoxPar.ItemListDDF(IndexItem))
|
HardwareGeneral.SetJambSide(CBoxPar.ItemListDDF(IndexItem))
|
||||||
End If
|
|
||||||
'HardwareGeneral.SetJambSide(CBoxPar.SelItem)
|
|
||||||
Exit For
|
|
||||||
End If
|
End If
|
||||||
Next
|
'HardwareGeneral.SetJambSide(CBoxPar.SelItem)
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
'End If
|
'End If
|
||||||
If HardwareGeneral.JambSide.ToLower.Contains("hinge") Then
|
If HardwareGeneral.JambSide.ToLower.Contains("hinge") Then
|
||||||
Map.refHardwarePageVM.GenericPart.TypePart = PART_FRAME_LEFT & HINGE
|
Map.refHardwarePageVM.GenericPart.TypePart = PART_FRAME_LEFT & HINGE
|
||||||
@@ -581,21 +583,21 @@ Public Class Hardware
|
|||||||
Map.refHardwarePageVM.GenericPart.SetHeight(OptionModule.m_Height)
|
Map.refHardwarePageVM.GenericPart.SetHeight(OptionModule.m_Height)
|
||||||
End If
|
End If
|
||||||
Return
|
Return
|
||||||
ElseIf HardwareGeneral.JambSide.ToLower.Contains("top") Then
|
ElseIf HardwareGeneral.JambSide.ToLower.Contains("top") Then
|
||||||
Map.refHardwarePageVM.GenericPart.TypePart = PART_FRAME_TOP & TOP
|
Map.refHardwarePageVM.GenericPart.TypePart = PART_FRAME_TOP & TOP
|
||||||
If Not HardwarePartVM.bIsSettingDoor Then
|
If Not HardwarePartVM.bIsSettingDoor Then
|
||||||
Map.refHardwarePageVM.GenericPart.SetWidth(OptionModule.m_Width)
|
Map.refHardwarePageVM.GenericPart.SetWidth(OptionModule.m_Width)
|
||||||
Map.refHardwarePageVM.GenericPart.SetHeight(OptionModule.m_ThicknessHead)
|
Map.refHardwarePageVM.GenericPart.SetHeight(OptionModule.m_ThicknessHead)
|
||||||
End If
|
End If
|
||||||
Return
|
Return
|
||||||
ElseIf HardwareGeneral.JambSide.ToLower.Contains("bottom") Then
|
ElseIf HardwareGeneral.JambSide.ToLower.Contains("bottom") Then
|
||||||
Map.refHardwarePageVM.GenericPart.TypePart = PART_FRAME_BOTTOM & BOTTOM
|
Map.refHardwarePageVM.GenericPart.TypePart = PART_FRAME_BOTTOM & BOTTOM
|
||||||
If Not HardwarePartVM.bIsSettingDoor Then
|
If Not HardwarePartVM.bIsSettingDoor Then
|
||||||
Map.refHardwarePageVM.GenericPart.SetWidth(OptionModule.m_Width)
|
Map.refHardwarePageVM.GenericPart.SetWidth(OptionModule.m_Width)
|
||||||
Map.refHardwarePageVM.GenericPart.SetHeight(OptionModule.m_ThicknessBottom)
|
Map.refHardwarePageVM.GenericPart.SetHeight(OptionModule.m_ThicknessBottom)
|
||||||
End If
|
End If
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -739,14 +741,16 @@ Public Class Hardware
|
|||||||
Dim nIsActiveMaterial As Integer = 3
|
Dim nIsActiveMaterial As Integer = 3
|
||||||
Dim bIsCurrentMaterial As Boolean = True
|
Dim bIsCurrentMaterial As Boolean = True
|
||||||
StdTemplateGetPrivateProfileListMaterial(S_CHAPTER & ChapterIndex, K_MATERIAL, sMaterialList, nIsActiveMaterial)
|
StdTemplateGetPrivateProfileListMaterial(S_CHAPTER & ChapterIndex, K_MATERIAL, sMaterialList, nIsActiveMaterial)
|
||||||
For Each ItemMaterial In sMaterialList
|
'For Each ItemMaterial In sMaterialList
|
||||||
bIsCurrentMaterial = False
|
' bIsCurrentMaterial = False
|
||||||
Dim ArrayItemMaterial As String() = ItemMaterial.Split("/"c)
|
' Dim ArrayItemMaterial As String() = ItemMaterial.Split("/"c)
|
||||||
If Trim(ArrayItemMaterial(0)) = Trim(Map.refHardwarePageVM.GenericPart.SelectedMaterial.NameDDF) Then
|
' If Trim(ArrayItemMaterial(0)) = Trim(Map.refHardwarePageVM.GenericPart.SelectedMaterial.NameDDF) Then
|
||||||
bIsCurrentMaterial = True
|
' bIsCurrentMaterial = True
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
Next
|
'Next
|
||||||
|
IsCurrentMaterial(sMaterialList, bIsCurrentMaterial)
|
||||||
|
|
||||||
If Not bIsCurrentMaterial And nIsActive <> 4 Then
|
If Not bIsCurrentMaterial And nIsActive <> 4 Then
|
||||||
nIsActive = nIsActiveMaterial
|
nIsActive = nIsActiveMaterial
|
||||||
End If
|
End If
|
||||||
@@ -792,6 +796,18 @@ Public Class Hardware
|
|||||||
Dim NewParam As New CompoParam(m_HardwareGeneral.DDFName, m_HardwareGeneral.Name, Chapter)
|
Dim NewParam As New CompoParam(m_HardwareGeneral.DDFName, m_HardwareGeneral.Name, Chapter)
|
||||||
Dim sHelpParam As String = String.Empty
|
Dim sHelpParam As String = String.Empty
|
||||||
EgtUILib.GetPrivateProfileString(S_CHAPTER & ChapterIndex, "HelpParam" & ParamIndex, "", sHelpParam, m_StdTemplate)
|
EgtUILib.GetPrivateProfileString(S_CHAPTER & ChapterIndex, "HelpParam" & ParamIndex, "", sHelpParam, m_StdTemplate)
|
||||||
|
' verifico se il materiale corrente deve essere visualizzato in funzione del materiale associato al parametro
|
||||||
|
Dim sMaterialParam As String = String.Empty
|
||||||
|
Dim MaterialParamList As New List(Of String)
|
||||||
|
Dim bIsCurrentMaterialParam As Boolean = True
|
||||||
|
Dim sDefaultGhostValue As String = ""
|
||||||
|
StdTemplateGetPrivateProfileListMaterialParam(S_CHAPTER & ChapterIndex, "MaterialParam" & ParamIndex, MaterialParamList, sDefaultGhostValue)
|
||||||
|
IsCurrentMaterial(MaterialParamList, bIsCurrentMaterialParam)
|
||||||
|
If Not bIsCurrentMaterialParam Then
|
||||||
|
' trasformo il parametro in Ghost
|
||||||
|
TrasformCurrParamInGhost(sParam, sDefaultGhostValue)
|
||||||
|
End If
|
||||||
|
|
||||||
' leggo il tipo di parametro, se la lettura va a buon fine la carico
|
' leggo il tipo di parametro, se la lettura va a buon fine la carico
|
||||||
If Chapter.ReadParamHardware(sParam, sHelpParam, NewParam, ErrorReading) Then Chapter.CompoParamList.Add(NewParam)
|
If Chapter.ReadParamHardware(sParam, sHelpParam, NewParam, ErrorReading) Then Chapter.CompoParamList.Add(NewParam)
|
||||||
If TypeOf NewParam Is TextBoxOnOffParam Then
|
If TypeOf NewParam Is TextBoxOnOffParam Then
|
||||||
@@ -812,7 +828,7 @@ Public Class Hardware
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
ParamIndex += 1
|
ParamIndex += 1
|
||||||
End While ' termina lettura del capitolo
|
End While ' termina lettura del capitolo
|
||||||
|
|
||||||
GroupChapters.Add(Chapter)
|
GroupChapters.Add(Chapter)
|
||||||
@@ -833,6 +849,29 @@ Public Class Hardware
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' recupera il l'elenco dei materiali indicati nella stringa e verifica se nell'elenco è presente il materiale attivo nella porta
|
||||||
|
Private Sub IsCurrentMaterial(sMaterialList As List(Of String), ByRef bIsCurrentMaterial As Boolean)
|
||||||
|
For Each ItemMaterial In sMaterialList
|
||||||
|
bIsCurrentMaterial = False
|
||||||
|
Dim ArrayItemMaterial As String() = ItemMaterial.Split("/"c)
|
||||||
|
If Trim(ArrayItemMaterial(0)) = Trim(Map.refHardwarePageVM.GenericPart.SelectedMaterial.NameDDF) Then
|
||||||
|
bIsCurrentMaterial = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub TrasformCurrParamInGhost(ByRef sParamLine As String, ByVal sDefaultValue As String)
|
||||||
|
' separo la stringa
|
||||||
|
Dim sItems As String() = sParamLine.Split(";"c)
|
||||||
|
If sItems.Count > 2 Then
|
||||||
|
sItems(0) = "Ghost"
|
||||||
|
sItems(2) = sDefaultValue
|
||||||
|
End If
|
||||||
|
' riassemblo la stringa iniziale
|
||||||
|
sParamLine = Trim(sItems(0)) & "; " & Trim(sItems(1)) & "; " & Trim(sItems(2))
|
||||||
|
End Sub
|
||||||
|
|
||||||
' carico la liste dei nomi dei capitoli
|
' carico la liste dei nomi dei capitoli
|
||||||
Private Function SetGroupChaptername(sName As String) As Boolean
|
Private Function SetGroupChaptername(sName As String) As Boolean
|
||||||
If m_GroupChapterName.Count = 0 Then m_GroupChapterName.Add(sName)
|
If m_GroupChapterName.Count = 0 Then m_GroupChapterName.Add(sName)
|
||||||
@@ -988,6 +1027,10 @@ Public Class Hardware
|
|||||||
' caricamento dei dati del file lua
|
' caricamento dei dati del file lua
|
||||||
Private Function FindParamTemplateInConfigList(sParam As String, sValue As String) As Boolean
|
Private Function FindParamTemplateInConfigList(sParam As String, sValue As String) As Boolean
|
||||||
For IndexGroupChapters As Integer = 0 To m_GroupChapters.Count - 1
|
For IndexGroupChapters As Integer = 0 To m_GroupChapters.Count - 1
|
||||||
|
' verifico che sia attivo il gruppo
|
||||||
|
If Not m_GroupChapters(IndexGroupChapters).EnableChapter Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
For IndexChapter As Integer = 0 To m_GroupChapters(IndexGroupChapters).CompoParamList.Count - 1
|
For IndexChapter As Integer = 0 To m_GroupChapters(IndexGroupChapters).CompoParamList.Count - 1
|
||||||
If m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter).DDFName = sParam Then
|
If m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter).DDFName = sParam Then
|
||||||
' ho trovato una corrispondenza tra il valore de file ini e quello lua in lettura
|
' ho trovato una corrispondenza tra il valore de file ini e quello lua in lettura
|
||||||
@@ -1055,7 +1098,19 @@ Public Class Hardware
|
|||||||
|
|
||||||
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxOnOffParam Then
|
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxOnOffParam Then
|
||||||
Dim Text As TextBoxOnOffParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxOnOffParam)
|
Dim Text As TextBoxOnOffParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxOnOffParam)
|
||||||
Text.SetIsActive(True)
|
' estraggo il valore: -- NomeParamOnOff = inch(0.6); 0
|
||||||
|
Dim sItems() As String = sValue.Split(";"c)
|
||||||
|
sValue = sItems(0)
|
||||||
|
' verifico se deve essere attivata
|
||||||
|
If sItems.Count > 1 Then
|
||||||
|
If sItems(1).Trim <> "0" Then
|
||||||
|
Text.SetIsActive(True)
|
||||||
|
Else
|
||||||
|
Text.SetIsActive(False)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Text.SetIsActive(True)
|
||||||
|
End If
|
||||||
' se testo numerico, eseguo opportunbe conversioni per H,W e T
|
' se testo numerico, eseguo opportunbe conversioni per H,W e T
|
||||||
sValue = ConvertToDGD(Text.TypeVar, sValue)
|
sValue = ConvertToDGD(Text.TypeVar, sValue)
|
||||||
' controllo il tipo di dato che si aspetta
|
' controllo il tipo di dato che si aspetta
|
||||||
@@ -1116,7 +1171,19 @@ Public Class Hardware
|
|||||||
|
|
||||||
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is ComboBoxOnOffParam Then
|
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is ComboBoxOnOffParam Then
|
||||||
Dim Text As ComboBoxOnOffParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), ComboBoxOnOffParam)
|
Dim Text As ComboBoxOnOffParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), ComboBoxOnOffParam)
|
||||||
Text.SetIsActive(True)
|
' estraggo il valore: -- NomeParamOnOff = inch(0.6); 0
|
||||||
|
Dim sItems() As String = sValue.Split(";"c)
|
||||||
|
sValue = sItems(0)
|
||||||
|
' verifico se deve essere attivata
|
||||||
|
If sItems.Count > 1 Then
|
||||||
|
If sItems(1).Trim <> "0" Then
|
||||||
|
Text.SetIsActive(True)
|
||||||
|
Else
|
||||||
|
Text.SetIsActive(False)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Text.SetIsActive(True)
|
||||||
|
End If
|
||||||
Text.SetSelItem(Text.ItemList(0))
|
Text.SetSelItem(Text.ItemList(0))
|
||||||
For IndexCombo As Integer = 0 To Text.ItemListDDF.Count - 1
|
For IndexCombo As Integer = 0 To Text.ItemListDDF.Count - 1
|
||||||
If Trim(Utility.DeleteSuperScript(Text.ItemListDDF(IndexCombo))) = Trim(Utility.DeleteSuperScript(sValue)) Then Text.SetSelItem(Text.ItemList(IndexCombo))
|
If Trim(Utility.DeleteSuperScript(Text.ItemListDDF(IndexCombo))) = Trim(Utility.DeleteSuperScript(sValue)) Then Text.SetSelItem(Text.ItemList(IndexCombo))
|
||||||
@@ -1811,7 +1878,7 @@ Public Class Hardware
|
|||||||
' cerco un numero finito di parametri
|
' cerco un numero finito di parametri
|
||||||
For IndexParam As Integer = 0 To IndexParamDDF - 1
|
For IndexParam As Integer = 0 To IndexParamDDF - 1
|
||||||
If LineIndex + ParamIndex > sFile.Count - 1 Then Return False
|
If LineIndex + ParamIndex > sFile.Count - 1 Then Return False
|
||||||
' recuro il nome del parametro
|
' recupero il nome del parametro
|
||||||
KeyParam = Trim(RegexFunction.KeyParamLine(sFile(LineIndex + ParamIndex)))
|
KeyParam = Trim(RegexFunction.KeyParamLine(sFile(LineIndex + ParamIndex)))
|
||||||
While String.IsNullOrEmpty(KeyParam) And LineIndex + ParamIndex < sFile(LineIndex + ParamIndex).Count
|
While String.IsNullOrEmpty(KeyParam) And LineIndex + ParamIndex < sFile(LineIndex + ParamIndex).Count
|
||||||
ParamIndex += 1
|
ParamIndex += 1
|
||||||
@@ -1929,10 +1996,16 @@ Public Class Hardware
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
For IndexGroupChapters As Integer = 0 To m_GroupChapters.Count - 1
|
For IndexGroupChapters As Integer = 0 To m_GroupChapters.Count - 1
|
||||||
|
' se il presente gruppo non è attivo passo al successivo (di default assegno "nil", in caso di uscita senza gruppo il valore
|
||||||
|
If Not m_GroupChapters(IndexGroupChapters).EnableChapter Then
|
||||||
|
sValue = " nil"
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
For IndexChapter As Integer = 0 To m_GroupChapters(IndexGroupChapters).CompoParamList.Count - 1
|
For IndexChapter As Integer = 0 To m_GroupChapters(IndexGroupChapters).CompoParamList.Count - 1
|
||||||
If m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter).DDFName = NameParam Then
|
If m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter).DDFName = NameParam Then
|
||||||
' verifico che il parametro da stampare sia abilitato alla stampa (altriementi NON scrivere nel file)
|
' verifico che il parametro da stampare sia abilitato alla stampa (altriementi NON scrivere nel file)
|
||||||
If Not m_GroupChapters(IndexGroupChapters).IsActiveChapter Then sValue = " nil" : Return True
|
If Not m_GroupChapters(IndexGroupChapters).IsActiveChapter Then sValue = " nil" : Return True
|
||||||
|
|
||||||
If TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxDGCParam Then
|
If TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxDGCParam Then
|
||||||
Dim Text As TextBoxDGCParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxDGCParam)
|
Dim Text As TextBoxDGCParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxDGCParam)
|
||||||
sValue = String.Empty
|
sValue = String.Empty
|
||||||
@@ -1942,21 +2015,27 @@ Public Class Hardware
|
|||||||
If Text.ToolTipValue.Contains("Invalid") Then
|
If Text.ToolTipValue.Contains("Invalid") Then
|
||||||
sValue = "0.0000"
|
sValue = "0.0000"
|
||||||
Else
|
Else
|
||||||
sValue = Text.TypeVar & "( " & Text.Value & ")"
|
'sValue = Text.TypeVar & "( " & Text.Value & ")"
|
||||||
|
sValue = "inch( " & Text.Value & ")"
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
sValue = Text.Value
|
sValue = Text.Value
|
||||||
If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")"
|
'If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")"
|
||||||
|
sValue = "mm( " & sValue & ")"
|
||||||
End If
|
End If
|
||||||
Case ConstGen.MM
|
Case ConstGen.MM
|
||||||
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
|
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
|
||||||
sValue = Text.Value
|
sValue = Text.Value
|
||||||
InchesToMm(sValue)
|
InchesToMm(sValue)
|
||||||
|
'sValue = Text.TypeVar & "( " & sValue & ")"
|
||||||
|
sValue = "inch( " & sValue & ")"
|
||||||
Else
|
Else
|
||||||
If Text.ToolTipValue.Contains("Invalid") Then
|
If Text.ToolTipValue.Contains("Invalid") Then
|
||||||
sValue = "0.0000"
|
sValue = "0.0000"
|
||||||
Else
|
Else
|
||||||
sValue = Text.Value
|
'sValue = Text.Value
|
||||||
|
'sValue = Text.TypeVar & "( " & Text.Value & ")"
|
||||||
|
sValue = "mm( " & Text.Value & ")"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
@@ -1975,21 +2054,27 @@ Public Class Hardware
|
|||||||
If Text.ToolTipValue.Contains("Invalid") Then
|
If Text.ToolTipValue.Contains("Invalid") Then
|
||||||
sValue = "0.0000"
|
sValue = "0.0000"
|
||||||
Else
|
Else
|
||||||
sValue = Text.TypeVar & "( " & Text.Value & ")"
|
'sValue = Text.TypeVar & "( " & Text.Value & ")"
|
||||||
|
sValue = "inch( " & Text.Value & ")"
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
sValue = Text.Value
|
sValue = Text.Value
|
||||||
If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")"
|
'If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")"
|
||||||
|
sValue = "mm( " & sValue & ")"
|
||||||
End If
|
End If
|
||||||
Case ConstGen.MM
|
Case ConstGen.MM
|
||||||
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
|
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
|
||||||
sValue = Text.Value
|
sValue = Text.Value
|
||||||
InchesToMm(sValue)
|
InchesToMm(sValue)
|
||||||
|
'sValue = Text.TypeVar & "( " & sValue & ")"
|
||||||
|
sValue = "inch( " & sValue & ")"
|
||||||
Else
|
Else
|
||||||
If Text.ToolTipValue.Contains("Invalid") Then
|
If Text.ToolTipValue.Contains("Invalid") Then
|
||||||
sValue = "0.0000"
|
sValue = "0.0000"
|
||||||
Else
|
Else
|
||||||
sValue = Text.Value
|
'sValue = Text.Value
|
||||||
|
'sValue = Text.TypeVar & "( " & Text.Value & ")"
|
||||||
|
sValue = "mm( " & Text.Value & ")"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
@@ -2015,7 +2100,6 @@ Public Class Hardware
|
|||||||
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxOnOffParam Then
|
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxOnOffParam Then
|
||||||
Dim Text As TextBoxOnOffParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxOnOffParam)
|
Dim Text As TextBoxOnOffParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxOnOffParam)
|
||||||
sValue = String.Empty
|
sValue = String.Empty
|
||||||
If Not Text.IsActive Then sValue = " nil" : Return True
|
|
||||||
' controllo il tipo di dato che si aspetta
|
' controllo il tipo di dato che si aspetta
|
||||||
Select Case Text.TypeVar
|
Select Case Text.TypeVar
|
||||||
Case ConstGen.INCHES
|
Case ConstGen.INCHES
|
||||||
@@ -2023,22 +2107,28 @@ Public Class Hardware
|
|||||||
If Text.ToolTipValue.Contains("Invalid") Then
|
If Text.ToolTipValue.Contains("Invalid") Then
|
||||||
sValue = "0.0000"
|
sValue = "0.0000"
|
||||||
Else
|
Else
|
||||||
sValue = Text.TypeVar & "( " & Text.Value & ")"
|
'sValue = Text.TypeVar & "( " & Text.Value & ")"
|
||||||
|
sValue = "inch( " & Text.Value & ")"
|
||||||
End If
|
End If
|
||||||
'sValue = Text.TypeVar & "( " & Text.ToolTipValue & ")"
|
'sValue = Text.TypeVar & "( " & Text.ToolTipValue & ")"
|
||||||
Else
|
Else
|
||||||
sValue = Text.Value
|
sValue = Text.Value
|
||||||
If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")"
|
'If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")"
|
||||||
|
sValue = "mm( " & sValue & ")"
|
||||||
End If
|
End If
|
||||||
Case ConstGen.MM
|
Case ConstGen.MM
|
||||||
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
|
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
|
||||||
sValue = Text.Value
|
sValue = Text.Value
|
||||||
InchesToMm(sValue)
|
InchesToMm(sValue)
|
||||||
|
'sValue = Text.TypeVar & "( " & sValue & ")"
|
||||||
|
sValue = "inch( " & sValue & ")"
|
||||||
Else
|
Else
|
||||||
If Text.ToolTipValue.Contains("Invalid") Then
|
If Text.ToolTipValue.Contains("Invalid") Then
|
||||||
sValue = "0.0000"
|
sValue = "0.0000"
|
||||||
Else
|
Else
|
||||||
sValue = Text.Value
|
'sValue = Text.Value
|
||||||
|
'sValue = Text.TypeVar & "( " & Text.Value & ")"
|
||||||
|
sValue = "mm( " & Text.Value & ")"
|
||||||
End If
|
End If
|
||||||
'sValue = Text.ToolTipValue
|
'sValue = Text.ToolTipValue
|
||||||
End If
|
End If
|
||||||
@@ -2049,6 +2139,15 @@ Public Class Hardware
|
|||||||
End Select
|
End Select
|
||||||
' se testo numerico, eseguo opportune conversioni per H,W e T
|
' se testo numerico, eseguo opportune conversioni per H,W e T
|
||||||
sValue = ConvertFromDGD(Text.TypeVar, sValue)
|
sValue = ConvertFromDGD(Text.TypeVar, sValue)
|
||||||
|
' se parametro spento (Solo per capitolo DDF)
|
||||||
|
If Not Text.IsActive Then
|
||||||
|
If m_GroupChapters(IndexGroupChapters).TemplateDDFName = "DDF" Then
|
||||||
|
sValue &= "; 0"
|
||||||
|
Else
|
||||||
|
' per inidicare di spegnere il valore deve essere restituito il valore " nill"
|
||||||
|
sValue = " nil"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
Return True
|
Return True
|
||||||
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxParam Then
|
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxParam Then
|
||||||
Dim Text As TextBoxParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxParam)
|
Dim Text As TextBoxParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxParam)
|
||||||
@@ -2060,22 +2159,28 @@ Public Class Hardware
|
|||||||
If Text.ToolTipValue.Contains("Invalid") Then
|
If Text.ToolTipValue.Contains("Invalid") Then
|
||||||
sValue = "0.0000"
|
sValue = "0.0000"
|
||||||
Else
|
Else
|
||||||
sValue = Text.TypeVar & "( " & Text.Value & ")"
|
'sValue = Text.TypeVar & "( " & Text.Value & ")"
|
||||||
|
sValue = "inch( " & Text.Value & ")"
|
||||||
End If
|
End If
|
||||||
'sValue = Text.TypeVar & "( " & Text.ToolTipValue & ")"
|
'sValue = Text.TypeVar & "( " & Text.ToolTipValue & ")"
|
||||||
Else
|
Else
|
||||||
sValue = Text.Value
|
sValue = Text.Value
|
||||||
If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")"
|
'If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")"
|
||||||
|
sValue = "mm( " & Text.Value & ")"
|
||||||
End If
|
End If
|
||||||
Case ConstGen.MM
|
Case ConstGen.MM
|
||||||
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
|
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
|
||||||
sValue = Text.Value
|
sValue = Text.Value
|
||||||
InchesToMm(sValue)
|
InchesToMm(sValue)
|
||||||
|
'sValue = Text.TypeVar & "( " & sValue & ")"
|
||||||
|
sValue = "inch( " & Text.Value & ")"
|
||||||
Else
|
Else
|
||||||
If Text.ToolTipValue.Contains("Invalid") Then
|
If Text.ToolTipValue.Contains("Invalid") Then
|
||||||
sValue = "0.0000"
|
sValue = "0.0000"
|
||||||
Else
|
Else
|
||||||
sValue = Text.Value
|
'sValue = Text.Value
|
||||||
|
'sValue = Text.TypeVar & "( " & Text.Value & ")"
|
||||||
|
sValue = "mm( " & Text.Value & ")"
|
||||||
End If
|
End If
|
||||||
'sValue = Text.ToolTipValue
|
'sValue = Text.ToolTipValue
|
||||||
End If
|
End If
|
||||||
@@ -2118,11 +2223,21 @@ Public Class Hardware
|
|||||||
'-- attenzione a quando abbiamo da stampare delle stringhe! e non dei valori numerici
|
'-- attenzione a quando abbiamo da stampare delle stringhe! e non dei valori numerici
|
||||||
Dim Text As ComboBoxOnOffParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), ComboBoxOnOffParam)
|
Dim Text As ComboBoxOnOffParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), ComboBoxOnOffParam)
|
||||||
sValue = String.Empty
|
sValue = String.Empty
|
||||||
If Not Text.IsActive Then sValue = " nil" : Return True
|
|
||||||
For Index As Integer = 0 To Text.ItemList.Count - 1
|
For Index As Integer = 0 To Text.ItemList.Count - 1
|
||||||
If Text.SelItem = Text.ItemList(Index) Then sValue = Text.ItemListDDF(Index) : Return True
|
If Text.SelItem = Text.ItemList(Index) Then sValue = Text.ItemListDDF(Index)
|
||||||
Next
|
Next
|
||||||
sValue = Text.SelItem
|
If String.IsNullOrEmpty(sValue) Then
|
||||||
|
sValue = Text.SelItem
|
||||||
|
End If
|
||||||
|
' se parametro spento
|
||||||
|
If Not Text.IsActive Then
|
||||||
|
If m_GroupChapters(IndexGroupChapters).TemplateDDFName = "DDF" Then
|
||||||
|
sValue &= "; 0"
|
||||||
|
Else
|
||||||
|
' per inidicare di spegnere il valore deve essere restituito il valore " nill"
|
||||||
|
sValue = " nil"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
Return True
|
Return True
|
||||||
|
|
||||||
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is ComboBoxParam Then
|
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is ComboBoxParam Then
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
<Grid IsEnabled="{Binding EnablePageHardware}">
|
<Grid IsEnabled="{Binding EnablePageHardware}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<!-- Colonna dedicata alla lista dei bottoni -->
|
<!-- Colonna dedicata alla lista dei bottoni -->
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="{Binding WidthColumn1}"/>
|
||||||
<ColumnDefinition Width="5*"/>
|
<ColumnDefinition Width="{Binding WidthColumn2}"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="2*"/>
|
<RowDefinition Height="2*"/>
|
||||||
@@ -26,8 +26,9 @@
|
|||||||
<KeyBinding Key="Enter" Command="{Binding DataContext.RefreshCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
<KeyBinding Key="Enter" Command="{Binding DataContext.RefreshCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
||||||
<KeyBinding Key="F1" Command="{Binding DataContext.GuideCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
<KeyBinding Key="F1" Command="{Binding DataContext.GuideCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
||||||
</Grid.InputBindings>
|
</Grid.InputBindings>
|
||||||
|
|
||||||
<!-- La griglia che gestirà i parametri hardaware -->
|
<!-- La griglia che gestirà i parametri hardaware -->
|
||||||
<Grid Grid.Column="1">
|
<Grid Grid.Column="{Binding GridGeneralDiposition}" Grid.Row="0">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<!-- Deicata al general dell'hardware-->
|
<!-- Deicata al general dell'hardware-->
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
@@ -858,9 +859,9 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- Elenco pulsanti Hardware -->
|
<!-- Elenco pulsanti Hardware -->
|
||||||
<ContentControl Grid.Column="0" Grid.RowSpan="2" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
|
<ContentControl Grid.Column="{Binding CompoPanelDiposition}" Grid.RowSpan="2" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
|
||||||
|
|
||||||
<EgtDOORCreator:HardwareHelpSceneHostV Grid.Column="1" Grid.Row="1" Margin="0,0,2,0"/>
|
<EgtDOORCreator:HardwareHelpSceneHostV Grid.Column="{Binding GridGeneralDiposition}" Grid.Row="1" Margin="0,0,2,0" />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,50 @@ Public Class HardwarePageVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#Region "DISPOSITION SCREEN"
|
||||||
|
|
||||||
|
Public ReadOnly Property WidthColumn1 As String
|
||||||
|
Get
|
||||||
|
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
|
||||||
|
Return "1*"
|
||||||
|
Else
|
||||||
|
Return "5*"
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property WidthColumn2 As String
|
||||||
|
Get
|
||||||
|
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
|
||||||
|
Return "5*"
|
||||||
|
Else
|
||||||
|
Return "1*"
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property GridGeneralDiposition As String
|
||||||
|
Get
|
||||||
|
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
|
||||||
|
Return "1"
|
||||||
|
Else
|
||||||
|
Return "0"
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CompoPanelDiposition As String
|
||||||
|
Get
|
||||||
|
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
|
||||||
|
Return "0"
|
||||||
|
Else
|
||||||
|
Return "1"
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Disposition Screen
|
||||||
|
|
||||||
#Region "MESSAGES"
|
#Region "MESSAGES"
|
||||||
|
|
||||||
Public ReadOnly Property GeneralMsg As String
|
Public ReadOnly Property GeneralMsg As String
|
||||||
|
|||||||
+40
@@ -59,6 +59,8 @@ Friend Module IniFile
|
|||||||
Friend m_sListLabelCurrent As String = String.Empty
|
Friend m_sListLabelCurrent As String = String.Empty
|
||||||
' Path dell'eseguibile Cam5
|
' Path dell'eseguibile Cam5
|
||||||
Friend m_sEgtCameEXEPath As String = String.Empty
|
Friend m_sEgtCameEXEPath As String = String.Empty
|
||||||
|
' Path LuaLibs Dir
|
||||||
|
Friend m_sLuaLibsDir As String = String.Empty
|
||||||
|
|
||||||
' EgtDoorCreator.ini
|
' EgtDoorCreator.ini
|
||||||
Public Function GetPrivateProfileLanguage(ByVal lpAppName As String, ByVal lpKeyName As String) As Language
|
Public Function GetPrivateProfileLanguage(ByVal lpAppName As String, ByVal lpKeyName As String) As Language
|
||||||
@@ -289,6 +291,27 @@ Friend Module IniFile
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
' restituisce l'elenco dei materiali ed eventualmente il valore di default da associare al parametro Ghost che viene generato in sostituzione del parametro letto
|
||||||
|
Public Function StdTemplateGetPrivateProfileListMaterialParam(ByVal lpAppName As String, ByVal lpKeyName As String, ByVal List As List(Of String), ByRef sDefaultParam As String) As Boolean
|
||||||
|
Dim sVal As String = String.Empty
|
||||||
|
StdTemplateGetPrivateProfileString(lpAppName, lpKeyName, "", sVal)
|
||||||
|
If String.IsNullOrEmpty(sVal) Then Return False
|
||||||
|
Dim sItems() As String = sVal.Split(",".ToCharArray)
|
||||||
|
' se la lista ha almeno due elementi
|
||||||
|
If sItems.Count > 1 Then
|
||||||
|
For Index = 0 To sItems.Count() - 2
|
||||||
|
List.Add(Trim(sItems(Index)))
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
' se la lista ha un solo elemento, oppure ha un solo elemento
|
||||||
|
Dim LastItems As String() = sItems.Last.Split(";"c)
|
||||||
|
List.Add(Trim(LastItems(0)))
|
||||||
|
If LastItems.Count > 1 Then
|
||||||
|
sDefaultParam = Trim(LastItems(1))
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function StdTemplateGetPrivateProfileChapterName(ByVal lpAppName As String, ByVal lpKeyName As String, ByRef sValueLua As String, ByRef sValue As String) As Boolean
|
Public Function StdTemplateGetPrivateProfileChapterName(ByVal lpAppName As String, ByVal lpKeyName As String, ByRef sValueLua As String, ByRef sValue As String) As Boolean
|
||||||
Dim sVal As String = String.Empty
|
Dim sVal As String = String.Empty
|
||||||
StdTemplateGetPrivateProfileString(lpAppName, lpKeyName, "", sVal)
|
StdTemplateGetPrivateProfileString(lpAppName, lpKeyName, "", sVal)
|
||||||
@@ -341,6 +364,23 @@ Friend Module IniFile
|
|||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GetPrivateProfileCompoImage(IpAppName As String, IpKeyName As String, ByRef Image As String, CompoIniPath As String) As Boolean
|
||||||
|
Dim sVal As String = String.Empty
|
||||||
|
EgtUILib.GetPrivateProfileString(IpAppName, IpKeyName, "", sVal, CompoIniPath)
|
||||||
|
Dim CurrDir As String = Path.GetDirectoryName(CompoIniPath)
|
||||||
|
sVal = sVal.Trim
|
||||||
|
If Not String.IsNullOrEmpty(sVal) AndAlso Not String.IsNullOrEmpty(CurrDir) Then
|
||||||
|
sVal = CurrDir.Trim & "\" & sVal
|
||||||
|
If File.Exists(sVal) Then
|
||||||
|
Image = sVal
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function GetPrivateProfileFolderName(IpAppName As String, IpKeyName As String, ByRef Name As String, CompoIniPath As String) As Boolean
|
Public Function GetPrivateProfileFolderName(IpAppName As String, IpKeyName As String, ByRef Name As String, CompoIniPath As String) As Boolean
|
||||||
Dim sVal As String = String.Empty
|
Dim sVal As String = String.Empty
|
||||||
EgtUILib.GetPrivateProfileString(IpAppName, IpKeyName, "", sVal, CompoIniPath)
|
EgtUILib.GetPrivateProfileString(IpAppName, IpKeyName, "", sVal, CompoIniPath)
|
||||||
|
|||||||
@@ -56,9 +56,28 @@ Friend Class MainWindowModel
|
|||||||
Dim sKey As String = String.Empty
|
Dim sKey As String = String.Empty
|
||||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||||
EgtSetKey(sKey)
|
EgtSetKey(sKey)
|
||||||
|
|
||||||
|
Dim sNestKey As String = ""
|
||||||
|
EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
|
||||||
|
EgtSetNestKey(sNestKey)
|
||||||
|
Dim bNetHwKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_sIniFile) = 1)
|
||||||
|
EgtSetNetHwKey(bNetHwKey)
|
||||||
|
|
||||||
|
' Impostazioni per chiave di rete
|
||||||
|
Dim bNetKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_sIniFile) = 1)
|
||||||
|
EgtSetNetHwKey(bNetKey)
|
||||||
|
Dim sLockId As String = ""
|
||||||
|
EgtUILib.GetPrivateProfileString(S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
|
||||||
|
If Not String.IsNullOrEmpty(sLockId) Then
|
||||||
|
EgtSetLockId(sLockId)
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Verifico abilitazione nesting automatico
|
||||||
|
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||||
|
|
||||||
' Recupero livello e opzioni della chiave
|
' Recupero livello e opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2404, 1, IniFile.m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2612, 1, IniFile.m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(3279, 2404, 1, IniFile.m_nKeyOptions)
|
EgtGetKeyOptions(3279, 2612, 1, IniFile.m_nKeyOptions)
|
||||||
'Inizializzazione generale di EgtInterface
|
'Inizializzazione generale di EgtInterface
|
||||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||||
Dim sLogFile As String = IniFile.m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
Dim sLogFile As String = IniFile.m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||||
@@ -96,6 +115,7 @@ Friend Class MainWindowModel
|
|||||||
Dim sLuaLibsDir As String = String.Empty
|
Dim sLuaLibsDir As String = String.Empty
|
||||||
GetMainPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
|
GetMainPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
|
||||||
EgtSetLuaLibs(sLuaLibsDir)
|
EgtSetLuaLibs(sLuaLibsDir)
|
||||||
|
IniFile.m_sLuaLibsDir = sLuaLibsDir
|
||||||
Dim sLuaBaseLib As String = String.Empty
|
Dim sLuaBaseLib As String = String.Empty
|
||||||
GetMainPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
|
GetMainPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
|
||||||
EgtLuaRequire(sLuaBaseLib)
|
EgtLuaRequire(sLuaBaseLib)
|
||||||
|
|||||||
@@ -23,8 +23,8 @@
|
|||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<!--<ColumnDefinition Width="1*"/>-->
|
<!--<ColumnDefinition Width="1*"/>-->
|
||||||
<ColumnDefinition Width="6*"/>
|
<ColumnDefinition Width="{Binding WidthColumn1}"/>
|
||||||
<ColumnDefinition Width="5*"/>
|
<ColumnDefinition Width="{Binding WidthColumn2}"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
@@ -32,10 +32,11 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!--<EgtDOORCreator:AssemblyManagerV Grid.Column="0" DataContext="{StaticResource AssemblyManagerVM}"/>-->
|
<!--<EgtDOORCreator:AssemblyManagerV Grid.Column="0" DataContext="{StaticResource AssemblyManagerVM}"/>-->
|
||||||
<ContentControl Grid.Column="0" Grid.Row="0" Content="{Binding AssemblyManagerControl}"/>
|
<ContentControl Grid.Column="{Binding AssemblyManagerDisposition}" Grid.Row="0" Content="{Binding AssemblyManagerControl}"/>
|
||||||
<ContentControl Grid.Column="0" Grid.Row="1" Content="{Binding PageControl}"/>
|
<ContentControl Grid.Column="{Binding PageControlDisposition}" Grid.Row="1" Content="{Binding PageControl}"/>
|
||||||
<EgtDOORCreator:SceneManagerV Grid.Column="1" Grid.RowSpan="2" DataContext="{StaticResource SceneManagerVM}"/>
|
<!--<EgtDOORCreator:SceneManagerV Grid.Column="{Binding SceneManagerDiposition}" Grid.RowSpan="2" DataContext="{StaticResource SceneManagerVM}"/>-->
|
||||||
|
<!--<EgtDOORCreator:SceneManagerV Grid.Column="0" Grid.RowSpan="2" DataContext="{StaticResource SceneManagerVM}"/>-->
|
||||||
|
<ContentControl Grid.Column="{Binding SceneManagerDiposition}" Grid.RowSpan="2" Content="{Binding SceneManagerControl}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</EgtWPFLib5:EgtCustomWindow>
|
</EgtWPFLib5:EgtCustomWindow>
|
||||||
|
|||||||
@@ -2,8 +2,24 @@
|
|||||||
|
|
||||||
Class MainWindowV
|
Class MainWindowV
|
||||||
|
|
||||||
|
Private m_args() As String = Nothing
|
||||||
|
|
||||||
#Region "EVENTS"
|
#Region "EVENTS"
|
||||||
|
|
||||||
|
Public Sub New(args As String())
|
||||||
|
|
||||||
|
' La chiamata è richiesta dalla finestra di progettazione.
|
||||||
|
InitializeComponent()
|
||||||
|
' Per leggere più argomenti devono essere scritti ognuno tra doppi apici e separati da spazio
|
||||||
|
' Esempio:"Argomento 1 di prova" "Argomento 2 di prova"
|
||||||
|
If args.Length > 0 Then
|
||||||
|
m_args = args
|
||||||
|
RunBlindCode()
|
||||||
|
End If
|
||||||
|
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub MainWindowV_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub MainWindowV_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
' Carico e imposto posizione finestra
|
' Carico e imposto posizione finestra
|
||||||
WinPosFromIniToWindow(S_GENERAL, K_WINPLACE, Me)
|
WinPosFromIniToWindow(S_GENERAL, K_WINPLACE, Me)
|
||||||
@@ -11,9 +27,7 @@ Class MainWindowV
|
|||||||
|
|
||||||
Private Sub MainWindowV_ContentRendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
|
Private Sub MainWindowV_ContentRendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
|
||||||
' se è assente la chiave di protezione non mostro la finestra Launcher
|
' se è assente la chiave di protezione non mostro la finestra Launcher
|
||||||
If Map.refSceneManagerVM.bProtectKey Then
|
RunBlindCode()
|
||||||
Map.refMainWindowVM.SetLauncher()
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MainWindowV_Unloaded(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles Me.Closing
|
Private Sub MainWindowV_Unloaded(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles Me.Closing
|
||||||
@@ -25,4 +39,50 @@ Class MainWindowV
|
|||||||
|
|
||||||
#End Region ' EVENTS
|
#End Region ' EVENTS
|
||||||
|
|
||||||
|
Private Sub RunBlindCode()
|
||||||
|
If Map.refSceneManagerVM.bProtectKey Then
|
||||||
|
ReadArgs()
|
||||||
|
Map.refMainWindowVM.SetLauncher()
|
||||||
|
Map.refMainWindowVM.ShowErrorCompoLoad()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Lettura degli argomenti e scrittura di un file di Log con i parametri caricati
|
||||||
|
Private Sub ReadArgs()
|
||||||
|
If Not IsNothing(m_args) Then
|
||||||
|
StartBlinProgdLog(IniFile.m_sTempDir & "\BlindProgLog.txt")
|
||||||
|
' leggo gli argomenti: Il programma si chiude appena termina la scrittura del file DDF
|
||||||
|
Dim Items() As String = m_args(0).Split(";"c)
|
||||||
|
If Items.Length >= 5 Then
|
||||||
|
' Avvio progetto - LauncherOpt.Open_last_project (1)
|
||||||
|
OptionModule.m_bLauncherOpenOnce = True
|
||||||
|
' Indico il percorso del file
|
||||||
|
OptionModule.FileNameFromArgs = Items(0)
|
||||||
|
BlindProgLog(" File '.ddt' input : " & OptionModule.FileNameFromArgs)
|
||||||
|
' Assegno i valore Width, Height, Thickness
|
||||||
|
OptionModule.m_Width = Items(1)
|
||||||
|
BlindProgLog(" width : " & OptionModule.m_Width)
|
||||||
|
OptionModule.m_Height = Items(2)
|
||||||
|
BlindProgLog(" height : " & OptionModule.m_Height)
|
||||||
|
OptionModule.m_Thickness = Items(3)
|
||||||
|
BlindProgLog(" thickness : " & OptionModule.m_Thickness)
|
||||||
|
' Indico il percoso di salvataggio file DDF
|
||||||
|
OptionModule.SaveFileNameFromArgs = Items(4)
|
||||||
|
BlindProgLog(" File '.ddf' output : " & OptionModule.SaveFileNameFromArgs)
|
||||||
|
' Nuovo parametro da laggere per gestione Swing
|
||||||
|
If Items.Length = 6 Then
|
||||||
|
OptionModule.ForcesSideSwing = Items(5)
|
||||||
|
BlindProgLog(" swing : " & OptionModule.ForcesSideSwing)
|
||||||
|
End If
|
||||||
|
' abilito lettura dati
|
||||||
|
OptionModule.AdjustDDT = True
|
||||||
|
Else
|
||||||
|
' blocco lettura dati
|
||||||
|
OptionModule.AdjustDDT = False
|
||||||
|
' TERMINO TUTTO SUBITO!
|
||||||
|
End
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -67,7 +67,9 @@ Public Class MainWindowVM
|
|||||||
Set(value As ListPageEnum)
|
Set(value As ListPageEnum)
|
||||||
m_SelectedPage = value
|
m_SelectedPage = value
|
||||||
NotifyPropertyChanged("PageControl")
|
NotifyPropertyChanged("PageControl")
|
||||||
Map.refInstrumentPanelVM.NotifyPropertyChanged("DimensionVisibility")
|
If Not IsNothing(Map.refInstrumentPanelVM) Then
|
||||||
|
Map.refInstrumentPanelVM.NotifyPropertyChanged("DimensionVisibility")
|
||||||
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -77,6 +79,7 @@ Public Class MainWindowVM
|
|||||||
Private m_PartPage As PartPageV
|
Private m_PartPage As PartPageV
|
||||||
Private m_AssemblyPage As AssemblyPageV
|
Private m_AssemblyPage As AssemblyPageV
|
||||||
Private m_HardwarePage As HardwarePageV
|
Private m_HardwarePage As HardwarePageV
|
||||||
|
Private m_SceneManager As SceneManagerV
|
||||||
|
|
||||||
Private Watcher As FileSystemWatcher = New FileSystemWatcher(IniFile.m_CompoDir, "*" & LUA_EXTENSION)
|
Private Watcher As FileSystemWatcher = New FileSystemWatcher(IniFile.m_CompoDir, "*" & LUA_EXTENSION)
|
||||||
|
|
||||||
@@ -128,6 +131,12 @@ Public Class MainWindowVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property SceneManagerControl As ContentControl
|
||||||
|
Get
|
||||||
|
Return m_SceneManager
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property ProjectManagerControl As ContentControl
|
Public ReadOnly Property ProjectManagerControl As ContentControl
|
||||||
Get
|
Get
|
||||||
If m_SelectedPage <> ListPageEnum.nHardwarePage then
|
If m_SelectedPage <> ListPageEnum.nHardwarePage then
|
||||||
@@ -159,10 +168,79 @@ Public Class MainWindowVM
|
|||||||
m_HardwarePage.DataContext = New HardwarePageVM
|
m_HardwarePage.DataContext = New HardwarePageVM
|
||||||
m_AssemblyManager = New AssemblyManagerV
|
m_AssemblyManager = New AssemblyManagerV
|
||||||
m_AssemblyManager.DataContext = New AssemblyManagerVM
|
m_AssemblyManager.DataContext = New AssemblyManagerVM
|
||||||
|
' inserisco la scena
|
||||||
|
m_SceneManager = New SceneManagerV
|
||||||
|
m_SceneManager.DataContext = New SceneManagerVM
|
||||||
Dim OptionsPage As OptionsVM = OptionPage
|
Dim OptionsPage As OptionsVM = OptionPage
|
||||||
InitWatcher()
|
InitWatcher()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "DISPOSITION SCREEN"
|
||||||
|
|
||||||
|
Public ReadOnly Property WidthColumn1 As String
|
||||||
|
Get
|
||||||
|
If OptionModule.m_nDispostionScreen = 1 Or OptionModule.m_nDispostionScreen = 2 Then
|
||||||
|
Return "5*"
|
||||||
|
Else
|
||||||
|
Return "6*"
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property WidthColumn2 As String
|
||||||
|
Get
|
||||||
|
If OptionModule.m_nDispostionScreen = 1 Or OptionModule.m_nDispostionScreen = 2 Then
|
||||||
|
Return "6*"
|
||||||
|
Else
|
||||||
|
Return "5*"
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property AssemblyManagerDisposition As String
|
||||||
|
Get
|
||||||
|
If OptionModule.m_nDispostionScreen = 1 Or OptionModule.m_nDispostionScreen = 2 Then
|
||||||
|
Return "1"
|
||||||
|
Else
|
||||||
|
Return "0"
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property PageControlDisposition As String
|
||||||
|
Get
|
||||||
|
If OptionModule.m_nDispostionScreen = 1 Or OptionModule.m_nDispostionScreen = 2 Then
|
||||||
|
Return "1"
|
||||||
|
Else
|
||||||
|
Return "0"
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property SceneManagerDiposition As String
|
||||||
|
Get
|
||||||
|
If OptionModule.m_nDispostionScreen = 1 Or OptionModule.m_nDispostionScreen = 2 Then
|
||||||
|
Return "0"
|
||||||
|
Else
|
||||||
|
Return "1"
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Disposition Screen
|
||||||
|
|
||||||
|
#Region "Methods"
|
||||||
|
|
||||||
|
Public Sub ShowErrorCompoLoad()
|
||||||
|
Dim sError As String = Map.refCompoPanelVM.ErrorLoadCompo
|
||||||
|
If Not String.IsNullOrEmpty(sError) Then
|
||||||
|
MessageBox.Show(sError, EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
|
EgtOutLog(sError)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
#Region "Watcher"
|
#Region "Watcher"
|
||||||
|
|
||||||
Public Enum WatcherCalling
|
Public Enum WatcherCalling
|
||||||
@@ -290,6 +368,10 @@ Public Class MainWindowVM
|
|||||||
Case LauncherOpt.Open_last_project
|
Case LauncherOpt.Open_last_project
|
||||||
' se definito ultimo progetto, lo apro
|
' se definito ultimo progetto, lo apro
|
||||||
If GetMainPrivateProfileString(S_LAUNCHERWINDOW, K_LASTPROJECT, "", m_sLastProject) > 0 Then
|
If GetMainPrivateProfileString(S_LAUNCHERWINDOW, K_LASTPROJECT, "", m_sLastProject) > 0 Then
|
||||||
|
' se caricato il nome in avvio del programma allora sovrascrivo
|
||||||
|
If OptionModule.AdjustDDT Then
|
||||||
|
m_sLastProject = OptionModule.FileNameFromArgs
|
||||||
|
End If
|
||||||
Map.refProjectManagerVM.OpenLastProject()
|
Map.refProjectManagerVM.OpenLastProject()
|
||||||
End If
|
End If
|
||||||
Case Else
|
Case Else
|
||||||
|
|||||||
@@ -23,16 +23,16 @@ Imports System.Windows
|
|||||||
#Else
|
#Else
|
||||||
#If DEBUG Then
|
#If DEBUG Then
|
||||||
<Assembly: AssemblyTitle("EgtDOORCreator Debug 32 bit")>
|
<Assembly: AssemblyTitle("EgtDOORCreator Debug 32 bit")>
|
||||||
<Assembly: AssemblyDescription("EgtDOORCreatorD32.exe")>
|
<Assembly: AssemblyDescription("EgtDOORCreatorD32.exe")>
|
||||||
#Else
|
#Else
|
||||||
<Assembly: AssemblyTitle("EgtDOORCreator Release 32 bit")>
|
<Assembly: AssemblyTitle("EgtDOORCreator Release 32 bit")>
|
||||||
<Assembly: AssemblyDescription("EgtDOORCreatorR32.exe")>
|
<Assembly: AssemblyDescription("EgtDOORCreatorR32.exe")>
|
||||||
#End If
|
#End If
|
||||||
#End If
|
#End If
|
||||||
|
|
||||||
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
|
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyProduct("EgtDOORCreator")>
|
<Assembly: AssemblyProduct("EgtDOORCreator")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2016-2021 by EgalTech s.r.l.")>
|
<Assembly: AssemblyCopyright("Copyright © 2016-2024 by Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyTrademark("")>
|
<Assembly: AssemblyTrademark("")>
|
||||||
<Assembly: ComVisible(false)>
|
<Assembly: ComVisible(false)>
|
||||||
|
|
||||||
@@ -72,5 +72,5 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.4.4.1")>
|
<Assembly: AssemblyVersion("2.6.12.1")>
|
||||||
<Assembly: AssemblyFileVersion("2.4.4.1")>
|
<Assembly: AssemblyFileVersion("2.6.12.1")>
|
||||||
|
|||||||
+26
-10
@@ -23,24 +23,40 @@
|
|||||||
|
|
||||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
<application>
|
<application>
|
||||||
<!-- A list of all Windows versions that this application is designed to work with.
|
<!-- A list of the Windows versions that this application has been tested on
|
||||||
Windows will automatically select the most compatible environment.-->
|
and is designed to work with. Uncomment the appropriate elements
|
||||||
|
and Windows will automatically select the most compatible environment. -->
|
||||||
|
|
||||||
<!-- If your application is designed to work with Windows Vista, uncomment the following supportedOS node-->
|
<!-- Windows Vista -->
|
||||||
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>-->
|
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
|
||||||
|
|
||||||
<!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
|
<!-- Windows 7 -->
|
||||||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->
|
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
|
||||||
|
|
||||||
<!-- If your application is designed to work with Windows 8, uncomment the following supportedOS node-->
|
<!-- Windows 8 -->
|
||||||
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>-->
|
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
|
||||||
|
|
||||||
<!-- If your application is designed to work with Windows 8.1, uncomment the following supportedOS node-->
|
<!-- Windows 8.1 -->
|
||||||
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>-->
|
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
|
||||||
|
|
||||||
|
<!-- Windows 10 -->
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
</compatibility>
|
</compatibility>
|
||||||
|
|
||||||
|
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
|
||||||
|
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
|
||||||
|
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
|
||||||
|
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->
|
||||||
|
<!--
|
||||||
|
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<windowsSettings>
|
||||||
|
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
|
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
|
||||||
<!-- <dependency>
|
<!-- <dependency>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
|
|||||||
@@ -7,10 +7,22 @@ Friend Module OptionModule
|
|||||||
' flag per modalità di visualizzazione file (solo lettura)
|
' flag per modalità di visualizzazione file (solo lettura)
|
||||||
Friend ReadOnlyDDF As Boolean = False
|
Friend ReadOnlyDDF As Boolean = False
|
||||||
|
|
||||||
|
' flag per forzare l'aggiornamento delle dimensioni anta dei file DDT
|
||||||
|
Friend AdjustDDT As Boolean = False
|
||||||
|
Friend FileNameFromArgs As String = String.Empty
|
||||||
|
Friend SaveFileNameFromArgs As String = String.Empty
|
||||||
|
' Forza la scrittura dello swing Left(L..) oppure Right(R..)
|
||||||
|
Friend ForcesSideSwing As String = String.Empty
|
||||||
|
|
||||||
' Parametri che contengono lista delle lingue disponibili e lingua selezionata
|
' Parametri che contengono lista delle lingue disponibili e lingua selezionata
|
||||||
Friend m_LanguageList As New ObservableCollection(Of Language)
|
Friend m_LanguageList As New ObservableCollection(Of Language)
|
||||||
Friend m_SelectedLanguage As Language
|
Friend m_SelectedLanguage As Language
|
||||||
|
|
||||||
|
' Elenco delle MTable disponibili nella configurazione corrente
|
||||||
|
Friend m_MTableList As New ObservableCollection(Of MTable)
|
||||||
|
Friend m_SelectedMTable As MTable
|
||||||
|
Friend m_CurrentMachine As String = String.Empty
|
||||||
|
|
||||||
Friend m_OptionLauncherList As New List(Of String)
|
Friend m_OptionLauncherList As New List(Of String)
|
||||||
Friend m_SelectedOptionLauncher As Integer = 0
|
Friend m_SelectedOptionLauncher As Integer = 0
|
||||||
Friend m_bLauncherOpenOnce As Boolean = False
|
Friend m_bLauncherOpenOnce As Boolean = False
|
||||||
@@ -25,6 +37,14 @@ Friend Module OptionModule
|
|||||||
Friend m_bBevelUp As Visibility
|
Friend m_bBevelUp As Visibility
|
||||||
Friend m_bBevelDown As Visibility
|
Friend m_bBevelDown As Visibility
|
||||||
|
|
||||||
|
' Parametri per la scelta della versione di stampa ddf
|
||||||
|
Friend m_sVersionDDF As String = "2"
|
||||||
|
Friend m_sSpaceTabCompo As String = ""
|
||||||
|
Friend m_sSpace1Tab As String = ConstCompo.DDF_SPACE3
|
||||||
|
Friend m_sSpace2Tab As String = ConstCompo.DDF_SPACE5
|
||||||
|
Friend m_sSpace3Tab As String = ConstCompo.DDF_SPACE5
|
||||||
|
Friend m_sSpaceHype As String = ConstCompo.DDF_HYPHEN
|
||||||
|
|
||||||
Friend m_DisableInvertBevel As Visibility = Visibility.Collapsed
|
Friend m_DisableInvertBevel As Visibility = Visibility.Collapsed
|
||||||
|
|
||||||
Friend m_DisableAddGeometry As Visibility = Visibility.Collapsed
|
Friend m_DisableAddGeometry As Visibility = Visibility.Collapsed
|
||||||
@@ -45,6 +65,8 @@ Friend Module OptionModule
|
|||||||
|
|
||||||
Friend m_EnableBrowse As Boolean = False
|
Friend m_EnableBrowse As Boolean = False
|
||||||
|
|
||||||
|
Friend m_nDispostionScreen As Integer = 0
|
||||||
|
|
||||||
Friend Enum LauncherOpt As Integer
|
Friend Enum LauncherOpt As Integer
|
||||||
Open_window = 0
|
Open_window = 0
|
||||||
Open_last_project = 1
|
Open_last_project = 1
|
||||||
@@ -227,11 +249,33 @@ Friend Module OptionModule
|
|||||||
OptionModule.ReadOnlyDDF = False
|
OptionModule.ReadOnlyDDF = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' valore indentazione programma
|
||||||
|
Dim sVer As String = String.Empty
|
||||||
|
If GetMainPrivateProfileString(S_GENERAL, K_DDFVERSION, "1", sVer) > 0 Then
|
||||||
|
Dim sItem() As String = sVer.Split(";"c)
|
||||||
|
m_sVersionDDF = sItem(0).Trim
|
||||||
|
End If
|
||||||
|
If m_sVersionDDF = "2" Then
|
||||||
|
m_sSpaceTabCompo = ConstCompo.DDF_SPACE2
|
||||||
|
m_sSpace1Tab = ConstCompo.DDF_SPACE2
|
||||||
|
m_sSpace2Tab = ConstCompo.DDF_SPACE4
|
||||||
|
m_sSpace3Tab = ConstCompo.DDF_SPACE6
|
||||||
|
m_sSpaceHype = ConstCompo.DDF_HYPHEN_2
|
||||||
|
End If
|
||||||
|
|
||||||
' imposto unità di misura per interfaccia utente
|
' imposto unità di misura per interfaccia utente
|
||||||
m_bIsMmUnit = (GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0)
|
m_bIsMmUnit = (GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0)
|
||||||
EgtSetUiUnits(m_bIsMmUnit)
|
EgtSetUiUnits(m_bIsMmUnit)
|
||||||
m_SelectedMeasureUnit = m_MeasureUnitList(If(m_bIsMmUnit, 0, 1))
|
m_SelectedMeasureUnit = m_MeasureUnitList(If(m_bIsMmUnit, 0, 1))
|
||||||
|
|
||||||
|
' leggo come deve essere visualizzato il programma
|
||||||
|
Dim nDispositionScreen As Integer = GetMainPrivateProfileInt(S_GENERAL, "DispositionScreen", 0)
|
||||||
|
If nDispositionScreen < 0 Or nDispositionScreen > 2 Then
|
||||||
|
m_nDispostionScreen = 0
|
||||||
|
Else
|
||||||
|
m_nDispostionScreen = nDispositionScreen
|
||||||
|
End If
|
||||||
|
|
||||||
' imposto tipo di avvio
|
' imposto tipo di avvio
|
||||||
Dim nLauncher As Integer = GetMainPrivateProfileInt(S_LAUNCHERWINDOW, K_LAUNCHER, 0)
|
Dim nLauncher As Integer = GetMainPrivateProfileInt(S_LAUNCHERWINDOW, K_LAUNCHER, 0)
|
||||||
m_SelectedOptionLauncher = (nLauncher Mod LoOpenOnce)
|
m_SelectedOptionLauncher = (nLauncher Mod LoOpenOnce)
|
||||||
@@ -391,21 +435,25 @@ Friend Module OptionModule
|
|||||||
DefaultGetMmUnits(ConstCompo.S_GENERALINI, ConstCompo.K_MMUNITSINI, IsMM)
|
DefaultGetMmUnits(ConstCompo.S_GENERALINI, ConstCompo.K_MMUNITSINI, IsMM)
|
||||||
m_IsMM = IsMM
|
m_IsMM = IsMM
|
||||||
|
|
||||||
|
If GetCurrentMTableList() Then
|
||||||
|
' abilito la modifica della MTbale solo se Debug superioere a 5
|
||||||
|
End If
|
||||||
|
|
||||||
Dim Width As String = String.Empty
|
Dim Width As String = String.Empty
|
||||||
DefaultGetPrivateProfileString(S_SIZE_INI, K_WIDTH_INI, "32", Width)
|
DefaultGetPrivateProfileString(S_SIZE_INI, K_WIDTH_INI, "32", Width)
|
||||||
Utility.ConvertCompoConfig(Width, 500)
|
Utility.ConvertCompoConfig(Width, 9999)
|
||||||
m_Width = Width
|
m_Width = Width
|
||||||
Dim dWidth As Double
|
Dim dWidth As Double
|
||||||
If StringToDouble(m_Width, dWidth) Then EgtLuaSetGlobNumVar("W", dWidth)
|
If StringToDouble(m_Width, dWidth) Then EgtLuaSetGlobNumVar("W", dWidth)
|
||||||
Dim Height As String = String.Empty
|
Dim Height As String = String.Empty
|
||||||
DefaultGetPrivateProfileString(S_SIZE_INI, K_HEIGHT_INI, "80", Height)
|
DefaultGetPrivateProfileString(S_SIZE_INI, K_HEIGHT_INI, "80", Height)
|
||||||
Utility.ConvertCompoConfig(Height, 500)
|
Utility.ConvertCompoConfig(Height, 9999)
|
||||||
m_Height = Height
|
m_Height = Height
|
||||||
Dim dHeight As Double
|
Dim dHeight As Double
|
||||||
If StringToDouble(m_Height, dHeight) Then EgtLuaSetGlobNumVar("H", dHeight)
|
If StringToDouble(m_Height, dHeight) Then EgtLuaSetGlobNumVar("H", dHeight)
|
||||||
Dim Thickness As String = String.Empty
|
Dim Thickness As String = String.Empty
|
||||||
DefaultGetPrivateProfileString(S_SIZE_INI, K_THICKNESS_INI, "1.75", Thickness)
|
DefaultGetPrivateProfileString(S_SIZE_INI, K_THICKNESS_INI, "1.75", Thickness)
|
||||||
Utility.ConvertCompoConfig(Thickness, 100)
|
Utility.ConvertCompoConfig(Thickness, 9999)
|
||||||
m_Thickness = Thickness
|
m_Thickness = Thickness
|
||||||
Dim dThickness As Double
|
Dim dThickness As Double
|
||||||
If StringToDouble(m_Thickness, dThickness) Then EgtLuaSetGlobNumVar("T", dThickness)
|
If StringToDouble(m_Thickness, dThickness) Then EgtLuaSetGlobNumVar("T", dThickness)
|
||||||
@@ -824,12 +872,17 @@ Friend Module OptionModule
|
|||||||
Friend Sub CreateNewPropertiesList(ByRef LocalPart As Part)
|
Friend Sub CreateNewPropertiesList(ByRef LocalPart As Part)
|
||||||
If OptionModule.m_DisableProperties <> Visibility.Visible Then Return
|
If OptionModule.m_DisableProperties <> Visibility.Visible Then Return
|
||||||
If OptionModule.m_MaterialList.Count > 0 Then
|
If OptionModule.m_MaterialList.Count > 0 Then
|
||||||
LocalPart.SetMaterial(OptionModule.m_MaterialList(0))
|
' assegno la proprietà di materiale
|
||||||
|
If Not IsNothing(LocalPart.SelectedMaterial) Then
|
||||||
|
LocalPart.SetMaterial(LocalPart.SelectedMaterial)
|
||||||
|
Else
|
||||||
|
LocalPart.SetMaterial(OptionModule.m_MaterialList(0))
|
||||||
|
End If
|
||||||
LocalPart.SetPropertiesList(OptionModule.m_MaterialList(0).PropertiesList)
|
LocalPart.SetPropertiesList(OptionModule.m_MaterialList(0).PropertiesList)
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' configurazione senza materiali
|
' configurazione senza materiali
|
||||||
If LocalPart.PropertiesList.Count > 0 Then LocalPart.PropertiesList.Clear()
|
If LocalPart.PropertiesList.Count > 0 Then LocalPart.PropertiesList.Clear()
|
||||||
For Each Item In OptionModule.m_PropertList
|
For Each Item In OptionModule.m_PropertList
|
||||||
LocalPart.PropertiesList.Add(New PropertyItem(Item.Name, Item.GraphicName, Item.IsChecked))
|
LocalPart.PropertiesList.Add(New PropertyItem(Item.Name, Item.GraphicName, Item.IsChecked))
|
||||||
Next
|
Next
|
||||||
@@ -995,6 +1048,81 @@ Friend Module OptionModule
|
|||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GetCurrentMTableList() As Boolean
|
||||||
|
If String.IsNullOrEmpty(IniFile.m_sDoorsDirPath) Then Return False
|
||||||
|
m_MTableList.Clear()
|
||||||
|
Dim sMTableDir As String = IniFile.m_sDoorsDirPath & "\MTables"
|
||||||
|
If Not Directory.Exists(sMTableDir) Then
|
||||||
|
EgtOutLog("Directory " & "'" & sMTableDir & "'" & " not found.")
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Dim Items As String() = Directory.GetFiles(sMTableDir)
|
||||||
|
' recupero i file che hanno estemsione *.mtl
|
||||||
|
For Each MTableFile As String In Items
|
||||||
|
If MTableFile.EndsWith(".mtl") Then
|
||||||
|
Dim sName As String = Path.GetFileNameWithoutExtension(MTableFile).ToLower
|
||||||
|
Dim sPath As String = MTableFile
|
||||||
|
Dim bIsValid As Boolean = True
|
||||||
|
Dim ExcludeList As List(Of String) = GetExludeList()
|
||||||
|
For Each ExcludedItem As String In ExcludeList
|
||||||
|
If sName.ToLower.Contains(ExcludedItem) Then
|
||||||
|
bIsValid = False
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If bIsValid Then
|
||||||
|
sName = Path.GetFileNameWithoutExtension(MTableFile)
|
||||||
|
Dim LocalMTable As New MTable(sName.Trim, sPath.Trim)
|
||||||
|
m_MTableList.Add(LocalMTable)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If m_MTableList.Count < 1 Then
|
||||||
|
EgtOutLog("Not valid file in directory " & "'" & sMTableDir & "'" & ".")
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
' leggo il nome della MTable attiva
|
||||||
|
Dim sSelectedMTable As String = String.Empty
|
||||||
|
Dim nbSelected As Boolean = False
|
||||||
|
If GetMainPrivateProfileString(S_DOORS, K_MTABLE, "", sSelectedMTable) <> 0 Then
|
||||||
|
For Each ItemFile As MTable In m_MTableList
|
||||||
|
If ItemFile.FilePath.ToLower = sSelectedMTable.Trim.ToLower Then
|
||||||
|
m_SelectedMTable = ItemFile
|
||||||
|
nbSelected = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If Not nbSelected Then m_SelectedMTable = m_MTableList(0)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function GetExludeList() As List(Of String)
|
||||||
|
Dim LocalList As New List(Of String)
|
||||||
|
Dim sVal As String = String.Empty
|
||||||
|
GetMainPrivateProfileString(S_DOORS, "Exclude", "", sVal)
|
||||||
|
Dim sItems As String() = sVal.Split(","c)
|
||||||
|
For Each Item As String In sItems
|
||||||
|
LocalList.Add(Item.Trim)
|
||||||
|
Next
|
||||||
|
Return LocalList
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Sub GetCurrentMachineInMTable()
|
||||||
|
' aggiorno il file Config.ini dell'EgtCAM5
|
||||||
|
EgtLuaExecFile(IniFile.m_sConfigDir & "\ChangeConfig.lua")
|
||||||
|
' assegno variabili
|
||||||
|
Dim sDir As String = IniFile.m_sDoorsDirPath.Replace("\", "/")
|
||||||
|
EgtLuaSetGlobStringVar("CCD.NewBaseDir", sDir)
|
||||||
|
EgtLuaSetGlobStringVar("CCD.NewMTable", m_SelectedMTable.Name)
|
||||||
|
' eseguo la funzione che esegue la scrittura delle variabili
|
||||||
|
EgtLuaCallFunction("CCD.GetCurrentMachineInMTable")
|
||||||
|
Dim sVal As String = ""
|
||||||
|
EgtLuaGetGlobStringVar("CCD.NewMachineName", sVal)
|
||||||
|
OptionModule.m_CurrentMachine = sVal
|
||||||
|
EgtLuaResetGlobVar("CCD")
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Module
|
End Module
|
||||||
|
|
||||||
' Classe che identifica una lingua del programma con nome e path del file dei messaggi
|
' Classe che identifica una lingua del programma con nome e path del file dei messaggi
|
||||||
@@ -1027,3 +1155,33 @@ Public Class Language
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
Public Class MTable
|
||||||
|
|
||||||
|
Private m_sName As String
|
||||||
|
Private m_sFilePath As String
|
||||||
|
|
||||||
|
Public Property Name As String
|
||||||
|
Get
|
||||||
|
Return m_sName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sName = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property FilePath As String
|
||||||
|
Get
|
||||||
|
Return m_sFilePath
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sFilePath = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(sName As String, sFilePath As String)
|
||||||
|
Me.Name = sName
|
||||||
|
Me.FilePath = sFilePath
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|||||||
@@ -5,12 +5,14 @@
|
|||||||
Title="{Binding Title}" Icon="/Resources/EgtDOOR.ico"
|
Title="{Binding Title}" Icon="/Resources/EgtDOOR.ico"
|
||||||
TitleBarBrush="{StaticResource EgaltechBlue1}"
|
TitleBarBrush="{StaticResource EgaltechBlue1}"
|
||||||
BorderBrush="{StaticResource EgaltechBlue1}"
|
BorderBrush="{StaticResource EgaltechBlue1}"
|
||||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30"
|
||||||
|
IsResizable="True" IsMovable="True"
|
||||||
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
||||||
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
|
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
|
||||||
|
|
||||||
<EgtWPFLib5:EgtCustomWindow.InputBindings>
|
<EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||||
<KeyBinding Key="F1" Command="{Binding OptionGuideCmd}"/>
|
<KeyBinding Key="F1" Command="{Binding OptionGuideCmd}"/>
|
||||||
|
<KeyBinding Key="Esc" Command="{Binding CloseOptionsCommand}"/>
|
||||||
</EgtWPFLib5:EgtCustomWindow.InputBindings>
|
</EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||||
|
|
||||||
|
|
||||||
@@ -27,7 +29,7 @@
|
|||||||
<RowDefinition Height="6.7*"/>
|
<RowDefinition Height="6.7*"/>
|
||||||
<RowDefinition Height="1.5*"/>
|
<RowDefinition Height="1.5*"/>
|
||||||
<RowDefinition Height="1.5*"/>
|
<RowDefinition Height="1.5*"/>
|
||||||
<RowDefinition Height="1.5*"/>
|
<RowDefinition Height="1.5*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
@@ -253,6 +255,64 @@
|
|||||||
</GroupBox>
|
</GroupBox>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
<TabItem Header="{Binding ConfigOption}" IsEnabled="{Binding EnableConfig}">
|
||||||
|
<Grid Margin="3,3,3,3">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="3.25*"/>
|
||||||
|
<RowDefinition Height="3.0*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<GroupBox Header="{Binding ConfigMsg}" Grid.Row="0" Grid.ColumnSpan="4">
|
||||||
|
<Grid >
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="23*"/>
|
||||||
|
<ColumnDefinition Width="125*"/>
|
||||||
|
<ColumnDefinition Width="443*"/>
|
||||||
|
<ColumnDefinition Width="147*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="{Binding ConfigDirectoryMsg}" Grid.Row="1" Grid.Column="0" Margin="2,10,5,5"
|
||||||
|
Style="{StaticResource DoorParamsTxBl}" Grid.ColumnSpan="2"/>
|
||||||
|
<TextBlock Text="{Binding BaseDir}" Grid.Row="1" Grid.Column="2" Margin="2,10,5,5"
|
||||||
|
Style="{StaticResource DoorParamsTxBl}"/>
|
||||||
|
<Button Content="{Binding ChangeConfigMsg}" Grid.Row="1" Grid.Column="3"
|
||||||
|
Command="{Binding BrowseCommand}" Margin="5" MaxHeight="28"
|
||||||
|
CommandParameter="ConfigDir"/>
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
|
<!--Seclta della MTable-->
|
||||||
|
<GroupBox Header="{Binding MTableMsg}" Grid.Row="1">
|
||||||
|
<UniformGrid Rows="2">
|
||||||
|
<ComboBox ItemsSource="{Binding MTableList, Mode=OneWay}"
|
||||||
|
DisplayMemberPath="Name" SelectedItem="{Binding SelectedMTable}"
|
||||||
|
Style="{StaticResource DoorParamsCmBx}"
|
||||||
|
Margin="5,0,5,0"/>
|
||||||
|
<TextBlock Text="{Binding MTableAdvertMsg}" TextWrapping="Wrap"
|
||||||
|
TextAlignment="Center" Margin="5,0,5,0"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
|
<!--Seclta della MTable-->
|
||||||
|
<GroupBox Header="{Binding CurrMachTitleMsg}" Grid.Row="1" Grid.Column="1">
|
||||||
|
<UniformGrid Rows="1">
|
||||||
|
<TextBlock Text="{Binding CurrentMachine}" TextWrapping="Wrap"
|
||||||
|
TextAlignment="Center" VerticalAlignment="Center" FontWeight="Black" Margin="5,0,5,0"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
|
|
||||||
<!--Impostazioni generali della porta-->
|
<!--Impostazioni generali della porta-->
|
||||||
@@ -327,7 +387,7 @@
|
|||||||
Margin="0,10,5,18"
|
Margin="0,10,5,18"
|
||||||
Style="{StaticResource DoorParamsChBx}" />
|
Style="{StaticResource DoorParamsChBx}" />
|
||||||
|
|
||||||
<TextBox Style="{StaticResource DoorParamsTxBx}"
|
<TextBox Style="{StaticResource DoorParamsTxBx}"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Text="{Binding WeightValue, UpdateSourceTrigger=PropertyChanged}"
|
Text="{Binding WeightValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
Margin="5,5,10,13"
|
Margin="5,5,10,13"
|
||||||
|
|||||||
@@ -80,9 +80,25 @@ Public Class OptionsVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
m_SelectedTabGeneral = value
|
m_SelectedTabGeneral = value
|
||||||
|
If m_SelectedTabGeneral = 2 Then
|
||||||
|
OptionModule.GetCurrentMachineInMTable()
|
||||||
|
NotifyPropertyChanged("CurrentMachine")
|
||||||
|
m_OrigBaseDir = IniFile.m_sDoorsDirPath
|
||||||
|
m_OrigMTable = OptionModule.m_SelectedMTable.Name
|
||||||
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_IsChangedConfig As Boolean = False
|
||||||
|
Public ReadOnly Property IsChangedConfig As Boolean
|
||||||
|
Get
|
||||||
|
Return m_IsChangedConfig
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_OrigBaseDir As String = String.Empty
|
||||||
|
Private m_OrigMTable As String = String.Empty
|
||||||
|
|
||||||
|
|
||||||
#End Region ' Hardware_part
|
#End Region ' Hardware_part
|
||||||
|
|
||||||
@@ -104,6 +120,68 @@ Public Class OptionsVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property EnableConfig As Boolean
|
||||||
|
Get
|
||||||
|
If GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) > 4 And File.Exists(IniFile.m_sConfigDir & "\ChangeConfig.lua") Then
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property MTableList As ObservableCollection(Of MTable)
|
||||||
|
Get
|
||||||
|
Return OptionModule.m_MTableList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property SelectedMTable As MTable
|
||||||
|
Get
|
||||||
|
Return OptionModule.m_SelectedMTable
|
||||||
|
End Get
|
||||||
|
Set(value As MTable)
|
||||||
|
If Not IsNothing(value) AndAlso value IsNot OptionModule.m_SelectedMTable Then
|
||||||
|
OptionModule.m_SelectedMTable = value
|
||||||
|
WriteMainPrivateProfileString(S_DOORS, K_MTABLE, OptionModule.m_SelectedMTable.FilePath)
|
||||||
|
NotifyPropertyChanged("SelectedMTable")
|
||||||
|
OptionModule.GetCurrentMachineInMTable()
|
||||||
|
NotifyPropertyChanged("CurrentMachine")
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property BaseDir As String
|
||||||
|
Get
|
||||||
|
Return IniFile.m_sDoorsDirPath
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
If value.Trim.ToLower <> IniFile.m_sDoorsDirPath.ToLower Then
|
||||||
|
Dim sPreValue As String = IniFile.m_sDoorsDirPath
|
||||||
|
IniFile.m_sDoorsDirPath = value
|
||||||
|
If Not GetCurrentMTableList() Then
|
||||||
|
MessageBox.Show("Currente directory '" & value & "' is not valid as BaseDir!", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
|
IniFile.m_sDoorsDirPath = sPreValue
|
||||||
|
GetCurrentMTableList()
|
||||||
|
End If
|
||||||
|
WriteMainPrivateProfileString(S_DOORS, K_BASEDIR, IniFile.m_sDoorsDirPath)
|
||||||
|
m_IsChangedConfig = True
|
||||||
|
NotifyPropertyChanged("SelectedMTable")
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged("MTableList")
|
||||||
|
NotifyPropertyChanged("ConfigDir")
|
||||||
|
OptionModule.GetCurrentMachineInMTable()
|
||||||
|
NotifyPropertyChanged("CurrentMachine")
|
||||||
|
NotifyPropertyChanged("BaseDir")
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CurrentMachine As String
|
||||||
|
Get
|
||||||
|
Return OptionModule.m_CurrentMachine
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property MeasureUnitList As List(Of String)
|
Public ReadOnly Property MeasureUnitList As List(Of String)
|
||||||
Get
|
Get
|
||||||
Return OptionModule.m_MeasureUnitList
|
Return OptionModule.m_MeasureUnitList
|
||||||
@@ -116,6 +194,28 @@ Public Class OptionsVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If value IsNot OptionModule.m_SelectedMeasureUnit Then
|
If value IsNot OptionModule.m_SelectedMeasureUnit Then
|
||||||
|
|
||||||
|
Dim sMessage As String = "The program will be shut down, do you want to proced?"
|
||||||
|
Dim bRestartProgram As Boolean = EnableConfig
|
||||||
|
If bRestartProgram Then
|
||||||
|
sMessage = "The program will be restart, do you want to proced?"
|
||||||
|
End If
|
||||||
|
|
||||||
|
' chiedo se desidera procedere con lo spegnimento del programma
|
||||||
|
If MessageBox.Show(sMessage, "Warning", MessageBoxButton.OKCancel, MessageBoxImage.Exclamation, MessageBoxResult.Cancel) = MessageBoxResult.OK Then
|
||||||
|
' procedo alla chiusura del programma
|
||||||
|
Map.refMainWindowVM.CloseApplication()
|
||||||
|
If bRestartProgram Then Process.Start(Application.ResourceAssembly.Location)
|
||||||
|
Else
|
||||||
|
' esco senza salvare la selezione
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' sa la chiusura del porgramma è stata interotta
|
||||||
|
If Map.refMainWindowVM.StopClosingApplication Then
|
||||||
|
' esco senza salvare la selezione
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
OptionModule.m_bIsMmUnit = (value = OptionModule.m_MeasureUnitList(0))
|
OptionModule.m_bIsMmUnit = (value = OptionModule.m_MeasureUnitList(0))
|
||||||
EgtSetUiUnits(OptionModule.m_bIsMmUnit)
|
EgtSetUiUnits(OptionModule.m_bIsMmUnit)
|
||||||
WriteMainPrivateProfileString(S_SCENE, K_MMUNITS, If(OptionModule.m_bIsMmUnit, "1", "0"))
|
WriteMainPrivateProfileString(S_SCENE, K_MMUNITS, If(OptionModule.m_bIsMmUnit, "1", "0"))
|
||||||
@@ -1112,9 +1212,9 @@ Public Class OptionsVM
|
|||||||
Public ReadOnly Property Title As String
|
Public ReadOnly Property Title As String
|
||||||
Get
|
Get
|
||||||
Dim sTitle As String = EgtMsg(MSG_MAINWINDOW + 209)
|
Dim sTitle As String = EgtMsg(MSG_MAINWINDOW + 209)
|
||||||
If Map.refMainWindowVM.SelectedPage =MainWindowVM.ListPageEnum.nDDFPage then
|
If Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nDDFPage Then
|
||||||
sTitle = "DOOR - " & sTitle
|
sTitle = "DOOR - " & sTitle
|
||||||
else
|
Else
|
||||||
sTitle = "HARDWARE - " & sTitle
|
sTitle = "HARDWARE - " & sTitle
|
||||||
End If
|
End If
|
||||||
Return sTitle
|
Return sTitle
|
||||||
@@ -1139,6 +1239,12 @@ Public Class OptionsVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property MTableAdvertMsg As String
|
||||||
|
Get
|
||||||
|
Return "Going out this page the program will restart."
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property MeasureUnit As String
|
Public ReadOnly Property MeasureUnit As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(50211)
|
Return EgtMsg(50211)
|
||||||
@@ -1322,7 +1428,7 @@ Public Class OptionsVM
|
|||||||
|
|
||||||
Public ReadOnly Property MachMsg As String
|
Public ReadOnly Property MachMsg As String
|
||||||
Get
|
Get
|
||||||
' Mach.
|
' Mach.
|
||||||
Return EgtMsg(50711)
|
Return EgtMsg(50711)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
@@ -1352,20 +1458,56 @@ Public Class OptionsVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
' TabMsg
|
||||||
Public ReadOnly Property GeneralOption As String
|
Public ReadOnly Property GeneralOption As String
|
||||||
Get
|
Get
|
||||||
' 50729=General
|
' 50729=General
|
||||||
Return EgtMsg(50729)
|
Return EgtMsg(50729)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property GeneralCam As String
|
Public ReadOnly Property GeneralCam As String
|
||||||
Get
|
Get
|
||||||
' 50730=Report
|
' 50730=Report
|
||||||
Return EgtMsg(50730)
|
Return EgtMsg(50730)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Public ReadOnly Property ConfigOption As String
|
||||||
|
Get
|
||||||
|
Return "Config"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property ChangeConfigMsg As String
|
||||||
|
Get
|
||||||
|
Return "Change config"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property MTableMsg As String
|
||||||
|
Get
|
||||||
|
Return "MTable"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property ConfigMsg As String
|
||||||
|
Get
|
||||||
|
Return "Door Config"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CurrMachTitleMsg As String
|
||||||
|
Get
|
||||||
|
Return "Current Machine"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property ConfigDirectoryMsg As String
|
||||||
|
Get
|
||||||
|
Return "Directory"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' GenearlCamMsg
|
||||||
Public ReadOnly Property ExtLineLenMsg As String
|
Public ReadOnly Property ExtLineLenMsg As String
|
||||||
Get
|
Get
|
||||||
' Estensione linea
|
' Estensione linea
|
||||||
@@ -1524,14 +1666,14 @@ Public Class OptionsVM
|
|||||||
|
|
||||||
Public ReadOnly Property LightUpMsg As String
|
Public ReadOnly Property LightUpMsg As String
|
||||||
Get
|
Get
|
||||||
' Light Up
|
' Light Up
|
||||||
Return EgtMsg(50056)
|
Return EgtMsg(50056)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property LightLockMsg As String
|
Public ReadOnly Property LightLockMsg As String
|
||||||
Get
|
Get
|
||||||
' Light Lock
|
' Light Lock
|
||||||
Return EgtMsg(50057)
|
Return EgtMsg(50057)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
@@ -1724,10 +1866,17 @@ Public Class OptionsVM
|
|||||||
Return m_EnableAssembly
|
Return m_EnableAssembly
|
||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
|
Dim sMessage As String = "The program will be shut down, do you want to proced?"
|
||||||
|
Dim bRestartProgram As Boolean = EnableConfig
|
||||||
|
If bRestartProgram Then
|
||||||
|
sMessage = "The program will be restart, do you want to proced?"
|
||||||
|
End If
|
||||||
|
|
||||||
' chiedo se desidera procedere con lo spegnimento del programma
|
' chiedo se desidera procedere con lo spegnimento del programma
|
||||||
If MessageBox.Show("The program will be shut down, do you want to proced?", "Warning", MessageBoxButton.OKCancel, MessageBoxImage.Exclamation, MessageBoxResult.Cancel) = MessageBoxResult.OK Then
|
If MessageBox.Show(sMessage, "Warning", MessageBoxButton.OKCancel, MessageBoxImage.Exclamation, MessageBoxResult.Cancel) = MessageBoxResult.OK Then
|
||||||
' procedo alla chiusura del programma
|
' procedo alla chiusura del programma
|
||||||
Map.refMainWindowVM.CloseApplication()
|
Map.refMainWindowVM.CloseApplication()
|
||||||
|
If bRestartProgram Then Process.Start(Application.ResourceAssembly.Location)
|
||||||
Else
|
Else
|
||||||
' esco senza salvare la selezione
|
' esco senza salvare la selezione
|
||||||
Return
|
Return
|
||||||
@@ -1883,10 +2032,10 @@ Public Class OptionsVM
|
|||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
Map.SetRefOptionsVM(Me)
|
Map.SetRefOptionsVM(Me)
|
||||||
If IsEnableHarwarePart then
|
If IsEnableHarwarePart Then
|
||||||
m_HardwarePartVM = New HardwarePartVM
|
m_HardwarePartVM = New HardwarePartVM
|
||||||
m_HardwarePartV = New HardwarePartV(m_HardwarePartVM)
|
m_HardwarePartV = New HardwarePartV(m_HardwarePartVM)
|
||||||
End if
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
@@ -1916,6 +2065,37 @@ Public Class OptionsVM
|
|||||||
OptionsWindow.Close()
|
OptionsWindow.Close()
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
If EnableConfig AndAlso m_IsChangedConfig Then
|
||||||
|
' Se modifico il direttorio Compo: aggiorno il file Config.ini dell'EgtCAM5
|
||||||
|
EgtLuaExecFile(IniFile.m_sConfigDir & "\ChangeConfig.lua")
|
||||||
|
' assegno variabili
|
||||||
|
EgtLuaSetGlobStringVar("CCD.NewBaseDir", IniFile.m_sDoorsDirPath)
|
||||||
|
EgtLuaSetGlobStringVar("CCD.NewMTable", OptionModule.m_SelectedMTable.Name)
|
||||||
|
' eseguo la funzione che esegue la scrittura delle variabili
|
||||||
|
EgtLuaCallFunction("CCD.ChangeConfigDirectory")
|
||||||
|
Dim sVal As String = ""
|
||||||
|
EgtLuaGetGlobStringVar("CCD.NewMachineName", sVal)
|
||||||
|
OptionModule.m_CurrentMachine = sVal
|
||||||
|
EgtLuaResetGlobVar("CCD")
|
||||||
|
' chiudo il programma e lo riavvio
|
||||||
|
Map.refMainWindowVM.CloseApplication()
|
||||||
|
Process.Start(Application.ResourceAssembly.Location)
|
||||||
|
'End If
|
||||||
|
ElseIf EnableConfig AndAlso m_OrigMTable <> OptionModule.m_SelectedMTable.Name Then
|
||||||
|
' aggiorno il file Config.ini dell'EgtCAM5
|
||||||
|
EgtLuaExecFile(IniFile.m_sConfigDir & "\ChangeConfig.lua")
|
||||||
|
' assegno variabili
|
||||||
|
EgtLuaSetGlobStringVar("CCD.NewBaseDir", IniFile.m_sDoorsDirPath)
|
||||||
|
EgtLuaSetGlobStringVar("CCD.NewMTable", OptionModule.m_SelectedMTable.Name)
|
||||||
|
' eseguo la funzione che esegue la scrittura delle variabili
|
||||||
|
EgtLuaCallFunction("CCD.ChangeConfigDirectory")
|
||||||
|
Dim sVal As String = ""
|
||||||
|
EgtLuaGetGlobStringVar("CCD.NewMachineName", sVal)
|
||||||
|
OptionModule.m_CurrentMachine = sVal
|
||||||
|
EgtLuaResetGlobVar("CCD")
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CloseOptionsCommand
|
#End Region ' CloseOptionsCommand
|
||||||
@@ -1959,6 +2139,15 @@ Public Class OptionsVM
|
|||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
TemplateDir = FolderBrowserDialog.SelectedPath
|
TemplateDir = FolderBrowserDialog.SelectedPath
|
||||||
|
Case "ConfigDir"
|
||||||
|
Dim FolderBrowserDialog As New System.Windows.Forms.FolderBrowserDialog
|
||||||
|
FolderBrowserDialog.SelectedPath = IniFile.m_sDoorsDirPath
|
||||||
|
' mostriamo la finestra di dialogo aperta fino alla directory MyProjects
|
||||||
|
If FolderBrowserDialog.ShowDialog <> Forms.DialogResult.OK Then
|
||||||
|
' se la risposta è diversa da OK esce
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
BaseDir = FolderBrowserDialog.SelectedPath
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
+14
-10
@@ -66,10 +66,18 @@ Public Class OrderVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Function VerifyNotIsNothing() As Boolean
|
||||||
|
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) OrElse
|
||||||
|
IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly) OrElse
|
||||||
|
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Property Customer As String
|
Public Property Customer As String
|
||||||
Get
|
Get
|
||||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
|
If Not VerifyNotIsNothing() Then Return Nothing
|
||||||
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then Return Nothing
|
|
||||||
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Customer
|
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Customer
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
@@ -83,8 +91,7 @@ Public Class OrderVM
|
|||||||
|
|
||||||
Public Property Elevation As String
|
Public Property Elevation As String
|
||||||
Get
|
Get
|
||||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
|
If Not VerifyNotIsNothing() Then Return Nothing
|
||||||
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then Return Nothing
|
|
||||||
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Elevation
|
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Elevation
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
@@ -98,8 +105,7 @@ Public Class OrderVM
|
|||||||
|
|
||||||
Public Property Project As String
|
Public Property Project As String
|
||||||
Get
|
Get
|
||||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
|
If Not VerifyNotIsNothing() Then Return Nothing
|
||||||
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then Return Nothing
|
|
||||||
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Project
|
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Project
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
@@ -113,8 +119,7 @@ Public Class OrderVM
|
|||||||
|
|
||||||
Public Property PO As String
|
Public Property PO As String
|
||||||
Get
|
Get
|
||||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
|
If Not VerifyNotIsNothing() Then Return Nothing
|
||||||
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then Return Nothing
|
|
||||||
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.PO
|
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.PO
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
@@ -128,8 +133,7 @@ Public Class OrderVM
|
|||||||
|
|
||||||
Public Property Line As String
|
Public Property Line As String
|
||||||
Get
|
Get
|
||||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
|
If Not VerifyNotIsNothing() Then Return Nothing
|
||||||
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then Return Nothing
|
|
||||||
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Line
|
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Line
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
|
|||||||
@@ -361,6 +361,8 @@ Public Class ProjectManagerHardwareVM
|
|||||||
End If
|
End If
|
||||||
Try
|
Try
|
||||||
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
|
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
|
||||||
|
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
|
||||||
|
zip.AlternateEncoding = Text.Encoding.UTF8
|
||||||
' aggiungo progetto corrente .nge
|
' aggiungo progetto corrente .nge
|
||||||
If File.Exists(sCurrProject) Then
|
If File.Exists(sCurrProject) Then
|
||||||
zip.AddItem(sCurrProject, "")
|
zip.AddItem(sCurrProject, "")
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Imports System.ComponentModel
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
Imports Ionic.zip
|
Imports Ionic.Zip
|
||||||
|
|
||||||
Public Class ProjectManagerVM
|
Public Class ProjectManagerVM
|
||||||
Implements INotifyPropertyChanged
|
Implements INotifyPropertyChanged
|
||||||
@@ -411,10 +411,10 @@ Public Class ProjectManagerVM
|
|||||||
Map.refAssemblyManagerVM.VisibilityDoorList = Visibility.Visible
|
Map.refAssemblyManagerVM.VisibilityDoorList = Visibility.Visible
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
'-------------------------------------------------------------------------------------------------------------------------
|
'-------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
'Prima di tutto chiedo se vuole aprire un template
|
'Prima di tutto chiedo se vuole aprire un template
|
||||||
Dim sImportTemplate As String = Map.refAssemblyManagerVM.ShowDialogImportTemplate
|
Dim sImportTemplate As String = Map.refAssemblyManagerVM.ShowDialogImportTemplate
|
||||||
|
|
||||||
' dichiaro la finestra di dialogo
|
' dichiaro la finestra di dialogo
|
||||||
Dim saveFileDialog1 As New System.Windows.Forms.SaveFileDialog()
|
Dim saveFileDialog1 As New System.Windows.Forms.SaveFileDialog()
|
||||||
@@ -476,6 +476,7 @@ Public Class ProjectManagerVM
|
|||||||
' creo un nuovo assemblato
|
' creo un nuovo assemblato
|
||||||
Dim Local_AssemblyName As New AssemblyName
|
Dim Local_AssemblyName As New AssemblyName
|
||||||
Local_AssemblyName.Name = FilePathComplete
|
Local_AssemblyName.Name = FilePathComplete
|
||||||
|
Local_AssemblyName.OrigTemplate = sImportTemplate
|
||||||
Local_AssemblyName.GraphicName = Path.GetFileNameWithoutExtension(FilePathComplete)
|
Local_AssemblyName.GraphicName = Path.GetFileNameWithoutExtension(FilePathComplete)
|
||||||
m_CurrProject.AssemblyList.Add(Local_AssemblyName)
|
m_CurrProject.AssemblyList.Add(Local_AssemblyName)
|
||||||
' Seleziono AssembyName creato
|
' Seleziono AssembyName creato
|
||||||
@@ -487,13 +488,17 @@ Public Class ProjectManagerVM
|
|||||||
End If
|
End If
|
||||||
' tolgo la visualizzazione della lista dei nomi
|
' tolgo la visualizzazione della lista dei nomi
|
||||||
Map.refAssemblyManagerVM.CurrProject = CurrProject
|
Map.refAssemblyManagerVM.CurrProject = CurrProject
|
||||||
Map.refAssemblyManagerVM.ImportTemplate(sImportTemplate)
|
Dim bImportedTemplate As Boolean = Map.refAssemblyManagerVM.ImportTemplate(sImportTemplate)
|
||||||
' Creo nuovo assembly
|
' Creo nuovo assembly
|
||||||
Map.refAssemblyManagerVM.NewCmd(Local_AssemblyName)
|
Map.refAssemblyManagerVM.NewCmd(Local_AssemblyName)
|
||||||
Utility.OutLog("Creazione nuovo progetto : " & saveFileDialog1.FileName)
|
Utility.OutLog("Creazione nuovo progetto : " & saveFileDialog1.FileName)
|
||||||
Utility.LockDir(Path.GetDirectoryName(saveFileDialog1.FileName), Path.GetFileNameWithoutExtension(saveFileDialog1.FileName))
|
Utility.LockDir(Path.GetDirectoryName(saveFileDialog1.FileName), Path.GetFileNameWithoutExtension(saveFileDialog1.FileName))
|
||||||
Map.refAssemblyManagerVM.VisibilityDoorList = Visibility.Collapsed
|
Map.refAssemblyManagerVM.VisibilityDoorList = Visibility.Collapsed
|
||||||
CurrProject.NotifyPropertyChanged("Name")
|
CurrProject.NotifyPropertyChanged("Name")
|
||||||
|
' Se l'importazione del template è andata a buon fine allora salvo
|
||||||
|
If bImportedTemplate Then
|
||||||
|
Save()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -682,8 +687,8 @@ Public Class ProjectManagerVM
|
|||||||
fd.InitialDirectory = IniFile.m_MyProjectDir
|
fd.InitialDirectory = IniFile.m_MyProjectDir
|
||||||
End If
|
End If
|
||||||
' seleziono il filtro di apertura
|
' seleziono il filtro di apertura
|
||||||
fd.Filter = "(*.ddt) |*.ddt|(*.ddf) |*.ddf"
|
fd.Filter = "(*.ddf) |*.ddf|(*.ddt) |*.ddt"
|
||||||
fd.FilterIndex = 2
|
fd.FilterIndex = GetCurrentFilter()
|
||||||
fd.RestoreDirectory = True
|
fd.RestoreDirectory = True
|
||||||
' apro la finestra di dialogo
|
' apro la finestra di dialogo
|
||||||
If fd.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then
|
If fd.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then
|
||||||
@@ -698,6 +703,8 @@ Public Class ProjectManagerVM
|
|||||||
sFilePath = Path.GetDirectoryName(fd.FileName)
|
sFilePath = Path.GetDirectoryName(fd.FileName)
|
||||||
' salvo il nome completo del file
|
' salvo il nome completo del file
|
||||||
sFilePathComplete = fd.FileName
|
sFilePathComplete = fd.FileName
|
||||||
|
' salvo l'estensione dell'ultimo progetto aperto
|
||||||
|
WriteMainPrivateProfileString("General", "LastExtensionOpened", Path.GetExtension(fd.FileName))
|
||||||
' se esiste un file in lettura con questo nome allora blocco tutto
|
' se esiste un file in lettura con questo nome allora blocco tutto
|
||||||
If Utility.IsFileLocked(sFilePath, Path.GetFileNameWithoutExtension(sFilePathComplete)) Then
|
If Utility.IsFileLocked(sFilePath, Path.GetFileNameWithoutExtension(sFilePathComplete)) Then
|
||||||
If Not IsNothing(Map.refAssemblyManagerVM.CurrProject) AndAlso Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
|
If Not IsNothing(Map.refAssemblyManagerVM.CurrProject) AndAlso Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
|
||||||
@@ -841,6 +848,21 @@ Public Class ProjectManagerVM
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function GetCurrentFilter() As Integer
|
||||||
|
Dim nFilter As Integer = 1
|
||||||
|
Dim sExt As String = String.Empty
|
||||||
|
GetMainPrivateProfileString("General", "LastExtensionOpened", "ddf", sExt)
|
||||||
|
sExt = sExt.Replace("."c, "")
|
||||||
|
sExt = sExt.Trim
|
||||||
|
Select Case sExt
|
||||||
|
Case = "ddf"
|
||||||
|
nFilter = 1
|
||||||
|
Case = "ddt"
|
||||||
|
nFilter = 2
|
||||||
|
End Select
|
||||||
|
Return nFilter
|
||||||
|
End Function
|
||||||
|
|
||||||
#End Region ' OpenCommand
|
#End Region ' OpenCommand
|
||||||
|
|
||||||
#Region "OpenMruFileCommand"
|
#Region "OpenMruFileCommand"
|
||||||
@@ -982,6 +1004,7 @@ Public Class ProjectManagerVM
|
|||||||
Local_Assembly.IsModified = False
|
Local_Assembly.IsModified = False
|
||||||
CurrProject.AssemblyList.Add(Local_Assembly)
|
CurrProject.AssemblyList.Add(Local_Assembly)
|
||||||
Else
|
Else
|
||||||
|
EgtOutLog("LastProject '" & OptionModule.m_sLastProject & "' is not a file or does not exist!")
|
||||||
Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nNothingSelected
|
Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nNothingSelected
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
@@ -1121,6 +1144,8 @@ Public Class ProjectManagerVM
|
|||||||
End If
|
End If
|
||||||
Try
|
Try
|
||||||
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
|
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
|
||||||
|
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
|
||||||
|
zip.AlternateEncoding = Text.Encoding.UTF8
|
||||||
' aggiungo progetto corrente .nge
|
' aggiungo progetto corrente .nge
|
||||||
If File.Exists(sCurrProject) Then
|
If File.Exists(sCurrProject) Then
|
||||||
zip.AddItem(sCurrProject, "")
|
zip.AddItem(sCurrProject, "")
|
||||||
@@ -1186,17 +1211,48 @@ Public Class ProjectManagerVM
|
|||||||
End If
|
End If
|
||||||
' se esite una porta, allora rendo possibile la creazione di un template della porta corrente
|
' se esite una porta, allora rendo possibile la creazione di un template della porta corrente
|
||||||
If Not IsNothing(Map.refPartPageVM.CurrPart) Then
|
If Not IsNothing(Map.refPartPageVM.CurrPart) Then
|
||||||
' Stampo il file correte nella cartella Template
|
|
||||||
Dim SaveFileDialog As New MySaveFileDialogVM
|
' ' Stampo il file correte nella cartella Template
|
||||||
Dim SaveFileDialogWnd As New EgtWPFLib5.SaveFileDialogV(Application.Current.MainWindow, SaveFileDialog)
|
' Dim SaveFileDialog As New MySaveFileDialogVM
|
||||||
SaveFileDialog.Title = EgtMsg(50417)
|
' Dim SaveFileDialogWnd As New EgtWPFLib5.SaveFileDialogV(Application.Current.MainWindow, SaveFileDialog)
|
||||||
SaveFileDialog.Directory = IniFile.m_TemplateDir
|
' SaveFileDialog.Title = EgtMsg(50417)
|
||||||
SaveFileDialog.Extension = DDT_EXTENSION
|
' SaveFileDialog.Directory = IniFile.m_TemplateDir
|
||||||
'SaveFileDialog.FileName = m_CurrProject.Name & "\"
|
' SaveFileDialog.Extension = DDT_EXTENSION
|
||||||
' se decido di chiuedere la finestra
|
' 'SaveFileDialog.FileName = m_CurrProject.Name & "\"
|
||||||
If Not SaveFileDialogWnd.ShowDialog Then
|
' ' se decido di chiuedere la finestra
|
||||||
|
' If Not SaveFileDialogWnd.ShowDialog Then
|
||||||
|
' Return
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' Apro la finestra di salvataggio generica
|
||||||
|
Dim SaveFileDialog As New System.Windows.Forms.SaveFileDialog()
|
||||||
|
' controllo se esiste il file DDF
|
||||||
|
Dim sFilePath As String = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name
|
||||||
|
If File.Exists(sFilePath) Then
|
||||||
|
' recupero il nome del template che ha generato il DDF corrente
|
||||||
|
Dim DDTOrig As String = String.Empty
|
||||||
|
Dim fStream As String() = File.ReadAllLines(sFilePath)
|
||||||
|
DDTOrig = ReadOrigTemplate(fStream)
|
||||||
|
SaveFileDialog.Filter = "(*.ddt) |*.ddt"
|
||||||
|
SaveFileDialog.FilterIndex = 2
|
||||||
|
If String.IsNullOrEmpty(DDTOrig) Then
|
||||||
|
If OptionModule.m_SingleDoor Then
|
||||||
|
SaveFileDialog.FileName = Path.GetFileNameWithoutExtension(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name)
|
||||||
|
Else
|
||||||
|
SaveFileDialog.FileName = Path.GetFileNameWithoutExtension(Map.refAssemblyManagerVM.CurrProject.Name)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
SaveFileDialog.FileName = Path.GetFileNameWithoutExtension(DDTOrig)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' avvio la ricerca nell'ultimo direttorio aperto
|
||||||
|
SaveFileDialog.InitialDirectory = IniFile.m_TemplateDir
|
||||||
|
If SaveFileDialog.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then
|
||||||
|
' Interrompo la creazione del template
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Controllo se ha estensione il nome della porta
|
' Controllo se ha estensione il nome della porta
|
||||||
If Path.HasExtension(SaveFileDialog.FileName) Then
|
If Path.HasExtension(SaveFileDialog.FileName) Then
|
||||||
Dim sExtension As String = Path.GetExtension(SaveFileDialog.FileName)
|
Dim sExtension As String = Path.GetExtension(SaveFileDialog.FileName)
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<EgtWPFLib5:EgtCustomWindow x:Class="SelectPartV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
|
Title="{Binding Title}"
|
||||||
|
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||||
|
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||||
|
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
||||||
|
Height="100" Width="300" Topmost="True"
|
||||||
|
DataContext="{Binding RelativeSource={RelativeSource Self}}">
|
||||||
|
|
||||||
|
<!--<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||||
|
<EgtWPFLib5:FileNameConverter x:Key="FileNameConverter"/>
|
||||||
|
</EgtWPFLib5:EgtCustomWindow.Resources>-->
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<UniformGrid Columns="2" Grid.Row="0" Grid.ColumnSpan="2">
|
||||||
|
<TextBlock Margin="5" Height="24" Text="{Binding PartDoorMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox Margin="5,0,5,0" Height="24" VerticalAlignment="Center"
|
||||||
|
ItemsSource="{Binding PartDoorList}" SelectedItem="{Binding Selection}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
|
|
||||||
|
<Button IsDefault="True" Name="OkBtn" Grid.Row="2" Grid.ColumnSpan="2"
|
||||||
|
Content="{Binding SaveMsg}" Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</EgtWPFLib5:EgtCustomWindow>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
Public Class SelectPartV
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
|
||||||
|
' La chiamata è richiesta dalla finestra di progettazione.
|
||||||
|
InitializeComponent()
|
||||||
|
|
||||||
|
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OkBtn_Click() Handles OkBtn.Click
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
Public Class SelectPartVM
|
||||||
|
|
||||||
|
Private m_Title As String = "Selection of door"
|
||||||
|
Public ReadOnly Property Title As String
|
||||||
|
Get
|
||||||
|
Return m_Title
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_PartDoorMsg As String = "Select part"
|
||||||
|
Public ReadOnly Property PartDoorMsg As String
|
||||||
|
Get
|
||||||
|
Return m_PartDoorMsg
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_PartDoorList As New List(Of String)
|
||||||
|
Public Property PartDoorList As List(Of String)
|
||||||
|
Get
|
||||||
|
Return m_PartDoorList
|
||||||
|
End Get
|
||||||
|
Set(value As List(Of String))
|
||||||
|
m_ListPartDoor = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Selection As String = ""
|
||||||
|
Public Property Selection As String
|
||||||
|
Get
|
||||||
|
Return m_Selection
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_Selection = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(TitleWd As String, MsgWd As String, nParts As Integer, nIndex As Integer)
|
||||||
|
m_Title = TitleWd
|
||||||
|
m_PartDoorMsg = MsgWd
|
||||||
|
For Index As Integer = 0 To nParts - 1
|
||||||
|
m_PartDoorList.Add("Door " & nParts.ToString)
|
||||||
|
Next
|
||||||
|
m_Selection = "Door " & nIndex.ToString
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
+32
-2
@@ -4,6 +4,8 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Module RegexFunction
|
Module RegexFunction
|
||||||
|
Friend sCurrVersionDoor As String = "1"
|
||||||
|
|
||||||
' restituisce vero se trova il capitoletto [Graphic parameters]
|
' restituisce vero se trova il capitoletto [Graphic parameters]
|
||||||
Friend Function IsGraphicParametersTitle(sLine As String) As Boolean
|
Friend Function IsGraphicParametersTitle(sLine As String) As Boolean
|
||||||
Return Regex.Match(sLine, "\s*--\s*(\[Graphic parameters\])\s*$").Groups(1).Value = "[Graphic parameters]"
|
Return Regex.Match(sLine, "\s*--\s*(\[Graphic parameters\])\s*$").Groups(1).Value = "[Graphic parameters]"
|
||||||
@@ -88,13 +90,21 @@ Module RegexFunction
|
|||||||
Dim sErrorMsg As String = String.Format(EgtMsg(50196), ConfigurationCompo)
|
Dim sErrorMsg As String = String.Format(EgtMsg(50196), ConfigurationCompo)
|
||||||
MessageBox.Show(sErrorMsg, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(sErrorMsg, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
Else
|
Else
|
||||||
|
' se abilitata la modifica delle configurazioni cambio messaggio e disabilito la chiusura del programma
|
||||||
|
If Map.refOptionsVM.EnableConfig Then
|
||||||
|
Dim sWarningMsg As String = String.Format("The current ddf configuration ({0}) is different from the current program configuration ({1})", ConfigurationCompo, Path.GetFileName(IniFile.m_sDoorsDirPath), vbCrLf)
|
||||||
|
MessageBox.Show(sWarningMsg, "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||||
|
Part.LastPartName = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
|
||||||
Dim MsgBoxResult As MessageBoxResult = MessageBoxResult.No
|
Dim MsgBoxResult As MessageBoxResult = MessageBoxResult.No
|
||||||
' 50195=The current ddf configuration ({0}) is different from the current program configuration ({1}).
|
' 50195=The current ddf configuration ({0}) is different from the current program configuration ({1}).
|
||||||
Dim sWarningMas As String = String.Format(EgtMsg(50195), ConfigurationCompo, Path.GetFileName(IniFile.m_sDoorsDirPath), vbCrLf)
|
Dim sWarningMas As String = String.Format(EgtMsg(50195), ConfigurationCompo, Path.GetFileName(IniFile.m_sDoorsDirPath), vbCrLf)
|
||||||
MsgBoxResult = MessageBox.Show(sWarningMas, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
|
MsgBoxResult = MessageBox.Show(sWarningMas, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
|
||||||
If MsgBoxResult = MessageBoxResult.Yes Then
|
If MsgBoxResult = MessageBoxResult.Yes Then
|
||||||
' Imposto nuova configurazione
|
' Imposto nuova configurazione
|
||||||
WriteMainPrivateProfileString("Doors", "BaseDir", sConfCompoPath)
|
WriteMainPrivateProfileString(S_DOORS, K_BASEDIR, sConfCompoPath)
|
||||||
' Imposto progetto corrente
|
' Imposto progetto corrente
|
||||||
WriteMainPrivateProfileString(S_LAUNCHERWINDOW, K_LASTPROJECT, Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name)
|
WriteMainPrivateProfileString(S_LAUNCHERWINDOW, K_LASTPROJECT, Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name)
|
||||||
' Imposto apertura automatica al prossimo avvio
|
' Imposto apertura automatica al prossimo avvio
|
||||||
@@ -111,6 +121,20 @@ Module RegexFunction
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
' leggo dal vettore per cercare la stringa OrigTemplate
|
||||||
|
Friend Function ReadOrigTemplate(fStream As String()) As String
|
||||||
|
Dim sOrigTemplate As String = String.Empty
|
||||||
|
For Each Line As String In fStream
|
||||||
|
If Line.Contains("#OrigTemplate") Then
|
||||||
|
sOrigTemplate = Regex.Match(Line, "\s*:\s*(.*?)\s*$").Groups(1).Value
|
||||||
|
Return sOrigTemplate
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' Processo il tipo di configurazione
|
||||||
|
Return sOrigTemplate
|
||||||
|
End Function
|
||||||
|
|
||||||
' restituisce quello che segue l'uguale assegnata la parola chiave Err
|
' restituisce quello che segue l'uguale assegnata la parola chiave Err
|
||||||
Friend Function ErrDraw(sLine As String) As Integer
|
Friend Function ErrDraw(sLine As String) As Integer
|
||||||
Dim sErrMsg As String = Regex.Match(sLine, "\s*(Err)\s*=\s*(.*?\b)\s*$").Groups(2).Value
|
Dim sErrMsg As String = Regex.Match(sLine, "\s*(Err)\s*=\s*(.*?\b)\s*$").Groups(2).Value
|
||||||
@@ -208,8 +232,14 @@ Module RegexFunction
|
|||||||
|
|
||||||
' Restituisce il nome che precede i due punti (tutti i caratteri dall'inizio della stringa)
|
' Restituisce il nome che precede i due punti (tutti i caratteri dall'inizio della stringa)
|
||||||
Friend Function GetName(sLine As String) As String
|
Friend Function GetName(sLine As String) As String
|
||||||
|
' La versione deve essere impostata in fase di lettura della porta
|
||||||
Dim sTmp As String = RemoveComment(sLine)
|
Dim sTmp As String = RemoveComment(sLine)
|
||||||
If String.IsNullOrWhiteSpace(sTmp) OrElse Char.IsWhiteSpace(sTmp, 0) Then Return ""
|
If sCurrVersionDoor = "2" Then
|
||||||
|
If String.IsNullOrWhiteSpace(sTmp) OrElse sTmp.StartsWith(OptionModule.m_sSpaceHype) OrElse sTmp.StartsWith(OptionModule.m_sSpace3Tab) Then Return ""
|
||||||
|
Else
|
||||||
|
If String.IsNullOrWhiteSpace(sTmp) OrElse Char.IsWhiteSpace(sTmp, 0) Then Return ""
|
||||||
|
End If
|
||||||
|
Dim sString As String = Regex.Match(RemoveComment(sLine), "\s*(.*?\b)\s*:.*").Groups(1).Value
|
||||||
Return Regex.Match(RemoveComment(sLine), "\s*(.*?\b)\s*:.*").Groups(1).Value
|
Return Regex.Match(RemoveComment(sLine), "\s*(.*?\b)\s*:.*").Groups(1).Value
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ Public Class SceneManagerVM
|
|||||||
' Creazione scena
|
' Creazione scena
|
||||||
PreInitializeScene()
|
PreInitializeScene()
|
||||||
' Se tutto bene
|
' Se tutto bene
|
||||||
If m_ProjectScene.Init() And (IniFile.m_nKeyOptions And KEY_OPT.DOORCREATOR) <> 0 Then
|
If m_ProjectScene.Init() And ((IniFile.m_nKeyOptions And KEY_OPT.DOORCREATOR) <> 0 OrElse
|
||||||
|
(Not (IniFile.m_nKeyOptions And KEY_OPT.DOORCREATOR) <> 0 AndAlso (IniFile.m_nKeyOptions And KEY_OPT.READ_ONLY) <> 0)) Then
|
||||||
EgtSetCurrentContext(m_ProjectScene.GetCtx)
|
EgtSetCurrentContext(m_ProjectScene.GetCtx)
|
||||||
PostInitializeScene()
|
PostInitializeScene()
|
||||||
m_ProjectScene.SetStatusNull()
|
m_ProjectScene.SetStatusNull()
|
||||||
@@ -120,12 +121,26 @@ Public Class SceneManagerVM
|
|||||||
m_ProjectSceneHost.Child = Nothing
|
m_ProjectSceneHost.Child = Nothing
|
||||||
' Se manca la chiave
|
' Se manca la chiave
|
||||||
If IniFile.m_nKeyLevel = -1 Or IniFile.m_nKeyLevel = -2 Then
|
If IniFile.m_nKeyLevel = -1 Or IniFile.m_nKeyLevel = -2 Then
|
||||||
EgtOutLog("Missing Dongle")
|
If Not EgtGetNetHwKey() Then
|
||||||
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
|
EgtOutLog("Missing Dongle")
|
||||||
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
|
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
|
||||||
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
|
||||||
|
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
||||||
|
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
|
||||||
|
ElseIf IniFile.m_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)
|
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
' Altrimenti manca la licenza
|
' Altrimenti manca la licenza
|
||||||
Else
|
Else
|
||||||
EgtOutLog("Problems with Licence")
|
EgtOutLog("Problems with Licence")
|
||||||
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
||||||
@@ -157,7 +172,7 @@ Public Class SceneManagerVM
|
|||||||
' Chiudo il programma
|
' Chiudo il programma
|
||||||
End
|
End
|
||||||
End If
|
End If
|
||||||
Return m_ProjectSceneHost
|
Return m_ProjectSceneHost
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -331,7 +346,7 @@ Public Class SceneManagerVM
|
|||||||
ElseIf Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nAssemblyPage Then
|
ElseIf Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nAssemblyPage Then
|
||||||
If Not EnableRefresh Then Return
|
If Not EnableRefresh Then Return
|
||||||
' Verifico esista elemento selezionato
|
' Verifico esista elemento selezionato
|
||||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) orelse IsNothing(Map.refAssemblyPageVM.CurrAssembly) Then Return
|
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) OrElse IsNothing(Map.refAssemblyPageVM.CurrAssembly) Then Return
|
||||||
DdfFile.WriteDDFAssembly(Map.refAssemblyPageVM.CurrAssembly, sTempFile, True)
|
DdfFile.WriteDDFAssembly(Map.refAssemblyPageVM.CurrAssembly, sTempFile, True)
|
||||||
ExecDoors(m_ProjectScene, sTempFile, False)
|
ExecDoors(m_ProjectScene, sTempFile, False)
|
||||||
' mantengo i layer accesi
|
' mantengo i layer accesi
|
||||||
@@ -420,6 +435,104 @@ Public Class SceneManagerVM
|
|||||||
|
|
||||||
#End Region ' Command
|
#End Region ' Command
|
||||||
|
|
||||||
|
#Region "EVENT Scene"
|
||||||
|
|
||||||
|
Private Sub MouseMoveOverScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_ProjectScene.OnMouseMoveScene
|
||||||
|
' Se non abilitata l'evidenziazione dei compo allora esco
|
||||||
|
If GetMainPrivateProfileInt(S_GENERAL, "MarkCompo", 0) = 0 Then Return
|
||||||
|
' se non esiste una porta corrente allora esco
|
||||||
|
If IsNothing(Map.refPartPageVM) OrElse IsNothing(Map.refPartPageVM.CurrPart) Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Dim LocalCompoList As ObservableCollection(Of Compo) = Map.refPartPageVM.CurrPart.CompoList
|
||||||
|
' Ripulisco la scena da i Mark
|
||||||
|
Map.refPartPageVM.CurrPart.ResetAllMark()
|
||||||
|
' Se la lista dei componenti è vuota allora esco
|
||||||
|
If Map.refPartPageVM.CurrPart.CompoList.Count < 1 Then Return
|
||||||
|
' Ricavo il punto corrente in coordinate mondo
|
||||||
|
Dim ptCurr As Point3d
|
||||||
|
EgtUnProjectPoint(e.Location, ptCurr)
|
||||||
|
' Verifico se selezionato curva
|
||||||
|
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||||
|
Dim nSel As Integer
|
||||||
|
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
|
||||||
|
Dim nId As Integer = EgtGetFirstObjInSelWin()
|
||||||
|
While nId <> GDB_ID.NULL
|
||||||
|
If EgtGetType(nId) = GDB_TY.CRV_COMPO Or EgtGetType(nId) = GDB_TY.CRV_ARC Or EgtGetType(nId) = GDB_TY.CRV_LINE Then
|
||||||
|
Dim nIdParent As Integer = EgtGetParent(nId)
|
||||||
|
Dim sNameLayer As String = String.Empty
|
||||||
|
EgtGetName(nIdParent, sNameLayer)
|
||||||
|
If Not sNameLayer.StartsWith("AUX") Or Not sNameLayer.StartsWith("SOLID") Or Not sNameLayer.StartsWith("DIM") Then
|
||||||
|
' scorro l'elenco dei componenti fino a trovare un riscontro tra i nomi e i parametri
|
||||||
|
For Each ItemCompo As Compo In LocalCompoList
|
||||||
|
If MatchCompoFromScena(nIdParent, ItemCompo, LocalCompoList) Then Exit While
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' Passo al successivo
|
||||||
|
nId = EgtGetNextObjInSelWin()
|
||||||
|
End While
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function MatchCompoFromScena(nIdLay As Integer, CurrCompo As Compo, CompoList As ObservableCollection(Of Compo)) As Boolean
|
||||||
|
If IsNothing(CurrCompo) Then Return True
|
||||||
|
' recupero la lista dei compo dello stesso tipo
|
||||||
|
Dim TempList As ObservableCollection(Of Compo) = DdfFile.GetCurrentListSameCompoType(CompoList, CurrCompo.CompoType.DDFName)
|
||||||
|
' recupero la lista dei compo con lo stesso nome
|
||||||
|
TempList = DdfFile.GetCurrentListSameCompoDDFName(TempList, CurrCompo.SelFile, CurrCompo.SelBrandPart)
|
||||||
|
' riordino la lista appena trovata secondo le regole di stampa DDF
|
||||||
|
DdfFile.GetOrderedListSameCompo(TempList)
|
||||||
|
' ottengo la posizione prevista nella grafica
|
||||||
|
Dim IndexInList As Integer = DdfFile.GetIndexInList(TempList, CurrCompo)
|
||||||
|
' recupero la lista ordinata
|
||||||
|
Dim sCompoName As String = CurrCompo.TemplateSelItem
|
||||||
|
' oridnamento del layer
|
||||||
|
Dim IndexLay As Integer = -1
|
||||||
|
' recupero il nome della comaponente selezionata con MouseOver
|
||||||
|
Dim sInfoPath As String = String.Empty
|
||||||
|
If Not EgtGetInfo(nIdLay, "Path", sInfoPath) Then Return True
|
||||||
|
' Dim sNamePath As String = Path.GetFileNameWithoutExtension(sInfoPath)
|
||||||
|
Dim sNamePath As String = sInfoPath
|
||||||
|
'If sNamePath = sCompoName Then
|
||||||
|
If sNamePath.Contains(sCompoName) Then
|
||||||
|
Dim nCurrLayId As Integer = nIdLay
|
||||||
|
Dim nCounter As Integer = 1
|
||||||
|
While nCurrLayId <> GDB_ID.NULL
|
||||||
|
nCurrLayId = EgtGetNext(nCurrLayId)
|
||||||
|
Dim LocalsPath As String = String.Empty
|
||||||
|
If EgtGetInfo(nCurrLayId, "Path", LocalsPath) Then
|
||||||
|
If sNamePath.Trim = LocalsPath.Trim Then
|
||||||
|
nCounter += 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End While
|
||||||
|
IndexLay = TempList.Count - nCounter
|
||||||
|
End If
|
||||||
|
' la compo passata non ha lo stesso nome, quindi mi aspetto un'altra compo
|
||||||
|
If IndexLay = -1 Then Return False
|
||||||
|
|
||||||
|
While IndexInList < TempList.Count And nIdLay <> GDB_ID.NULL
|
||||||
|
' recupero l'ordinamento del layer
|
||||||
|
If sNamePath.Contains(sCompoName) And IndexLay = IndexInList Then
|
||||||
|
EgtSetMark(nIdLay)
|
||||||
|
' evidenzio la compo corrente
|
||||||
|
TempList(IndexInList).SetMark()
|
||||||
|
EgtDraw()
|
||||||
|
' ricerca terminata correttamente
|
||||||
|
Return True
|
||||||
|
Exit While
|
||||||
|
ElseIf sNamePath.Contains(sCompoName) And IndexInList < IndexLay Then
|
||||||
|
IndexInList += 1
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End While
|
||||||
|
' prova con un'altra compo
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region ' Event scene
|
||||||
|
|
||||||
Public Sub ComposeAssembly(nAssembl As Integer)
|
Public Sub ComposeAssembly(nAssembl As Integer)
|
||||||
If Not File.Exists(IniFile.m_sDoorsDirPath & "\" & "Main_Assemb.lua") Then
|
If Not File.Exists(IniFile.m_sDoorsDirPath & "\" & "Main_Assemb.lua") Then
|
||||||
EgtOutLog("SetUp error: SetUp configuration file (" & IniFile.m_sDoorsDirPath & "\" & "Main_Assemb.lua)" & " doesn't exist ")
|
EgtOutLog("SetUp error: SetUp configuration file (" & IniFile.m_sDoorsDirPath & "\" & "Main_Assemb.lua)" & " doesn't exist ")
|
||||||
|
|||||||
+136
-27
@@ -22,6 +22,13 @@ Public Module Utility
|
|||||||
|
|
||||||
' CurrFile deve arrivare già senza estensione!
|
' CurrFile deve arrivare già senza estensione!
|
||||||
Private Function GenerateLockFileName(ByVal CurrDirectory As String, Optional ByVal CurrFile As String = "") As String
|
Private Function GenerateLockFileName(ByVal CurrDirectory As String, Optional ByVal CurrFile As String = "") As String
|
||||||
|
' Se in modalità Modifica file DDT allora non bloccare il file
|
||||||
|
If OptionModule.AdjustDDT Then
|
||||||
|
Return String.Empty
|
||||||
|
End If
|
||||||
|
If OptionModule.ReadOnlyDDF Then
|
||||||
|
Return String.Empty
|
||||||
|
End If
|
||||||
' per bloccare il direttorio
|
' per bloccare il direttorio
|
||||||
If String.IsNullOrEmpty(CurrFile) Then
|
If String.IsNullOrEmpty(CurrFile) Then
|
||||||
Return CurrDirectory & "\Lock_Project" & LCK_EXTENSION
|
Return CurrDirectory & "\Lock_Project" & LCK_EXTENSION
|
||||||
@@ -37,17 +44,21 @@ Public Module Utility
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function IsFileLocked(ByVal CurrDirectory As String, Optional ByVal CurrFile As String = "", Optional ByVal bSendMsg As Boolean = True) As Boolean
|
Public Function IsFileLocked(ByVal CurrDirectory As String, Optional ByVal CurrFile As String = "", Optional ByVal bSendMsg As Boolean = True) As Boolean
|
||||||
|
If String.IsNullOrEmpty(CurrDirectory) Then
|
||||||
|
EgtOutLog("Impossible to find directory")
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
Dim sLockFile As String = GenerateLockFileName(CurrDirectory, CurrFile)
|
Dim sLockFile As String = GenerateLockFileName(CurrDirectory, CurrFile)
|
||||||
Dim bIsLocked As Boolean = False
|
Dim bIsLocked As Boolean = False
|
||||||
Dim FileList As String() = Directory.GetFiles(CurrDirectory)
|
Dim FileList As String() = Directory.GetFiles(CurrDirectory)
|
||||||
|
|
||||||
' recurpero il nome del primo file bloccato nel direttorio corrente (se non è specificato un file)
|
' recurpero il nome del primo file bloccato nel direttorio corrente (se non è specificato un file)
|
||||||
If String.IsNullOrEmpty(CurrFile) then
|
If String.IsNullOrEmpty(CurrFile) Then
|
||||||
Try
|
Try
|
||||||
sLockFile = FileList.First(Function(x) x.EndsWith(LCK_EXTENSION))
|
sLockFile = FileList.First(Function(x) x.EndsWith(LCK_EXTENSION))
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If File.Exists(sLockFile) Then
|
If File.Exists(sLockFile) Then
|
||||||
Try
|
Try
|
||||||
@@ -101,9 +112,9 @@ Public Module Utility
|
|||||||
m_CurrLockFile = GenerateLockFileName(CurrDirectory, CurrFile)
|
m_CurrLockFile = GenerateLockFileName(CurrDirectory, CurrFile)
|
||||||
m_StopSaving = False
|
m_StopSaving = False
|
||||||
'If VerifyFileLocked(CurrDirectory, CurrFile) Then Return False
|
'If VerifyFileLocked(CurrDirectory, CurrFile) Then Return False
|
||||||
If Not IsNothing(Map.refMainWindowVM.AssemblyManagerControl) then
|
If Not IsNothing(Map.refMainWindowVM.AssemblyManagerControl) Then
|
||||||
Map.refMainWindowVM.AssemblyManagerControl.Visibility = Visibility.Visible
|
Map.refMainWindowVM.AssemblyManagerControl.Visibility = Visibility.Visible
|
||||||
End If
|
End If
|
||||||
Try
|
Try
|
||||||
Dim NomeUtente As String = Environment.MachineName & "/" & Environment.UserName
|
Dim NomeUtente As String = Environment.MachineName & "/" & Environment.UserName
|
||||||
File.WriteAllText(m_CurrLockFile, NomeUtente, New System.Text.UTF8Encoding(False))
|
File.WriteAllText(m_CurrLockFile, NomeUtente, New System.Text.UTF8Encoding(False))
|
||||||
@@ -301,7 +312,32 @@ Public Module Utility
|
|||||||
Return "0.0000"
|
Return "0.0000"
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
ElseIf sValue.Contains("(") And sValue.Contains(")") And Not sValue.Contains("inch") Then
|
ElseIf sValue.Contains("(") And sValue.Contains(")") And sValue.Contains("mm") Then
|
||||||
|
sValue = Trim(sValue.Replace("mm", ""))
|
||||||
|
If sValue.StartsWith("(") And sValue.EndsWith(")") Then
|
||||||
|
Dim ArrayString() As Char = StringToChar(sValue)
|
||||||
|
ArrayString(0) = CChar("§")
|
||||||
|
ArrayString(ArrayString.Count - 1) = CChar("§")
|
||||||
|
sValue = CharToString(ArrayString, sValue)
|
||||||
|
sValue = Trim(sValue.Replace("§", ""))
|
||||||
|
End If
|
||||||
|
If String.IsNullOrEmpty(sValue) Then Return "0.0000"
|
||||||
|
' ricevo un valore in inches
|
||||||
|
Select Case OptionModule.m_SelectedMeasureUnit
|
||||||
|
Case ConstGen.MM ' se la configurazione è inches non faccio conversioni
|
||||||
|
If StringToDouble(sValue, dVal) Then
|
||||||
|
Return sValue
|
||||||
|
Else
|
||||||
|
Return "0.0000"
|
||||||
|
End If
|
||||||
|
Case ConstGen.VAL_INCHES ' se la configurazione è in mm faccio la conevrsione
|
||||||
|
If MmToInches(sValue) Then
|
||||||
|
Return sValue
|
||||||
|
Else
|
||||||
|
Return "0.0000"
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
ElseIf sValue.Contains("(") And sValue.Contains(")") And (Not sValue.Contains("inch") Or Not sValue.Contains("mm")) Then
|
||||||
'sValue = Regex.Match(sValue, "\s*\((.*?)\s*\)\s*\.*").Groups(1).Value
|
'sValue = Regex.Match(sValue, "\s*\((.*?)\s*\)\s*\.*").Groups(1).Value
|
||||||
If String.IsNullOrEmpty(sValue) Then Return "0.0000"
|
If String.IsNullOrEmpty(sValue) Then Return "0.0000"
|
||||||
' ricevo un valore in mm
|
' ricevo un valore in mm
|
||||||
@@ -350,16 +386,36 @@ Public Module Utility
|
|||||||
Friend Function MmToInches(ByRef sMeasure As String) As Boolean
|
Friend Function MmToInches(ByRef sMeasure As String) As Boolean
|
||||||
Dim dVal As Double = 0.0
|
Dim dVal As Double = 0.0
|
||||||
If Not StringToDouble(sMeasure, dVal) Then Return False
|
If Not StringToDouble(sMeasure, dVal) Then Return False
|
||||||
dVal = dVal / ONEINCH
|
'dVal = dVal / ONEINCH
|
||||||
sMeasure = LenToString(dVal, 4)
|
sMeasure = LenToString(dVal, 4)
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function DirectInchesToMm(ByRef sMeasure As String) As Boolean
|
||||||
|
Dim dVal As Double = 0.0
|
||||||
|
If Not StringToDouble(sMeasure, dVal) Then Return False
|
||||||
|
dVal = dVal * ONEINCH
|
||||||
|
sMeasure = DoubleToString(dVal, 3)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function DirectMmToInches(ByRef sMeasure As String) As Boolean
|
||||||
|
Dim dVal As Double = 0.0
|
||||||
|
If Not StringToDouble(sMeasure, dVal) Then Return False
|
||||||
|
dVal = dVal / ONEINCH
|
||||||
|
sMeasure = DoubleToString(dVal, 4)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Function ConvertCurrentUnitMeasure(ByRef sMeasure As String) As Boolean
|
Friend Function ConvertCurrentUnitMeasure(ByRef sMeasure As String) As Boolean
|
||||||
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
|
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
|
||||||
' non eseguo nessun tipo di conversione
|
' non eseguo nessun tipo di conversione
|
||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
|
' la configurazione è già in mm quindi non devo convertire
|
||||||
|
If OptionModule.m_IsMM Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
Return InchesToMm(sMeasure)
|
Return InchesToMm(sMeasure)
|
||||||
End If
|
End If
|
||||||
Return False
|
Return False
|
||||||
@@ -385,10 +441,10 @@ Public Module Utility
|
|||||||
' conevrsione in lettura dei valori delle textbox nel DoorCreator/HardwareManager
|
' conevrsione in lettura dei valori delle textbox nel DoorCreator/HardwareManager
|
||||||
Friend Function ConvertCompoConfig(ByRef sItems As String, ByRef dControlValue As Double) As Boolean
|
Friend Function ConvertCompoConfig(ByRef sItems As String, ByRef dControlValue As Double) As Boolean
|
||||||
Dim dDefaultValue As Double = 0
|
Dim dDefaultValue As Double = 0
|
||||||
If sItems.Contains("$") then
|
If sItems.Contains("$") Then
|
||||||
sItems = "$"
|
sItems = "$"
|
||||||
Return true
|
Return True
|
||||||
end
|
End
|
||||||
End If
|
End If
|
||||||
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES And Not OptionModule.m_IsMM Then
|
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES And Not OptionModule.m_IsMM Then
|
||||||
' Concordi = Inches
|
' Concordi = Inches
|
||||||
@@ -398,7 +454,7 @@ Public Module Utility
|
|||||||
End If
|
End If
|
||||||
ElseIf OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES And OptionModule.m_IsMM Then
|
ElseIf OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES And OptionModule.m_IsMM Then
|
||||||
' Discordi
|
' Discordi
|
||||||
If StringToLen(sItems, dDefaultValue) AndAlso dDefaultValue < dControlValue Then
|
If StringToDouble(sItems, dDefaultValue) AndAlso dDefaultValue < dControlValue Then
|
||||||
MmToInches(sItems)
|
MmToInches(sItems)
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
@@ -450,6 +506,28 @@ Public Module Utility
|
|||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function ConvertDDFValueIntoCurrentUnit(sCurrUnitDDF As String, ByRef sValue As String) As Boolean
|
||||||
|
Dim bCurrUnitDDFIsMM As Boolean = ConvertStringToMmUnits(sCurrUnitDDF)
|
||||||
|
Dim dDefaultValue As Double = 0
|
||||||
|
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES And Not bCurrUnitDDFIsMM Then
|
||||||
|
' non eseguo cenversione: Concordi = Inches
|
||||||
|
Return True
|
||||||
|
ElseIf OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES And bCurrUnitDDFIsMM Then
|
||||||
|
' eseguo conversione: Discordi= MM → Inches
|
||||||
|
DirectMmToInches(sValue)
|
||||||
|
'InchesToMm(sValue)
|
||||||
|
Return True
|
||||||
|
ElseIf OptionModule.m_SelectedMeasureUnit = ConstGen.MM And Not bCurrUnitDDFIsMM Then
|
||||||
|
' eseguo conversione: Discordi= Inches → MM
|
||||||
|
DirectInchesToMm(sValue)
|
||||||
|
Return True
|
||||||
|
ElseIf OptionModule.m_SelectedMeasureUnit = ConstGen.MM And bCurrUnitDDFIsMM Then
|
||||||
|
' non eseguo cenversione: Concordi = MM
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
' Converte il valore Boolean in una stringa ON/OFF (attributo machining)
|
' Converte il valore Boolean in una stringa ON/OFF (attributo machining)
|
||||||
Friend Function ConvertBooleanToOnOff(bValue As Boolean) As String
|
Friend Function ConvertBooleanToOnOff(bValue As Boolean) As String
|
||||||
Return If(bValue, DDF_ON, DDF_OFF)
|
Return If(bValue, DDF_ON, DDF_OFF)
|
||||||
@@ -465,9 +543,9 @@ Public Module Utility
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function ConvertStringToMmUnits(sUnit As String) As Boolean
|
Friend Function ConvertStringToMmUnits(sUnit As String) As Boolean
|
||||||
If Trim(sUnit) = ConstGen.MM Then
|
If Trim(sUnit).ToLower = ConstGen.MM.ToLower Then
|
||||||
Return True
|
Return True
|
||||||
ElseIf Trim(sUnit) = ConstGen.VAL_INCHES Then
|
ElseIf Trim(sUnit).ToLower = ConstGen.VAL_INCHES.ToLower Then
|
||||||
Return False
|
Return False
|
||||||
Else
|
Else
|
||||||
Return OptionModule.m_bIsMmUnit
|
Return OptionModule.m_bIsMmUnit
|
||||||
@@ -484,9 +562,9 @@ Public Module Utility
|
|||||||
sMyVal = sMyVal.Replace("H", "(DGD.dH/25.4)")
|
sMyVal = sMyVal.Replace("H", "(DGD.dH/25.4)")
|
||||||
sMyVal = sMyVal.Replace("T", "(DGD.dT/25.4)")
|
sMyVal = sMyVal.Replace("T", "(DGD.dT/25.4)")
|
||||||
Else
|
Else
|
||||||
sMyVal = sMyVal.Replace("W", "DGD.dW")
|
sMyVal = sMyVal.Replace("W", "(DGD.dW)")
|
||||||
sMyVal = sMyVal.Replace("H", "DGD.dH")
|
sMyVal = sMyVal.Replace("H", "(DGD.dH)")
|
||||||
sMyVal = sMyVal.Replace("T", "DGD.dT")
|
sMyVal = sMyVal.Replace("T", "(DGD.dT)")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Return sMyVal
|
Return sMyVal
|
||||||
@@ -495,16 +573,25 @@ Public Module Utility
|
|||||||
Friend Function ConvertToDGD(sTypeVar As String, sValue As String) As String
|
Friend Function ConvertToDGD(sTypeVar As String, sValue As String) As String
|
||||||
Dim sMyVal As String = sValue
|
Dim sMyVal As String = sValue
|
||||||
' se testo numerico, eseguo opportunbe conversioni per H,W e T
|
' se testo numerico, eseguo opportunbe conversioni per H,W e T
|
||||||
If sTypeVar = ConstGen.INCHES Or sTypeVar = ConstGen.MM Then
|
'If sTypeVar = ConstGen.INCHES Or sTypeVar = ConstGen.MM Then
|
||||||
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
|
' If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
|
||||||
sMyVal = sMyVal.Replace("(DGD.dW/25.4)", "W")
|
' sMyVal = sMyVal.Replace("(DGD.dW/25.4)", "W")
|
||||||
sMyVal = sMyVal.Replace("(DGD.dH/25.4)", "H")
|
' sMyVal = sMyVal.Replace("(DGD.dH/25.4)", "H")
|
||||||
sMyVal = sMyVal.Replace("(DGD.dT/25.4)", "T")
|
' sMyVal = sMyVal.Replace("(DGD.dT/25.4)", "T")
|
||||||
Else
|
' Else
|
||||||
sMyVal = sMyVal.Replace("DGD.dW", "W")
|
' sMyVal = sMyVal.Replace("DGD.dW", "W")
|
||||||
sMyVal = sMyVal.Replace("DGD.dH", "H")
|
' sMyVal = sMyVal.Replace("DGD.dH", "H")
|
||||||
sMyVal = sMyVal.Replace("DGD.dT", "T")
|
' sMyVal = sMyVal.Replace("DGD.dT", "T")
|
||||||
End If
|
' End If
|
||||||
|
'End If
|
||||||
|
If sMyVal.Contains("25.4") Then
|
||||||
|
sMyVal = sMyVal.Replace("(DGD.dW/25.4)", "W")
|
||||||
|
sMyVal = sMyVal.Replace("(DGD.dH/25.4)", "H")
|
||||||
|
sMyVal = sMyVal.Replace("(DGD.dT/25.4)", "T")
|
||||||
|
Else
|
||||||
|
sMyVal = sMyVal.Replace("(DGD.dW)", "W")
|
||||||
|
sMyVal = sMyVal.Replace("(DGD.dH)", "H")
|
||||||
|
sMyVal = sMyVal.Replace("(DGD.dT)", "T")
|
||||||
End If
|
End If
|
||||||
Return sMyVal
|
Return sMyVal
|
||||||
End Function
|
End Function
|
||||||
@@ -620,6 +707,28 @@ Public Module Utility
|
|||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "Create Log"
|
||||||
|
Private sFileBlindProgLog As System.IO.StreamWriter
|
||||||
|
Private sFilePath As String = String.Empty
|
||||||
|
|
||||||
|
Public Sub StartBlinProgdLog(sPath As String)
|
||||||
|
sFilePath = sPath
|
||||||
|
sFileBlindProgLog = New System.IO.StreamWriter(sPath, True)
|
||||||
|
Dim sInfoStart As String = Date.Now.ToString & " Avvio programma in cieco"
|
||||||
|
sInfoStart &= vbCrLf & My.Application.Info.Version.Major.ToString() & "." & My.Application.Info.Version.Minor.ToString() &
|
||||||
|
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() & My.Application.Info.Version.Revision.ToString()
|
||||||
|
sFileBlindProgLog.WriteLine(sInfoStart)
|
||||||
|
sFileBlindProgLog.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub BlindProgLog(sMsg As String)
|
||||||
|
sFileBlindProgLog = File.AppendText(sFilePath)
|
||||||
|
sFileBlindProgLog.WriteLine(sMsg)
|
||||||
|
sFileBlindProgLog.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
End Module
|
End Module
|
||||||
|
|
||||||
Public Class CompoBrandDir
|
Public Class CompoBrandDir
|
||||||
|
|||||||
Reference in New Issue
Block a user