Merge remote-tracking branch 'gitlab.seriate/Renzo' into develop
This commit is contained in:
@@ -802,14 +802,36 @@ Public Class BTLPartM
|
||||
NewBTLPart.ocREFSIDEFIXCLAMP)
|
||||
End If
|
||||
|
||||
Dim EnumIndex As Integer = 0
|
||||
EgtGetInfo(nPartId, BTL_PRT_PROCESSINGQUALITY, sValue)
|
||||
NewBTLPart.m_SelPROCESSINGQUALITY = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue, NewBTLPart.ocPROCESSINGQUALITY),
|
||||
NewBTLPart.ocPROCESSINGQUALITY)
|
||||
For ind = 1 To NewBTLPart.ocPROCESSINGQUALITY.Count
|
||||
Dim sEnumName = [Enum].GetName(GetType(ProcessingQuality), ind)
|
||||
If sEnumName.Equals(sValue) Then
|
||||
EnumIndex = ind
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
NewBTLPart.m_SelPROCESSINGQUALITY = EnumIndex - 1
|
||||
EgtGetInfo(nPartId, BTL_PRT_RECESS, sValue)
|
||||
NewBTLPart.m_SelRECESS = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue, NewBTLPart.ocRECESS), NewBTLPart.ocRECESS)
|
||||
EnumIndex = 0
|
||||
For ind = 1 To NewBTLPart.ocRECESS.Count
|
||||
Dim sEnumName = [Enum].GetName(GetType(Recess), ind)
|
||||
If sEnumName.Equals(sValue) Then
|
||||
EnumIndex = ind
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
NewBTLPart.m_SelRECESS = EnumIndex - 1
|
||||
EgtGetInfo(nPartId, BTL_PRT_STOREYTYPE, sValue)
|
||||
NewBTLPart.m_SelSTOREYTYPE = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue, NewBTLPart.ocSTOREYTYPE),
|
||||
NewBTLPart.ocSTOREYTYPE)
|
||||
EnumIndex = 0
|
||||
For ind = 1 To NewBTLPart.ocSTOREYTYPE.Count
|
||||
Dim sEnumName = [Enum].GetName(GetType(StoreyType), ind)
|
||||
If sEnumName.Equals(sValue) Then
|
||||
EnumIndex = ind
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
NewBTLPart.m_SelSTOREYTYPE = EnumIndex - 1
|
||||
EgtGetInfo(nPartId, BTL_PRT_ELEMENTNUM, NewBTLPart.m_sELEMENTNUM)
|
||||
EgtGetInfo(nPartId, BTL_PRT_LAYER, NewBTLPart.m_nLAYER)
|
||||
EgtGetInfo(nPartId, BTL_PRT_MODULENUM, NewBTLPart.m_sMODULENUM)
|
||||
|
||||
@@ -30,6 +30,8 @@ Public Module ConstGen
|
||||
MACHINING = 1
|
||||
SUPERVISOR = 2
|
||||
CONFIG = 3
|
||||
INPUTS = 4
|
||||
OUTPUTS = 5
|
||||
End Enum
|
||||
|
||||
' Abilitazioni licenza
|
||||
|
||||
@@ -11,4 +11,6 @@
|
||||
Public Const K_SETUP As String = "Setup"
|
||||
Public Const K_FLOW As String = "Flow"
|
||||
|
||||
Public Const TS3DATA_FILE As String = "Ts3Data.lua"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -235,6 +235,14 @@
|
||||
<Compile Include="CALCPanel\CALCPanelVM.vb" />
|
||||
<Compile Include="Comms\NUMFlexiumComm.vb" />
|
||||
<Compile Include="Comms\TPAComm.vb" />
|
||||
<Compile Include="OutputsPage\OutputsPageV.xaml.vb">
|
||||
<DependentUpon>OutputsPageV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OutputsPage\OutputsPageVM.vb" />
|
||||
<Compile Include="InputsPage\InputsPageV.xaml.vb">
|
||||
<DependentUpon>InputsPageV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="InputsPage\InputsPageVM.vb" />
|
||||
<Compile Include="ConfigurationPage\ConfigurationPageV.xaml.vb">
|
||||
<DependentUpon>ConfigurationPageV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -335,6 +343,14 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="OutputsPage\OutputsPageV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="InputsPage\InputsPageV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="ConfigurationPage\ConfigurationPageV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<DockPanel x:Class="InputsPageV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Supervisor"
|
||||
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core">
|
||||
|
||||
</DockPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class InputsPageV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,20 @@
|
||||
Public Class InputsPageVM
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
Sub New()
|
||||
'' imposto riferimento in Map
|
||||
'Map.SetRefInputsPageVM(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "Methods"
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
@@ -9,10 +9,16 @@
|
||||
<RadioButton Content="{Binding Supervisor_Msg}"
|
||||
IsChecked="{Binding Supervisor_IsChecked}"
|
||||
Style="{StaticResource MainMenu_ToggleButton}"/>
|
||||
<RadioButton Content="{Binding Inputs_Msg}"
|
||||
IsChecked="{Binding Inputs_IsChecked}"
|
||||
Style="{StaticResource MainMenu_ToggleButton}"/>
|
||||
<RadioButton Content="{Binding Outputs_Msg}"
|
||||
IsChecked="{Binding Outputs_IsChecked}"
|
||||
Style="{StaticResource MainMenu_ToggleButton}"/>
|
||||
<RadioButton Content="{Binding Configuration_Msg}"
|
||||
IsChecked="{Binding Config_IsChecked}"
|
||||
Style="{StaticResource MainMenu_ToggleButton}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
|
||||
@@ -35,6 +35,24 @@ Public Class MainMenuVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Inputs_IsChecked As Boolean
|
||||
Get
|
||||
Return m_SelPage = Pages.INPUTS
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value Then SelPage = Pages.INPUTS
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Outputs_IsChecked As Boolean
|
||||
Get
|
||||
Return m_SelPage = Pages.OUTPUTS
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value Then SelPage = Pages.OUTPUTS
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_SelPage As Integer = -1
|
||||
Public Property SelPage As Integer
|
||||
Get
|
||||
@@ -55,6 +73,10 @@ Public Class MainMenuVM
|
||||
bOk = ExitSUPERVISOR(bVerifyModification)
|
||||
Case Pages.CONFIG
|
||||
bOk = ExitCONFIG()
|
||||
Case Pages.INPUTS
|
||||
bOk = ExitINPUTS()
|
||||
Case Pages.OUTPUTS
|
||||
bOk = ExitOUTPUTS()
|
||||
End Select
|
||||
If bOk Then
|
||||
' Entro nel nuovo stato
|
||||
@@ -69,11 +91,17 @@ Public Class MainMenuVM
|
||||
'Map.refMachGroupPanelVM.SetMachGroupState(False)
|
||||
'Map.refCONFIGTabVM.InitCONFIGation()
|
||||
'Map.refTopCommandBarVM.IsEnabled = False
|
||||
Case Pages.INPUTS
|
||||
InitINPUTS()
|
||||
Case Pages.OUTPUTS
|
||||
InitOUTPUTS()
|
||||
End Select
|
||||
End If
|
||||
' aggiorno visualizzazione RadioButton
|
||||
NotifyPropertyChanged(NameOf(Supervisor_IsChecked))
|
||||
NotifyPropertyChanged(NameOf(Config_IsChecked))
|
||||
NotifyPropertyChanged(NameOf(Inputs_IsChecked))
|
||||
NotifyPropertyChanged(NameOf(Outputs_IsChecked))
|
||||
End Sub
|
||||
|
||||
#Region "Messages"
|
||||
@@ -95,6 +123,18 @@ Public Class MainMenuVM
|
||||
Return EgtMsg(61832)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Inputs_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61930)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Outputs_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61931)
|
||||
End Get
|
||||
End Property
|
||||
#End Region ' Messages
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
@@ -200,6 +240,24 @@ Public Class MainMenuVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function InitINPUTS() As Boolean
|
||||
Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage))
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function ExitINPUTS() As Boolean
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function InitOUTPUTS() As Boolean
|
||||
Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage))
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function ExitOUTPUTS() As Boolean
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -31,6 +31,12 @@
|
||||
<TabItem>
|
||||
<EgtBEAMWALL:ProjectV DataContext="{StaticResource ProjectVM}"/>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<EgtBEAMWALL:InputsPageV DataContext="{StaticResource InputsPageVM}"/>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<EgtBEAMWALL:OutputsPageV DataContext="{StaticResource OutputsPageVM}"/>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<EgtBEAMWALL:ConfigurationPageV DataContext="{StaticResource ConfigurationPageVM}"/>
|
||||
</TabItem>
|
||||
|
||||
@@ -27,7 +27,15 @@ Public Class MainWindowVM
|
||||
' proprietà che seleziona la giusta pagina del TabControl
|
||||
Public Property nSelTabPage As Integer
|
||||
Get
|
||||
Return If(IsNothing(Map.refMainMenuVM.SelPage) OrElse Map.refMainMenuVM.SelPage = -1 OrElse Map.refMainMenuVM.SelPage = Pages.SUPERVISOR, 0, 1)
|
||||
If IsNothing(Map.refMainMenuVM.SelPage) OrElse Map.refMainMenuVM.SelPage = -1 OrElse Map.refMainMenuVM.SelPage = Pages.SUPERVISOR Then
|
||||
Return 0 ' Supervisor
|
||||
ElseIf Map.refMainMenuVM.SelPage = Pages.INPUTS Then
|
||||
Return 1 ' Ingressi
|
||||
ElseIf Map.refMainMenuVM.SelPage = Pages.OUTPUTS Then
|
||||
Return 2 ' Uscite
|
||||
Else
|
||||
Return 3 ' Configurazione
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
End Set
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<DockPanel x:Class="OutputsPageV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Supervisor"
|
||||
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core">
|
||||
|
||||
</DockPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class OutputsPageV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,20 @@
|
||||
Public Class OutputsPageVM
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
Sub New()
|
||||
'' imposto riferimento in Map
|
||||
'Map.SetRefOutputsPageVM(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "Methods"
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
@@ -30,6 +30,8 @@
|
||||
<EgtBEAMWALL:MyStatusBarVM x:Key="StatusBarVM"/>
|
||||
<!--<EgtBEAMWALL:BottomPanelVM x:Key="BottomPanelVM"/>-->
|
||||
<EgtBEAMWALL:ConfigurationPageVM x:Key="ConfigurationPageVM"/>
|
||||
<EgtBEAMWALL:InputsPageVM x:Key="InputsPageVM"/>
|
||||
<EgtBEAMWALL:OutputsPageVM x:Key="OutputsPageVM"/>
|
||||
<EgtBEAMWALL:CALCPanelVM x:Key="CALCPanelVM"/>
|
||||
<!--<EgtBEAMWALL:TopPanelVM x:Key="TopPanelVM"/>
|
||||
<EgtBEAMWALL:RawPartListVM x:Key="RawPartListVM"/>
|
||||
|
||||
@@ -1618,10 +1618,88 @@ Public Class BTLPartVM
|
||||
' creo nuovo part
|
||||
Dim nNewPartId As Integer = EgtBeamCreatePart()
|
||||
If nNewPartId = GDB_ID.NULL Then Return Nothing
|
||||
' scrivo info proj
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_PROJ, Map.refProjManagerVM.CurrProj.nProjId)
|
||||
EgtBeamSetPartProdNbr(m_BTLStructureM.NewPDN())
|
||||
EgtBeamSetPartName(m_BTLPartM.sNAM)
|
||||
EgtBeamSetPartCount(m_BTLPartM.nCNT)
|
||||
EgtBeamSetPartBox(m_BTLPartM.dBtlL, m_BTLPartM.dBtlH, m_BTLPartM.dBtlW)
|
||||
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_DO, m_BTLPartM.bDO)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_CNT, m_BTLPartM.m_nCNT)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_ADDED, m_BTLPartM.m_nADDED)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_ASSEMBLYNUM, m_BTLPartM.m_sASSEMBLYNUM)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_ORDERNUM, m_BTLPartM.m_nORDERNUM)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_DESIGNATION, m_BTLPartM.m_sDESIGN)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_ANNOTATION, m_BTLPartM.m_sANNOT)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_STOREY, m_BTLPartM.m_sSTOREY)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_GROUP, m_BTLPartM.m_sGROUP)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_PACKAGE, m_BTLPartM.m_sPACKAGE)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_TIMBERGRADE, m_BTLPartM.m_sTIMBERGRADE)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_QUALITYGRADE, m_BTLPartM.m_sQUALITYGRADE)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_COLOUR, m_BTLPartM.m_colCOLOR.ToString())
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_PLANINGLENGTH, m_BTLPartM.m_dPLANINGLEN)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_STARTOFFSET, m_BTLPartM.m_dSTARTOFFSET)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_ENDOFFSET, m_BTLPartM.m_dENDOFFSET)
|
||||
Dim ind As Integer = 1
|
||||
For Each UIDItem In m_BTLPartM.m_ocUID
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_UID & ind, UIDItem)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_TRANSFORMATION & ind, LenToString(m_BTLPartM.refTransf.Orig.x, 3) & "," &
|
||||
LenToString(m_BTLPartM.refTransf.Orig.y, 3) & "," &
|
||||
LenToString(m_BTLPartM.refTransf.Orig.z, 3) & "," &
|
||||
DoubleToString(m_BTLPartM.refTransf.VersX.x, 6) & "," &
|
||||
DoubleToString(m_BTLPartM.refTransf.VersX.y, 6) & "," &
|
||||
DoubleToString(m_BTLPartM.refTransf.VersX.z, 6) & "," &
|
||||
DoubleToString(m_BTLPartM.refTransf.VersY.x, 6) & "," &
|
||||
DoubleToString(m_BTLPartM.refTransf.VersY.y, 6) & "," &
|
||||
DoubleToString(m_BTLPartM.refTransf.VersY.z, 6))
|
||||
Next
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_CAMBER, " SIDE: " & (m_BTLPartM.SelCAMBERSIDE + 1) &
|
||||
" P01: " & LenToString(m_BTLPartM.m_dCamberLen1, 3) &
|
||||
" P02: " & LenToString(m_BTLPartM.m_dCamberLen2, 3) &
|
||||
" P03: " & LenToString(m_BTLPartM.m_dCamberLen3, 3) &
|
||||
" P04: " & LenToString(m_BTLPartM.m_dCamberCross3, 3))
|
||||
Dim nValue As Integer = IdNameStruct.IdFromInd(m_BTLPartM.SelREFSIDEFIXCLAMP, ocREFSIDEFIXCLAMP)
|
||||
Dim sValue As String = ocREFSIDEFIXCLAMP(nValue).Name
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_PARTOFFSET, " P04: " & sValue &
|
||||
" P11: " & m_BTLPartM.m_dPartOffsetSide1 &
|
||||
" P12: " & m_BTLPartM.m_dPartOffsetSide2 &
|
||||
" P13: " & m_BTLPartM.m_dPartOffsetSide3 &
|
||||
" P14: " & m_BTLPartM.m_dPartOffsetSide4)
|
||||
nValue = IdNameStruct.IdFromInd(m_BTLPartM.m_SelPROCESSINGQUALITY, ocPROCESSINGQUALITY)
|
||||
sValue = [Enum].GetName(GetType(ProcessingQuality), nValue)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_PROCESSINGQUALITY, sValue)
|
||||
nValue = IdNameStruct.IdFromInd(m_BTLPartM.m_SelRECESS, ocRECESS)
|
||||
sValue = [Enum].GetName(GetType(Recess), nValue)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_RECESS, sValue)
|
||||
nValue = IdNameStruct.IdFromInd(m_BTLPartM.m_SelSTOREYTYPE, ocSTOREYTYPE)
|
||||
sValue = [Enum].GetName(GetType(StoreyType), nValue)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_STOREYTYPE, sValue)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_ELEMENTNUM, m_BTLPartM.m_sELEMENTNUM)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_LAYER, m_BTLPartM.m_nLAYER)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_MODULENUM, m_BTLPartM.m_sMODULENUM)
|
||||
'EgtSetInfo(nNewPartId, BTL_PRT_USERATTRIBUTE, m_sUSERATTRIBUTE)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_COMMENT, m_BTLPartM.m_sCOMMENT)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_GRAINDIR, m_BTLPartM.refGrainDir.x & "," &
|
||||
m_BTLPartM.refGrainDir.y & "," &
|
||||
m_BTLPartM.refGrainDir.z & ";" &
|
||||
If(m_BTLPartM.bGRAINDIRALIGN, 1, 0))
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_REFSIDE, (m_BTLPartM.m_SelREFSIDE + 1) & ";" & If(m_BTLPartM.bREFSIDEALIGN, 1, 0))
|
||||
|
||||
nValue = IdNameStruct.IdFromInd(m_BTLPartM.SelALIGNLOCATION, ocALIGNLOCATION)
|
||||
Dim sValueLoc As String = [Enum].GetName(GetType(AlignmentLocation), nValue)
|
||||
nValue = IdNameStruct.IdFromInd(SelALIGNENDTYPE, ocALIGNENDTYPE)
|
||||
Dim sValueEnd As String = [Enum].GetName(GetType(AlignmentEndtype), nValue)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_ALIGNMENT, sValueLoc & ": " & sValueEnd)
|
||||
|
||||
nValue = IdNameStruct.IdFromInd(m_BTLPartM.SelMATERIALTYPEGRP, ocMATERIALTYPEGRP)
|
||||
sValue = ocMATERIALTYPEGRP(nValue).Name
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_MATERIALTYPE, sValue & ": " & m_BTLPartM.sMATERIALTYPESPEC)
|
||||
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_ROTATED, m_BTLPartM.nROTATED)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_INVERTED, m_BTLPartM.nINVERTED)
|
||||
EgtSetInfo(nNewPartId, BTL_PRT_MATERIAL, m_BTLPartM.m_sMATERIAL)
|
||||
|
||||
' aggiungo dati pezzo
|
||||
Dim NewPart As BTLPartM = BTLPartM.CreateBTLPart(nNewPartId)
|
||||
'aggiungo tutte le sue feature
|
||||
|
||||
@@ -337,6 +337,7 @@ Public Class ConfigurationPageVM
|
||||
''' </summary>
|
||||
Public Sub Save()
|
||||
WriteMachParams()
|
||||
WriteMachParamsLua()
|
||||
WriteProcessParams(PRCList.ToList())
|
||||
WriteDataGridColumns()
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_MESSAGES, m_SelectedLanguage.Name)
|
||||
@@ -373,8 +374,40 @@ Public Class ConfigurationPageVM
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
' se macchina di tipo BOTH copio il file appena scritto nella cartella Beam nella cartella Wall o viceversa
|
||||
If CurrentMachine.nType = MachineType.BOTH Then
|
||||
If CurrentMachine.sMachParamIniFile.Contains("\" & K_BEAM & "\") Then
|
||||
File.Copy(CurrentMachine.sMachParamIniFile, CurrentMachine.sMachParamIniFile.Replace("\" & K_BEAM & "\", "\" & K_WALL & "\"), True)
|
||||
Else
|
||||
File.Copy(CurrentMachine.sMachParamIniFile, CurrentMachine.sMachParamIniFile.Replace("\" & K_WALL & "\", "\" & K_BEAM & "\"), True)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' funzione che scrive i parametri modificati sul file LUA
|
||||
Private Function WriteMachParamsLua() As Boolean
|
||||
' inizio routine di scrittura
|
||||
Dim NewTs3DataFileContent = New List(Of String)
|
||||
Dim sMachineStr As String = String.Empty
|
||||
For Each MachTableItem In ConfigMachTableList
|
||||
NewTs3DataFileContent.Add("local " & MachTableItem.sName & " = {")
|
||||
sMachineStr &= " " & MachTableItem.sName & "=" & MachTableItem.sName & ","
|
||||
For Each MachParamItem In MachTableItem.MachParamList
|
||||
NewTs3DataFileContent.Add(" " & MachParamItem.sName & "=" & MachParamItem.sValue & ",")
|
||||
Next
|
||||
NewTs3DataFileContent.Last().TrimEnd(",")
|
||||
NewTs3DataFileContent.Add("}")
|
||||
NewTs3DataFileContent.Add("")
|
||||
Next
|
||||
NewTs3DataFileContent.Add("local Machine = {" & sMachineStr.TrimEnd(",") & "}")
|
||||
NewTs3DataFileContent.Add("return Machine")
|
||||
Dim FilePath As String = CurrentMachine.sMachDir & "\" & If(CurrentMachine.nType = MachineType.BEAM, BEAM_DIR, WALL_DIR) & "\" & TS3DATA_FILE
|
||||
File.WriteAllLines(FilePath, NewTs3DataFileContent, Text.Encoding.UTF8)
|
||||
' se macchina di tipo BOTH copio il file appena scritto nella cartella Wall nella cartella Beam
|
||||
If CurrentMachine.nType = MachineType.BOTH Then File.Copy(FilePath, CurrentMachine.sMachDir & "\" & BEAM_DIR & "\" & TS3DATA_FILE, True)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' funzione che verifica la modifica dei valori in Configurazione e ne chiede il salvataggio
|
||||
Friend Sub VerifyConfigPageModification()
|
||||
' Prima ciclo sui parametri Macchina
|
||||
@@ -385,6 +418,7 @@ Public Class ConfigurationPageVM
|
||||
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()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
|
||||
@@ -91,6 +92,13 @@ Public Module CurrentMachine
|
||||
m_sMachParamIniFile = sMachinesRootDir & "\" & sMachineName & "\" & K_BEAM & "\" & MACH_INI_FILE_NAME
|
||||
ElseIf nType = MachineType.WALL Then
|
||||
m_sMachParamIniFile = sMachinesRootDir & "\" & sMachineName & "\" & K_WALL & "\" & MACH_INI_FILE_NAME
|
||||
Else
|
||||
' Se macchina di tipo BOTH prendo quello presente in Beam, se esiste, altrimenti prendo quello in Wall
|
||||
Dim sBeamMachParamIniFile = sMachinesRootDir & "\" & sMachineName & "\" & K_BEAM & "\" & MACH_INI_FILE_NAME
|
||||
Dim sWallMachParamIniFile = sMachinesRootDir & "\" & sMachineName & "\" & K_WALL & "\" & MACH_INI_FILE_NAME
|
||||
If nType = MachineType.BOTH Then
|
||||
m_sMachParamIniFile = If(File.Exists(sBeamMachParamIniFile), sBeamMachParamIniFile, sWallMachParamIniFile)
|
||||
End If
|
||||
End If
|
||||
' Impostazione path Script dir
|
||||
m_sMachScriptDir = sMachinesRootDir & "\" & sMachineName & "\" & K_SCRIPT
|
||||
|
||||
Reference in New Issue
Block a user