Compare commits
40 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d9a157b35 | |||
| 405fde996c | |||
| 8321f09af8 | |||
| 391583b9ea | |||
| 5cf0472806 | |||
| 89598c154e | |||
| 5874a39b25 | |||
| 43f3f2f6d8 | |||
| 79a883a303 | |||
| e3f88296e5 | |||
| e207ed7ece | |||
| e97175765b | |||
| 6a0ebb9fee | |||
| 0a698dae34 | |||
| b74c052dd1 | |||
| b7d62ace2c | |||
| 3febbbbcbf | |||
| 31874a8b92 | |||
| c75d9d6bc2 | |||
| 96dd92c3d3 | |||
| ebc41183bc | |||
| feb7982bef | |||
| f241b72453 | |||
| 2b306763c6 | |||
| f1b0a28e71 | |||
| 121f02fb0c | |||
| 848b6d98a5 | |||
| 0589565b8e | |||
| 1109a91dd9 | |||
| 37cb1dbb6a | |||
| 152788fe1b | |||
| 534b363a04 | |||
| 3f13706b97 | |||
| 1f804ab6fc | |||
| 21dd6fbbb1 | |||
| b25d73c0cb | |||
| 50d9603598 | |||
| fae8018df9 | |||
| 7e15ef9dd1 | |||
| 2b4f3d93dc |
@@ -175,8 +175,10 @@
|
||||
Public Const BTL_PRT_REFSIDE = "REFERENCESIDE"
|
||||
Public Const BTL_PRT_ALIGNMENT = "ALIGNMENT"
|
||||
Public Const BTL_PRT_MATERIALTYPE = "MATERIALTYPE"
|
||||
Public Const BTL_PRT_DESCRIPTION = "NAM"
|
||||
|
||||
' parametri generici
|
||||
Public Const BTL_GEN_BTLPATH = "BTL"
|
||||
Public Const BTL_GEN_PROJNUM = "PROJECTNUMBER"
|
||||
Public Const BTL_GEN_PROJNAME = "PROJECTNAME"
|
||||
Public Const BTL_GEN_PROJPART = "PROJECTPART"
|
||||
@@ -251,6 +253,7 @@
|
||||
Public Const MGR_RPT_PANELLEN As String = "PANELLEN"
|
||||
Public Const MGR_RPT_PANELWIDTH As String = "PANELWIDTH"
|
||||
Public Const MGR_RPT_PANELHEIGHT As String = "PANELHEIGHT"
|
||||
Public Const MGR_RPT_PANELPOSZ As String = "PANELPOSZ"
|
||||
Public Const MGR_RPT_PART As String = "PART"
|
||||
|
||||
' parametri P per comunicazione con la macchina
|
||||
@@ -298,6 +301,8 @@
|
||||
Public Const BTLFILENAME As String = "BTLFILENAME"
|
||||
Public Const EXP_PART As String = "ImportExport"
|
||||
Public Const EXP_MACHINE As String = "Machine"
|
||||
' parametro che indica se il progetto e' stato appena importato e quindi bisogna riverificare i MachGroup
|
||||
Public Const IMP_VERIFYMACHGROUP As String = "VerifyMachGroup"
|
||||
|
||||
' parametri modifica percorsi free contour
|
||||
Public Const PATH_SIDEANGLAYER As String = "SideAngLayer"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
Public Const COL_STARTCUT As String = "colSTARTCUT"
|
||||
Public Const COL_W As String = "colW"
|
||||
Public Const COL_L As String = "colL"
|
||||
Public Const COL_POSZ As String = "colPOSZ"
|
||||
Public Const COL_ROT As String = "colROT"
|
||||
Public Const COL_FLIP As String = "colFLIP"
|
||||
Public Const COL_POSX As String = "colPOSX"
|
||||
|
||||
@@ -102,6 +102,7 @@ Public Module ConstIni
|
||||
Public Const K_SUPERVISORMACH As String = "SupervisorMach"
|
||||
Public Const K_PASSWORD As String = "Password"
|
||||
Public Const K_CHANGEMACH As String = "ChangeMach"
|
||||
Public Const K_EXPORTBWE As String = "ExpBwe"
|
||||
|
||||
'Public Const S_SIMUL As String = "Simul"
|
||||
'Public Const K_SLIDERX As String = "SliderX"
|
||||
|
||||
@@ -149,6 +149,16 @@ Public Class MyMachGroupM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_dPosZ As Double = 0
|
||||
Public Property dPosZ As Double
|
||||
Get
|
||||
Return m_dPosZ
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dPosZ = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Wall
|
||||
|
||||
#Region "Calc"
|
||||
@@ -311,6 +321,7 @@ Public Class MyMachGroupM
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELLEN, NewMachGroupM.m_dL)
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELWIDTH, NewMachGroupM.m_dW)
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELHEIGHT, NewMachGroupM.m_dH)
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELPOSZ, NewMachGroupM.m_dPosZ)
|
||||
NewMachGroupM.m_dTotMat = NewMachGroupM.m_dL * NewMachGroupM.m_dW * NewMachGroupM.m_dH
|
||||
NewMachGroupM.m_PartMList = LoadParts(NewMachGroupM)
|
||||
For Each Part In NewMachGroupM.m_PartMList
|
||||
@@ -343,6 +354,7 @@ Public Class MyMachGroupM
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELLEN, NewMachGroupM.m_dL)
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELWIDTH, NewMachGroupM.m_dW)
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELHEIGHT, NewMachGroupM.m_dH)
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELPOSZ, NewMachGroupM.m_dPosZ)
|
||||
NewMachGroupM.m_dTotMat = NewMachGroupM.m_dL * NewMachGroupM.m_dW
|
||||
NewMachGroupM.m_PartMList = LoadParts(NewMachGroupM)
|
||||
For Each Part In NewMachGroupM.m_PartMList
|
||||
|
||||
@@ -632,13 +632,17 @@ Public MustInherit Class MyMachGroupVM
|
||||
Public ReadOnly Property DeleteMachGroup_Command As ICommand
|
||||
Get
|
||||
If m_cmdDeleteMachGroup Is Nothing Then
|
||||
m_cmdDeleteMachGroup = New Command(AddressOf DeleteMachGroup)
|
||||
m_cmdDeleteMachGroup = New Command(AddressOf DeleteMachGroupCmd)
|
||||
End If
|
||||
Return m_cmdDeleteMachGroup
|
||||
End Get
|
||||
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
|
||||
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
||||
Dim nBeamId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
|
||||
|
||||
@@ -16,7 +16,7 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("EgtBEAMWALL.Core")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2022 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2023 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
@@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices
|
||||
' 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.5.3.2")>
|
||||
<Assembly: AssemblyFileVersion("2.5.3.2")>
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Egalware s.r.l.")]
|
||||
[assembly: AssemblyProduct("EgtBEAMWALL.DataLayer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020-2022 by Egalware s.r.l.")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020-2023 by Egalware s.r.l.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// 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.5.3.2")]
|
||||
[assembly: AssemblyFileVersion("2.5.3.2")]
|
||||
|
||||
@@ -701,6 +701,12 @@ Public Class NUMAxiumPcToolkitComm
|
||||
Try
|
||||
ISONumVariable.sValue = SentMachGroup.Name
|
||||
ISOSentVariable.sValue = 0
|
||||
'Dim TempISOSentVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = ISO_SENT)
|
||||
'While ISOSentVariable.sValue <> "0"
|
||||
' Threading.Thread.Sleep(100)
|
||||
' EgtOutLog("Bloccato - Sent(80046): " & TempISOSentVariable.sValue & " Num(80045): " & ISONumVariable.sValue)
|
||||
' TempISOSentVariable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = ISO_SENT)
|
||||
'End While
|
||||
SentMachGroup.SetSentToMachine(True)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error write var after download: " & ex.Message)
|
||||
@@ -710,6 +716,7 @@ Public Class NUMAxiumPcToolkitComm
|
||||
nRes = DownLoadFileAsyn(nPortFileTransfer, nFileType, sFilePath, DNC_MODE_ABORT, nIndex)
|
||||
SendPermissionVariable.sValue = 0
|
||||
m_BytesTransferedCounter = 0
|
||||
Threading.Thread.Sleep(1000)
|
||||
m_bIsTransferActive = False
|
||||
Return
|
||||
End Sub)
|
||||
|
||||
@@ -81,6 +81,13 @@
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<!--PosZ - Posizione in Z-->
|
||||
<DataGridTextColumn x:Key="colPOSZ" Binding="{Binding sPosZ}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.PosZ_Msg,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<!--MAT - Materiale-->
|
||||
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}">
|
||||
<DataGridTextColumn.Header>
|
||||
|
||||
@@ -13,6 +13,13 @@ Public Class RawPartListVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_colRawPart_PosZ As EgtDataGridColumn
|
||||
Public ReadOnly Property colRawPart_PosZ As EgtDataGridColumn
|
||||
Get
|
||||
Return m_colRawPart_PosZ
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_RawPartColumns As New ObservableCollection(Of EgtDataGridColumn)
|
||||
Public Property RawPartColumns As ObservableCollection(Of EgtDataGridColumn)
|
||||
Get
|
||||
@@ -55,6 +62,12 @@ Public Class RawPartListVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property PosZ_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61728)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Material_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61607)
|
||||
@@ -84,23 +97,27 @@ Public Class RawPartListVM
|
||||
Map.SetRefRawPartListVM(Me)
|
||||
' carico le colonne della datagrid
|
||||
GetPrivateProfileColumns(S_RAWPARTLIST_SUPERVISOR, RawPartColumns)
|
||||
' recupero riferimento a colonna StartCut
|
||||
' recupero riferimento a colonna StartCut e PosZ
|
||||
m_colRawPart_StartCut = m_RawPartColumns.FirstOrDefault(Function(x) x.Name = COL_STARTCUT)
|
||||
m_colRawPart_PosZ = m_RawPartColumns.FirstOrDefault(Function(x) x.Name = COL_POSZ)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
Friend Sub UpdateColumns(nMachType As MachineType)
|
||||
If nMachType = MachineType.BEAM Then
|
||||
If Not IsNothing(m_colRawPart_StartCut) Then
|
||||
m_colRawPart_StartCut.ColumnVisibility = Visibility.Visible
|
||||
End If
|
||||
'RawPartColumns.Clear()
|
||||
'GetPrivateProfileColumns(S_RAWPARTLIST_BEAM, RawPartColumns)
|
||||
' aggiorno la visibilità delle colonne
|
||||
For Each col In RawPartColumns
|
||||
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
Next
|
||||
If Not IsNothing(m_colRawPart_StartCut) Then
|
||||
m_colRawPart_StartCut.ColumnVisibility = Visibility.Visible
|
||||
End If
|
||||
If Not IsNothing(m_colRawPart_PosZ) Then
|
||||
m_colRawPart_PosZ.ColumnVisibility = Visibility.Collapsed
|
||||
End If
|
||||
'RawPartColumns.Clear()
|
||||
'GetPrivateProfileColumns(S_RAWPARTLIST_BEAM, RawPartColumns)
|
||||
ElseIf nMachType = MachineType.WALL Then
|
||||
' aggiorno la visibilità delle colonne
|
||||
For Each col In RawPartColumns
|
||||
@@ -109,6 +126,9 @@ Public Class RawPartListVM
|
||||
If Not IsNothing(m_colRawPart_StartCut) Then
|
||||
m_colRawPart_StartCut.ColumnVisibility = Visibility.Collapsed
|
||||
End If
|
||||
If Not IsNothing(m_colRawPart_PosZ) Then
|
||||
m_colRawPart_PosZ.ColumnVisibility = Visibility.Visible
|
||||
End If
|
||||
'RawPartColumns.Clear()
|
||||
'GetPrivateProfileColumns(S_RAWPARTLIST_WALL, RawPartColumns)
|
||||
End If
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtBEAMWALL.Core
|
||||
@@ -1003,14 +1004,48 @@ Public Class LeftPanelVM
|
||||
|
||||
Private Sub CreateDataFile(sFilePath As String, SelPart As PartVM, SelMachGroup As MyMachGroupVM)
|
||||
Dim sFileText As New List(Of String)
|
||||
Dim nBtlInfoId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
Dim sInfo As String = ""
|
||||
Dim bOk As Boolean = False
|
||||
' inserisco il capitolo del [Main]
|
||||
sFileText.Add("[Main]")
|
||||
sFileText.Add("Var1=$PRODID$," & Map.refSupervisorManagerVM.CurrProd.sProdId)
|
||||
sFileText.Add("Var2=$MACHGROUPID$," & SelMachGroup.Id)
|
||||
sFileText.Add("Var2=$MACHGROUPID$," & SelMachGroup.nName)
|
||||
sFileText.Add("Var3=$PARTID$," & SelPart.nPDN)
|
||||
sFileText.Add("Var4=$MATERIAL$," & SelPart.sMATERIAL)
|
||||
'sFileText.Add("Var5=$Thickness$," & SelPart.Thickness)
|
||||
'sFileText.Add("Var6=$Storage$," & SelPart.WarehousePosition)
|
||||
bOk = EgtGetInfo(nBtlInfoId, BTL_GEN_PROJNUM, sInfo)
|
||||
sFileText.Add("Var5=$PROJECTNUMBER$," & If(bOk, sInfo, ""))
|
||||
bOk = EgtGetInfo(nBtlInfoId, BTL_GEN_PROJNAME, sInfo)
|
||||
sFileText.Add("Var6=$PROJECTNAME$," & If(bOk, sInfo, ""))
|
||||
bOk = EgtGetInfo(nBtlInfoId, BTL_GEN_CUSTOMER, sInfo)
|
||||
sFileText.Add("Var7=$CUSTOMER$," & If(bOk, sInfo, ""))
|
||||
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_ASSEMBLYNUM, sInfo)
|
||||
sFileText.Add("Var8=$ASSEMBLYNUMBER$," & If(bOk, sInfo, ""))
|
||||
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_ORDERNUM, sInfo)
|
||||
sFileText.Add("Var9=$ORDERNUMBER$," & If(bOk, sInfo, ""))
|
||||
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_DESIGNATION, sInfo)
|
||||
sFileText.Add("Var10=$DESIGNATION$," & If(bOk, sInfo, ""))
|
||||
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_ANNOTATION, sInfo)
|
||||
sFileText.Add("Var11=$ANNOTATION$," & If(bOk, sInfo, ""))
|
||||
sFileText.Add("Var12=$STOREY$," & SelPart.sSTOREY)
|
||||
sFileText.Add("Var13=$GROUP$," & SelPart.sGROUP)
|
||||
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_PACKAGE, sInfo)
|
||||
sFileText.Add("Var14=$PACKAGE$," & If(bOk, sInfo, ""))
|
||||
sFileText.Add("Var15=$WHL$," & SelPart.sW & "x" & SelPart.sH & "x" & SelPart.sL)
|
||||
sFileText.Add("Var16=$PRODUCTIONDATE$," & Date.Now().ToString("yyyy-MM-dd"))
|
||||
' calcolo numero settimana corrente secondo ISO 8601
|
||||
Dim time As Date = Date.Now()
|
||||
Dim Day As DayOfWeek = CultureInfo.InvariantCulture.Calendar.GetDayOfWeek(time)
|
||||
If Day >= DayOfWeek.Monday AndAlso Day <= DayOfWeek.Wednesday Then time = time.AddDays(3)
|
||||
Dim nWeekOfYear As Integer = CultureInfo.InvariantCulture.Calendar.GetWeekOfYear(time, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday)
|
||||
sFileText.Add("Var17=$PRODUCTIONWEEK$," & nWeekOfYear)
|
||||
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_DESCRIPTION, sInfo)
|
||||
sFileText.Add("Var18=$DESCRIPTION$," & If(bOk, sInfo, ""))
|
||||
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_QUALITYGRADE, sInfo)
|
||||
sFileText.Add("Var19=$QUALITYGRADE$," & If(bOk, sInfo, ""))
|
||||
bOk = EgtGetInfo(nBtlInfoId, BTL_GEN_BTLPATH, sInfo)
|
||||
sFileText.Add("Var20=$BTLPATH$," & If(bOk, Path.GetFileNameWithoutExtension(sInfo), ""))
|
||||
|
||||
Try
|
||||
File.WriteAllLines(sFilePath, sFileText)
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -666,10 +666,17 @@ Public Class MachCommandMessagePanelVM
|
||||
ErrorAdditionalMsg = "Line Number"
|
||||
ErrorNumberMsg = "CN:"
|
||||
End If
|
||||
Dim sErrorMessage As String = ErrorMessage
|
||||
If bMsgTranslationActive Then
|
||||
Dim sTranslatedMsg = MachMsg(MsgParagraphs.CNC, nErrorNumber)
|
||||
If Not String.IsNullOrWhiteSpace(sTranslatedMsg) Then
|
||||
sErrorMessage = sTranslatedMsg
|
||||
End If
|
||||
End If
|
||||
ErrorLineMsg = "Number from the Cnc Block"
|
||||
AlarmMessage = If(nErrorNumber <> 0, ErrorNumberMsg & ": " & nErrorNumber & " - ", "") &
|
||||
If(nErrorExtNumber <> 0, " - " & ErrorExtNumberMsg & ": " & nErrorExtNumber, "") &
|
||||
" " & ErrorMessage
|
||||
" " & sErrorMessage
|
||||
Case NUM_ErrorTypes.Drive_Error
|
||||
ErrorIndexMsg = "Azionamento: Asse"
|
||||
ErrorNumberMsg = "Ext"
|
||||
|
||||
@@ -807,6 +807,7 @@ Public Class MachManaging
|
||||
Case CommandTypes.READ_TPA
|
||||
Tpa.RWVariableManager.RefreshVar(Command.sVariable)
|
||||
Case CommandTypes.WRITE
|
||||
'EgtOutLog("Write" & Command.sVariable & " " & Command.sVariables(1) & " " & Command.nVariable)
|
||||
WriteVar(Command.sVariable, Command.sVariables(1), Command.nVariable)
|
||||
Case CommandTypes.DELETEALARMS
|
||||
DeleteAlarms()
|
||||
|
||||
@@ -173,35 +173,33 @@ Public Class MachineLogPageVM
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Private Function MachineLogFilter(LogEvent As Object) As Boolean
|
||||
Dim CurrLogEvent As LogEvent = DirectCast(LogEvent, LogEvent)
|
||||
Private Function MachineLogFilter(CurrEvent As Object) As Boolean
|
||||
Dim CurrLogEvent As LogEvent = DirectCast(CurrEvent, LogEvent)
|
||||
Dim bOk As Boolean = True
|
||||
Select Case m_SelEntityType
|
||||
Case 0
|
||||
bOk = bOk And True
|
||||
Case 1
|
||||
bOk = bOk And CurrLogEvent.EventType = MachLogTypes.PART_STATUS
|
||||
Case 2
|
||||
bOk = bOk And CurrLogEvent.EventType = MachLogTypes.MACHGROUP_STATUS
|
||||
End Select
|
||||
If CurrLogEvent.EventType = MachLogTypes.PART_STATUS OrElse CurrLogEvent.EventType = MachLogTypes.MACHGROUP_STATUS Then
|
||||
Select Case m_SelPartEventType
|
||||
Case 0
|
||||
bOk = bOk And True
|
||||
Case 1
|
||||
bOk = bOk And CurrLogEvent.nStatus = 1
|
||||
Case 2
|
||||
bOk = bOk And CurrLogEvent.nStatus = 2
|
||||
End Select
|
||||
End If
|
||||
' se livello utente inferiore a 5, mostro solo eventi pezzo e machgroup
|
||||
If Map.refMainWindowVM.MainWindowM.nUserLevel < 5 Then
|
||||
bOk = bOk And CurrLogEvent.EventType = MachLogTypes.PART_STATUS OrElse CurrLogEvent.EventType = MachLogTypes.MACHGROUP_STATUS
|
||||
Else
|
||||
If Not CurrLogEvent.EventType = MachLogTypes.PART_STATUS AndAlso Not CurrLogEvent.EventType = MachLogTypes.MACHGROUP_STATUS Then
|
||||
bOk = True
|
||||
If CurrLogEvent.EventType <> LogEvent.MachLogTypes.PART_STATUS AndAlso CurrLogEvent.EventType <> LogEvent.MachLogTypes.MACHGROUP_STATUS Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Select Case m_SelEntityType
|
||||
Case 0 ' ""
|
||||
bOk = bOk And True
|
||||
Case 1 ' "Pezzo"
|
||||
bOk = bOk And CurrLogEvent.EventType = LogEvent.MachLogTypes.PART_STATUS
|
||||
Case 2 ' "Barra"
|
||||
bOk = bOk And CurrLogEvent.EventType = LogEvent.MachLogTypes.MACHGROUP_STATUS
|
||||
End Select
|
||||
If CurrLogEvent.EventType = LogEvent.MachLogTypes.PART_STATUS OrElse CurrLogEvent.EventType = LogEvent.MachLogTypes.MACHGROUP_STATUS Then
|
||||
Select Case m_SelPartEventType
|
||||
Case 0 ' ""
|
||||
bOk = bOk And True
|
||||
Case 1 ' "Inizio"
|
||||
bOk = bOk And CurrLogEvent.nStatus = 1
|
||||
Case 2 ' "Fine"
|
||||
bOk = bOk And CurrLogEvent.nStatus = 2
|
||||
End Select
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
|
||||
@@ -240,8 +240,8 @@ Public Class MainWindowM
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2411, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2411, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2503, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2503, 1, m_nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sLogFile = m_sTempDir & "\" & SUPGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
|
||||
@@ -30,7 +30,7 @@ Imports System.Windows
|
||||
#End if
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("EgtBEAMWALL.Supervisor")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2022 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2023 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
@@ -70,5 +70,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.5.3.2")>
|
||||
<Assembly: AssemblyFileVersion("2.5.3.2")>
|
||||
|
||||
|
Before Width: | Height: | Size: 812 B After Width: | Height: | Size: 1016 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 |
@@ -147,12 +147,27 @@ Public Class LogEvent
|
||||
Select Case m_EventType
|
||||
Case MachLogTypes.PART_STATUS
|
||||
m_ProdId = sValues(0)
|
||||
m_MachGroupId = DbControllers.m_MachGroupController.FindByMachGroupId(m_ProdId, sValues(1)).Name
|
||||
m_PartId = DbControllers.m_PartController.FindByPartId(m_ProdId, sValues(2)).PDN
|
||||
Dim MachGroup As DataLayer.DatabaseModels.MachGroupModel = DbControllers.m_MachGroupController.FindByMachGroupId(m_ProdId, sValues(1))
|
||||
If Not IsNothing(MachGroup) Then
|
||||
m_MachGroupId = MachGroup.Name
|
||||
Else
|
||||
m_MachGroupId = -1
|
||||
End If
|
||||
Dim Part As DataLayer.DatabaseModels.PartModel = DbControllers.m_PartController.FindByPartId(m_ProdId, sValues(2))
|
||||
If Not IsNothing(Part) Then
|
||||
m_PartId = Part.PDN
|
||||
Else
|
||||
m_PartId = -1
|
||||
End If
|
||||
m_Status = sValues(3)
|
||||
Case MachLogTypes.MACHGROUP_STATUS
|
||||
m_ProdId = sValues(0)
|
||||
m_MachGroupId = DbControllers.m_MachGroupController.FindByMachGroupId(m_ProdId, sValues(1)).Name
|
||||
Dim MachGroup As DataLayer.DatabaseModels.MachGroupModel = DbControllers.m_MachGroupController.FindByMachGroupId(m_ProdId, sValues(1))
|
||||
If Not IsNothing(MachGroup) Then
|
||||
m_MachGroupId = MachGroup.Name
|
||||
Else
|
||||
m_MachGroupId = -1
|
||||
End If
|
||||
m_Status = sValues(2)
|
||||
Case MachLogTypes.MACHINE_COMMAND
|
||||
|
||||
|
||||
@@ -102,7 +102,17 @@ Public Class AddRawPartWndVM
|
||||
End Select
|
||||
m_DimensionsList = DimensionsList
|
||||
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
|
||||
Dim TempDimension As SParam = m_DimensionsList.FirstOrDefault(Function(x) x.SectXMat = LastMaterial.SectXMat AndAlso x.dL = LastMaterial.dL AndAlso x.dW = LastMaterial.dW AndAlso x.nQuantity = LastMaterial.nQuantity)
|
||||
If Not IsNothing(TempDimension) Then
|
||||
SelDimension = TempDimension
|
||||
Else
|
||||
SelDimension = m_DimensionsList(0)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' riduco lista parametri a solo quelli che utilizzati
|
||||
m_VariableList_View = CollectionViewSource.GetDefaultView(m_VariableList)
|
||||
|
||||
@@ -25,7 +25,7 @@ Public Class BTLFeatureVM
|
||||
If value <> -1 Then
|
||||
' verifico se solido attivo
|
||||
Dim bShowSolid As Boolean = Map.refShowBeamPanelVM.ShowSolid_IsChecked
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
' aggiorno la feature con nuovo valore
|
||||
Dim vPar() As Double = Nothing
|
||||
Dim sPar As String = String.Empty
|
||||
@@ -41,8 +41,8 @@ Public Class BTLFeatureVM
|
||||
ResetCalcFeature()
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(nSelGRP))
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
EgtDraw()
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -65,7 +65,7 @@ Public Class BTLFeatureVM
|
||||
If value <> -1 Then
|
||||
' verifico se solido attivo
|
||||
Dim bShowSolid As Boolean = Map.refShowBeamPanelVM.ShowSolid_IsChecked
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
' se freecontour
|
||||
If Me.m_BTLFeatureM.IsFreeContour() Then
|
||||
' cambio faccia alla geometria
|
||||
@@ -108,8 +108,8 @@ Public Class BTLFeatureVM
|
||||
ResetCalcFeature()
|
||||
End If
|
||||
NotifyPropertyChanged("nSelSIDE")
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
EgtDraw()
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -135,7 +135,7 @@ Public Class BTLFeatureVM
|
||||
If value <> m_BTLFeatureM.bDO Then
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
' verifico se solido attivo
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
End If
|
||||
If EgtBeamEnableProcess(nFeatureId, value, Not m_bDO_MultipleUpdate) Then
|
||||
m_BTLFeatureM.bDO = value
|
||||
@@ -154,7 +154,7 @@ Public Class BTLFeatureVM
|
||||
End If
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
' eventualmente ripristino solido
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
End If
|
||||
If Not m_bDO_MultipleUpdate Then EgtDraw()
|
||||
' aggiorno stato abilitazione del bottone modifica free contour
|
||||
|
||||
@@ -277,7 +277,7 @@ Public Class BTLParamVM
|
||||
Friend Sub UpdateParamValue(dNewValue As Double, sNewValue As String, Optional bDraw As Boolean = True)
|
||||
' verifico se solido attivo
|
||||
Dim bShowSolid As Boolean = Map.refShowBeamPanelVM.ShowSolid_IsChecked
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
' Recupero i parametri attuali della feature
|
||||
Dim vPar() As Double = Nothing
|
||||
Dim sPar As String = String.Empty
|
||||
@@ -335,7 +335,7 @@ Public Class BTLParamVM
|
||||
End If
|
||||
End If
|
||||
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
If bDraw Then EgtDraw()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -118,7 +118,7 @@ Public Class BTLPartVM
|
||||
|
||||
' verifico se solido attivo
|
||||
Dim bShowSolid As Boolean = Map.refShowBeamPanelVM.ShowSolid_IsChecked
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
|
||||
If Not EgtBeamSetPartBox(dBtlL, dBtlH, dBtlW, False) Then Return False
|
||||
|
||||
@@ -134,7 +134,7 @@ Public Class BTLPartVM
|
||||
' aggiorno sezioni
|
||||
Map.refProjectVM.BTLStructureVM.UpdateSection(Section, OldSection)
|
||||
' eventualmente ripristino solido
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
EgtDraw()
|
||||
|
||||
Return True
|
||||
@@ -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 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)
|
||||
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 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)
|
||||
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 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)
|
||||
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 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)
|
||||
End If
|
||||
Dim frBeam As New Frame3d
|
||||
|
||||
@@ -243,7 +243,7 @@ Public Class BTLStructureVM
|
||||
If Map.refShowBeamPanelVM.ShowSolid_IsChecked Then
|
||||
' tolgo eventuale indicazione solido rimasta da pezzo precedente
|
||||
Map.refShowBeamPanelVM.SetShowSolid(False)
|
||||
Map.refProjectVM.BTLStructureVM.ShowSolid(False, BtlPart.nPartId)
|
||||
Map.refProjectVM.BTLStructureVM.ShowSolid(BtlPart.nPartId, False, False)
|
||||
End If
|
||||
If m_SelBTLPart Is BtlPart Then
|
||||
EgtBeamShowFacesName( False)
|
||||
@@ -1083,7 +1083,7 @@ Public Class BTLStructureVM
|
||||
If Not IsNothing(SelBTLPart) Then
|
||||
' se pezzo solido, lo riporto normale
|
||||
If Map.refShowBeamPanelVM.ShowSolid_IsChecked Then
|
||||
ShowSolid(False)
|
||||
ShowSolid(GDB_ID.NULL, False, False)
|
||||
Map.refShowBeamPanelVM.SetShowSolid(False)
|
||||
End If
|
||||
' tolgo pezzo selezionato
|
||||
@@ -1132,12 +1132,12 @@ Public Class BTLStructureVM
|
||||
EgtZoom(ZM.ALL, bRedraw)
|
||||
End Sub
|
||||
|
||||
Friend Sub ShowSolid(Optional bRedraw As Boolean = True, Optional nPartId As Integer = GDB_ID.NULL)
|
||||
Friend Sub ShowSolid(nPartId As Integer, bShow As Boolean, Optional bRedraw As Boolean = True)
|
||||
' se non viene passato, recupero il pezzo del primo oggetto selezionato
|
||||
If nPartId = GDB_ID.NULL Then
|
||||
nPartId = If(Not IsNothing(SelBTLPart), SelBTLPart.nPartId, GDB_ID.NULL)
|
||||
If nPartId = GDB_ID.NULL And Not IsNothing(SelBTLPart) Then
|
||||
nPartId = SelBTLPart.nPartId
|
||||
End If
|
||||
If nPartId = GDB_ID.NULL Or Not EgtIsPart(nPartId) Then
|
||||
If Not EgtIsPart(nPartId) Then
|
||||
Dim nLayerId As Integer = EgtGetParent(nPartId)
|
||||
Dim sLayerName As String = ""
|
||||
EgtGetName(nLayerId, sLayerName)
|
||||
@@ -1151,17 +1151,11 @@ Public Class BTLStructureVM
|
||||
' disabilito impostazione modificato
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
|
||||
Dim nSolId As Integer = EgtBeamGetSolid(nPartId)
|
||||
If nSolId = GDB_ID.NULL OrElse Not EgtExistsInfo(nSolId, "VALID") Then
|
||||
EgtBeamCalcSolid(nPartId)
|
||||
EgtBeamShowSolid(nPartId, True)
|
||||
Else
|
||||
Dim nStat As Integer
|
||||
EgtGetStatus(EgtGetParent(nSolId), nStat)
|
||||
EgtBeamShowSolid(nPartId, (nStat = GDB_ST.OFF))
|
||||
End If
|
||||
If bShow Then EgtBeamCalcSolid(nPartId)
|
||||
|
||||
EgtBeamShowSolid(nPartId, bShow)
|
||||
If bRedraw Then EgtDraw()
|
||||
|
||||
' ripristino precedente impostazione modificato
|
||||
DisableMgr.ReEnable()
|
||||
End Sub
|
||||
|
||||
@@ -35,7 +35,7 @@ Public Class ChangeParameterWndVM
|
||||
ParamIndex += 1
|
||||
End While
|
||||
' aggiungo bDO come parametro
|
||||
m_ParamList.Add(New Parameters(NewBTLParam, True))
|
||||
m_ParamList.Add(New Parameters(BTLParamM.CreateNewBTLParam(), True))
|
||||
' seleziono parametro vuoto per dargli un valore iniziale ed evitare che visualizzi sia text che check
|
||||
m_SelParam = New Parameters(BTLParamM.CreateNewBTLParam())
|
||||
NotifyPropertyChanged(NameOf(SelParam))
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
<RowDefinition Height="6*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TabControl Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2">
|
||||
<TabControl Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2"
|
||||
SelectedIndex="{Binding SelConfigSubPage}">
|
||||
<TabItem Header="General">
|
||||
<TabItem.Content>
|
||||
<Grid>
|
||||
|
||||
@@ -7,6 +7,32 @@ Imports EgtBEAMWALL.Core
|
||||
Public Class ConfigurationPageVM
|
||||
Inherits VMBase
|
||||
|
||||
Public Enum ConfigSubPages As Integer
|
||||
GENERAL = 0
|
||||
QPARAMETERS = 1
|
||||
MACHINE = 2
|
||||
End Enum
|
||||
|
||||
Private m_QParametersModified As Boolean = False
|
||||
Friend ReadOnly Property QParametersModified As Boolean
|
||||
Get
|
||||
Return m_QParametersModified
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub ResetQParametersModified()
|
||||
m_QParametersModified = False
|
||||
End Sub
|
||||
|
||||
Private m_SelConfigSubPage As ConfigSubPages = ConfigSubPages.GENERAL
|
||||
Public Property SelConfigSubPage As Integer
|
||||
Get
|
||||
Return m_SelConfigSubPage
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_SelConfigSubPage = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' flag modifica parametri Macchina
|
||||
Friend bModifyMachParam As Boolean
|
||||
|
||||
@@ -325,13 +351,19 @@ Public Class ConfigurationPageVM
|
||||
''' Execute the Save. This method is invoked by the SaveCommand.
|
||||
''' </summary>
|
||||
Public Sub Save()
|
||||
WriteMachParams()
|
||||
WriteMachParamsLua()
|
||||
WriteProcessParams(PRCList.ToList())
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_MESSAGES, m_SelectedLanguage.Name)
|
||||
WriteMainPrivateProfileString(S_SCENE, K_MMUNITS, SelMeasureUnit.ToString())
|
||||
WriteMainPrivateProfileString(S_NEST, K_SECTIONTIME, DoubleToString(m_SectionTime, 5))
|
||||
WriteMainPrivateProfileString(S_NEST, K_PARTTIME, DoubleToString(m_PartTime, 5))
|
||||
VerifyConfigPageModification()
|
||||
'Select Case SelConfigSubPage
|
||||
' Case ConfigSubPages.GENERAL
|
||||
' WriteMachParams()
|
||||
' WriteMachParamsLua()
|
||||
' Case ConfigSubPages.QPARAMETERS
|
||||
' WriteProcessParams(PRCList.ToList())
|
||||
' Case ConfigSubPages.MACHINE
|
||||
' WriteMainPrivateProfileString(S_GENERAL, K_MESSAGES, m_SelectedLanguage.Name)
|
||||
' WriteMainPrivateProfileString(S_SCENE, K_MMUNITS, SelMeasureUnit.ToString())
|
||||
' WriteMainPrivateProfileString(S_NEST, K_SECTIONTIME, DoubleToString(m_SectionTime, 5))
|
||||
' WriteMainPrivateProfileString(S_NEST, K_PARTTIME, DoubleToString(m_PartTime, 5))
|
||||
'End Select
|
||||
End Sub
|
||||
|
||||
#End Region ' SaveCommand
|
||||
@@ -415,58 +447,68 @@ Public Class ConfigurationPageVM
|
||||
|
||||
' funzione che verifica la modifica dei valori in Configurazione e ne chiede il salvataggio
|
||||
Friend Sub VerifyConfigPageModification()
|
||||
' Prima ciclo sui parametri Macchina
|
||||
Dim bExitFor = False
|
||||
For Each MachTableItem In ConfigMachTableList
|
||||
For Each MachParamItem In MachTableItem.MachParamList
|
||||
If MachParamItem.IsModified Then
|
||||
If MessageBox.Show(EgtMsg(61860), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
' scrivo i parametri Macchina
|
||||
WriteMachParams()
|
||||
WriteMachParamsLua()
|
||||
Else
|
||||
' se da non salvare li resetto ed esco dai For
|
||||
CreateMachParams()
|
||||
bExitFor = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If bExitFor Then Exit For
|
||||
Next
|
||||
' Ora ciclo sui parametri Q
|
||||
Dim bAskToSaveDefaultValues As Boolean = False
|
||||
bExitFor = False
|
||||
For Each PRCItem In PRCList
|
||||
For Each QParam In PRCItem.QBTLParamVMList
|
||||
If QParam.bIsModified Then
|
||||
bAskToSaveDefaultValues = True
|
||||
' esco dai For
|
||||
bExitFor = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If bExitFor Then Exit For
|
||||
Next
|
||||
' se nel ciclo è stato trovato almeno un valore modificato chiedo il salvataggio
|
||||
If bAskToSaveDefaultValues Then
|
||||
If MessageBox.Show(EgtMsg(61861), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
' se si è scelto di salvare i valori li scrivo
|
||||
WriteProcessParams(PRCList.ToList())
|
||||
End If
|
||||
' in ogni caso ricarico i valori (in modo da resettare i flag di modifica)
|
||||
GetQParamsList()
|
||||
' carico la lista di tutti i parametri Q ciclando su ogni Process di PRCList
|
||||
If Not IsNothing(QBTLParamVMList) Then
|
||||
QBTLParamVMList.Clear()
|
||||
End If
|
||||
For Each PRCItem In PRCList
|
||||
For Each QBTLParam In PRCItem.QBTLParamVMList
|
||||
QBTLParamVMList.Add(QBTLParam)
|
||||
Select Case m_SelConfigSubPage
|
||||
Case ConfigSubPages.GENERAL
|
||||
' aggiorno tutti i valori senza verificare modifiche
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_MESSAGES, m_SelectedLanguage.Name)
|
||||
WriteMainPrivateProfileString(S_SCENE, K_MMUNITS, SelMeasureUnit.ToString())
|
||||
WriteMainPrivateProfileString(S_NEST, K_SECTIONTIME, DoubleToString(m_SectionTime, 5))
|
||||
WriteMainPrivateProfileString(S_NEST, K_PARTTIME, DoubleToString(m_PartTime, 5))
|
||||
Case ConfigSubPages.QPARAMETERS
|
||||
' ciclo sui parametri Q
|
||||
Dim bAskToSaveDefaultValues As Boolean = False
|
||||
For Each PRCItem In PRCList
|
||||
For Each QParam In PRCItem.QBTLParamVMList
|
||||
If QParam.bIsModified Then
|
||||
bAskToSaveDefaultValues = True
|
||||
' esco dai For
|
||||
bExitFor = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If bExitFor Then Exit For
|
||||
Next
|
||||
Next
|
||||
NotifyPropertyChanged(NameOf(QBTLParamVMList))
|
||||
End If
|
||||
' se nel ciclo è stato trovato almeno un valore modificato chiedo il salvataggio
|
||||
If bAskToSaveDefaultValues Then
|
||||
If MessageBox.Show(EgtMsg(61861), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
' se si è scelto di salvare i valori li scrivo
|
||||
WriteProcessParams(PRCList.ToList())
|
||||
m_QParametersModified = True
|
||||
End If
|
||||
' in ogni caso ricarico i valori (in modo da resettare i flag di modifica)
|
||||
GetQParamsList()
|
||||
' carico la lista di tutti i parametri Q ciclando su ogni Process di PRCList
|
||||
If Not IsNothing(QBTLParamVMList) Then
|
||||
QBTLParamVMList.Clear()
|
||||
End If
|
||||
For Each PRCItem In PRCList
|
||||
For Each QBTLParam In PRCItem.QBTLParamVMList
|
||||
QBTLParamVMList.Add(QBTLParam)
|
||||
Next
|
||||
Next
|
||||
NotifyPropertyChanged(NameOf(QBTLParamVMList))
|
||||
End If
|
||||
Case ConfigSubPages.MACHINE
|
||||
' ciclo sui parametri Macchina
|
||||
For Each MachTableItem In ConfigMachTableList
|
||||
For Each MachParamItem In MachTableItem.MachParamList
|
||||
If MachParamItem.IsModified Then
|
||||
If MessageBox.Show(EgtMsg(61860), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
' scrivo i parametri Macchina
|
||||
WriteMachParams()
|
||||
WriteMachParamsLua()
|
||||
Else
|
||||
' se da non salvare li resetto ed esco dai For
|
||||
CreateMachParams()
|
||||
bExitFor = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If bExitFor Then Exit For
|
||||
Next
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
' funzione che verifica l'inserimento della password quando si edita un parametro Macchina
|
||||
|
||||
@@ -271,12 +271,12 @@ Public Class FreeContourManagerVM
|
||||
Private m_cmdDelete As ICommand
|
||||
Private m_cmdModifyCurve As ICommand
|
||||
Private m_cmdAddPointCurve As ICommand
|
||||
Private m_cmdRemovePointCurve As ICommand
|
||||
Private m_cmdArcflip As ICommand
|
||||
Private m_cmdMove As ICommand
|
||||
Private m_cmdRotate As ICommand
|
||||
Private m_cmdMirror As ICommand
|
||||
Private m_cmdScale As ICommand
|
||||
Private m_cmdRemovePointCurve As ICommand
|
||||
Private m_cmdChangeStart As ICommand
|
||||
Private m_cmdInvertCurve As ICommand
|
||||
Private m_cmdTextAngle As ICommand
|
||||
@@ -324,7 +324,7 @@ Public Class FreeContourManagerVM
|
||||
Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.PartManager_Visibility))
|
||||
' verifico se solido attivo
|
||||
m_bPrevShowSolid = Map.refShowBeamPanelVM.ShowSolid_IsChecked
|
||||
If m_bPrevShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
If m_bPrevShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
' attivo visualizzazione direzione curve
|
||||
EgtSetShowCurveDirection(True)
|
||||
' elimino eventuale vecchio layer testi
|
||||
@@ -367,7 +367,7 @@ Public Class FreeContourManagerVM
|
||||
m_SelType = FreeContourTypes.TWO
|
||||
End If
|
||||
End If
|
||||
' se nuova senza percorsi
|
||||
' se nuova senza percorsi
|
||||
Else
|
||||
' imposto modalita' un percorso
|
||||
m_SelType = FreeContourTypes.ONE
|
||||
@@ -424,10 +424,12 @@ Public Class FreeContourManagerVM
|
||||
NotifyPropertyChanged(NameOf(Line2P_IsEnabled))
|
||||
NotifyPropertyChanged(NameOf(TextAngle_Visibility))
|
||||
NotifyPropertyChanged(NameOf(PathList_Visibility))
|
||||
' posiziono la griglia sulla faccia attiva
|
||||
' posiziono la griglia sul riferimento del contorno libero
|
||||
Dim frFace As New Frame3d
|
||||
EgtBeamGetSideData(SelFeature.nSelSIDE, frFace)
|
||||
EgtSetGridFrame(frFace)
|
||||
Dim frFrame As Frame3d = SelFeature.BTLFeatureM.frFRAME
|
||||
frFrame.ToGlob( frFace)
|
||||
EgtSetGridFrame(frFrame)
|
||||
EgtSetGridShow(True, True)
|
||||
Map.refSceneHostVM.MainScene.CPlaneView()
|
||||
' rimetto la selezione scena a null
|
||||
@@ -442,11 +444,8 @@ Public Class FreeContourManagerVM
|
||||
End Sub
|
||||
|
||||
Friend Sub Close(bSave As Boolean)
|
||||
If m_bIsActive Then
|
||||
m_bIsActive = False
|
||||
Else
|
||||
Return
|
||||
End If
|
||||
If not m_bIsActive Then Return
|
||||
m_bIsActive = False
|
||||
' gestisco modifiche ai percorsi
|
||||
If bSave Then
|
||||
Select Case m_SelType
|
||||
@@ -459,7 +458,8 @@ Public Class FreeContourManagerVM
|
||||
Dim sSideAngInfo As String = ""
|
||||
For Index = 0 To SideAngValues.Count - 1
|
||||
If Index > 0 Then sSideAngInfo &= ","
|
||||
sSideAngInfo &= SideAngValues(Index).dValue
|
||||
Dim sAng As String = DoubleToString(SideAngValues(Index).dValue, 2)
|
||||
sSideAngInfo &= sAng
|
||||
Next
|
||||
EgtSetInfo(m_nNewPathId, "SideAngs", sSideAngInfo)
|
||||
EgtSetInfo(nSelFeatureId, "AUXID", (m_nNewPathId - nSelFeatureId).ToString("+#;-#;0"))
|
||||
@@ -474,7 +474,7 @@ Public Class FreeContourManagerVM
|
||||
Dim BTLFeatureM As BTLFeatureM = SelFeature.BTLFeatureM
|
||||
BTLFeatureM.CalcParamArray(vPar, sPar, vParQ)
|
||||
Dim bOK As Boolean = BTLFeatureM.UpdateParams(BTLFeatureM.nSelGRP, BTLFeatureM.nPRC, BTLFeatureM.nSelSIDE, BTLFeatureM.sDES, BTLFeatureM.nPRID,
|
||||
BTLFeatureM.frFRAME, vPar, sPar, vParQ)
|
||||
BTLFeatureM.frFRAME, vPar, sPar, vParQ)
|
||||
If bOK Then
|
||||
SelFeature.SelGeomFeature()
|
||||
' rendo non calcolata questa feature
|
||||
@@ -519,7 +519,8 @@ Public Class FreeContourManagerVM
|
||||
' elimino eventuale layer dei testi angoli
|
||||
EgtErase(nSideAngTextLayer)
|
||||
nSideAngTextLayer = GDB_ID.NULL
|
||||
' nascondo la griglia
|
||||
' riporto griglia globale e la nascondo
|
||||
EgtSetGridFrame( New Frame3d())
|
||||
EgtSetGridShow(False, False)
|
||||
' se il progetto non era modificato ed esco senza salvare, resetto lo stato di modificato
|
||||
If Not m_bAlreadyModified And Not bSave Then
|
||||
@@ -539,7 +540,7 @@ Public Class FreeContourManagerVM
|
||||
Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.PartManager_Visibility))
|
||||
' disattivo modifiche su scena
|
||||
Map.refSceneHostVM.MainScene.SetStatusNull()
|
||||
If m_bPrevShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
If m_bPrevShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
' disattivo visualizzazione direzione curve
|
||||
EgtSetShowCurveDirection(False)
|
||||
' reimposto filtro selezione
|
||||
@@ -651,7 +652,8 @@ Public Class FreeContourManagerVM
|
||||
If sSideAngSplit.Count - 1 >= Index Then
|
||||
StringToDouble(sSideAngSplit(Index), dSideAng)
|
||||
End If
|
||||
Dim TextId As Integer = EgtCreateText(nSideAngTextLayer, ptText, dSideAng & "°", 20)
|
||||
Dim sSideAng As String = DoubleToString( dSideAng, 2) & "°"
|
||||
Dim TextId As Integer = EgtCreateText(nSideAngTextLayer, ptText, sSideAng, 20)
|
||||
EgtSetInfo(TextId, "SideAng", dSideAng)
|
||||
SideAngValues.Add(New SideAngle(TextId, Index, dSideAng))
|
||||
Next
|
||||
@@ -744,7 +746,7 @@ Public Class FreeContourManagerVM
|
||||
End If
|
||||
ElseIf bChangedStart Then
|
||||
' non faccio nulla perche' gestito sopra
|
||||
' se apro percorso
|
||||
' se apro percorso
|
||||
ElseIf Not bNewIsClosed AndAlso bOldIsClosed AndAlso Index = NewAngleList.Count Then
|
||||
' cancello il testo del lato rimosso
|
||||
nMovedIndex = OldAngleList.FindIndex(Function(x) AreSamePointApprox(x, NewAngleList(CurrIndex - 1)))
|
||||
@@ -752,7 +754,7 @@ Public Class FreeContourManagerVM
|
||||
Dim NewIndex As Integer = (nPointsQty + nOffset) Mod nPointsQty
|
||||
EgtErase(SideAngValues(nOffset).nId)
|
||||
NewSideAngValues.RemoveAt(NewSideAngValues.Count - 1)
|
||||
' se chiudo percorso
|
||||
' se chiudo percorso
|
||||
ElseIf bNewIsClosed AndAlso Not bOldIsClosed AndAlso Index = OldAngleList.Count Then
|
||||
' creo il testo del lato aggiunto
|
||||
Dim ptText As Point3d
|
||||
@@ -761,20 +763,21 @@ Public Class FreeContourManagerVM
|
||||
' aggiungo punto e incremento indice di confronto per riallineare successivo
|
||||
NewSideAngValues.Add(New SideAngle(TextId, NewSideAngValues.Count - 1, 0))
|
||||
'' percorso aperto
|
||||
' punti coincidono: verifico che i punti coincidano e non siano il centro del percorso simmetrico
|
||||
' punti coincidono: verifico che i punti coincidano e non siano il centro del percorso simmetrico
|
||||
ElseIf Not bNewIsClosed AndAlso nNewIndex <= NewAngleList.Count - 1 AndAlso nOldIndex <= OldAngleList.Count - 1 AndAlso AreSamePointApprox(NewAngleList(nNewIndex), OldAngleList(nOldIndex)) AndAlso
|
||||
Not (Index = nPointsQty / 2 AndAlso AreSamePointApprox(NewAngleList(Index - 1), OldAngleList(nPointsQty - Index + 1))) Then
|
||||
If Index < nPointsQty AndAlso nOldIndex <= SideAngValues.Count - 1 Then
|
||||
NewSideAngValues.Add(New SideAngle(SideAngValues(nOldIndex).nId, NewSideAngValues.Count, SideAngValues(nOldIndex).dValue))
|
||||
End If
|
||||
' punti simmetrici: verifico se sono simmetrici o se coincidono ma i precedenti sono simmetrici
|
||||
' punti simmetrici: verifico se sono simmetrici o se coincidono ma i precedenti sono simmetrici
|
||||
ElseIf Not bNewIsClosed AndAlso Not bOldIsClosed AndAlso NewAngleList.Count = OldAngleList.Count AndAlso (AreSamePointApprox(NewAngleList(Index), OldAngleList(nPointsQty - Index)) OrElse
|
||||
(AreSamePointApprox(NewAngleList(nNewIndex), OldAngleList(nOldIndex)) AndAlso AreSamePointApprox(NewAngleList(Index - 1), OldAngleList(nPointsQty - Index + 1)))) Then
|
||||
If Index < nPointsQty Then
|
||||
EgtModifyText(SideAngValues(Index).nId, SideAngValues(nPointsQty - 1 - Index).dValue)
|
||||
Dim sText As String = DoubleToString( SideAngValues(nPointsQty - 1 - Index).dValue, 2)
|
||||
EgtModifyText(SideAngValues(Index).nId, sText)
|
||||
NewSideAngValues.Add(New SideAngle(SideAngValues(nPointsQty - 1 - Index).nId, NewSideAngValues.Count, SideAngValues(nPointsQty - 1 - Index).dValue))
|
||||
End If
|
||||
' punto spostato: verifico che non coincidano ma che i precedenti o i successivi coincidano
|
||||
' punto spostato: verifico che non coincidano ma che i precedenti o i successivi coincidano
|
||||
ElseIf Not bNewIsClosed AndAlso
|
||||
((Index = nPointsQty AndAlso Index <= OldAngleList.Count - 1 AndAlso Not AreSamePointApprox(NewAngleList(Index), OldAngleList(Index)) AndAlso AreSamePointApprox(NewAngleList(Index - 1), OldAngleList(Index - 1))) OrElse
|
||||
(nOldIndex + 1 <= OldAngleList.Count - 1 AndAlso nNewIndex + 1 <= NewAngleList.Count - 1 AndAlso AreSamePointApprox(NewAngleList(nNewIndex + 1), OldAngleList(nOldIndex + 1)))) Then
|
||||
@@ -797,20 +800,20 @@ Public Class FreeContourManagerVM
|
||||
NewSideAngValues.Add(New SideAngle(SideAngValues(Index).nId, NewSideAngValues.Count, SideAngValues(Index).dValue))
|
||||
End If
|
||||
'' percorso chiuso
|
||||
' punti coincidono: verifico che i punti coincidano e non siano inizio, fine o centro del percorso simmetrico
|
||||
' punti coincidono: verifico che i punti coincidano e non siano inizio, fine o centro del percorso simmetrico
|
||||
ElseIf bNewIsClosed AndAlso nNewIndex <= NewAngleList.Count - 1 AndAlso nOldIndex <= OldAngleList.Count - 1 AndAlso AreSamePointApprox(NewAngleList(nNewIndex), OldAngleList(nOldIndex)) AndAlso
|
||||
Not ((Index = 0 AndAlso AreSamePointApprox(NewAngleList(Index + 1), OldAngleList(nPointsQty - 1))) OrElse
|
||||
((Index = nPointsQty / 2 OrElse Index = nPointsQty) AndAlso AreSamePointApprox(NewAngleList(Index - 1), OldAngleList(nPointsQty - Index + 1)))) Then
|
||||
If Index < nPointsQty AndAlso nOldIndex < SideAngValues.Count Then
|
||||
NewSideAngValues.Add(New SideAngle(SideAngValues(nOldIndex).nId, NewSideAngValues.Count, SideAngValues(nOldIndex).dValue))
|
||||
End If
|
||||
' punti simmetrici: verifico se sono simmetrici o se coincidono ma i precedenti sono simmetrici
|
||||
' punti simmetrici: verifico se sono simmetrici o se coincidono ma i precedenti sono simmetrici
|
||||
ElseIf bNewIsClosed AndAlso bOldIsClosed AndAlso (AreSamePointApprox(NewAngleList(Index), OldAngleList(nPointsQty - Index)) OrElse
|
||||
(AreSamePointApprox(NewAngleList(nNewIndex), OldAngleList(nOldIndex)) AndAlso AreSamePointApprox(NewAngleList(Index - 1), OldAngleList(nPointsQty - Index + 1)))) Then
|
||||
If Index < nPointsQty Then
|
||||
NewSideAngValues.Add(New SideAngle(SideAngValues(nPointsQty - 1 - Index).nId, NewSideAngValues.Count, SideAngValues(nPointsQty - 1 - Index).dValue))
|
||||
End If
|
||||
' punto spostato: verifico che non coincidano ma che i precedenti o i successivi coincidano
|
||||
' punto spostato: verifico che non coincidano ma che i precedenti o i successivi coincidano
|
||||
ElseIf (nOldIndex + 1 <= OldAngleList.Count - 1 AndAlso nNewIndex + 1 <= NewAngleList.Count - 1 AndAlso AreSamePointApprox(NewAngleList(nNewIndex + 1), OldAngleList(nOldIndex + 1))) OrElse
|
||||
(bNewIsClosed AndAlso nOldIndex + 1 = OldAngleList.Count AndAlso nNewIndex + 1 = NewAngleList.Count AndAlso AreSamePointApprox(NewAngleList(1), OldAngleList(1))) Then
|
||||
' aggiorno posizione testo precedente
|
||||
@@ -831,7 +834,7 @@ Public Class FreeContourManagerVM
|
||||
EgtMove(SideAngValues(nOldIndex).nId, vtDistance)
|
||||
NewSideAngValues.Add(New SideAngle(SideAngValues(nOldIndex).nId, NewSideAngValues.Count, SideAngValues(nOldIndex).dValue))
|
||||
End If
|
||||
' punto aggiunto: Verifico che il punto successivo coincida con il vecchio corrente o che sia stato aggiunto in fondo
|
||||
' punto aggiunto: Verifico che il punto successivo coincida con il vecchio corrente o che sia stato aggiunto in fondo
|
||||
ElseIf (nNewIndex + 1 <= NewAngleList.Count - 1 AndAlso AreSamePointApprox(NewAngleList(nNewIndex + 1), OldAngleList(nOldIndex))) OrElse
|
||||
(nOldIndex = OldAngleList.Count AndAlso OldAngleList.Count < NewAngleList.Count) Then
|
||||
' se non e' percorso aperto e primo punto
|
||||
@@ -853,7 +856,7 @@ Public Class FreeContourManagerVM
|
||||
' aggiungo punto e incremento indice di confronto per riallineare successivo
|
||||
NewSideAngValues.Insert(TextIndex, New SideAngle(TextId, TextIndex, 0))
|
||||
nOldIndex -= 1
|
||||
' punto tolto: verifico che il punto coincida con il vecchio successivo o che sia stato tolto in fondo
|
||||
' punto tolto: verifico che il punto coincida con il vecchio successivo o che sia stato tolto in fondo
|
||||
ElseIf (nOldIndex + 1 <= OldAngleList.Count - 1 AndAlso AreSamePointApprox(NewAngleList(nNewIndex), OldAngleList(nOldIndex + 1))) OrElse
|
||||
(nNewIndex = NewAngleList.Count AndAlso OldAngleList.Count > NewAngleList.Count) Then
|
||||
' non aggiungo nulla, ma cancello testo
|
||||
@@ -866,7 +869,7 @@ Public Class FreeContourManagerVM
|
||||
EgtAtParamPoint(m_nNewPathId, If(Index = 0, NewAngleList.Count, Index) - 0.5, ptNew)
|
||||
Dim vtDistance As Vector3d = ptNew - ptOld
|
||||
EgtMove(SideAngValues(If(Index = 0, OldAngleList.Count, Index) - 1).nId, vtDistance)
|
||||
' spostato o ruotato intero percorso
|
||||
' spostato o ruotato intero percorso
|
||||
Else
|
||||
' aggiorno posizione testo successivo
|
||||
Dim ptOld As Point3d
|
||||
@@ -897,7 +900,8 @@ Public Class FreeContourManagerVM
|
||||
Dim dAng As Double
|
||||
StringToDouble(Map.refFreeContourInputVM.Text, dAng)
|
||||
EgtSetInfo(m_nSelTextId, "SideAng", dAng)
|
||||
EgtModifyText(m_nSelTextId, dAng & "°")
|
||||
Dim sAng As String = DoubleToString( dAng, 2) & "°"
|
||||
EgtModifyText(m_nSelTextId, sAng)
|
||||
Dim SideAngValue As SideAngle = SideAngValues.First(Function(x) x.nId = m_nSelTextId)
|
||||
SideAngValue.dValue = dAng
|
||||
End If
|
||||
@@ -944,8 +948,9 @@ Public Class FreeContourManagerVM
|
||||
Map.refFreeContourInputVM.PrepareInputBox(EgtMsg(62007), EgtMsg(62008), "", False, False)
|
||||
Dim dSideAng As Double = 0
|
||||
EgtGetInfo(nId, "SideAng", dSideAng)
|
||||
Map.refFreeContourInputVM.SetInputBoxText(dSideAng)
|
||||
' se sto aprendo percorso chiuso
|
||||
Dim sSideAng As String = DoubleToString( dSideAng, 2)
|
||||
Map.refFreeContourInputVM.SetInputBoxText(sSideAng)
|
||||
' se sto aprendo percorso chiuso
|
||||
ElseIf Map.refFreeContourManagerVM.bIsOpeningCurveCompo Then
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.OPENCOMPO)
|
||||
m_bIsOpeningCurveCompo = False
|
||||
@@ -982,13 +987,21 @@ Public Class FreeContourManagerVM
|
||||
''' Execute the Line2P. This method is invoked by the Line2PCommand.
|
||||
''' </summary>
|
||||
Public Sub Line2P(ByVal param As Object)
|
||||
Dim nNewPathLayerId As Integer = EgtCreateGroup(nSelPartId)
|
||||
' cancello eventuale gruppo precedente
|
||||
Dim nNewPathLayerId As Integer = EgtGetFirstNameInGroup(nSelPartId, "NewPathLayer")
|
||||
If nNewPathLayerId <> GDB_ID.NULL Then
|
||||
EgtEmptyGroup(nNewPathLayerId)
|
||||
Else
|
||||
nNewPathLayerId = EgtCreateGroup(nSelPartId)
|
||||
End If
|
||||
EgtSetName(nNewPathLayerId, "NewPathLayer")
|
||||
EgtSetCurrPartLayer(nSelPartId, nNewPathLayerId)
|
||||
InitCommand(True)
|
||||
InitCommand(False)
|
||||
Map.refSceneHostVM.MainController.SetContinue()
|
||||
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.LINE2P) Then
|
||||
m_bIsCreatingPath = True
|
||||
Else
|
||||
EgtErase(nNewPathLayerId)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -213,49 +213,17 @@ Public Class MyInstrumentPanelVM
|
||||
For Each Param In ParamList.Where(Function(x) x.sName = ChangeParameterWndVM.SelParam.sName)
|
||||
Select Case Param.nType
|
||||
Case BTLParamType.DOUBLE_, BTLParamType.LENGTH
|
||||
If Param.dValue = ChangeParameterWndVM.SelParam.dActualValue Then
|
||||
If Math.Abs( Param.dValue - ChangeParameterWndVM.SelParam.dActualValue) < EPS_SMALL Then
|
||||
Param.UpdateParamValue(ChangeParameterWndVM.SelParam.dNewValue, "")
|
||||
'' rinfresco valori parametri feature correntemente selezionata
|
||||
'If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso
|
||||
' Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) AndAlso
|
||||
' Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM Is Feature Then
|
||||
' Param.NotifyPropertyChanged("sValue")
|
||||
'End If
|
||||
End If
|
||||
Case BTLParamType.STRING_
|
||||
If Param.sValue = ChangeParameterWndVM.SelParam.sActualValue Then
|
||||
Param.UpdateParamValue(0, ChangeParameterWndVM.SelParam.sNewValue)
|
||||
'' rinfresco valori parametri feature correntemente selezionata
|
||||
'If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso
|
||||
' Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) AndAlso
|
||||
' Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.nPRC = ChangeParameterWndVM.SelPRC.nPRC AndAlso
|
||||
' Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.nSelGRP = ChangeParameterWndVM.SelPRC.nGRP Then
|
||||
' Param.NotifyPropertyChanged("sValue")
|
||||
'End If
|
||||
End If
|
||||
End Select
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
'' faccio passare feature
|
||||
'For Each Feature In Part.FeatureList
|
||||
' If Feature.nPRC = ChangeParameterWndVM.SelPRC.nPRC Then
|
||||
' For Each Param In Feature.PParamList
|
||||
' If Param.sName = ChangeParameterWndVM.SelParam.sName Then
|
||||
' Select Case Param.nType
|
||||
' Case BTLParamType.DOUBLE_, BTLParamType.LENGTH
|
||||
' If Param.dValue = ChangeParameterWndVM.SelParam.dActualValue Then
|
||||
' Param.dValue = ChangeParameterWndVM.SelParam.dValue
|
||||
' End If
|
||||
' Case BTLParamType.STRING_
|
||||
' If Param.sValue = ChangeParameterWndVM.SelParam.sActualValue Then
|
||||
' Param.sValue = ChangeParameterWndVM.SelParam.sValue
|
||||
' End If
|
||||
' End Select
|
||||
' End If
|
||||
' Next
|
||||
' End If
|
||||
'Next
|
||||
Next
|
||||
End If
|
||||
LoadingWndHelper.CloseLoadingWnd(ActiveIds.CHANGEPARAM)
|
||||
|
||||
@@ -131,6 +131,18 @@
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--PosZ - Posizione in Z-->
|
||||
<DataGridTextColumn x:Key="colPOSZ" Binding="{Binding sPosZ}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.PosZ_Msg,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="Blue" />
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--MAT - Materiale-->
|
||||
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}">
|
||||
<DataGridTextColumn.Header>
|
||||
|
||||
@@ -69,6 +69,12 @@ Public Class RawPartListVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property PosZ_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61728)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Material_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61607)
|
||||
|
||||
@@ -90,9 +90,9 @@
|
||||
Style="{StaticResource LeftPanel_Button}">
|
||||
<Image Source="/Resources/LeftPanel/NewRawPart.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding NewRawPartAuto_Command}"
|
||||
<Button Command="{Binding NewRawPartLast_Command}"
|
||||
Visibility="{Binding MachiningPage_Visibility}"
|
||||
ToolTip="{Binding NewRawPartAuto_ToolTip}"
|
||||
ToolTip="{Binding NewRawPartLast_ToolTip}"
|
||||
IsEnabled="{Binding LeftPanel_IsEnabled}"
|
||||
Style="{StaticResource LeftPanel_Button}">
|
||||
<Image Source="/Resources/LeftPanel/NewRawPartAuto.png" Stretch="Uniform"/>
|
||||
|
||||
@@ -100,7 +100,7 @@ Public Class LeftPanelVM
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdNewRawPart As ICommand
|
||||
Private m_cmdNewRawPartAuto As ICommand
|
||||
Private m_cmdNewRawPartLast As ICommand
|
||||
Private m_cmdAddToRawPart As ICommand
|
||||
Private m_cmdCopyPart As ICommand
|
||||
Private m_cmdAddPart As ICommand
|
||||
@@ -156,7 +156,7 @@ Public Class LeftPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property NewRawPartAuto_ToolTip As String
|
||||
Public ReadOnly Property NewRawPartLast_ToolTip As String
|
||||
Get
|
||||
Return EgtMsg(61977)
|
||||
End Get
|
||||
@@ -265,7 +265,7 @@ Public Class LeftPanelVM
|
||||
Public ReadOnly Property NewRawPart_Command As ICommand
|
||||
Get
|
||||
If m_cmdNewRawPart Is Nothing Then
|
||||
m_cmdNewRawPart = New Command(AddressOf NewRawPart)
|
||||
m_cmdNewRawPart = New Command(AddressOf NewRawPartCmd)
|
||||
End If
|
||||
Return m_cmdNewRawPart
|
||||
End Get
|
||||
@@ -274,7 +274,11 @@ Public Class LeftPanelVM
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub NewRawPart()
|
||||
Public Sub NewRawPartCmd()
|
||||
NewRawPart(False)
|
||||
End Sub
|
||||
|
||||
Public Sub NewRawPart(bLast As Boolean)
|
||||
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
|
||||
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLPart
|
||||
Dim SelParts As List(Of BTLPartVM) = Map.refProjectVM.BTLStructureVM.SelBTLParts.ToList()
|
||||
@@ -348,56 +352,50 @@ Public Class LeftPanelVM
|
||||
Case WarehouseType.MEDIUM
|
||||
Dim SectionList As List(Of SParam) = WarehouseHelper.GetSectionList()
|
||||
Dim SParamlist As List(Of SParam) = SectionList.FindAll(Function(x) x.SectXMat = SelParts(0).Section)
|
||||
If SParamlist.Count = 0 Then
|
||||
' apro finestra con solo edit
|
||||
If AddRawPartWnd(AddRawPartWndVM.EditTypes.ONLY_TEXT, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then
|
||||
WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset)
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
WarehouseHelper.SetStartOffset(dStartOffset)
|
||||
Else
|
||||
WarehouseHelper.SetKerf(dKerf)
|
||||
End If
|
||||
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
|
||||
dRawL = SParamlist(0).dL
|
||||
dRawW = SParamlist(0).dW
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(61975), EgtMsg(30007))
|
||||
Return
|
||||
End If
|
||||
ElseIf SParamlist.Count > 0 Then
|
||||
'' se premuto shift
|
||||
'If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||
' imposto finestra con anche edit
|
||||
If AddRawPartWnd(AddRawPartWndVM.EditTypes.TEXT_AND_COMBO, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then
|
||||
WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset)
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
WarehouseHelper.SetStartOffset(dStartOffset)
|
||||
Else
|
||||
WarehouseHelper.SetKerf(dKerf)
|
||||
Else
|
||||
If SParamlist.Count = 0 Then
|
||||
' se pareti aumento dimensioni del kerf
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL Then
|
||||
dRawW += (2 * dKerf)
|
||||
dRawL += (2 * dKerf)
|
||||
End If
|
||||
' apro finestra con solo edit
|
||||
If AddRawPartWnd(AddRawPartWndVM.EditTypes.ONLY_TEXT, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then
|
||||
WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset)
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
WarehouseHelper.SetStartOffset(dStartOffset)
|
||||
Else
|
||||
WarehouseHelper.SetKerf(dKerf)
|
||||
End If
|
||||
Else
|
||||
Return
|
||||
End If
|
||||
ElseIf SParamlist.Count > 0 Then
|
||||
' imposto finestra con anche edit
|
||||
If AddRawPartWnd(AddRawPartWndVM.EditTypes.TEXT_AND_COMBO, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then
|
||||
WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset)
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
WarehouseHelper.SetStartOffset(dStartOffset)
|
||||
Else
|
||||
WarehouseHelper.SetKerf(dKerf)
|
||||
End If
|
||||
Else
|
||||
Return
|
||||
End If
|
||||
Else
|
||||
Return
|
||||
End If
|
||||
'Else
|
||||
' ' creo grezzo con l'unico materiale
|
||||
' dRawL = SParamlist(0).dL
|
||||
' dRawW = SParamlist(0).dW
|
||||
End If
|
||||
'Else
|
||||
' ' imposto finestra di sola scelta dimensione
|
||||
' Dim EditType As AddRawPartWndVM.EditTypes = AddRawPartWndVM.EditTypes.ONLY_COMBO
|
||||
' ' se premuto shift
|
||||
' If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||
' ' imposto finestra con anche edit
|
||||
' EditType = AddRawPartWndVM.EditTypes.TEXT_AND_COMBO
|
||||
' End If
|
||||
' If AddRawPartWnd(EditType, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then
|
||||
' WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset)
|
||||
' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
' WarehouseHelper.SetStartOffset(dStartOffset)
|
||||
' Else
|
||||
' WarehouseHelper.SetKerf(dKerf)
|
||||
' End If
|
||||
' Else
|
||||
' Return
|
||||
' End If
|
||||
'End If
|
||||
End Select
|
||||
End If
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||
@@ -419,23 +417,23 @@ Public Class LeftPanelVM
|
||||
Dim nCurrMachGroup As Integer = EgtGetCurrMachGroup()
|
||||
Dim sCurrMachGroupName As String = ""
|
||||
EgtGetMachGroupName(nCurrMachGroup, sCurrMachGroupName)
|
||||
' ordino i pezzi per lunghezza
|
||||
SelParts = SelParts.OrderBy(Function(x) x.dL).ToList
|
||||
' creo copie dei pezzi
|
||||
Dim nPartDuploIdList As New List(Of Integer)
|
||||
For Each Part In SelParts
|
||||
Dim nDuploId As Integer = EgtDuploNew(Part.nPartId)
|
||||
' elimino valori calcolo dell'originale
|
||||
MyMachGroupPanelVM.DuploRemoveProjCalc(nDuploId)
|
||||
' lo rendo std
|
||||
EgtSetMode(nDuploId, GDB_MD.STD)
|
||||
nPartDuploIdList.Add(nDuploId)
|
||||
Next
|
||||
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
|
||||
' scrivo dati per variabili P di comunicazione con la macchina in gruppo di lavorazione
|
||||
EgtSetInfo(nCurrMachGroup, MGR_RPT_PRODID, Map.refProdManagerVM.CurrProd.nProdId)
|
||||
EgtSetInfo(nCurrMachGroup, MGR_RPT_PATTID, nCurrMachGroup)
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||
' ordino i pezzi per lunghezza
|
||||
SelParts = SelParts.OrderBy(Function(x) x.dL).ToList
|
||||
' creo copie dei pezzi
|
||||
Dim nPartDuploIdList As New List(Of Integer)
|
||||
For Each Part In SelParts
|
||||
Dim nDuploId As Integer = EgtDuploNew(Part.nPartId)
|
||||
' elimino valori calcolo dell'originale
|
||||
MyMachGroupPanelVM.DuploRemoveProjCalc(nDuploId)
|
||||
' lo rendo std
|
||||
EgtSetMode(nDuploId, GDB_MD.STD)
|
||||
nPartDuploIdList.Add(nDuploId)
|
||||
Next
|
||||
' scrivo dati costruzione grezzo in gruppo di lavorazione
|
||||
EgtSetInfo(nCurrMachGroup, MGR_RPT_BARLEN, dRawL)
|
||||
EgtSetInfo(nCurrMachGroup, MGR_RPT_MATERIAL, SelPart.sMATERIAL)
|
||||
@@ -553,9 +551,89 @@ Public Class LeftPanelVM
|
||||
dKerf = AddRawPartWndVM.VariableList(2).dValue
|
||||
dOffset = AddRawPartWndVM.VariableList(3).dValue
|
||||
End Select
|
||||
' verifico se il materiale esiste in magazzino o devo aggiungerlo
|
||||
Dim CurrSParam As SParam = Nothing
|
||||
Select Case EditType
|
||||
Case AddRawPartWndVM.EditTypes.ONLY_TEXT
|
||||
' lo aggiungo a lista materiali in magazzino
|
||||
CurrSParam = AddRawMaterial(dRawW, dRawL)
|
||||
Case AddRawPartWndVM.EditTypes.ONLY_COMBO
|
||||
' non faccio nulla
|
||||
Case AddRawPartWndVM.EditTypes.TEXT_AND_COMBO
|
||||
' verifico se lunghezza testo corrisponde a materiale
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
CurrSParam = SParamlist.FirstOrDefault(Function(x) x.dL = AddRawPartWndVM.VariableList(0).dValue)
|
||||
Else
|
||||
CurrSParam = SParamlist.FirstOrDefault(Function(x) x.dL = AddRawPartWndVM.VariableList(1).dValue AndAlso x.dW = AddRawPartWndVM.VariableList(0).dValue)
|
||||
End If
|
||||
If IsNothing(CurrSParam) Then
|
||||
' lo aggiungo a lista materiali in magazzino
|
||||
CurrSParam = AddRawMaterial(dRawW, dRawL)
|
||||
End If
|
||||
End Select
|
||||
' imposto il materiale selezionato come ultimo utilizzato
|
||||
SetLastMaterial(CurrSParam.SectXMat, CurrSParam)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function AddRawMaterial(dRawW As Double, ByRef dRawL As Double) As SParam
|
||||
Dim sWarehousePath As String = Map.refMainWindowVM.MainWindowM.sWarehouseDir & "\" & WH_MEDIUM_INI_FILE_NAME
|
||||
Dim nQuantity As Integer = GetMainPrivateProfileInt(S_WAREHOUSE, K_DEFAULTQUANTITY, 1)
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||
' creo sParam
|
||||
Dim CurrSParam As New SParam(Map.refProjectVM.BTLStructureVM.SelBTLPart.Section, dRawL, nQuantity, False)
|
||||
Dim sL As String = String.Empty
|
||||
sL = LenToString(CurrSParam.dL, 3)
|
||||
' ricavo l'indice del SecionXMaterial dalla Beam_List
|
||||
Dim SectXMatIndex As Integer = GetSectIndexFromSection(MachineType.BEAM, CurrSParam.SectXMat)
|
||||
' ricavo nuovo indice materiale
|
||||
Dim ParamIndex As Integer = 1
|
||||
Dim sParam As String = ""
|
||||
While GetPrivateProfileString(S_BEAM, K_L & ParamIndex, "", sParam, sWarehousePath) > 0
|
||||
ParamIndex += 1
|
||||
End While
|
||||
If SectXMatIndex > 0 Then
|
||||
' lo aggiungo in warehouse
|
||||
WritePrivateProfileString(S_BEAM, K_L & ParamIndex,
|
||||
SectXMatIndex & "," & sL & "," & CurrSParam.nQuantity & "," & If(CurrSParam.bActive, 1, 0),
|
||||
sWarehousePath)
|
||||
Else
|
||||
EgtOutLog("Error in material creation, section not found!")
|
||||
End If
|
||||
Return CurrSParam
|
||||
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
|
||||
' creo sParam
|
||||
Dim CurrSParam As New SParam(Map.refProjectVM.BTLStructureVM.SelBTLPart.Section, dRawW, dRawL, nQuantity, False)
|
||||
Dim sW As String = String.Empty
|
||||
Dim sL As String = String.Empty
|
||||
sW = LenToString(CurrSParam.dW, 3)
|
||||
sL = LenToString(CurrSParam.dL, 3)
|
||||
' ricavo l'indice del SecionXMaterial dalla Wall_List
|
||||
Dim SectXMatIndex As Integer = 1
|
||||
Dim sSxMValue As String = ""
|
||||
While EgtUILib.GetPrivateProfileString(S_WALL_LIST, SectXMatIndex, String.Empty, sSxMValue, sWarehousePath)
|
||||
If sSxMValue = CurrSParam.sValue Then
|
||||
' se l'ho trovato esco dal while, il SectXMatIndex è l'indice che cercavamo
|
||||
Exit While
|
||||
End If
|
||||
SectXMatIndex += 1
|
||||
End While
|
||||
' ricavo nuovo indice materiale
|
||||
Dim ParamIndex As Integer = 1
|
||||
Dim sParam As String = ""
|
||||
While GetPrivateProfileString(S_WALL, K_S & ParamIndex, "", sParam, sWarehousePath) > 0
|
||||
ParamIndex += 1
|
||||
End While
|
||||
' lo aggiungo in warehouse
|
||||
WritePrivateProfileString(S_WALL, K_S & ParamIndex,
|
||||
SectXMatIndex & "," & sW & "," & sL & "," & CurrSParam.nQuantity & "," & If(CurrSParam.bActive, 1, 0),
|
||||
sWarehousePath)
|
||||
Return CurrSParam
|
||||
End If
|
||||
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Private Function VerifyPartCount(SelParts As List(Of BTLPartVM)) As Boolean
|
||||
' verifico se ci sono pezzi da aggiungere
|
||||
Dim ToAddList As New List(Of String)
|
||||
@@ -585,289 +663,28 @@ Public Class LeftPanelVM
|
||||
|
||||
#End Region ' NewRawPart
|
||||
|
||||
#Region "NewRawPartAuto"
|
||||
#Region "NewRawPartLast"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property NewRawPartAuto_Command As ICommand
|
||||
Public ReadOnly Property NewRawPartLast_Command As ICommand
|
||||
Get
|
||||
If m_cmdNewRawPartAuto Is Nothing Then
|
||||
m_cmdNewRawPartAuto = New Command(AddressOf NewRawPartAuto)
|
||||
If m_cmdNewRawPartLast Is Nothing Then
|
||||
m_cmdNewRawPartLast = New Command(AddressOf NewRawPartLast)
|
||||
End If
|
||||
Return m_cmdNewRawPartAuto
|
||||
Return m_cmdNewRawPartLast
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub NewRawPartAuto()
|
||||
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
|
||||
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLPart
|
||||
Dim SelParts As List(Of BTLPartVM) = Map.refProjectVM.BTLStructureVM.SelBTLParts.ToList()
|
||||
If IsNothing(SelParts) OrElse SelParts.Count <= 0 Then Return
|
||||
' verifico che abbiano tutti la stessa sezione
|
||||
Dim dHSection As Double = SelParts(0).dH
|
||||
Dim dWSection As Double = SelParts(0).dW
|
||||
For PartIndex = 0 To SelParts.Count - 1
|
||||
Dim Part As BTLPartVM = SelParts(PartIndex)
|
||||
If Not IsNothing(Part) Then
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
If Part.dH <> dHSection OrElse Part.dW <> dWSection Then
|
||||
MessageBox.Show(EgtMsg(61970), EgtMsg(30007))
|
||||
Return
|
||||
End If
|
||||
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL Then
|
||||
If Part.dH <> dHSection Then
|
||||
MessageBox.Show(EgtMsg(61970), EgtMsg(30007))
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
SelParts.Remove(Part)
|
||||
End If
|
||||
Next
|
||||
' se pareti e piu' di uno selezionato, esco
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL And SelParts.Count > 1 Then
|
||||
MessageBox.Show(EgtMsg(61971), EgtMsg(30007))
|
||||
Return
|
||||
End If
|
||||
' se nessun grezzo, rendo tutti i pezzi visibili
|
||||
If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
|
||||
Map.refProjectVM.BTLStructureVM.ShowAll(False)
|
||||
End If
|
||||
' verifico se sono gia' stati messi tutti i pezzi richiesti
|
||||
If Not VerifyPartCount(SelParts) Then Return
|
||||
Dim dRawL As Double = SelParts(0).dL
|
||||
Dim dRawW As Double = SelParts(0).dW
|
||||
Dim dStartOffset As Double = 0
|
||||
Dim dKerf As Double = 0
|
||||
Dim dOffset As Double = WarehouseHelper.GetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
||||
' se tipo di definizione grezzo esplicito
|
||||
If WarehouseHelper.GetRawPartDef = 1 OrElse ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift AndAlso WarehouseHelper.GetWarehouseType = WarehouseType.BASIC) Then
|
||||
' chiedo lunghezza grezzo
|
||||
Dim sWarehouseIniPath As String = Map.refMainWindowVM.MainWindowM.sWarehouseDir & "\" & WH_BASIC_INI_FILE_NAME
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||
dStartOffset = WarehouseHelper.GetStartOffset()
|
||||
dRawL += dStartOffset
|
||||
Else
|
||||
dKerf = WarehouseHelper.GetKerf()
|
||||
dRawL += 2 * dKerf
|
||||
dRawW += 2 * dKerf
|
||||
End If
|
||||
Dim AddRawPartWndVM As New AddRawPartWndVM(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dRawL, dRawW, dStartOffset)
|
||||
Dim AddRawPartWnd As New AddRawPartWndV(Application.Current.MainWindow, AddRawPartWndVM)
|
||||
If Not AddRawPartWnd.ShowDialog() Then Return
|
||||
dRawL = AddRawPartWndVM.VariableList(0).dValue
|
||||
dRawW = AddRawPartWndVM.VariableList(1).dValue
|
||||
dStartOffset = AddRawPartWndVM.VariableList(1).dValue
|
||||
' se altrimenti definizione grezzo da warehouse
|
||||
Else
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
dStartOffset = WarehouseHelper.GetStartOffset()
|
||||
Else
|
||||
dKerf = WarehouseHelper.GetKerf()
|
||||
End If
|
||||
' se warehouse basic
|
||||
Select Case WarehouseHelper.GetWarehouseType()
|
||||
Case WarehouseType.BASIC
|
||||
WarehouseHelper.GetCurrentDimensions(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dRawW, dRawL)
|
||||
Case WarehouseType.MEDIUM
|
||||
Dim SectionList As List(Of SParam) = WarehouseHelper.GetSectionList()
|
||||
Dim SParamlist As List(Of SParam) = SectionList.FindAll(Function(x) x.SectXMat = SelParts(0).Section)
|
||||
'If SParamlist.Count = 0 Then
|
||||
' ' apro finestra con solo edit
|
||||
' If AddRawPartWnd(AddRawPartWndVM.EditTypes.ONLY_TEXT, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then
|
||||
' WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset)
|
||||
' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
' WarehouseHelper.SetStartOffset(dStartOffset)
|
||||
' Else
|
||||
' WarehouseHelper.SetKerf(dKerf)
|
||||
' End If
|
||||
' Else
|
||||
' Return
|
||||
' End If
|
||||
'ElseIf SParamlist.Count = 1 Then
|
||||
If SParamlist.Count > 0 Then
|
||||
'' se premuto shift
|
||||
'If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||
' ' imposto finestra con anche edit
|
||||
' If AddRawPartWnd(AddRawPartWndVM.EditTypes.TEXT_AND_COMBO, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then
|
||||
' WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset)
|
||||
' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
' WarehouseHelper.SetStartOffset(dStartOffset)
|
||||
' Else
|
||||
' WarehouseHelper.SetKerf(dKerf)
|
||||
' End If
|
||||
' Else
|
||||
' Return
|
||||
' End If
|
||||
'Else
|
||||
' creo grezzo con l'unico materiale
|
||||
dRawL = SParamlist(0).dL
|
||||
dRawW = SParamlist(0).dW
|
||||
'End If
|
||||
'Else
|
||||
' ' imposto finestra di sola scelta dimensione
|
||||
' Dim EditType As AddRawPartWndVM.EditTypes = AddRawPartWndVM.EditTypes.ONLY_COMBO
|
||||
' ' se premuto shift
|
||||
' If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||
' ' imposto finestra con anche edit
|
||||
' EditType = AddRawPartWndVM.EditTypes.TEXT_AND_COMBO
|
||||
' End If
|
||||
' If AddRawPartWnd(EditType, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then
|
||||
' WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset)
|
||||
' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
' WarehouseHelper.SetStartOffset(dStartOffset)
|
||||
' Else
|
||||
' WarehouseHelper.SetKerf(dKerf)
|
||||
' End If
|
||||
' Else
|
||||
' Return
|
||||
' End If
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(61975), EgtMsg(30007))
|
||||
Return
|
||||
End If
|
||||
End Select
|
||||
End If
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||
' verifico se lunghezza barra e' maggiore della lunghezza dei pezzi
|
||||
Dim dTotLen As Double = WarehouseHelper.GetStartOffset()
|
||||
For PartIndex = 0 To SelParts.Count - 1
|
||||
If PartIndex <> 0 Then
|
||||
dTotLen += WarehouseHelper.GetOffset(BWType.BEAM)
|
||||
End If
|
||||
dTotLen += SelParts(PartIndex).dL
|
||||
Next
|
||||
If dTotLen > dRawL Then
|
||||
MessageBox.Show(EgtMsg(61972), EgtMsg(30007))
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
' creo nuovo gruppo di lavorazione
|
||||
Map.refMachGroupPanelVM.AddMachGroup()
|
||||
Dim nCurrMachGroup As Integer = EgtGetCurrMachGroup()
|
||||
Dim sCurrMachGroupName As String = ""
|
||||
EgtGetMachGroupName(nCurrMachGroup, sCurrMachGroupName)
|
||||
' ordino i pezzi per lunghezza
|
||||
SelParts = SelParts.OrderBy(Function(x) x.dL).ToList
|
||||
' creo copie dei pezzi
|
||||
Dim nPartDuploIdList As New List(Of Integer)
|
||||
For Each Part In SelParts
|
||||
Dim nDuploId As Integer = EgtDuploNew(Part.nPartId)
|
||||
' elimino valori calcolo dell'originale
|
||||
MyMachGroupPanelVM.DuploRemoveProjCalc(nDuploId)
|
||||
' lo rendo std
|
||||
EgtSetMode(nDuploId, GDB_MD.STD)
|
||||
nPartDuploIdList.Add(nDuploId)
|
||||
Next
|
||||
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
|
||||
' scrivo dati per variabili P di comunicazione con la macchina in gruppo di lavorazione
|
||||
EgtSetInfo(nCurrMachGroup, MGR_RPT_PRODID, Map.refProdManagerVM.CurrProd.nProdId)
|
||||
EgtSetInfo(nCurrMachGroup, MGR_RPT_PATTID, nCurrMachGroup)
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||
' scrivo dati costruzione grezzo in gruppo di lavorazione
|
||||
EgtSetInfo(nCurrMachGroup, MGR_RPT_BARLEN, dRawL)
|
||||
EgtSetInfo(nCurrMachGroup, MGR_RPT_MATERIAL, SelPart.sMATERIAL)
|
||||
' scrivo dati di tutti i pezzi
|
||||
Dim dPosX As Double = WarehouseHelper.GetStartOffset()
|
||||
' ciclo sui pezzi
|
||||
For nIndex = 0 To nPartDuploIdList.Count - 1
|
||||
' se non è primo, aggiungo offset tra barre standard
|
||||
If nIndex <> 0 Then
|
||||
dPosX += WarehouseHelper.GetOffset(BWType.BEAM)
|
||||
End If
|
||||
EgtSetInfo(nCurrMachGroup, MGR_RPT_PART & nIndex + 1, nPartDuploIdList(nIndex) & "," & DoubleToString(dPosX, 3))
|
||||
' incremento posizione della sua lunghezza
|
||||
dPosX += SelParts(nIndex).dL
|
||||
Next
|
||||
Dim BeamMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.GetLastMachGroup()
|
||||
' eseguo script creazione grezzo
|
||||
Dim nERR As Integer = 0
|
||||
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
|
||||
' elimino duplo e gruppo di lavorazione
|
||||
For Each nDuploId In nPartDuploIdList
|
||||
EgtErase(nDuploId)
|
||||
Next
|
||||
BeamMachGroup.DeleteMachGroup()
|
||||
If File.Exists(sLogPath) Then
|
||||
Dim LogFile As String() = File.ReadAllLines(sLogPath)
|
||||
If LogFile.Count >= 2 AndAlso Not IsNothing(LogFile(1)) Then
|
||||
MessageBox.Show(LogFile(1), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(61973), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
' se nessun grezzo, rimetto tutti i pezzi invisibili
|
||||
If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
|
||||
Map.refProjectVM.BTLStructureVM.HideAll()
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
For nDuploIndex = 0 To SelParts.Count - 1
|
||||
EgtSetInfo(nPartDuploIdList(nDuploIndex), MGR_PRT_ROT, SelParts(nDuploIndex).nROTATED)
|
||||
EgtSetInfo(nPartDuploIdList(nDuploIndex), MGR_PRT_FLIP, SelParts(nDuploIndex).nINVERTED)
|
||||
Next
|
||||
' aggiorno contatore pezzi usati in Prod
|
||||
For Each SelPart In SelParts
|
||||
SelPart.RefreshPartInProd()
|
||||
Next
|
||||
'aggiorno lista pezzi
|
||||
BeamMachGroup.MyMachGroupM.RefreshPartList()
|
||||
BeamMachGroup.MyMachGroupM.RefreshGroupData()
|
||||
' aggiorno dati utilizzo barra
|
||||
BeamMachGroup.UpdateUsage()
|
||||
Core.ViewPanelVM.BWSetView(VT.ISO_SW, False)
|
||||
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
|
||||
Dim nPartDuploId As Integer = EgtDuploNew(SelPart.nPartId)
|
||||
' scrivo dati in gruppo di lavorazione
|
||||
Dim dPosX As Double = dKerf
|
||||
Dim dPosY As Double = dKerf
|
||||
EgtSetInfo(nCurrMachGroup, MGR_RPT_PANELLEN, dRawL)
|
||||
EgtSetInfo(nCurrMachGroup, MGR_RPT_PANELWIDTH, dRawW)
|
||||
EgtSetInfo(nCurrMachGroup, MGR_RPT_MATERIAL, SelPart.sMATERIAL)
|
||||
EgtSetInfo(nCurrMachGroup, MGR_RPT_PART & 1,
|
||||
nPartDuploId & "," & DoubleToString(dPosX, 3) & "," & DoubleToString(dPosY, 3) & ",0,0")
|
||||
Dim WallMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.MachGroupVMList(Map.refMachGroupPanelVM.MachGroupVMList.Count - 1)
|
||||
' eseguo script creazione grezzo
|
||||
If Not ExecWall(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False, False) Then
|
||||
' elimino duplo e gruppo di lavorazione
|
||||
EgtErase(nPartDuploId)
|
||||
WallMachGroup.DeleteMachGroup()
|
||||
If File.Exists(sLogPath) Then
|
||||
Dim LogFile As String() = File.ReadAllLines(sLogPath)
|
||||
If LogFile.Count >= 2 AndAlso Not IsNothing(LogFile(1)) Then
|
||||
MessageBox.Show(LogFile(1), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(61973), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
' se nessun grezzo, rimetto tutti i pezzi invisibili
|
||||
If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
|
||||
Map.refProjectVM.BTLStructureVM.HideAll(True)
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
' scrivo dati pezzo
|
||||
EgtSetInfo(nPartDuploId, MGR_PRT_POSX, dPosX)
|
||||
EgtSetInfo(nPartDuploId, MGR_PRT_POSY, dPosY)
|
||||
EgtSetInfo(nPartDuploId, MGR_PRT_ROT, SelPart.nROTATED)
|
||||
EgtSetInfo(nPartDuploId, MGR_PRT_FLIP, SelPart.nINVERTED)
|
||||
' aggiorno contatore pezzi usati in Prod
|
||||
SelPart.RefreshPartInProd()
|
||||
' aggiorno lista pezzi
|
||||
WallMachGroup.MyMachGroupM.RefreshPartList()
|
||||
WallMachGroup.MyMachGroupM.RefreshGroupData()
|
||||
' aggiorno dati ultilizzo barra
|
||||
WallMachGroup.UpdateUsage()
|
||||
Core.ViewPanelVM.BWSetView(VT.TOP, False)
|
||||
End If
|
||||
EgtZoom(ZM.ALL)
|
||||
Public Sub NewRawPartLast()
|
||||
NewRawPart(True)
|
||||
End Sub
|
||||
|
||||
#End Region ' NewRawPartAuto
|
||||
#End Region ' NewRawPartLast
|
||||
|
||||
#Region "AddToRawPart"
|
||||
|
||||
@@ -943,7 +760,7 @@ Public Class LeftPanelVM
|
||||
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
|
||||
Dim WallMachGroup As MyMachGroupVM = SelMachGroup
|
||||
' verifico spessore
|
||||
If SelPart.dH < WallMachGroup.dH - EPS_SMALL OrElse SelPart.dH > WallMachGroup.dH + EPS_SMALL Then
|
||||
If SelPart.Section <> WallMachGroup.Section Then
|
||||
MessageBox.Show(EgtMsg(61868), EgtMsg(30007))
|
||||
Return
|
||||
End If
|
||||
@@ -1029,6 +846,8 @@ Public Class LeftPanelVM
|
||||
dPosX += WarehouseHelper.GetOffset(BeamMachGroup.nType)
|
||||
' lo aggiungo in fondo
|
||||
EgtSetInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + nPartIndex + 1, nPartDuploIdList(nPartIndex) & "," & DoubleToString(dPosX, 3))
|
||||
' incremento posizione della sua lunghezza
|
||||
dPosX += PartsToAdd(nPartIndex).dL
|
||||
' conservo indice d'inserimento
|
||||
nInsertIndex = nIndex
|
||||
nPartIndex += 1
|
||||
@@ -1321,9 +1140,18 @@ Public Class LeftPanelVM
|
||||
''' </summary>
|
||||
Public Sub Invert()
|
||||
If IsNothing(Map.refProjManagerVM.CurrProj) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) Then Return
|
||||
' se modalita' assemblato
|
||||
Dim bShowBuilding As Boolean = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
If bShowBuilding AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
' devo smontarlo prima di ruotare le travi
|
||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
End If
|
||||
' inverto i pezzi selezionati
|
||||
For Each Part In Map.refProjectVM.BTLStructureVM.SelBTLParts
|
||||
Part.Invert()
|
||||
Next
|
||||
' se assemblato lo ripristino
|
||||
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False)
|
||||
End Sub
|
||||
|
||||
#End Region ' BackRotation
|
||||
|
||||
@@ -241,5 +241,4 @@ Public Class MyMachGroupPanelVM
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -104,14 +104,14 @@ Public Class MyMachGroupVM
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
Dim p3OrigOnTab As Point3d
|
||||
Select Case CurrentMachine.OrigCorner
|
||||
'Case MCH_CR.BL
|
||||
' p3OrigOnTab = New Point3d(0, 0, 0)
|
||||
Case MCH_CR.BL
|
||||
p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.BR
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX(), 0, 0)
|
||||
'Case MCH_CR.TL
|
||||
' p3OrigOnTab = New Point3d(0, b3Tab.DimY(), 0)
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.TL
|
||||
p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.TR
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX(), b3Tab.DimY(), 0)
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
End Select
|
||||
EgtMoveToCornerRawPart(nRawPartId, p3OrigOnTab, CurrentMachine.OrigCorner)
|
||||
' sposto tutti i pezzi di quanto si e' accorciato il grezzo
|
||||
@@ -175,14 +175,14 @@ Public Class MyMachGroupVM
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
Dim p3OrigOnTab As Point3d
|
||||
Select Case CurrentMachine.OrigCorner
|
||||
'Case MCH_CR.BL
|
||||
' p3OrigOnTab = New Point3d(0, 0, 0)
|
||||
'Case MCH_CR.BR
|
||||
' p3OrigOnTab = New Point3d(b3Tab.DimX(), 0, 0)
|
||||
Case MCH_CR.BL
|
||||
p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.BR
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.TL
|
||||
p3OrigOnTab = New Point3d(0, b3Tab.DimY(), 0)
|
||||
p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.TR
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX(), b3Tab.DimY(), 0)
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
End Select
|
||||
EgtMoveToCornerRawPart(nRawPartId, p3OrigOnTab, CurrentMachine.OrigCorner)
|
||||
' sposto tutti i pezzi di quanto si e' accorciato il grezzo
|
||||
@@ -250,13 +250,27 @@ Public Class MyMachGroupVM
|
||||
Dim dValue As Double
|
||||
If StringToLen(value, dValue) Then
|
||||
Dim dOldValue As Double = MyMachGroupM.dStartCut
|
||||
' verifico se con il nuovo StartCut tutti i pezzi stanno nella barra
|
||||
Dim dTotLength As Double = 0
|
||||
For PartIndex = 0 To m_PartVMList.Count - 1
|
||||
Dim Part As PartVM = m_PartVMList(PartIndex)
|
||||
If PartIndex = 0 Then
|
||||
dTotLength += Part.dL + dValue
|
||||
Else
|
||||
dTotLength += Part.dL + Part.dOffset
|
||||
End If
|
||||
Next
|
||||
If Me.dL < dTotLength Then
|
||||
NotifyPropertyChanged(NameOf(sStartCut))
|
||||
Return
|
||||
End If
|
||||
MyMachGroupM.dStartCut = dValue
|
||||
If Not ReDrawBeamMachgroup() Then
|
||||
' rispristino vecchio valore
|
||||
MyMachGroupM.dStartCut = dOldValue
|
||||
ReDrawBeamMachgroup()
|
||||
NotifyPropertyChanged(NameOf(sStartCut))
|
||||
End If
|
||||
MyMachGroupM.dStartCut = dValue
|
||||
EgtDraw()
|
||||
If PartVMList.Count > 0 Then
|
||||
Dim Beam As PartVM = PartVMList(0)
|
||||
@@ -278,6 +292,38 @@ Public Class MyMachGroupVM
|
||||
|
||||
#End Region ' Beam
|
||||
|
||||
#Region "Wall"
|
||||
|
||||
Public Property sPosZ As String
|
||||
Get
|
||||
Return LenToString(MyMachGroupM.dPosZ, 3)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dValue As Double
|
||||
If StringToLen(value, dValue) Then
|
||||
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
||||
If Math.Abs( dValue - MyMachGroupM.dPosZ) > EPS_SMALL Then
|
||||
Select Case nType
|
||||
Case BWType.BEAM
|
||||
' non utilizzato
|
||||
Case BWType.WALL
|
||||
' se operazione di spostamento in z ha successo
|
||||
If dValue >= 0 AndAlso EgtMoveRawPart( nRawPartId, New Vector3d(0, 0, dValue - MyMachGroupM.dPosZ)) Then
|
||||
EgtSetInfo(Id, MGR_RPT_PANELPOSZ, dValue)
|
||||
EgtDraw()
|
||||
MyMachGroupM.dPosZ = dValue
|
||||
Else
|
||||
NotifyPropertyChanged(NameOf(sPosZ))
|
||||
End If
|
||||
End Select
|
||||
ResetCalcTotalMachGroup()
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Wall
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTORS"
|
||||
@@ -480,9 +526,7 @@ Public Class MyMachGroupVM
|
||||
nRawId = EgtGetFirstRawPart()
|
||||
End While
|
||||
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
|
||||
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then Return False
|
||||
|
||||
Return True
|
||||
Return ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False)
|
||||
End Function
|
||||
|
||||
Friend Sub MoveBeam(Beam As PartVM, MoveDirection As MoveDirections)
|
||||
@@ -778,7 +822,7 @@ Public Class MyMachGroupVM
|
||||
#Region "DeleteMachGroup"
|
||||
|
||||
' 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
|
||||
' elimino tutte le copie
|
||||
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
||||
@@ -807,25 +851,28 @@ Public Class MyMachGroupVM
|
||||
' elimino MachGroup
|
||||
EgtRemoveMachGroup(Me.Id)
|
||||
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)
|
||||
' 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 = Nothing
|
||||
EgtDraw()
|
||||
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Index - 1)
|
||||
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
|
||||
' rimuovo dalla lista grezzi
|
||||
Map.refMachGroupPanelVM.MachGroupVMList.Remove(Me)
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ Public Class MainMenuVM
|
||||
Set(value As Boolean)
|
||||
If value Then
|
||||
If Not IsNothing(Map.refProjManagerVM.CurrProj) AndAlso Not IsNothing(Map.refProdManagerVM.CurrProd) AndAlso
|
||||
Map.refProjManagerVM.CurrProj.nProdId = Map.refProdManagerVM.CurrProd.nProdId Then
|
||||
Map.refProjManagerVM.CurrProj.nProdId = Map.refProdManagerVM.CurrProd.nProdId Then
|
||||
Map.refProjManagerVM.CurrProj.SetReloadProject(False)
|
||||
End If
|
||||
SelPage = Pages.VIEW
|
||||
@@ -53,7 +53,7 @@ Public Class MainMenuVM
|
||||
Set(value As Boolean)
|
||||
If value Then
|
||||
If Not IsNothing(Map.refProjManagerVM.CurrProj) AndAlso Not IsNothing(Map.refProdManagerVM.CurrProd) AndAlso
|
||||
Map.refProjManagerVM.CurrProj.nProdId = Map.refProdManagerVM.CurrProd.nProdId Then
|
||||
Map.refProjManagerVM.CurrProj.nProdId = Map.refProdManagerVM.CurrProd.nProdId Then
|
||||
Map.refProdManagerVM.CurrProd.SetReloadProject(False)
|
||||
End If
|
||||
SelPage = Pages.MACHINING
|
||||
@@ -244,7 +244,7 @@ Public Class MainMenuVM
|
||||
DimensionsIniFile.ReadGridDimensions(ConstDims.LEFTPANEL_VIEW, Map.refLeftPanelVM.GridDims)
|
||||
' apro progetto proj
|
||||
If Not IsNothing(Map.refProjManagerVM.CurrProj) Then
|
||||
If Map.refProjManagerVM.CurrProj.bReloadProject Then
|
||||
If Map.refProjManagerVM.CurrProj.bReloadProject OrElse Map.refConfigurationPageVM.QParametersModified Then
|
||||
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROJ, 2, EgtMsg(63005), 10, 100) ' Loading parts
|
||||
Map.refProjManagerVM.OpenProject(Map.refProjManagerVM.CurrProj)
|
||||
' aggiorno le colonne in base al tipo progetto
|
||||
@@ -257,6 +257,8 @@ Public Class MainMenuVM
|
||||
Map.refTopPanelVM.ManageQParamsRowVisibility(BWType.BEAM)
|
||||
Map.refPartInRawPartListVM.UpdateColumns(BWType.BEAM)
|
||||
End If
|
||||
' resetto modifica parametri Q default
|
||||
Map.refConfigurationPageVM.ResetQParametersModified()
|
||||
DbControllers.m_ProjController.LockByProjId(Map.refProjManagerVM.CurrProj.nProjId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
||||
Map.refProjManagerVM.NotifyPropertyChanged(NameOf(Map.refProjManagerVM.MruFileNames))
|
||||
Else
|
||||
@@ -329,7 +331,7 @@ Public Class MainMenuVM
|
||||
If Not IsNothing(Map.refProdManagerVM.CurrProd) AndAlso Not IsNothing(Map.refProdManagerVM.CurrProd.nProdId) AndAlso Map.refProdManagerVM.CurrProd.nProdId > 0 Then
|
||||
If File.Exists(Map.refProdManagerVM.CurrProd.sProdPath) Then
|
||||
' apro progetto
|
||||
If Map.refProdManagerVM.CurrProd.bReloadProject Then
|
||||
If Map.refProdManagerVM.CurrProd.bReloadProject OrElse Map.refConfigurationPageVM.QParametersModified Then
|
||||
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROD, 2, EgtMsg(63005), 10, 50) ' Loading parts
|
||||
Map.refProdManagerVM.TempCurrProd = Map.refProdManagerVM.CurrProd
|
||||
If Map.refSceneHostVM.MainController.OpenProject(Map.refProdManagerVM.CurrProd.sProdPath, False) Then
|
||||
@@ -337,6 +339,8 @@ Public Class MainMenuVM
|
||||
Map.refRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
||||
Map.refTopPanelVM.ManageQParamsRowVisibility(Map.refProjectVM.BTLStructureVM.nPROJTYPE <> BWType.BEAM)
|
||||
Map.refPartInRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
||||
' resetto modifica parametri Q default
|
||||
Map.refConfigurationPageVM.ResetQParametersModified()
|
||||
DbControllers.m_ProdController.LockByProdId(Map.refProdManagerVM.CurrProd.nProdId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
||||
Map.refProdManagerVM.NotifyPropertyChanged(NameOf(Map.refProdManagerVM.MruFileNames))
|
||||
End If
|
||||
@@ -372,6 +376,20 @@ Public Class MainMenuVM
|
||||
' aggiorno titolo
|
||||
Map.refMainWindowVM.UpdateTitle()
|
||||
DbControllers.m_ProdController.LockByProdId(Map.refProdManagerVM.CurrProd.nProdId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
||||
' controllo se devo lanciare verifica perche' importato
|
||||
Dim bGetVerifyResult As Boolean = False
|
||||
Dim bVerifyMach As Boolean = False
|
||||
Dim nBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
While nBTLInfoLayerId <> GDB_ID.NULL
|
||||
If EgtGetInfo(nBTLInfoLayerId, IMP_VERIFYMACHGROUP, bGetVerifyResult) AndAlso bGetVerifyResult Then
|
||||
If Not bVerifyMach Then bVerifyMach = True
|
||||
EgtSetInfo(nBTLInfoLayerId, IMP_VERIFYMACHGROUP, False)
|
||||
End If
|
||||
nBTLInfoLayerId = EgtGetNextName(nBTLInfoLayerId, BTLINFO)
|
||||
End While
|
||||
If bVerifyMach Then
|
||||
Map.refCALCPanelVM.VerifyAll()
|
||||
End If
|
||||
' seleziono prima barra
|
||||
Map.refProjectVM.MachGroupPanelVM.SelFirstMachGroup()
|
||||
Else
|
||||
|
||||
@@ -227,8 +227,8 @@ Public Class MainWindowM
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2411, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2411, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2503, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2503, 1, m_nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
|
||||
@@ -30,7 +30,7 @@ Imports System.Windows
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("EgtBEAMWALL.ViewerOptimizer")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2022 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2023 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
@@ -70,5 +70,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.5.3.2")>
|
||||
<Assembly: AssemblyFileVersion("2.5.3.2")>
|
||||
|
||||
@@ -499,7 +499,7 @@ Public Class NestingRunningWndVM
|
||||
If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
|
||||
Map.refProjectVM.BTLStructureVM.HideAll(True)
|
||||
End If
|
||||
Return
|
||||
Exit While
|
||||
End If
|
||||
|
||||
' passo al prossimo RawPart
|
||||
|
||||
@@ -535,7 +535,7 @@ Public Class ProjManagerVM
|
||||
' se vista singolo pezzo
|
||||
Else
|
||||
bShowSolid = Map.refShowBeamPanelVM.ShowSolid_IsChecked
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
End If
|
||||
' imposto ProjId di caricamento
|
||||
m_nLoadingProjId = CurrProj.nProjId
|
||||
@@ -551,7 +551,7 @@ Public Class ProjManagerVM
|
||||
End If
|
||||
' se assemblato lo ripristino
|
||||
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False)
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
' verifico se Reset Macchina modificato e nel caso aggiorno DB e CurrProj
|
||||
If Map.refCALCPanelVM.IsMachineModified() Then
|
||||
DbControllers.m_ProjController.UpdateMachine(Map.refProjManagerVM.CurrProj.nProjId, Map.refCALCPanelVM.SelectedMachine.Name)
|
||||
@@ -596,7 +596,7 @@ Public Class ProjManagerVM
|
||||
.DefaultExt = ".btl",
|
||||
.Filter = "BTL (*.btl)|*.btl" &
|
||||
"|BTLX (*.btlx)|*.btlx",
|
||||
.InitialDirectory = If( Directory.Exists( sDir), sDir, ""),
|
||||
.InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True}
|
||||
If BTLDlg.ShowDialog() Then
|
||||
@@ -831,7 +831,7 @@ Public Class ProjManagerVM
|
||||
' se vista singolo pezzo
|
||||
Else
|
||||
bShowSolid = Map.refShowBeamPanelVM.ShowSolid_IsChecked
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
' se pezzo selezionato lo segno e metto vista tutti
|
||||
nSelPartId = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId
|
||||
Map.refProjectVM.BTLStructureVM.ShowAll(False)
|
||||
@@ -845,7 +845,7 @@ Public Class ProjManagerVM
|
||||
.DefaultExt = ".btl",
|
||||
.Filter = "BTL (*.btl)|*.btl" &
|
||||
"|BTLX (*.btlx)|*.btlx",
|
||||
.InitialDirectory = If( Directory.Exists( sDir), sDir, ""),
|
||||
.InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True}
|
||||
If BTLDlg.ShowDialog() Then
|
||||
@@ -857,7 +857,7 @@ Public Class ProjManagerVM
|
||||
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId)
|
||||
If Not IsNothing(SelPart) Then
|
||||
SelPart.IsSelected = True
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
End If
|
||||
End If
|
||||
EgtZoom(ZM.ALL)
|
||||
@@ -974,7 +974,7 @@ Public Class ProjManagerVM
|
||||
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId)
|
||||
If Not IsNothing(SelPart) Then
|
||||
SelPart.IsSelected = True
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
End If
|
||||
End If
|
||||
EgtZoom(ZM.ALL)
|
||||
@@ -1089,7 +1089,7 @@ Public Class ProjManagerVM
|
||||
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId)
|
||||
If Not IsNothing(SelPart) Then
|
||||
SelPart.IsSelected = True
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
End If
|
||||
End If
|
||||
EgtZoom(ZM.ALL)
|
||||
@@ -1296,7 +1296,7 @@ Public Class ProjManagerVM
|
||||
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId)
|
||||
If Not IsNothing(SelPart) Then
|
||||
SelPart.IsSelected = True
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
End If
|
||||
End If
|
||||
EgtZoom(ZM.ALL)
|
||||
@@ -1444,7 +1444,7 @@ Public Class ProjManagerVM
|
||||
' apro finestra scelta file
|
||||
Dim ImportDlg As New Microsoft.Win32.OpenFileDialog() With {.DefaultExt = ".ngexp",
|
||||
.Filter = "ProjectExport (*.ngexp)|*.ngexp",
|
||||
.InitialDirectory = If( Directory.Exists( sDir), sDir, ""),
|
||||
.InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True}
|
||||
If ImportDlg.ShowDialog() <> True Then Return
|
||||
@@ -1621,9 +1621,19 @@ Public Class ProjManagerVM
|
||||
For Each MachGroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
||||
' aggiorno ProdId sui MachGroup
|
||||
EgtSetInfo(MachGroup.Id, MGR_RPT_PRODID, nProdId)
|
||||
' resetto tutti gli stati di CALC
|
||||
MachGroup.ResetCalcTotalMachGroup()
|
||||
If Map.refMainWindowVM.MainWindowM.nUserLevel < 5 OrElse GetMainPrivateProfileInt(S_MACH, K_EXPORTBWE, 0) <> 1 Then
|
||||
' resetto tutti gli stati di CALC
|
||||
MachGroup.ResetCalcTotalMachGroup()
|
||||
End If
|
||||
Next
|
||||
If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 AndAlso GetMainPrivateProfileInt(S_MACH, K_EXPORTBWE, 0) = 1 Then
|
||||
' riporto info di futuro aggiornamento machgroup
|
||||
nBTLInfoLayerId = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
While nBTLInfoLayerId <> GDB_ID.NULL
|
||||
EgtSetInfo(nBTLInfoLayerId, IMP_VERIFYMACHGROUP, True)
|
||||
nBTLInfoLayerId = EgtGetNextName(nBTLInfoLayerId, BTLINFO)
|
||||
End While
|
||||
End If
|
||||
' salvo il progetto PROD
|
||||
EgtSaveFile(sProjFromPath(0), NGE.CMPTEXT)
|
||||
' copio file progetto
|
||||
@@ -1639,6 +1649,14 @@ Public Class ProjManagerVM
|
||||
bOk = False
|
||||
End Try
|
||||
End If
|
||||
If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 AndAlso GetMainPrivateProfileInt(S_MACH, K_EXPORTBWE, 0) = 1 Then
|
||||
' copio tutti i bwe
|
||||
For Each CurrFile In Directory.GetFiles(sProjectimportDir)
|
||||
If Path.GetExtension(CurrFile) = ".bwe" OrElse Path.GetExtension(CurrFile) = ".html" Then
|
||||
File.Copy(CurrFile, sProdDir & "\" & Path.GetFileName(CurrFile))
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If bOk Then
|
||||
' aggiungo altri proj a prod
|
||||
For Each nProjId In NewProjIdList
|
||||
|
||||
@@ -261,7 +261,7 @@ Public Class ProjectVM
|
||||
If Not IsNothing(Map.refRawPartListVM.colRawPart_StartCut) Then
|
||||
Map.refRawPartListVM.colRawPart_StartCut.IsReadOnly = True
|
||||
End If
|
||||
If m_BTLStructureVM.nPROJTYPE <> BWType.BEAM AndAlso Not IsNothing(Map.refRawPartListVM.colRawPart_W) Then
|
||||
If Not IsNothing(Map.refRawPartListVM.colRawPart_W) Then
|
||||
Map.refRawPartListVM.colRawPart_W.IsReadOnly = True
|
||||
End If
|
||||
If Not IsNothing(Map.refRawPartListVM.colRawPart_L) Then
|
||||
@@ -308,7 +308,7 @@ Public Class ProjectVM
|
||||
If Not IsNothing(Map.refRawPartListVM.colRawPart_StartCut) Then
|
||||
Map.refRawPartListVM.colRawPart_StartCut.IsReadOnly = False
|
||||
End If
|
||||
If Not IsNothing(Map.refRawPartListVM.colRawPart_W) Then
|
||||
If m_BTLStructureVM.nPROJTYPE <> BWType.BEAM AndAlso Not IsNothing(Map.refRawPartListVM.colRawPart_W) Then
|
||||
Map.refRawPartListVM.colRawPart_W.IsReadOnly = False
|
||||
End If
|
||||
If Not IsNothing(Map.refRawPartListVM.colRawPart_L) Then
|
||||
|
||||
|
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: 1016 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: 468 B After Width: | Height: | Size: 645 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: 629 B |
|
Before Width: | Height: | Size: 478 B After Width: | Height: | Size: 584 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: 499 B |
|
Before Width: | Height: | Size: 427 B After Width: | Height: | Size: 492 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: 609 B |
@@ -285,8 +285,10 @@ Public Class MySceneHostVM
|
||||
Select Case Map.refMainMenuVM.SelPage
|
||||
Case Pages.VIEW
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
|
||||
If Map.refFreeContourManagerVM.bIsActive AndAlso Map.refFreeContourManagerVM.SelType = FreeContourManagerVM.FreeContourTypes.ONEWITHANGLES Then
|
||||
' passo testo selezionato
|
||||
If Map.refFreeContourManagerVM.bIsActive AndAlso
|
||||
( Map.refFreeContourManagerVM.SelType = FreeContourManagerVM.FreeContourTypes.ONEWITHANGLES Or
|
||||
Map.refFreeContourManagerVM.bIsOpeningCurveCompo) Then
|
||||
' passo entità selezionata
|
||||
Map.refFreeContourManagerVM.OnMouseSelectedObj(EgtGetFirstSelectedObj(), True)
|
||||
ElseIf Map.refShowBeamPanelVM.bShowAll Then
|
||||
View_Part_OnMouseDownScene(sender, e)
|
||||
|
||||
@@ -34,7 +34,7 @@ Public Class ShowBeamPanelVM
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bShowSolid = value
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then Map.refProjectVM.BTLStructureVM.ShowSolid()
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then Map.refProjectVM.BTLStructureVM.ShowSolid( GDB_ID.NULL, m_bShowSolid)
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetShowSolid(bValue As Boolean)
|
||||
@@ -164,6 +164,7 @@ Public Class ShowBeamPanelVM
|
||||
' se necessario tolgo solido dal precedentemente selezionato
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso m_bShowSolid Then
|
||||
Map.refShowBeamPanelVM.SetShowSolid(False)
|
||||
Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
End If
|
||||
' nascondo barra del pezzo
|
||||
Map.refProjectVM.BTLStructureVM.SetSelectionType(BTLStructureVM.SelectionTypes.NULL)
|
||||
|
||||
@@ -387,14 +387,14 @@ Public Class TopPanelVM
|
||||
|
||||
Public Sub RemoveRawPart(Optional bAll As Boolean = False)
|
||||
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
|
||||
' se premuto shift
|
||||
' se tutti
|
||||
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()
|
||||
CurrMachGroup.DeleteMachGroup(True)
|
||||
Next
|
||||
Else
|
||||
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
@@ -403,6 +403,7 @@ Public Class TopPanelVM
|
||||
If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
|
||||
SelMachGroup.DeleteMachGroup()
|
||||
End If
|
||||
EgtDraw()
|
||||
' se nessun grezzo, rimetto tutti i pezzi invisibili
|
||||
If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
|
||||
Map.refProjectVM.BTLStructureVM.HideAll(True)
|
||||
|
||||
@@ -39,6 +39,19 @@ Public Module CurrentMachine
|
||||
Return m_OrigCorner
|
||||
End Get
|
||||
End Property
|
||||
' Offset da origine tavola verso l'interno in X e Y
|
||||
Private m_dOrigOffsX As Double = 0
|
||||
Public ReadOnly Property OrigOffsX As Double
|
||||
Get
|
||||
Return m_dOrigOffsX
|
||||
End Get
|
||||
End Property
|
||||
Private m_dOrigOffsY As Double = 0
|
||||
Public ReadOnly Property OrigOffsY As Double
|
||||
Get
|
||||
Return m_dOrigOffsY
|
||||
End Get
|
||||
End Property
|
||||
' Posizione origine del grezzo per posizionamento pezzi
|
||||
Private m_NestingCorner As MCH_CR
|
||||
Public ReadOnly Property NestingCorner As MCH_CR
|
||||
@@ -267,9 +280,13 @@ Public Module CurrentMachine
|
||||
m_OrigCorner = MCH_CR.TR
|
||||
Case "BL"
|
||||
m_OrigCorner = MCH_CR.BL
|
||||
Case "BR"
|
||||
Case Else ' "BR"
|
||||
m_OrigCorner = MCH_CR.BR
|
||||
End Select
|
||||
m_dOrigOffsX = 0
|
||||
EgtLuaGetGlobNumVar("GWD.DELTA_X", m_dOrigOffsX)
|
||||
m_dOrigOffsY = 0
|
||||
EgtLuaGetGlobNumVar("GWD.DELTA_Y", m_dOrigOffsY)
|
||||
EgtLuaGetGlobStringVar("GWD.NESTING_CORNER", sTemp)
|
||||
Select Case sTemp
|
||||
Case "TL"
|
||||
@@ -278,15 +295,17 @@ Public Module CurrentMachine
|
||||
m_NestingCorner = MCH_CR.TR
|
||||
Case "BL"
|
||||
m_NestingCorner = MCH_CR.BL
|
||||
Case "BR"
|
||||
Case Else ' "BR"
|
||||
m_NestingCorner = MCH_CR.BR
|
||||
End Select
|
||||
EgtLuaGetGlobNumVar("GWD.MIN_HEIGHT", m_dMinRawH)
|
||||
EgtLuaGetGlobNumVar("GWD.MAX_HEIGHT", m_dMaxRawH)
|
||||
Else
|
||||
m_nViewDir = VT.ISO_SW
|
||||
m_OrigCorner = MCH_CR.BL
|
||||
m_NestingCorner = MCH_CR.BL
|
||||
m_OrigCorner = MCH_CR.BR
|
||||
m_dOrigOffsX = 0
|
||||
m_dOrigOffsY = 0
|
||||
m_NestingCorner = MCH_CR.BR
|
||||
m_dMinRawH = 5
|
||||
m_dMaxRawH = 500
|
||||
End If
|
||||
|
||||
@@ -99,8 +99,6 @@ Module LuaExec
|
||||
EgtLuaSetGlobStringVar("NEST.BASEDIR", sRoot)
|
||||
EgtLuaSetGlobStringVar("NEST.FILE", sFile)
|
||||
EgtLuaSetGlobStringVar("NEST.MACHINE", sMachine)
|
||||
'EgtLuaSetGlobNumVar("NEST.LEN", dLength)
|
||||
'EgtLuaSetGlobNumVar("NEST.WIDTH", dWidth)
|
||||
EgtLuaSetGlobNumVar("NEST.STARTOFFSET", dStartOffset)
|
||||
EgtLuaSetGlobNumVar("NEST.OFFSET", dOffset)
|
||||
EgtLuaSetGlobNumVar("NEST.KERF", dKerf)
|
||||
@@ -119,7 +117,6 @@ Module LuaExec
|
||||
End Select
|
||||
EgtLuaSetGlobNumVar("NEST.CORNER", nNestCorner)
|
||||
EgtLuaSetGlobStringVar("NEST.MATERIAL", PartList(0).sMATERIAL)
|
||||
'EgtLuaSetGlobNumVar("NEST.QTY", nQty)
|
||||
EgtLuaSetGlobNumVar("NEST.TIME", nNestTime)
|
||||
EgtLuaSetGlobNumVar("NEST.PRODID", Map.refProdManagerVM.CurrProd.nProdId)
|
||||
EgtLuaCreateGlobTable("PART")
|
||||
@@ -128,19 +125,19 @@ Module LuaExec
|
||||
Next
|
||||
EgtLuaCreateGlobTable("LEN")
|
||||
For SectionIndex = 0 To SectionList.Count - 1
|
||||
EgtLuaSetGlobNumVar("LEN." & SectionIndex + 1, SectionList(SectionIndex).dL)
|
||||
EgtLuaSetGlobNumVar("LEN." & (SectionIndex + 1).ToString(), SectionList(SectionIndex).dL)
|
||||
Next
|
||||
EgtLuaCreateGlobTable("WIDTH")
|
||||
For SectionIndex = 0 To SectionList.Count - 1
|
||||
EgtLuaSetGlobNumVar("WIDTH." & SectionIndex + 1, SectionList(SectionIndex).dW)
|
||||
EgtLuaSetGlobNumVar("WIDTH." & (SectionIndex + 1).ToString(), SectionList(SectionIndex).dW)
|
||||
Next
|
||||
EgtLuaCreateGlobTable("QTY")
|
||||
For SectionIndex = 0 To SectionList.Count - 1
|
||||
EgtLuaSetGlobNumVar("QTY." & SectionIndex + 1, SectionList(SectionIndex).nQuantity)
|
||||
EgtLuaSetGlobNumVar("QTY." & (SectionIndex + 1).ToString(), SectionList(SectionIndex).nQuantity)
|
||||
Next
|
||||
EgtLuaCreateGlobTable("MATERIAL")
|
||||
For SectionIndex = 0 To SectionList.Count - 1
|
||||
EgtLuaSetGlobStringVar("MATERIAL." & SectionIndex + 1, SectionList(SectionIndex).SectXMat.sSectionXMaterial)
|
||||
EgtLuaSetGlobStringVar("MATERIAL." & (SectionIndex + 1).ToString(), SectionList(SectionIndex).SectXMat.sSectionXMaterial)
|
||||
Next
|
||||
' Eseguo lo script
|
||||
Dim bOk As Boolean = False
|
||||
|
||||
@@ -250,4 +250,124 @@ Module WarehouseHelper
|
||||
SectXMat.dW >= 0
|
||||
End Function
|
||||
|
||||
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
|
||||
End If
|
||||
|
||||
Return Nothing
|
||||
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
|
||||
|
||||
Friend Function GetSectIndexFromSection(Type As BWType, Section As SectionXMaterial) As Integer
|
||||
Dim nIndex As Integer = 1
|
||||
Dim sSectionData As String = ""
|
||||
While GetPrivateProfileString(If(Type = BWType.BEAM, S_BEAM_LIST, S_WALL_LIST), nIndex, "", sSectionData, GetWarehouseIniPath()) > 0
|
||||
If String.IsNullOrWhiteSpace(sSectionData) Then Continue While
|
||||
Dim sSectionValues() As String = sSectionData.Split(","c)
|
||||
Select Case Type
|
||||
Case BWType.BEAM
|
||||
Dim dW As Double = 0
|
||||
Dim dH As Double = 0
|
||||
Dim sMaterial As String = sSectionValues(2)
|
||||
StringToLen(sSectionValues(0), dW)
|
||||
StringToLen(sSectionValues(1), dH)
|
||||
If Section.dW = dW AndAlso Section.dH = dH AndAlso Section.sMaterial(0) = sMaterial Then
|
||||
' se l'ho trovato esco dal while, il SectXMatIndex è l'indice che cercavamo
|
||||
Return nIndex
|
||||
End If
|
||||
Case BWType.WALL
|
||||
Dim dH As Double = 0
|
||||
Dim sMaterial As String = sSectionValues(1)
|
||||
StringToLen(sSectionValues(0), dH)
|
||||
If Section.dH = dH AndAlso Section.sMaterial(0) = sMaterial Then
|
||||
' se l'ho trovato esco dal while, il SectXMatIndex è l'indice che cercavamo
|
||||
Return nIndex
|
||||
End If
|
||||
End Select
|
||||
nIndex += 1
|
||||
End While
|
||||
Return -1
|
||||
End Function
|
||||
|
||||
End Module
|
||||
|
||||
@@ -518,7 +518,10 @@ Public Class WarehouseWndVM
|
||||
SParamList = New ObservableCollection(Of SParam)
|
||||
SectionXMaterialList = New ObservableCollection(Of SectionXMaterial)(GetSectionXMaterialsFromWarehouse())
|
||||
While EgtUILib.GetPrivateProfileString(S_BEAM, "L" & ParamIndex, String.Empty, sValue, sWarehousePath)
|
||||
SParamList.Add(GetSParamFromWarehouse(ParamIndex))
|
||||
Dim SParam = GetSParamFromWarehouse(ParamIndex)
|
||||
If Not IsNothing(SParam) Then
|
||||
SParamList.Add(SParam)
|
||||
End If
|
||||
ParamIndex += 1
|
||||
End While
|
||||
|
||||
@@ -679,21 +682,32 @@ Public Class WarehouseWndVM
|
||||
Dim sL As String = String.Empty
|
||||
sL = LenToString(SParamList(ParamIndex - 1).dL, 3)
|
||||
|
||||
' ricavo l'indice del SecionXMaterial dalla Beam_List
|
||||
Dim SectXMatIndex As Integer = 1
|
||||
Dim sSxMValue As String = ""
|
||||
While EgtUILib.GetPrivateProfileString(S_BEAM_LIST, SectXMatIndex, String.Empty, sSxMValue, sWarehousePath)
|
||||
If sSxMValue = SParamList(ParamIndex - 1).sValue Then
|
||||
' se l'ho trovato esco dal while, il SectXMatIndex è l'indice che cercavamo
|
||||
Exit While
|
||||
End If
|
||||
SectXMatIndex += 1
|
||||
End While
|
||||
|
||||
WritePrivateProfileString(S_BEAM, K_L & ParamIndex,
|
||||
' ricavo l'indice del SecionXMaterial dalla Beam_List
|
||||
Dim SectXMatIndex As Integer = GetSectIndexFromSection(MachineType.BEAM, SParamList(ParamIndex - 1).SectXMat)
|
||||
'Dim sSxMValue As String = ""
|
||||
'While EgtUILib.GetPrivateProfileString(S_BEAM_LIST, SectXMatIndex, String.Empty, sSxMValue, sWarehousePath)
|
||||
' 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 SParamList(ParamIndex - 1).SectXMat.dW = dW AndAlso SParamList(ParamIndex - 1).SectXMat.dH = dH AndAlso SParamList(ParamIndex - 1).SectXMat.sMaterial(0) = sMaterial Then
|
||||
' ' se l'ho trovato esco dal while, il SectXMatIndex è l'indice che cercavamo
|
||||
' Exit While
|
||||
' End If
|
||||
' SectXMatIndex += 1
|
||||
'End While
|
||||
If SectXMatIndex > 0 Then
|
||||
WritePrivateProfileString(S_BEAM, K_L & ParamIndex,
|
||||
SectXMatIndex & "," & sL & "," & SParamList(ParamIndex - 1).nQuantity & "," & If(SParamList(ParamIndex - 1).bActive, 1, 0),
|
||||
sWarehousePath)
|
||||
ParamIndex += 1
|
||||
ParamIndex += 1
|
||||
Else
|
||||
EgtOutLog("Error in material creation, section not found!")
|
||||
End If
|
||||
Next
|
||||
' Se ci sono parametri da rimuovere li rimuovo
|
||||
For Index = ParamIndex To ParamIndex + m_RemovedParamsCount
|
||||
@@ -735,20 +749,23 @@ Public Class WarehouseWndVM
|
||||
sL = LenToString(SParamList(ParamIndex - 1).dL, 3)
|
||||
|
||||
' ricavo l'indice del SecionXMaterial dalla Wall_List
|
||||
Dim SectXMatIndex As Integer = 1
|
||||
Dim sSxMValue As String = ""
|
||||
While EgtUILib.GetPrivateProfileString(S_WALL_LIST, SectXMatIndex, String.Empty, sSxMValue, sWarehousePath)
|
||||
If sSxMValue = SParamList(ParamIndex - 1).sValue Then
|
||||
' se l'ho trovato esco dal while, il SectXMatIndex è l'indice che cercavamo
|
||||
Exit While
|
||||
End If
|
||||
SectXMatIndex += 1
|
||||
End While
|
||||
|
||||
WritePrivateProfileString(S_WALL, K_S & ParamIndex,
|
||||
Dim SectXMatIndex As Integer = GetSectIndexFromSection(MachineType.WALL, SParamList(ParamIndex - 1).SectXMat)
|
||||
'Dim sSxMValue As String = ""
|
||||
'While EgtUILib.GetPrivateProfileString(S_WALL_LIST, SectXMatIndex, String.Empty, sSxMValue, sWarehousePath)
|
||||
' If sSxMValue = SParamList(ParamIndex - 1).sValue Then
|
||||
' ' se l'ho trovato esco dal while, il SectXMatIndex è l'indice che cercavamo
|
||||
' Exit While
|
||||
' End If
|
||||
' SectXMatIndex += 1
|
||||
'End While
|
||||
If SectXMatIndex > 0 Then
|
||||
WritePrivateProfileString(S_WALL, K_S & ParamIndex,
|
||||
SectXMatIndex & "," & sW & "," & sL & "," & SParamList(ParamIndex - 1).nQuantity & "," & If(SParamList(ParamIndex - 1).bActive, 1, 0),
|
||||
sWarehousePath)
|
||||
ParamIndex += 1
|
||||
ParamIndex += 1
|
||||
Else
|
||||
EgtOutLog("Error in material creation, section not found!")
|
||||
End If
|
||||
Next
|
||||
' Se ci sono parametri da rimuovere li rimuovo
|
||||
For Index = ParamIndex To ParamIndex + m_RemovedParamsCount
|
||||
@@ -1084,7 +1101,9 @@ Public Class WarehouseWndVM
|
||||
Dim dH As Double = 0
|
||||
StringToLen(sSectXMatValues(0), dW)
|
||||
StringToLen(sSectXMatValues(1), dH)
|
||||
SectXMatList.Add(New SectionXMaterial(dW, dH, 0, sSectXMatValues(2)))
|
||||
If Not SectXMatList.Any(Function(x) x.dW = dW AndAlso x.dH = dH AndAlso x.sMaterial(0) = sSectXMatValues(2)) Then
|
||||
SectXMatList.Add(New SectionXMaterial(dW, dH, 0, sSectXMatValues(2)))
|
||||
End If
|
||||
sSectXMatIndex += 1
|
||||
End While
|
||||
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
|
||||
@@ -1096,7 +1115,9 @@ Public Class WarehouseWndVM
|
||||
' creo parametro
|
||||
Dim dH As Double = 0
|
||||
StringToLen(sSectXMatValues(0), dH)
|
||||
SectXMatList.Add(New SectionXMaterial(0, dH, 0, sSectXMatValues(1)))
|
||||
If Not SectXMatList.Any(Function(x) x.dH = dH AndAlso x.sMaterial(0) = sSectXMatValues(1)) Then
|
||||
SectXMatList.Add(New SectionXMaterial(0, dH, 0, sSectXMatValues(1)))
|
||||
End If
|
||||
sSectXMatIndex += 1
|
||||
End While
|
||||
End If
|
||||
|
||||