- aggiunta classe Material in core
- aggiunto MaterialController
This commit is contained in:
@@ -146,6 +146,7 @@
|
||||
<Compile Include="Lib\MachGroupPanelM.vb" />
|
||||
<Compile Include="MachGroupModel\MyMachGroupPanelM.vb" />
|
||||
<Compile Include="Utility\ManageWindow.vb" />
|
||||
<Compile Include="Utility\RawPart.vb" />
|
||||
<Compile Include="Utility\MyMachine.vb" />
|
||||
<Compile Include="OpenProjectFileDialog\OpenProjectFileDialogV.xaml.vb">
|
||||
<DependentUpon>OpenProjectFileDialogV.xaml</DependentUpon>
|
||||
@@ -158,6 +159,7 @@
|
||||
<Compile Include="ProjectManager\ProjectFileVM.vb" />
|
||||
<Compile Include="ProjectManager\ProjFileVM.vb" />
|
||||
<Compile Include="ProjectFileVM\ProjFileM.vb" />
|
||||
<Compile Include="Utility\Material.vb" />
|
||||
<Compile Include="Utility\SectionXMaterial.vb" />
|
||||
<Compile Include="Utility\BTLIniFile.vb" />
|
||||
<Compile Include="Utility\CoreMap.vb" />
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
Imports System.Windows
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MaterialM
|
||||
|
||||
Protected m_Material As String
|
||||
Public ReadOnly Property sMaterial As String
|
||||
Get
|
||||
Return m_Material
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_dW As Double = 0
|
||||
Public ReadOnly Property dW As Double
|
||||
Get
|
||||
Return m_dW
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_dH As Double = 0
|
||||
Public ReadOnly Property dH As Double
|
||||
Get
|
||||
Return m_dH
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_dL As Double = 0
|
||||
Public ReadOnly Property dL As Double
|
||||
Get
|
||||
Return m_dL
|
||||
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Shared Operator =(ByVal S1 As MaterialM, ByVal S2 As MaterialM) As Boolean
|
||||
Return (Math.Abs(S1.m_dH - S2.m_dH) < 100 * EPS_SMALL AndAlso
|
||||
Math.Abs(S1.m_dW - S2.m_dW) < 100 * EPS_SMALL AndAlso
|
||||
Math.Abs(S1.m_dL - S2.m_dL) < 100 * EPS_SMALL AndAlso
|
||||
S1.m_Material = S2.m_Material)
|
||||
End Operator
|
||||
|
||||
Shared Operator <>(ByVal S1 As MaterialM, ByVal S2 As MaterialM) As Boolean
|
||||
Return Not S1 = S2
|
||||
End Operator
|
||||
|
||||
Public Overrides Function Equals(ByVal obj As Object) As Boolean
|
||||
If TypeOf obj Is MaterialM Then
|
||||
Return Me = DirectCast(obj, MaterialM) '(m_dH = obj.dH AndAlso m_dW = obj.dW AndAlso m_dL = obj.dL AndAlso m_Material.Any(Function(x) DirectCast(obj.sMaterial, List(Of String)).Any(Function(y) y = x)))
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Sub New(dW As Double, dH As Double, dL As Double, sMaterial As String)
|
||||
m_dW = dW
|
||||
m_dH = dH
|
||||
m_dL = dL
|
||||
m_Material = sMaterial
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class RawPartM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_bActive As Boolean
|
||||
Public Property bActive As Boolean
|
||||
Get
|
||||
Return m_bActive
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bActive = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_SectXMat As MaterialM
|
||||
Public Property SectXMat As MaterialM
|
||||
Get
|
||||
Return m_SectXMat
|
||||
End Get
|
||||
Set(value As MaterialM)
|
||||
m_SectXMat = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_dW As Double
|
||||
Public Property dW As Double
|
||||
Get
|
||||
Return m_dW
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dW = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_dL As Double
|
||||
Public Property dL As Double
|
||||
Get
|
||||
Return m_dL
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nQuantity As Integer
|
||||
Public Property nQuantity As Integer
|
||||
Get
|
||||
Return m_nQuantity
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nQuantity = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(SxM As MaterialM, W As Double, L As Double, Qty As Integer, Active As Boolean)
|
||||
m_SectXMat = SxM
|
||||
m_dW = W
|
||||
m_dL = L
|
||||
m_nQuantity = Qty
|
||||
m_bActive = Active
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -15,8 +15,8 @@ Public Class SectionXMaterial
|
||||
m_nType = nType
|
||||
End Sub
|
||||
|
||||
Protected m_Material As List(Of String)
|
||||
Public ReadOnly Property sMaterial As List(Of String)
|
||||
Protected m_Material As String
|
||||
Public ReadOnly Property sMaterial As String
|
||||
Get
|
||||
Return m_Material
|
||||
End Get
|
||||
@@ -42,50 +42,46 @@ Public Class SectionXMaterial
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dW As Double = 0
|
||||
Protected m_MaterialM As MaterialM
|
||||
Public ReadOnly Property MaterialM As MaterialM
|
||||
Get
|
||||
Return m_MaterialM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dW As Double
|
||||
Get
|
||||
Return m_dW
|
||||
Return m_MaterialM.dW
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_dH As Double = 0
|
||||
Public ReadOnly Property dH As Double
|
||||
Get
|
||||
Return m_dH
|
||||
Return m_MaterialM.dH
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_dL As Double = 0
|
||||
Public ReadOnly Property dL As Double
|
||||
Get
|
||||
Return m_dL
|
||||
Return m_MaterialM.dL
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sSectionXMaterial As String
|
||||
Get
|
||||
Dim sAlias As String = String.Empty
|
||||
For Each sMatItem In sMaterial
|
||||
sAlias &= sMatItem & ";"
|
||||
Next
|
||||
sAlias = sAlias.TrimEnd(";")
|
||||
If Me = Empty Then
|
||||
Return ""
|
||||
ElseIf m_nType = MachineType.BEAM Then
|
||||
Return LenToString(m_dW, 3) & " x " & LenToString(m_dH, 3) & " " & sAlias
|
||||
Return LenToString(m_MaterialM.dW, 3) & " x " & LenToString(m_MaterialM.dH, 3) & " " & sMaterial
|
||||
ElseIf m_nType = MachineType.WALL Then
|
||||
Return LenToString(m_dH, 3) & " " & sAlias
|
||||
Return LenToString(m_MaterialM.dH, 3) & " " & sMaterial
|
||||
Else Return ""
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Shared Operator =(ByVal S1 As SectionXMaterial, ByVal S2 As SectionXMaterial) As Boolean
|
||||
Return (Math.Abs( S1.m_dH - S2.m_dH) < 100 * EPS_SMALL AndAlso
|
||||
Math.Abs( S1.m_dW - S2.m_dW) < 100 * EPS_SMALL AndAlso
|
||||
Math.Abs( S1.m_dL - S2.m_dL) < 100 * EPS_SMALL AndAlso
|
||||
S1.m_Material.Any(Function(x) S2.m_Material.Any(Function(y) y = x)))
|
||||
Return S1.m_MaterialM = S2.m_MaterialM
|
||||
End Operator
|
||||
|
||||
Shared Operator <>(ByVal S1 As SectionXMaterial, ByVal S2 As SectionXMaterial) As Boolean
|
||||
@@ -101,20 +97,13 @@ Public Class SectionXMaterial
|
||||
|
||||
Sub New(dW As Double, dH As Double, dL As Double, sMaterial As String)
|
||||
If m_nType = BWType.BEAM Then
|
||||
m_dW = dW
|
||||
m_dH = dH
|
||||
m_MaterialM = New MaterialM(dW, dH, 0, sMaterial)
|
||||
ElseIf m_nType = BWType.WALL Then
|
||||
m_dH = dH
|
||||
m_MaterialM = New MaterialM(0, dH, 0, sMaterial)
|
||||
Else
|
||||
m_dW = dW
|
||||
m_dH = dH
|
||||
m_dL = dL
|
||||
m_MaterialM = New MaterialM(dW, dH, dL, sMaterial)
|
||||
End If
|
||||
m_Material = New List(Of String)
|
||||
Dim sMaterialArray() As String = Split(sMaterial, ";")
|
||||
For Each sMatItem In sMaterialArray
|
||||
m_Material.Add(sMatItem)
|
||||
Next
|
||||
m_Material = sMaterial
|
||||
End Sub
|
||||
|
||||
Public Shared Empty As New SectionXMaterial(-1, -1, -1, "")
|
||||
@@ -197,20 +186,13 @@ Public Class SectionXMaterial
|
||||
|
||||
Sub New(dW As Double, dH As Double, dL As Double, sMaterial As String, nQuantity As Integer)
|
||||
If m_nType = BWType.BEAM Then
|
||||
m_dW = dW
|
||||
m_dH = dH
|
||||
m_MaterialM = New MaterialM(dW, dH, 0, sMaterial)
|
||||
ElseIf m_nType = BWType.WALL Then
|
||||
m_dH = dH
|
||||
m_MaterialM = New MaterialM(0, dH, 0, sMaterial)
|
||||
Else
|
||||
m_dW = dW
|
||||
m_dH = dH
|
||||
m_dL = dL
|
||||
m_MaterialM = New MaterialM(dW, dH, dL, sMaterial)
|
||||
End If
|
||||
m_Material = New List(Of String)
|
||||
Dim sMaterialArray() As String = Split(sMaterial, ";")
|
||||
For Each sMatItem In sMaterialArray
|
||||
m_Material.Add(sMatItem)
|
||||
Next
|
||||
m_Material = sMaterial
|
||||
m_nQuantity = nQuantity
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -452,25 +452,15 @@ Public Class BTLPartVM
|
||||
OldSection = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x = Section)
|
||||
End If
|
||||
m_BTLPartM.sMATERIAL = value
|
||||
' aggiorno sezione
|
||||
If bOtherSection Then
|
||||
' se sezione nuova non presente
|
||||
If Not Map.refProjectVM.BTLStructureVM.SectionList.Contains(Section) Then
|
||||
' creo nuova sezione
|
||||
Map.refProjectVM.BTLStructureVM.SectionList.Add(Section)
|
||||
End If
|
||||
Else
|
||||
' se sezione nuova gia' presente
|
||||
If Map.refProjectVM.BTLStructureVM.SectionList.Contains(Section) Then
|
||||
' cancello sezione vecchia
|
||||
Map.refProjectVM.BTLStructureVM.SectionList.Remove(OldSection)
|
||||
Else
|
||||
' altrimenti la modifico
|
||||
If Not IsNothing(OldSection) Then
|
||||
OldSection.sMaterial.Clear()
|
||||
OldSection.sMaterial.Add(sMATERIAL)
|
||||
End If
|
||||
End If
|
||||
' se sezione nuova non presente
|
||||
If Not Map.refProjectVM.BTLStructureVM.SectionList.Contains(Section) Then
|
||||
' creo nuova sezione
|
||||
Map.refProjectVM.BTLStructureVM.SectionList.Add(Section)
|
||||
End If
|
||||
' se sezione vecchia non utilizzata da altri pezzi
|
||||
If Not bOtherSection Then
|
||||
' cancello sezione vecchia
|
||||
Map.refProjectVM.BTLStructureVM.SectionList.Remove(OldSection)
|
||||
End If
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(sMATERIAL))
|
||||
@@ -2000,7 +1990,7 @@ Public Class BTLPartVM
|
||||
' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi)
|
||||
If bUpdateSection AndAlso Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM AndAlso CurrSection <> SectionXMaterial.Empty Then
|
||||
' se esiste, imposto sezione inversa
|
||||
Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial(0) = CurrSection.sMaterial(0))
|
||||
Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial = CurrSection.sMaterial)
|
||||
If Not IsNothing(InverseSection) Then Map.refProjectVM.BTLStructureVM.SetSelSection(InverseSection)
|
||||
End If
|
||||
End Sub
|
||||
@@ -2031,7 +2021,7 @@ Public Class BTLPartVM
|
||||
' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi)
|
||||
If bUpdateSection AndAlso Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM AndAlso CurrSection <> SectionXMaterial.Empty Then
|
||||
' se esiste, imposto sezione inversa
|
||||
Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial(0) = CurrSection.sMaterial(0))
|
||||
Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial = CurrSection.sMaterial)
|
||||
If Not IsNothing(InverseSection) Then Map.refProjectVM.BTLStructureVM.SetSelSection(InverseSection)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1184,7 +1184,7 @@ Public Class LeftPanelVM
|
||||
' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi)
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM AndAlso CurrSection <> SectionXMaterial.Empty Then
|
||||
' se esiste, imposto sezione inversa
|
||||
Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial(0) = CurrSection.sMaterial(0))
|
||||
Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial = CurrSection.sMaterial)
|
||||
If Not IsNothing(InverseSection) Then Map.refProjectVM.BTLStructureVM.SetSelSection(InverseSection)
|
||||
End If
|
||||
EgtDraw()
|
||||
@@ -1228,7 +1228,7 @@ Public Class LeftPanelVM
|
||||
' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi)
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM AndAlso CurrSection <> SectionXMaterial.Empty Then
|
||||
' se esiste, imposto sezione inversa
|
||||
Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial(0) = CurrSection.sMaterial(0))
|
||||
Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial = CurrSection.sMaterial)
|
||||
If Not IsNothing(InverseSection) Then Map.refProjectVM.BTLStructureVM.SetSelSection(InverseSection)
|
||||
End If
|
||||
EgtDraw()
|
||||
|
||||
@@ -298,7 +298,7 @@ Public Class StatisticsVM
|
||||
Select Case Map.refProdManagerVM.CurrProd.nType
|
||||
Case BWType.BEAM
|
||||
For Each MachGroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
||||
Dim RawPart As SParam = m_RawPartList.FirstOrDefault(Function(x) x.SectXMat.dW = MachGroup.dW AndAlso x.SectXMat.dH = MachGroup.dH AndAlso x.dL = MachGroup.dL AndAlso x.SectXMat.sMaterial.Any(Function(y) MachGroup.Section.sMaterial.Any(Function(z) z = y)))
|
||||
Dim RawPart As SParam = m_RawPartList.FirstOrDefault(Function(x) x.SectXMat.dW = MachGroup.dW AndAlso x.SectXMat.dH = MachGroup.dH AndAlso x.dL = MachGroup.dL AndAlso x.SectXMat.sMaterial = MachGroup.Section.sMaterial)
|
||||
If Not IsNothing(RawPart) Then
|
||||
RawPart.nQuantity += 1
|
||||
Else
|
||||
@@ -307,7 +307,7 @@ Public Class StatisticsVM
|
||||
Next
|
||||
Case BWType.WALL
|
||||
For Each MachGroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
||||
Dim RawPart As SParam = m_RawPartList.FirstOrDefault(Function(x) x.dW = MachGroup.dW AndAlso x.SectXMat.dH = MachGroup.dH AndAlso x.dL = MachGroup.dL AndAlso x.SectXMat.sMaterial.Any(Function(y) MachGroup.Section.sMaterial.Any(Function(z) z = y)))
|
||||
Dim RawPart As SParam = m_RawPartList.FirstOrDefault(Function(x) x.dW = MachGroup.dW AndAlso x.SectXMat.dH = MachGroup.dH AndAlso x.dL = MachGroup.dL AndAlso x.SectXMat.sMaterial = MachGroup.Section.sMaterial)
|
||||
If Not IsNothing(RawPart) Then
|
||||
RawPart.nQuantity += 1
|
||||
Else
|
||||
|
||||
@@ -18,6 +18,7 @@ Public Module DbControllers
|
||||
Public m_MachGroupController As DataLayer.Controllers.MachGroupController
|
||||
Public m_StatusMapController As DataLayer.Controllers.StatusMapController
|
||||
Public m_PartController As DataLayer.Controllers.PartController
|
||||
Public m_MaterialsController As DataLayer.Controllers.MaterialsController
|
||||
|
||||
Sub Init()
|
||||
End Sub
|
||||
@@ -95,6 +96,7 @@ Public Module DbControllers
|
||||
m_MachGroupController = New DataLayer.Controllers.MachGroupController
|
||||
m_StatusMapController = New DataLayer.Controllers.StatusMapController
|
||||
m_PartController = New DataLayer.Controllers.PartController
|
||||
m_MaterialsController = New DataLayer.Controllers.MaterialsController
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
|
||||
@@ -7,7 +7,7 @@ Public Class SectionXMaterialToBeAdded
|
||||
Inherits SectionXMaterial
|
||||
|
||||
Sub New(SectXMat As SectionXMaterial)
|
||||
MyBase.New(SectXMat.dW, SectXMat.dH, SectXMat.dL, SectXMat.sMaterial(0))
|
||||
MyBase.New(SectXMat.dW, SectXMat.dH, SectXMat.dL, SectXMat.sMaterial)
|
||||
End Sub
|
||||
|
||||
Private m_Alias_IsChecked As Boolean
|
||||
|
||||
@@ -165,8 +165,8 @@ Module WarehouseHelper
|
||||
Dim dSectionW As Double = 0 : StringToDoubleAdv( SectionData(0), dSectionW)
|
||||
Dim dSectionH As Double = 0 : StringToDoubleAdv( SectionData(1), dSectionH)
|
||||
For Each SectionProgress In SectionList
|
||||
If Math.Abs( SectionProgress.Section.dW - dSectionW) < 0.1 AndAlso
|
||||
Math.Abs( SectionProgress.Section.dH - dSectionH) < 0.1 AndAlso SectionProgress.Section.sMaterial.Contains(SectionData(2)) Then
|
||||
If Math.Abs(SectionProgress.Section.dW - dSectionW) < 0.1 AndAlso
|
||||
Math.Abs(SectionProgress.Section.dH - dSectionH) < 0.1 AndAlso SectionProgress.Section.sMaterial = SectionData(2) Then
|
||||
If Not StringToDoubleAdv(sSectionValues(1), dL) Then Continue While
|
||||
If Not Integer.TryParse(sSectionValues(2), nQty) Then Continue While
|
||||
If sSectionValues.Count >= 4 AndAlso Integer.TryParse(sSectionValues(3), nActive) Then
|
||||
@@ -181,7 +181,7 @@ Module WarehouseHelper
|
||||
Case BWType.WALL
|
||||
Dim dSectionH As Double = 0 : StringToDoubleAdv( SectionData(0), dSectionH)
|
||||
For Each SectionProgress In SectionList
|
||||
If Math.Abs( SectionProgress.Section.dH - dSectionH) < 0.1 AndAlso SectionProgress.Section.sMaterial.Contains(SectionData(1)) Then
|
||||
If Math.Abs(SectionProgress.Section.dH - dSectionH) < 0.1 AndAlso SectionProgress.Section.sMaterial = SectionData(1) Then
|
||||
If Not StringToDoubleAdv(sSectionValues(1), dW) Then Continue While
|
||||
If Not StringToDoubleAdv(sSectionValues(2), dL) Then Continue While
|
||||
If Not Integer.TryParse(sSectionValues(3), nQty) Then Continue While
|
||||
@@ -263,7 +263,7 @@ Module WarehouseHelper
|
||||
Dim sMaterial As String = sSectXMatValues(2)
|
||||
StringToLenAdv(sSectXMatValues(0), dW)
|
||||
StringToLenAdv(sSectXMatValues(1), dH)
|
||||
If SectXMat.dW = dW AndAlso SectXMat.dH = dH AndAlso SectXMat.sMaterial(0) = sMaterial Then
|
||||
If SectXMat.dW = dW AndAlso SectXMat.dH = dH AndAlso SectXMat.sMaterial = sMaterial Then
|
||||
If sSectXMatValues.Length <= 3 Then Return Nothing
|
||||
Dim sValue As String = ""
|
||||
If EgtUILib.GetPrivateProfileString(S_BEAM, "L" & sSectXMatValues(3), String.Empty, sValue, sWarehousePath) Then
|
||||
@@ -294,7 +294,7 @@ Module WarehouseHelper
|
||||
Dim dH As Double = 0
|
||||
Dim sMaterial As String = sSectXMatValues(1)
|
||||
StringToLenAdv(sSectXMatValues(0), dH)
|
||||
If SectXMat.dH = dH AndAlso SectXMat.sMaterial(0) = sMaterial Then
|
||||
If SectXMat.dH = dH AndAlso SectXMat.sMaterial = sMaterial Then
|
||||
If sSectXMatValues.Length <= 2 Then Return Nothing
|
||||
Dim sValue As String = ""
|
||||
If EgtUILib.GetPrivateProfileString(S_WALL, "S" & sSectXMatValues(2), String.Empty, sValue, sWarehousePath) Then
|
||||
@@ -337,7 +337,7 @@ Module WarehouseHelper
|
||||
Dim sMaterial As String = sSectXMatValues(2)
|
||||
StringToLenAdv(sSectXMatValues(0), dW)
|
||||
StringToLenAdv(sSectXMatValues(1), dH)
|
||||
If SectXMat.dW = dW AndAlso SectXMat.dH = dH AndAlso SectXMat.sMaterial(0) = sMaterial Then
|
||||
If SectXMat.dW = dW AndAlso SectXMat.dH = dH AndAlso SectXMat.sMaterial = sMaterial Then
|
||||
' recupero indice di SParam
|
||||
Dim SParamIndex As Integer = 1
|
||||
Dim sValue As String = ""
|
||||
@@ -379,7 +379,7 @@ Module WarehouseHelper
|
||||
Dim dH As Double = 0
|
||||
Dim sMaterial As String = sSectXMatValues(1)
|
||||
StringToLenAdv(sSectXMatValues(0), dH)
|
||||
If SectXMat.dH = dH AndAlso SectXMat.sMaterial(0) = sMaterial Then
|
||||
If SectXMat.dH = dH AndAlso SectXMat.sMaterial = sMaterial Then
|
||||
' recupero indice di SParam
|
||||
Dim SParamIndex As Integer = 1
|
||||
Dim sValue As String = ""
|
||||
@@ -429,7 +429,7 @@ Module WarehouseHelper
|
||||
Dim sMaterial As String = sSectionValues(2)
|
||||
StringToLenAdv(sSectionValues(0), dW)
|
||||
StringToLenAdv(sSectionValues(1), dH)
|
||||
If Section.dW = dW AndAlso Section.dH = dH AndAlso Section.sMaterial(0) = sMaterial Then
|
||||
If Section.dW = dW AndAlso Section.dH = dH AndAlso Section.sMaterial = sMaterial Then
|
||||
' se l'ho trovato esco dal while, il SectXMatIndex è l'indice che cercavamo
|
||||
Return nIndex
|
||||
End If
|
||||
@@ -437,7 +437,7 @@ Module WarehouseHelper
|
||||
Dim dH As Double = 0
|
||||
Dim sMaterial As String = sSectionValues(1)
|
||||
StringToLenAdv(sSectionValues(0), dH)
|
||||
If Section.dH = dH AndAlso Section.sMaterial(0) = sMaterial Then
|
||||
If Section.dH = dH AndAlso Section.sMaterial = sMaterial Then
|
||||
' se l'ho trovato esco dal while, il SectXMatIndex è l'indice che cercavamo
|
||||
Return nIndex
|
||||
End If
|
||||
|
||||
@@ -1104,7 +1104,7 @@ Public Class WarehouseWndVM
|
||||
Dim dH As Double = 0
|
||||
StringToLenAdv(sSectXMatValues(0), dW)
|
||||
StringToLenAdv(sSectXMatValues(1), dH)
|
||||
If Not SectXMatList.Any(Function(x) x.dW = dW AndAlso x.dH = dH AndAlso x.sMaterial(0) = sSectXMatValues(2)) Then
|
||||
If Not SectXMatList.Any(Function(x) x.dW = dW AndAlso x.dH = dH AndAlso x.sMaterial = sSectXMatValues(2)) Then
|
||||
SectXMatList.Add(New SectionXMaterial(dW, dH, 0, sSectXMatValues(2)))
|
||||
End If
|
||||
sSectXMatIndex += 1
|
||||
@@ -1118,7 +1118,7 @@ Public Class WarehouseWndVM
|
||||
' creo parametro
|
||||
Dim dH As Double = 0
|
||||
StringToLenAdv(sSectXMatValues(0), dH)
|
||||
If Not SectXMatList.Any(Function(x) x.dH = dH AndAlso x.sMaterial(0) = sSectXMatValues(1)) Then
|
||||
If Not SectXMatList.Any(Function(x) x.dH = dH AndAlso x.sMaterial = sSectXMatValues(1)) Then
|
||||
SectXMatList.Add(New SectionXMaterial(0, dH, 0, sSectXMatValues(1)))
|
||||
End If
|
||||
sSectXMatIndex += 1
|
||||
@@ -1149,7 +1149,7 @@ Public Class WarehouseWndVM
|
||||
End While
|
||||
WritePrivateProfileString(S_BEAM_LIST, sSectXMatIndex, LenToString(SectionXMaterial.dW, 3) & "," &
|
||||
LenToString(SectionXMaterial.dH, 3) & "," &
|
||||
SectionXMaterial.sMaterial(0), sWarehousePath)
|
||||
SectionXMaterial.sMaterial, sWarehousePath)
|
||||
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
|
||||
' ricavo SectionXMaterial tramite Wall_List
|
||||
While EgtUILib.GetPrivateProfileString(S_WALL_LIST, sSectXMatIndex, String.Empty, sSxMValue, sWarehousePath)
|
||||
@@ -1162,7 +1162,7 @@ Public Class WarehouseWndVM
|
||||
sSectXMatIndex += 1
|
||||
End While
|
||||
WritePrivateProfileString(S_WALL_LIST, sSectXMatIndex, LenToString(SectionXMaterial.dH, 3) & "," &
|
||||
SectionXMaterial.sMaterial(0), sWarehousePath)
|
||||
SectionXMaterial.sMaterial, sWarehousePath)
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
@@ -1496,7 +1496,7 @@ Public Class SParam
|
||||
|
||||
Public ReadOnly Property sMaterial As String
|
||||
Get
|
||||
Return If(IsNothing(SectXMat), "", SectXMat.sMaterial(0))
|
||||
Return If(IsNothing(SectXMat), "", SectXMat.sMaterial)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Reference in New Issue
Block a user