Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 96dd92c3d3 | |||
| ebc41183bc | |||
| feb7982bef | |||
| f241b72453 |
@@ -632,13 +632,17 @@ Public MustInherit Class MyMachGroupVM
|
|||||||
Public ReadOnly Property DeleteMachGroup_Command As ICommand
|
Public ReadOnly Property DeleteMachGroup_Command As ICommand
|
||||||
Get
|
Get
|
||||||
If m_cmdDeleteMachGroup Is Nothing Then
|
If m_cmdDeleteMachGroup Is Nothing Then
|
||||||
m_cmdDeleteMachGroup = New Command(AddressOf DeleteMachGroup)
|
m_cmdDeleteMachGroup = New Command(AddressOf DeleteMachGroupCmd)
|
||||||
End If
|
End If
|
||||||
Return m_cmdDeleteMachGroup
|
Return m_cmdDeleteMachGroup
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Overridable Sub DeleteMachGroup()
|
Public Sub DeleteMachGroupCmd()
|
||||||
|
DeleteMachGroup()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overridable Sub DeleteMachGroup(Optional bMultipleCommand As Boolean = False)
|
||||||
' elimino tutte le copie
|
' elimino tutte le copie
|
||||||
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
||||||
Dim nBeamId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
|
Dim nBeamId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
|
||||||
|
|||||||
@@ -701,6 +701,9 @@ Public Class NUMAxiumPcToolkitComm
|
|||||||
Try
|
Try
|
||||||
ISONumVariable.sValue = SentMachGroup.Name
|
ISONumVariable.sValue = SentMachGroup.Name
|
||||||
ISOSentVariable.sValue = 0
|
ISOSentVariable.sValue = 0
|
||||||
|
While ISOSentVariable.sValue <> 0
|
||||||
|
Threading.Thread.Sleep(100)
|
||||||
|
End While
|
||||||
SentMachGroup.SetSentToMachine(True)
|
SentMachGroup.SetSentToMachine(True)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
EgtOutLog("Error write var after download: " & ex.Message)
|
EgtOutLog("Error write var after download: " & ex.Message)
|
||||||
@@ -710,6 +713,7 @@ Public Class NUMAxiumPcToolkitComm
|
|||||||
nRes = DownLoadFileAsyn(nPortFileTransfer, nFileType, sFilePath, DNC_MODE_ABORT, nIndex)
|
nRes = DownLoadFileAsyn(nPortFileTransfer, nFileType, sFilePath, DNC_MODE_ABORT, nIndex)
|
||||||
SendPermissionVariable.sValue = 0
|
SendPermissionVariable.sValue = 0
|
||||||
m_BytesTransferedCounter = 0
|
m_BytesTransferedCounter = 0
|
||||||
|
Threading.Thread.Sleep(500)
|
||||||
m_bIsTransferActive = False
|
m_bIsTransferActive = False
|
||||||
Return
|
Return
|
||||||
End Sub)
|
End Sub)
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 812 B After Width: | Height: | Size: 889 B |
|
Before Width: | Height: | Size: 832 B After Width: | Height: | Size: 834 B |
|
Before Width: | Height: | Size: 832 B After Width: | Height: | Size: 834 B |
|
Before Width: | Height: | Size: 411 B After Width: | Height: | Size: 432 B |
|
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 427 B |
|
Before Width: | Height: | Size: 455 B After Width: | Height: | Size: 448 B |
|
Before Width: | Height: | Size: 899 B After Width: | Height: | Size: 899 B |
|
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 427 B |
|
Before Width: | Height: | Size: 622 B After Width: | Height: | Size: 782 B |
@@ -102,7 +102,12 @@ Public Class AddRawPartWndVM
|
|||||||
End Select
|
End Select
|
||||||
m_DimensionsList = DimensionsList
|
m_DimensionsList = DimensionsList
|
||||||
If m_DimensionsList.Count > 0 Then
|
If m_DimensionsList.Count > 0 Then
|
||||||
SelDimension = m_DimensionsList(0)
|
Dim LastMaterial As SParam = WarehouseHelper.GetLastMaterial(DimensionsList(0).SectXMat)
|
||||||
|
If IsNothing(LastMaterial) Then
|
||||||
|
SelDimension = m_DimensionsList(0)
|
||||||
|
Else
|
||||||
|
SelDimension = m_DimensionsList.FirstOrDefault(Function(x) x.SectXMat = LastMaterial.SectXMat AndAlso x.dL = LastMaterial.dL AndAlso x.dW = LastMaterial.dW AndAlso x.nQuantity = LastMaterial.nQuantity)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
' riduco lista parametri a solo quelli che utilizzati
|
' riduco lista parametri a solo quelli che utilizzati
|
||||||
m_VariableList_View = CollectionViewSource.GetDefaultView(m_VariableList)
|
m_VariableList_View = CollectionViewSource.GetDefaultView(m_VariableList)
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ Public Class BTLPartVM
|
|||||||
Public Property sL As String
|
Public Property sL As String
|
||||||
Get
|
Get
|
||||||
Dim nOrigGroupId As Integer = nPartId
|
Dim nOrigGroupId As Integer = nPartId
|
||||||
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||||
nOrigGroupId = GetOrigFrameGroup(nPartId)
|
nOrigGroupId = GetOrigFrameGroup(nPartId)
|
||||||
End If
|
End If
|
||||||
Dim frBeam As New Frame3d
|
Dim frBeam As New Frame3d
|
||||||
@@ -214,7 +214,7 @@ Public Class BTLPartVM
|
|||||||
Public Property sW As String
|
Public Property sW As String
|
||||||
Get
|
Get
|
||||||
Dim nOrigGroupId As Integer = nPartId
|
Dim nOrigGroupId As Integer = nPartId
|
||||||
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||||
nOrigGroupId = GetOrigFrameGroup(nPartId)
|
nOrigGroupId = GetOrigFrameGroup(nPartId)
|
||||||
End If
|
End If
|
||||||
Dim frBeam As New Frame3d
|
Dim frBeam As New Frame3d
|
||||||
@@ -272,7 +272,7 @@ Public Class BTLPartVM
|
|||||||
Public Property sH As String
|
Public Property sH As String
|
||||||
Get
|
Get
|
||||||
Dim nOrigGroupId As Integer = nPartId
|
Dim nOrigGroupId As Integer = nPartId
|
||||||
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||||
nOrigGroupId = GetOrigFrameGroup(nPartId)
|
nOrigGroupId = GetOrigFrameGroup(nPartId)
|
||||||
End If
|
End If
|
||||||
Dim frBeam As New Frame3d
|
Dim frBeam As New Frame3d
|
||||||
@@ -1395,7 +1395,7 @@ Public Class BTLPartVM
|
|||||||
Public ReadOnly Property Section As SectionXMaterial
|
Public ReadOnly Property Section As SectionXMaterial
|
||||||
Get
|
Get
|
||||||
Dim nOrigGroupId As Integer = nPartId
|
Dim nOrigGroupId As Integer = nPartId
|
||||||
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||||
nOrigGroupId = GetOrigFrameGroup(nPartId)
|
nOrigGroupId = GetOrigFrameGroup(nPartId)
|
||||||
End If
|
End If
|
||||||
Dim frBeam As New Frame3d
|
Dim frBeam As New Frame3d
|
||||||
|
|||||||
@@ -353,7 +353,11 @@ Public Class LeftPanelVM
|
|||||||
Dim SectionList As List(Of SParam) = WarehouseHelper.GetSectionList()
|
Dim SectionList As List(Of SParam) = WarehouseHelper.GetSectionList()
|
||||||
Dim SParamlist As List(Of SParam) = SectionList.FindAll(Function(x) x.SectXMat = SelParts(0).Section)
|
Dim SParamlist As List(Of SParam) = SectionList.FindAll(Function(x) x.SectXMat = SelParts(0).Section)
|
||||||
If bLast Then
|
If bLast Then
|
||||||
If SParamlist.Count > 0 Then
|
Dim LastMaterial As SParam = WarehouseHelper.GetLastMaterial(SelParts(0).Section)
|
||||||
|
If Not IsNothing(LastMaterial) Then
|
||||||
|
dRawL = LastMaterial.dL
|
||||||
|
dRawW = LastMaterial.dW
|
||||||
|
ElseIf SParamlist.Count > 0 Then
|
||||||
dRawL = SParamlist(0).dL
|
dRawL = SParamlist(0).dL
|
||||||
dRawW = SParamlist(0).dW
|
dRawW = SParamlist(0).dW
|
||||||
Else
|
Else
|
||||||
@@ -563,7 +567,7 @@ Public Class LeftPanelVM
|
|||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
' imposto il materiale selezionato come ultimo utilizzato
|
' imposto il materiale selezionato come ultimo utilizzato
|
||||||
|
SetLastMaterial(CurrSParam.SectXMat, CurrSParam)
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -810,7 +810,7 @@ Public Class MyMachGroupVM
|
|||||||
#Region "DeleteMachGroup"
|
#Region "DeleteMachGroup"
|
||||||
|
|
||||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||||
Public Overrides Sub DeleteMachGroup()
|
Public Overrides Sub DeleteMachGroup(Optional bMultipleCommand As Boolean = False)
|
||||||
If EgtSetCurrMachGroup(Me.Id) Then
|
If EgtSetCurrMachGroup(Me.Id) Then
|
||||||
' elimino tutte le copie
|
' elimino tutte le copie
|
||||||
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
||||||
@@ -839,25 +839,28 @@ Public Class MyMachGroupVM
|
|||||||
' elimino MachGroup
|
' elimino MachGroup
|
||||||
EgtRemoveMachGroup(Me.Id)
|
EgtRemoveMachGroup(Me.Id)
|
||||||
End If
|
End If
|
||||||
' rimuovo dalla lista grezzi
|
' cambio pezzo selezionato
|
||||||
Dim Index As Integer = Map.refMachGroupPanelVM.MachGroupVMList.IndexOf(Me)
|
If bMultipleCommand Then
|
||||||
If Index = 0 Then
|
Dim Index As Integer = Map.refMachGroupPanelVM.MachGroupVMList.IndexOf(Me)
|
||||||
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then
|
If Index = 0 Then
|
||||||
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(1)
|
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then
|
||||||
|
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(1)
|
||||||
|
Else
|
||||||
|
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
|
||||||
|
EgtDraw()
|
||||||
|
End If
|
||||||
|
ElseIf Index = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 Then
|
||||||
|
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then
|
||||||
|
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Map.refMachGroupPanelVM.MachGroupVMList.Count - 2)
|
||||||
|
Else
|
||||||
|
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
|
||||||
|
EgtDraw()
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
|
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Index - 1)
|
||||||
EgtDraw()
|
|
||||||
End If
|
End If
|
||||||
ElseIf Index = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 Then
|
|
||||||
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then
|
|
||||||
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Map.refMachGroupPanelVM.MachGroupVMList.Count - 2)
|
|
||||||
Else
|
|
||||||
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
|
|
||||||
EgtDraw()
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Index - 1)
|
|
||||||
End If
|
End If
|
||||||
|
' rimuovo dalla lista grezzi
|
||||||
Map.refMachGroupPanelVM.MachGroupVMList.Remove(Me)
|
Map.refMachGroupPanelVM.MachGroupVMList.Remove(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 947 B After Width: | Height: | Size: 1008 B |
|
Before Width: | Height: | Size: 477 B After Width: | Height: | Size: 478 B |
|
Before Width: | Height: | Size: 691 B After Width: | Height: | Size: 785 B |
|
Before Width: | Height: | Size: 812 B After Width: | Height: | Size: 889 B |
|
Before Width: | Height: | Size: 757 B After Width: | Height: | Size: 774 B |
|
Before Width: | Height: | Size: 792 B After Width: | Height: | Size: 794 B |
|
Before Width: | Height: | Size: 351 B After Width: | Height: | Size: 356 B |
|
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 442 B |
|
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 656 B |
|
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 328 B |
|
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 474 B After Width: | Height: | Size: 640 B |
|
Before Width: | Height: | Size: 290 B After Width: | Height: | Size: 294 B |
|
Before Width: | Height: | Size: 397 B After Width: | Height: | Size: 577 B |
|
Before Width: | Height: | Size: 649 B After Width: | Height: | Size: 756 B |
|
Before Width: | Height: | Size: 478 B After Width: | Height: | Size: 594 B |
|
Before Width: | Height: | Size: 503 B After Width: | Height: | Size: 626 B |
|
Before Width: | Height: | Size: 681 B After Width: | Height: | Size: 849 B |
|
Before Width: | Height: | Size: 599 B After Width: | Height: | Size: 757 B |
|
Before Width: | Height: | Size: 561 B After Width: | Height: | Size: 681 B |
|
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 298 B |
|
Before Width: | Height: | Size: 472 B After Width: | Height: | Size: 501 B |
|
Before Width: | Height: | Size: 299 B After Width: | Height: | Size: 306 B |
|
Before Width: | Height: | Size: 479 B After Width: | Height: | Size: 491 B |
|
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 325 B |
|
Before Width: | Height: | Size: 535 B After Width: | Height: | Size: 654 B |
|
Before Width: | Height: | Size: 652 B After Width: | Height: | Size: 802 B |
|
Before Width: | Height: | Size: 622 B After Width: | Height: | Size: 782 B |
|
Before Width: | Height: | Size: 610 B After Width: | Height: | Size: 711 B |
|
Before Width: | Height: | Size: 534 B After Width: | Height: | Size: 657 B |
|
Before Width: | Height: | Size: 797 B After Width: | Height: | Size: 868 B |
|
Before Width: | Height: | Size: 367 B After Width: | Height: | Size: 405 B |
|
Before Width: | Height: | Size: 541 B After Width: | Height: | Size: 591 B |
|
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 347 B |
|
Before Width: | Height: | Size: 449 B After Width: | Height: | Size: 472 B |
|
Before Width: | Height: | Size: 427 B After Width: | Height: | Size: 462 B |
|
Before Width: | Height: | Size: 435 B After Width: | Height: | Size: 475 B |
|
Before Width: | Height: | Size: 475 B After Width: | Height: | Size: 546 B |
|
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 695 B |
|
Before Width: | Height: | Size: 319 B After Width: | Height: | Size: 339 B |
|
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 544 B |
|
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 508 B |
@@ -387,14 +387,14 @@ Public Class TopPanelVM
|
|||||||
|
|
||||||
Public Sub RemoveRawPart(Optional bAll As Boolean = False)
|
Public Sub RemoveRawPart(Optional bAll As Boolean = False)
|
||||||
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
|
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
|
||||||
' se premuto shift
|
' se tutti
|
||||||
If bAll Then
|
If bAll Then
|
||||||
' cancello tutti
|
' cancello tutti
|
||||||
For Index = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 To 0 Step -1
|
For Index = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 To 0 Step -1
|
||||||
Dim CurrMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.MachGroupVMList(Index)
|
Dim CurrMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.MachGroupVMList(Index)
|
||||||
' se barra gia' assegnata a supervisore, esco
|
' se barra gia' assegnata a supervisore, esco
|
||||||
If CurrMachGroup.nProduction_State >= ItemState.Assigned Then Continue For
|
If CurrMachGroup.nProduction_State >= ItemState.Assigned Then Continue For
|
||||||
CurrMachGroup.DeleteMachGroup()
|
CurrMachGroup.DeleteMachGroup(True)
|
||||||
Next
|
Next
|
||||||
Else
|
Else
|
||||||
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||||
|
|||||||
@@ -252,83 +252,146 @@ Module WarehouseHelper
|
|||||||
|
|
||||||
Friend Function GetLastMaterial(SectXMat As SectionXMaterial) As SParam
|
Friend Function GetLastMaterial(SectXMat As SectionXMaterial) As SParam
|
||||||
Dim sWarehousePath As String = Map.refMainWindowVM.MainWindowM.sWarehouseDir & "\" & WH_MEDIUM_INI_FILE_NAME
|
Dim sWarehousePath As String = Map.refMainWindowVM.MainWindowM.sWarehouseDir & "\" & WH_MEDIUM_INI_FILE_NAME
|
||||||
'If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||||
' Dim ParamIndex As Integer = 1
|
Dim ParamIndex As Integer = 1
|
||||||
' Dim sSxMValue As String = ""
|
Dim sSxMValue As String = ""
|
||||||
' While EgtUILib.GetPrivateProfileString(S_BEAM_LIST, ParamIndex, String.Empty, sSxMValue, sWarehousePath) > 0
|
While EgtUILib.GetPrivateProfileString(S_BEAM_LIST, ParamIndex, String.Empty, sSxMValue, sWarehousePath) > 0
|
||||||
' Dim sSectXMatValues() As String = sSxMValue.Split(","c)
|
Dim sSectXMatValues() As String = sSxMValue.Split(","c)
|
||||||
' ' creo parametro
|
' creo parametro
|
||||||
' Dim dW As Double = 0
|
Dim dW As Double = 0
|
||||||
' Dim dH As Double = 0
|
Dim dH As Double = 0
|
||||||
' Dim sMaterial As String = sSectXMatValues(2)
|
Dim sMaterial As String = sSectXMatValues(2)
|
||||||
' StringToLen(sSectXMatValues(0), dW)
|
StringToLen(sSectXMatValues(0), dW)
|
||||||
' StringToLen(sSectXMatValues(1), dH)
|
StringToLen(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(0) = sMaterial Then
|
||||||
' If sSectXMatValues.Length <= 3 Then Return Nothing
|
If sSectXMatValues.Length <= 3 Then Return Nothing
|
||||||
' Dim sValue As String = ""
|
Dim sValue As String = ""
|
||||||
' If EgtUILib.GetPrivateProfileString(S_BEAM, "L" & sSectXMatValues(3), String.Empty, sValue, sWarehousePath) Then
|
If EgtUILib.GetPrivateProfileString(S_BEAM, "L" & sSectXMatValues(3), String.Empty, sValue, sWarehousePath) Then
|
||||||
|
Dim sParamValues() As String = sValue.Split(","c)
|
||||||
' End If
|
' verifico numero minimo di parametri
|
||||||
' End If
|
If sParamValues.Count < 2 Then Return Nothing
|
||||||
' End While
|
' cancello spazi
|
||||||
|
For Index = 0 To sParamValues.Count - 1
|
||||||
|
sParamValues(Index) = sParamValues(Index).Trim()
|
||||||
|
Next
|
||||||
|
Dim dL As Double = 0
|
||||||
|
Dim nQty As Integer = 0
|
||||||
|
Dim nActive As Integer = 1
|
||||||
|
StringToLen(sParamValues(1), dL)
|
||||||
|
If sParamValues.Count >= 3 Then Integer.TryParse(sParamValues(2), nQty)
|
||||||
|
If sParamValues.Count >= 4 Then Integer.TryParse(sParamValues(3), nActive)
|
||||||
|
Return New SParam(New SectionXMaterial(dW, dH, dL, sSectXMatValues(2)), dL, nQty, nActive > 0)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ParamIndex += 1
|
||||||
|
End While
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' If EgtUILib.GetPrivateProfileString(S_BEAM, "L" & ParamIndex, String.Empty, sValue, sWarehousePath) Then
|
'If EgtUILib.GetPrivateProfileString(S_BEAM, "L" & ParamIndex, String.Empty, sValue, sWarehousePath) Then
|
||||||
' Dim sParamValues() As String = sValue.Split(","c)
|
' Dim sParamValues() As String = sValue.Split(","c)
|
||||||
' ' verifico numero minimo di parametri
|
' ' verifico numero minimo di parametri
|
||||||
' If sParamValues.Count < 2 Then Return Nothing
|
' If sParamValues.Count < 2 Then Return Nothing
|
||||||
' ' cancello spazi
|
' ' cancello spazi
|
||||||
' For Index = 0 To sParamValues.Count - 1
|
' For Index = 0 To sParamValues.Count - 1
|
||||||
' sParamValues(Index) = sParamValues(Index).Trim()
|
' sParamValues(Index) = sParamValues(Index).Trim()
|
||||||
' Next
|
' Next
|
||||||
' ' ricavo SectionXMaterial tramite Beam_List
|
' ' ricavo SectionXMaterial tramite Beam_List
|
||||||
' If EgtUILib.GetPrivateProfileString(S_BEAM_LIST, sParamValues(0), String.Empty, sSxMValue, sWarehousePath) Then
|
' If EgtUILib.GetPrivateProfileString(S_BEAM_LIST, sParamValues(0), String.Empty, sSxMValue, sWarehousePath) Then
|
||||||
' Dim sSectXMatValues() As String = sSxMValue.Split(","c)
|
' Dim sSectXMatValues() As String = sSxMValue.Split(","c)
|
||||||
' ' creo parametro
|
' ' creo parametro
|
||||||
' Dim dW As Double = 0
|
' Dim dW As Double = 0
|
||||||
' Dim dH As Double = 0
|
' Dim dH As Double = 0
|
||||||
' Dim dL As Double = 0
|
' Dim dL As Double = 0
|
||||||
' Dim nQty As Integer = 0
|
' Dim nQty As Integer = 0
|
||||||
' Dim nActive As Integer = 1
|
' Dim nActive As Integer = 1
|
||||||
' StringToLen(sSectXMatValues(0), dW)
|
' StringToLen(sSectXMatValues(0), dW)
|
||||||
' StringToLen(sSectXMatValues(1), dH)
|
' StringToLen(sSectXMatValues(1), dH)
|
||||||
' StringToLen(sParamValues(1), dL)
|
' StringToLen(sParamValues(1), dL)
|
||||||
' If sParamValues.Count >= 3 Then Integer.TryParse(sParamValues(2), nQty)
|
' If sParamValues.Count >= 3 Then Integer.TryParse(sParamValues(2), nQty)
|
||||||
' If sParamValues.Count >= 4 Then Integer.TryParse(sParamValues(3), nActive)
|
' If sParamValues.Count >= 4 Then Integer.TryParse(sParamValues(3), nActive)
|
||||||
' Return New SParam(New SectionXMaterial(dW, dH, dL, sSectXMatValues(2)), dL, nQty, nActive > 0)
|
' Return New SParam(New SectionXMaterial(dW, dH, dL, sSectXMatValues(2)), dL, nQty, nActive > 0)
|
||||||
' End If
|
' End If
|
||||||
' End If
|
'End If
|
||||||
'ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
|
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
|
||||||
' If EgtUILib.GetPrivateProfileString(S_WALL, "S" & ParamIndex, String.Empty, sValue, sWarehousePath) Then
|
'If EgtUILib.GetPrivateProfileString(S_WALL, "S" & ParamIndex, String.Empty, sValue, sWarehousePath) Then
|
||||||
' Dim sParamValues() As String = sValue.Split(","c)
|
' Dim sParamValues() As String = sValue.Split(","c)
|
||||||
' ' verifico numero minimo di parametri
|
' ' verifico numero minimo di parametri
|
||||||
' If sParamValues.Count >= 3 Then
|
' If sParamValues.Count >= 3 Then
|
||||||
' ' cancello spazi
|
' ' cancello spazi
|
||||||
' For Index = 0 To sParamValues.Count - 1
|
' For Index = 0 To sParamValues.Count - 1
|
||||||
' sParamValues(Index) = sParamValues(Index).Trim()
|
' sParamValues(Index) = sParamValues(Index).Trim()
|
||||||
' Next
|
' Next
|
||||||
' ' ricavo SectionXMaterial tramite Wall_List
|
' ' ricavo SectionXMaterial tramite Wall_List
|
||||||
' If EgtUILib.GetPrivateProfileString(S_WALL_LIST, sParamValues(0), String.Empty, sSxMValue, sWarehousePath) Then
|
' If EgtUILib.GetPrivateProfileString(S_WALL_LIST, sParamValues(0), String.Empty, sSxMValue, sWarehousePath) Then
|
||||||
' Dim sSectXMatValues() As String = sSxMValue.Split(","c)
|
' Dim sSectXMatValues() As String = sSxMValue.Split(","c)
|
||||||
' ' creo parametro
|
' ' creo parametro
|
||||||
' Dim dH As Double = 0
|
' Dim dH As Double = 0
|
||||||
' Dim dW As Double = 0
|
' Dim dW As Double = 0
|
||||||
' Dim dL As Double = 0
|
' Dim dL As Double = 0
|
||||||
' Dim nQty As Integer = 0
|
' Dim nQty As Integer = 0
|
||||||
' Dim nActive As Integer = 1
|
' Dim nActive As Integer = 1
|
||||||
' StringToLen(sSectXMatValues(0), dH)
|
' StringToLen(sSectXMatValues(0), dH)
|
||||||
' StringToLen(sParamValues(1), dW)
|
' StringToLen(sParamValues(1), dW)
|
||||||
' StringToLen(sParamValues(2), dL)
|
' StringToLen(sParamValues(2), dL)
|
||||||
' If sParamValues.Count >= 4 Then Integer.TryParse(sParamValues(3), nQty)
|
' If sParamValues.Count >= 4 Then Integer.TryParse(sParamValues(3), nQty)
|
||||||
' If sParamValues.Count >= 5 Then Integer.TryParse(sParamValues(4), nActive)
|
' If sParamValues.Count >= 5 Then Integer.TryParse(sParamValues(4), nActive)
|
||||||
' Return New SParam(New SectionXMaterial(dW, dH, dL, sSectXMatValues(1)), dW, dL, nQty, nActive > 0)
|
' Return New SParam(New SectionXMaterial(dW, dH, dL, sSectXMatValues(1)), dW, dL, nQty, nActive > 0)
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
' End If
|
'End If
|
||||||
'End If
|
End If
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Sub SetLastMaterial(SectXMat As SectionXMaterial, SParam As SParam)
|
||||||
|
Dim sWarehousePath As String = Map.refMainWindowVM.MainWindowM.sWarehouseDir & "\" & WH_MEDIUM_INI_FILE_NAME
|
||||||
|
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||||
|
' cerco sezione
|
||||||
|
Dim SectIndex As Integer = 1
|
||||||
|
Dim sSxMValue As String = ""
|
||||||
|
While EgtUILib.GetPrivateProfileString(S_BEAM_LIST, SectIndex, String.Empty, sSxMValue, sWarehousePath) > 0
|
||||||
|
Dim sSectXMatValues() As String = sSxMValue.Split(","c)
|
||||||
|
' creo parametro
|
||||||
|
Dim dW As Double = 0
|
||||||
|
Dim dH As Double = 0
|
||||||
|
Dim sMaterial As String = sSectXMatValues(2)
|
||||||
|
StringToLen(sSectXMatValues(0), dW)
|
||||||
|
StringToLen(sSectXMatValues(1), dH)
|
||||||
|
If SectXMat.dW = dW AndAlso SectXMat.dH = dH AndAlso SectXMat.sMaterial(0) = sMaterial Then
|
||||||
|
' recupero indice di SParam
|
||||||
|
Dim SParamIndex As Integer = 1
|
||||||
|
Dim sValue As String = ""
|
||||||
|
While EgtUILib.GetPrivateProfileString(S_BEAM, "L" & SParamIndex, String.Empty, sValue, sWarehousePath)
|
||||||
|
Dim sParamValues() As String = sValue.Split(","c)
|
||||||
|
' verifico numero minimo di parametri
|
||||||
|
If sParamValues.Count < 2 Then Return
|
||||||
|
' cancello spazi
|
||||||
|
For Index = 0 To sParamValues.Count - 1
|
||||||
|
sParamValues(Index) = sParamValues(Index).Trim()
|
||||||
|
Next
|
||||||
|
Dim dL As Double = 0
|
||||||
|
Dim nSectIndex As Integer = sParamValues(0)
|
||||||
|
Dim nQty As Integer = 0
|
||||||
|
Dim nActive As Integer = 1
|
||||||
|
StringToLen(sParamValues(1), dL)
|
||||||
|
If sParamValues.Count >= 3 Then Integer.TryParse(sParamValues(2), nQty)
|
||||||
|
If sParamValues.Count >= 4 Then Integer.TryParse(sParamValues(3), nActive)
|
||||||
|
Dim bActive As Boolean = nActive = 1
|
||||||
|
If dL = SParam.dL AndAlso nQty = SParam.nQuantity AndAlso bActive = SParam.bActive Then
|
||||||
|
' scrivo indice ultimo materiale
|
||||||
|
EgtUILib.WritePrivateProfileString(S_BEAM_LIST, SectIndex, LenToString(dW, 3) & "," &
|
||||||
|
LenToString(dH, 3) & "," &
|
||||||
|
sMaterial & "," &
|
||||||
|
SParamIndex, sWarehousePath)
|
||||||
|
End If
|
||||||
|
SParamIndex += 1
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
SectIndex += 1
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Module
|
End Module
|
||||||
|
|||||||