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