Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d3d7fbacd4 | |||
| 201cf2ddf1 | |||
| 80c3634506 | |||
| 43bc9d7e59 | |||
| 4ab6a1a393 | |||
| 929966c456 | |||
| 65f8b72488 | |||
| d73ca948c9 |
+68
-9
@@ -31,6 +31,13 @@ Public Class Assembly
|
||||
' 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
|
||||
|
||||
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 "Light Up/Bottom"
|
||||
@@ -1109,6 +1116,28 @@ Public Class Assembly
|
||||
' se non carico nessuna informazione allora non è un assemblato, esco
|
||||
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
|
||||
If IndexLine < FileContent.Count - 1 Then
|
||||
If SearchKey(FileContent(IndexLine), ConstIni.S_SIZE_INI) Then
|
||||
@@ -1184,7 +1213,7 @@ Public Class Assembly
|
||||
If IndexLine < FileContent.Count Then
|
||||
If SearchKey(FileContent(IndexLine), ConstIni.S_DOORS_ASSEMBY) Then
|
||||
' 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
|
||||
SetDoorNumber(m_DoorNumber)
|
||||
If IndexLine = -1 Then
|
||||
@@ -1237,7 +1266,7 @@ Public Class Assembly
|
||||
End Function
|
||||
|
||||
' 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
|
||||
Dim Local_Var As String = GetValueWithKey(FileContent(Index), Name)
|
||||
If String.IsNullOrWhiteSpace(Local_Var) Then
|
||||
@@ -1245,6 +1274,7 @@ Public Class Assembly
|
||||
If Not SearchKey(FileContent(Index), Name) Then Return -1
|
||||
' altrimenti lascia il valore vuoto
|
||||
Else
|
||||
If bConvertUnit Then ConvertDDFValueIntoCurrentUnit(m_AssemblyUnit, Local_Var)
|
||||
Var = Local_Var
|
||||
End If
|
||||
Return Index + 1
|
||||
@@ -1330,6 +1360,35 @@ Public Class Assembly
|
||||
End If
|
||||
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
|
||||
Private Function GetSize(Index As Integer) As Integer
|
||||
If Index = -1 Then Return -1
|
||||
@@ -2774,7 +2833,7 @@ Public Class Assembly
|
||||
If TBoxPar.EnableCopy Then
|
||||
TBoxNewPar.SetValue(TBoxPar.Value)
|
||||
TBoxNewPar.SetIsActive(TBoxPar.IsActive)
|
||||
End If
|
||||
End If
|
||||
ElseIf TypeOf PrecCompo.CompoParamList(IndexParam) Is TextBoxParam AndAlso
|
||||
PrecCompo.CompoParamList(IndexParam).DDFName = NewCompo.CompoParamList(IndexParam).DDFName Then
|
||||
Dim TBoxPar As TextBoxParam = DirectCast(PrecCompo.CompoParamList(IndexParam), TextBoxParam)
|
||||
@@ -2796,7 +2855,7 @@ Public Class Assembly
|
||||
Dim CBoxNewPar As ComboBoxParam = DirectCast(NewCompo.CompoParamList(IndexParam), ComboBoxParam)
|
||||
If CBoxNewPar.EnableCopy Then
|
||||
CBoxNewPar.SetSelItem(CBoxNewPar.ItemList(CBoxNewPar.ItemList.IndexOf(CBoxPar.SelItem)))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
@@ -3735,8 +3794,8 @@ Public Class Assembly
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
' rimuovo dalla lista
|
||||
If bRabbet Then Jamb.CompoList.RemoveAt(IndexCompo)
|
||||
' rimuovo dalla lista
|
||||
If bRabbet Then Jamb.CompoList.RemoveAt(IndexCompo)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -3763,9 +3822,9 @@ Public Class Assembly
|
||||
TextParam.m_Value = DoubleToString(dDeltaT + dThicknessDoor, 4)
|
||||
End If
|
||||
TextParam.NotifyPropertyChanged("Value")
|
||||
End If
|
||||
' depth
|
||||
CurrCompoParam = CurrCompo.CompoParamList(2)
|
||||
End If
|
||||
' depth
|
||||
CurrCompoParam = CurrCompo.CompoParamList(2)
|
||||
If TypeOf DirectCast(CurrCompoParam, CompoParam) Is TextBoxParam Then
|
||||
Dim TextParam As TextBoxParam = DirectCast(CurrCompoParam, TextBoxParam)
|
||||
Dim sRabbetDepth As String = sOverlap
|
||||
|
||||
+13
-1
@@ -99,6 +99,17 @@ Public Class CompoType
|
||||
m_FolderName = FolderName
|
||||
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
|
||||
FolderList.Clear()
|
||||
m_HardwareFolderList.Clear()
|
||||
@@ -114,12 +125,13 @@ Public Class CompoType
|
||||
Return other
|
||||
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 ByVal sDDFMaterial As String = "wood")
|
||||
m_Name = sName
|
||||
m_DDFName = sDDFName
|
||||
m_Path = sPath
|
||||
m_JambSide = sJambSide
|
||||
m_FolderName = sFolderName
|
||||
m_DDFMaterial = sDDFMaterial
|
||||
LoadListTemplate()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -135,9 +135,11 @@ Module ConstCompo
|
||||
Public Const INI_COMBOBOX_ONOFF As String = "ComboBoxOnOff"
|
||||
Public Const INI_COMBOBOX_LUA As String = "ComboBoxLua"
|
||||
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_TEXTBOXTHICKNESS As String = "TextBoxThickness"
|
||||
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_TEXTBOXLUA As String = "TextBoxLua"
|
||||
Public Const INI_CHECKBOX As String = "CheckBox"
|
||||
|
||||
+11
-2
@@ -71,8 +71,10 @@ Friend Module DdfFile
|
||||
DdfFileContent.Add("produce: " & If(Part.IsActive, "true", "false"))
|
||||
'Genero una lista di stringhe
|
||||
DdfFileContent.Add("")
|
||||
If IsNothing(Part.Measure) Then Part.Measure = ConvertMmUnitsToString(OptionModule.m_bIsMmUnit)
|
||||
DdfFileContent.Add(ConstCompo.S_MEASURES & ": " & Part.Measure)
|
||||
'If IsNothing(Part.Measure) Then Part.Measure = ConvertMmUnitsToString(OptionModule.m_bIsMmUnit)
|
||||
'DdfFileContent.Add(ConstCompo.S_MEASURES & ": " & Part.Measure)
|
||||
DdfFileContent.Add(ConstCompo.S_MEASURES & ": " & ConvertMmUnitsToString(OptionModule.m_bIsMmUnit))
|
||||
|
||||
' 50200=Unit measure
|
||||
CompoDoorReport.CompoParameterList.Add(New ReportParameter(EgtMsg(50200), Part.Measure))
|
||||
|
||||
@@ -1540,6 +1542,13 @@ Friend Module DdfFile
|
||||
GeneralAssembly.Add("#EGTDOORCREATOR")
|
||||
GeneralAssembly.Add("#GENERAL ASSEMBLY")
|
||||
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 : ")
|
||||
If StringToDouble(CurrAssembly.Thickness, dVal) Then
|
||||
GeneralAssembly.Add(ConstCompo.DDF_METADATA & "thickness : " & DoubleToString(dVal, 5))
|
||||
|
||||
+35
-5
@@ -1134,7 +1134,7 @@ Public Class Compo
|
||||
|
||||
Return True
|
||||
|
||||
Case INI_TEXTBOX
|
||||
Case INI_TEXTBOX, INI_TEXTBOX_D
|
||||
' NomeDDF e Nome del Text
|
||||
Dim sTextList() As String = sItems(1).Split("/"c)
|
||||
Dim sDDFName As String = String.Empty
|
||||
@@ -1150,20 +1150,30 @@ Public Class Compo
|
||||
' Se ci sono 2 elementi "TextBox; NomeDDF/Nome"
|
||||
If sItems.Count < 3 Then
|
||||
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.
|
||||
sErrorList = ConcatErrorString(sErrorList, String.Format(EgtMsg(50125), sName, m_CompoType.DDFName))
|
||||
Return True
|
||||
End If
|
||||
' recupero il valore di default
|
||||
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)))
|
||||
End If
|
||||
|
||||
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
|
||||
|
||||
Case INI_TEXTBOX_ONOFF
|
||||
Case INI_TEXTBOX_ONOFF, INI_TEXTBOX_ONOFF_D
|
||||
' NomeDDF e Nome del Text
|
||||
Dim sTextList() As String = sItems(1).Split("/"c)
|
||||
Dim sDDFName As String = String.Empty
|
||||
@@ -1179,6 +1189,11 @@ Public Class Compo
|
||||
' Se ci sono 2 elementi "TextBox; NomeDDF/Nome"
|
||||
If sItems.Count < 3 Then
|
||||
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.
|
||||
sErrorList = ConcatErrorString(sErrorList, String.Format(EgtMsg(50125), sName, m_CompoType.DDFName))
|
||||
Return True
|
||||
@@ -1191,12 +1206,16 @@ Public Class Compo
|
||||
|
||||
' recupero il valore di default
|
||||
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)))
|
||||
End If
|
||||
|
||||
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
|
||||
|
||||
End Select
|
||||
@@ -2367,6 +2386,17 @@ Public Class TextBoxParam
|
||||
Shared m_PrecCompoIdCode As String = "-1"
|
||||
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
|
||||
Private m_TypeVar As String
|
||||
Public Property TypeVar As String
|
||||
|
||||
+26
-2
@@ -1940,6 +1940,7 @@ Public Class Part
|
||||
'50159= Missing parameter in ddf!
|
||||
MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_WIDTH_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Else
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, Width)
|
||||
SetWidth(Width)
|
||||
End If
|
||||
Index = NextIndex(Index)
|
||||
@@ -1956,6 +1957,7 @@ Public Class Part
|
||||
' 50159 = Missing parameter in ddf!
|
||||
MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_HEIGHT_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Else
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, Height)
|
||||
SetHeight(Height)
|
||||
End If
|
||||
Index = NextIndex(Index)
|
||||
@@ -1972,6 +1974,7 @@ Public Class Part
|
||||
' 50159 = Missing parameter in ddf!
|
||||
MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_THICKNESS_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Else
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, Thickness)
|
||||
SetThickness(Thickness)
|
||||
End If
|
||||
Map.refAssemblyPageVM.CurrAssembly.SetVarAssembly()
|
||||
@@ -2355,6 +2358,7 @@ Public Class Part
|
||||
If String.IsNullOrWhiteSpace(LockEdgeOverMaterial) Then
|
||||
If Not SearchKey(sLine, K_OVERMATERIAL) Then Return -1
|
||||
Else
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, LockEdgeOverMaterial)
|
||||
m_LockEdgeOverMaterial = LockEdgeOverMaterial
|
||||
End If
|
||||
Index = NextIndex(Index)
|
||||
@@ -2417,9 +2421,11 @@ Public Class Part
|
||||
If String.IsNullOrWhiteSpace(HingeEdgeOverMaterial) Then
|
||||
If Not SearchKey(sLine, K_OVERMATERIAL) Then Return -1
|
||||
Else
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, HingeEdgeOverMaterial)
|
||||
m_HingeEdgeOverMaterial = HingeEdgeOverMaterial
|
||||
End If
|
||||
Index = NextIndex(Index)
|
||||
'-------------------------------------------------------------------------------
|
||||
' Top
|
||||
If Index > FileContent.Count() - 1 Then Return -1
|
||||
sLine = RemoveComment(FileContent(Index))
|
||||
@@ -2476,12 +2482,14 @@ Public Class Part
|
||||
If String.IsNullOrWhiteSpace(TopOverMaterial) Then
|
||||
If Not SearchKey(sLine, K_OVERMATERIAL) Then Return -1
|
||||
Else
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, TopOverMaterial)
|
||||
m_TopOverMaterial = TopOverMaterial
|
||||
End If
|
||||
Index = NextIndex(Index)
|
||||
If Index > FileContent.Count() - 1 Then Return -1
|
||||
sLine = RemoveComment(FileContent(Index))
|
||||
'-------------------------------------------------------------------------------
|
||||
' Top Arc
|
||||
Dim Radius As String = GetValueWithKey(sLine, ConstCompo.K_RADIUS)
|
||||
If Not String.IsNullOrEmpty(Radius) Then
|
||||
Index = NextIndex(Index)
|
||||
@@ -2495,7 +2503,9 @@ Public Class Part
|
||||
Index = NextIndex(Index)
|
||||
Else
|
||||
Index = NextIndex(Index)
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, Radius)
|
||||
m_Radius = Radius
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, Posx)
|
||||
m_Posx = Posx
|
||||
TopArcIsChecked = True
|
||||
TopShapeIsChecked = True
|
||||
@@ -2519,6 +2529,7 @@ Public Class Part
|
||||
Else
|
||||
Index = NextIndex(Index)
|
||||
m_Angle = Angle
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, PosxAngle)
|
||||
m_PosxAngle = PosxAngle
|
||||
TopAngleIsChecked = True
|
||||
SelectedShape = m_TopShapeList(1)
|
||||
@@ -2584,6 +2595,7 @@ Public Class Part
|
||||
If String.IsNullOrWhiteSpace(BottomOverMaterial) Then
|
||||
If Not SearchKey(sLine, K_OVERMATERIAL) Then Return -1
|
||||
Else
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, BottomOverMaterial)
|
||||
m_BottomOverMaterial = BottomOverMaterial
|
||||
End If
|
||||
CalcBevelFromSecure()
|
||||
@@ -2955,7 +2967,13 @@ Public Class Part
|
||||
Dim sVal As String = GetValueWithoutKey(sLine)
|
||||
' per ora non esegue nessun tipo di controllo sui valori letti dal file DDF
|
||||
' 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)
|
||||
Dim dVal As Double
|
||||
If String.IsNullOrEmpty(sVal) OrElse Not StringToDouble(sVal, dVal) Then
|
||||
@@ -3002,7 +3020,13 @@ Public Class Part
|
||||
If String.Equals(Trim(CompoTemplateItem.CompoParamList(IndexParam).DDFName), GetKey(sLine)) Then
|
||||
' se la stringa c'è nel DDF vuol dire che è stata selezionata
|
||||
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
|
||||
Dim dVal As Double
|
||||
If String.IsNullOrEmpty(sVal) OrElse Not StringToDouble(sVal, dVal) Then
|
||||
|
||||
@@ -739,14 +739,16 @@ Public Class Hardware
|
||||
Dim nIsActiveMaterial As Integer = 3
|
||||
Dim bIsCurrentMaterial As Boolean = True
|
||||
StdTemplateGetPrivateProfileListMaterial(S_CHAPTER & ChapterIndex, K_MATERIAL, sMaterialList, nIsActiveMaterial)
|
||||
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
|
||||
'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
|
||||
IsCurrentMaterial(sMaterialList, bIsCurrentMaterial)
|
||||
|
||||
If Not bIsCurrentMaterial And nIsActive <> 4 Then
|
||||
nIsActive = nIsActiveMaterial
|
||||
End If
|
||||
@@ -792,6 +794,18 @@ Public Class Hardware
|
||||
Dim NewParam As New CompoParam(m_HardwareGeneral.DDFName, m_HardwareGeneral.Name, Chapter)
|
||||
Dim sHelpParam As String = String.Empty
|
||||
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
|
||||
If Chapter.ReadParamHardware(sParam, sHelpParam, NewParam, ErrorReading) Then Chapter.CompoParamList.Add(NewParam)
|
||||
If TypeOf NewParam Is TextBoxOnOffParam Then
|
||||
@@ -833,6 +847,29 @@ Public Class Hardware
|
||||
End If
|
||||
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
|
||||
Private Function SetGroupChaptername(sName As String) As Boolean
|
||||
If m_GroupChapterName.Count = 0 Then m_GroupChapterName.Add(sName)
|
||||
@@ -988,6 +1025,10 @@ Public Class Hardware
|
||||
' caricamento dei dati del file lua
|
||||
Private Function FindParamTemplateInConfigList(sParam As String, sValue As String) As Boolean
|
||||
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
|
||||
If m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter).DDFName = sParam Then
|
||||
' ho trovato una corrispondenza tra il valore de file ini e quello lua in lettura
|
||||
@@ -1953,10 +1994,16 @@ Public Class Hardware
|
||||
End If
|
||||
|
||||
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
|
||||
If m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter).DDFName = NameParam Then
|
||||
' 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 TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxDGCParam Then
|
||||
Dim Text As TextBoxDGCParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxDGCParam)
|
||||
sValue = String.Empty
|
||||
|
||||
+23
@@ -59,6 +59,8 @@ Friend Module IniFile
|
||||
Friend m_sListLabelCurrent As String = String.Empty
|
||||
' Path dell'eseguibile Cam5
|
||||
Friend m_sEgtCameEXEPath As String = String.Empty
|
||||
' Path LuaLibs Dir
|
||||
Friend m_sLuaLibsDir As String = String.Empty
|
||||
|
||||
' EgtDoorCreator.ini
|
||||
Public Function GetPrivateProfileLanguage(ByVal lpAppName As String, ByVal lpKeyName As String) As Language
|
||||
@@ -289,6 +291,27 @@ Friend Module IniFile
|
||||
Return True
|
||||
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
|
||||
Dim sVal As String = String.Empty
|
||||
StdTemplateGetPrivateProfileString(lpAppName, lpKeyName, "", sVal)
|
||||
|
||||
@@ -57,8 +57,8 @@ Friend Class MainWindowModel
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||
EgtSetKey(sKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2407, 1, IniFile.m_nKeyLevel) And
|
||||
EgtGetKeyOptions(3279, 2407, 1, IniFile.m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2412, 1, IniFile.m_nKeyLevel) And
|
||||
EgtGetKeyOptions(3279, 2412, 1, IniFile.m_nKeyOptions)
|
||||
'Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
Dim sLogFile As String = IniFile.m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
@@ -96,6 +96,7 @@ Friend Class MainWindowModel
|
||||
Dim sLuaLibsDir As String = String.Empty
|
||||
GetMainPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
|
||||
EgtSetLuaLibs(sLuaLibsDir)
|
||||
IniFile.m_sLuaLibsDir = sLuaLibsDir
|
||||
Dim sLuaBaseLib As String = String.Empty
|
||||
GetMainPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
|
||||
EgtLuaRequire(sLuaBaseLib)
|
||||
|
||||
@@ -32,7 +32,7 @@ Imports System.Windows
|
||||
|
||||
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyProduct("EgtDOORCreator")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2016-2021 by EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2016-2022 by EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
@@ -72,5 +72,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.11.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.11.1")>
|
||||
<Assembly: AssemblyVersion("2.4.12.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.12.1")>
|
||||
|
||||
@@ -1013,7 +1013,10 @@ Friend Module OptionModule
|
||||
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 Return False
|
||||
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
|
||||
@@ -1035,7 +1038,10 @@ Friend Module OptionModule
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If m_MTableList.Count < 1 Then Return False
|
||||
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
|
||||
@@ -1065,7 +1071,7 @@ Friend Module OptionModule
|
||||
|
||||
Public Sub GetCurrentMachineInMTable()
|
||||
' aggiorno il file Config.ini dell'EgtCAM5
|
||||
EgtLuaExecFile(IniFile.m_sConfigDir & "\ChangeConfig.lua")
|
||||
EgtLuaExecFile(IniFile.m_sLuaLibsDir & "\ChangeConfig.lua")
|
||||
' assegno variabili
|
||||
Dim sDir As String = IniFile.m_sDoorsDirPath.Replace("\", "/")
|
||||
EgtLuaSetGlobStringVar("CCD.NewBaseDir", sDir)
|
||||
|
||||
@@ -122,7 +122,7 @@ Public Class OptionsVM
|
||||
|
||||
Public ReadOnly Property EnableConfig As Boolean
|
||||
Get
|
||||
If GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) > 4 And File.Exists(IniFile.m_sConfigDir & "\ChangeConfig.lua") Then
|
||||
If GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) > 4 And File.Exists(IniFile.m_sLuaLibsDir & "\ChangeConfig.lua") Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
@@ -172,6 +172,7 @@ Public Class OptionsVM
|
||||
NotifyPropertyChanged("ConfigDir")
|
||||
OptionModule.GetCurrentMachineInMTable()
|
||||
NotifyPropertyChanged("CurrentMachine")
|
||||
NotifyPropertyChanged("BaseDir")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -193,6 +194,28 @@ Public Class OptionsVM
|
||||
End Get
|
||||
Set(value As String)
|
||||
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))
|
||||
EgtSetUiUnits(OptionModule.m_bIsMmUnit)
|
||||
WriteMainPrivateProfileString(S_SCENE, K_MMUNITS, If(OptionModule.m_bIsMmUnit, "1", "0"))
|
||||
@@ -2045,7 +2068,7 @@ Public Class OptionsVM
|
||||
|
||||
If m_IsChangedConfig AndAlso EnableConfig AndAlso m_OrigBaseDir <> IniFile.m_sDoorsDirPath AndAlso m_OrigMTable <> OptionModule.m_SelectedMTable.Name Then
|
||||
' aggiorno il file Config.ini dell'EgtCAM5
|
||||
EgtLuaExecFile(IniFile.m_sConfigDir & "\ChangeConfig.lua")
|
||||
EgtLuaExecFile(IniFile.m_sLuaLibsDir & "\ChangeConfig.lua")
|
||||
' assegno variabili
|
||||
EgtLuaSetGlobStringVar("CCD.NewBaseDir", IniFile.m_sDoorsDirPath)
|
||||
EgtLuaSetGlobStringVar("CCD.NewMTable", OptionModule.m_SelectedMTable.Name)
|
||||
|
||||
+49
-11
@@ -43,14 +43,14 @@ Public Module Utility
|
||||
Dim sLockFile As String = GenerateLockFileName(CurrDirectory, CurrFile)
|
||||
Dim bIsLocked As Boolean = False
|
||||
Dim FileList As String() = Directory.GetFiles(CurrDirectory)
|
||||
|
||||
|
||||
' recurpero il nome del primo file bloccato nel direttorio corrente (se non è specificato un file)
|
||||
If String.IsNullOrEmpty(CurrFile) then
|
||||
Try
|
||||
If String.IsNullOrEmpty(CurrFile) Then
|
||||
Try
|
||||
sLockFile = FileList.First(Function(x) x.EndsWith(LCK_EXTENSION))
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
|
||||
If File.Exists(sLockFile) Then
|
||||
Try
|
||||
@@ -104,9 +104,9 @@ Public Module Utility
|
||||
m_CurrLockFile = GenerateLockFileName(CurrDirectory, CurrFile)
|
||||
m_StopSaving = 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
|
||||
End If
|
||||
End If
|
||||
Try
|
||||
Dim NomeUtente As String = Environment.MachineName & "/" & Environment.UserName
|
||||
File.WriteAllText(m_CurrLockFile, NomeUtente, New System.Text.UTF8Encoding(False))
|
||||
@@ -358,6 +358,22 @@ Public Module Utility
|
||||
Return True
|
||||
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
|
||||
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
|
||||
' non eseguo nessun tipo di conversione
|
||||
@@ -388,10 +404,10 @@ Public Module Utility
|
||||
' conevrsione in lettura dei valori delle textbox nel DoorCreator/HardwareManager
|
||||
Friend Function ConvertCompoConfig(ByRef sItems As String, ByRef dControlValue As Double) As Boolean
|
||||
Dim dDefaultValue As Double = 0
|
||||
If sItems.Contains("$") then
|
||||
If sItems.Contains("$") Then
|
||||
sItems = "$"
|
||||
Return true
|
||||
end
|
||||
Return True
|
||||
End
|
||||
End If
|
||||
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES And Not OptionModule.m_IsMM Then
|
||||
' Concordi = Inches
|
||||
@@ -453,6 +469,28 @@ Public Module Utility
|
||||
Return False
|
||||
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)
|
||||
Friend Function ConvertBooleanToOnOff(bValue As Boolean) As String
|
||||
Return If(bValue, DDF_ON, DDF_OFF)
|
||||
@@ -468,9 +506,9 @@ Public Module Utility
|
||||
End Function
|
||||
|
||||
Friend Function ConvertStringToMmUnits(sUnit As String) As Boolean
|
||||
If Trim(sUnit) = ConstGen.MM Then
|
||||
If Trim(sUnit).ToLower = ConstGen.MM.ToLower Then
|
||||
Return True
|
||||
ElseIf Trim(sUnit) = ConstGen.VAL_INCHES Then
|
||||
ElseIf Trim(sUnit).ToLower = ConstGen.VAL_INCHES.ToLower Then
|
||||
Return False
|
||||
Else
|
||||
Return OptionModule.m_bIsMmUnit
|
||||
|
||||
Reference in New Issue
Block a user