-aggiunto scelta variant da file btlfeatureini
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Globalization
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
@@ -100,26 +101,6 @@ Public Class BTLFeatureM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_VARIANTList As New ObservableCollection(Of Integer)({1, 2, 3, 4, 5, 6, 7, 8, 9, 10})
|
||||
Public Property VARIANTList As ObservableCollection(Of Integer)
|
||||
Get
|
||||
Return m_VARIANTList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of Integer))
|
||||
m_VARIANTList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nSelVARIANT As Integer = 0
|
||||
Public Overridable Property nSelVARIANT As Integer
|
||||
Get
|
||||
Return m_nSelVARIANT
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nSelVARIANT = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Nome
|
||||
Protected m_sName As String
|
||||
Public ReadOnly Property sName As String
|
||||
@@ -151,6 +132,16 @@ Public Class BTLFeatureM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_VARIANTList As New ObservableCollection(Of Integer)()
|
||||
Public Property VARIANTList As ObservableCollection(Of Integer)
|
||||
Get
|
||||
Return m_VARIANTList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of Integer))
|
||||
m_VARIANTList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_sDES As String = String.Empty
|
||||
Public Property sDES As String
|
||||
Get
|
||||
@@ -161,6 +152,16 @@ Public Class BTLFeatureM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overridable Property nSelVARIANT As Integer
|
||||
Get
|
||||
Dim nDes As Integer = 0
|
||||
Return If(Integer.TryParse(m_sDES, nDes), nDes, 0)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_sDES = value.ToString()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_frFRAME As New Frame3d
|
||||
Public Property frFRAME As Frame3d
|
||||
Get
|
||||
@@ -264,6 +265,7 @@ Public Class BTLFeatureM
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Protected Sub New()
|
||||
CreateVariantList()
|
||||
End Sub
|
||||
|
||||
Public Shared Function CreateNewBTLFeature() As BTLFeatureM
|
||||
@@ -279,7 +281,6 @@ Public Class BTLFeatureM
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_PRC, NewBTLFeature.m_nPRC)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_SIDE, NewBTLFeature.m_nSelSIDE)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_PRIORITY, NewBTLFeature.m_nPriority)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_VARIANT, NewBTLFeature.m_nSelVARIANT)
|
||||
Dim nDO As Integer = 1
|
||||
If EgtGetInfo(nFeatureId, BTL_FTR_DO, nDO) Then
|
||||
NewBTLFeature.m_bDO = (nDO <> 0)
|
||||
@@ -343,11 +344,22 @@ Public Class BTLFeatureM
|
||||
NewBTLFeature.m_nSelSIDE = nSIDE
|
||||
NewBTLFeature.m_nPriority = 0
|
||||
NewBTLFeature.m_bDO = True
|
||||
NewBTLFeature.nSelVARIANT = 0
|
||||
' crea parametri per questa feature da file ini
|
||||
NewBTLFeature.CreateFeatureParams(NewBTLFeature)
|
||||
Return NewBTLFeature
|
||||
End Function
|
||||
|
||||
Private Sub CreateVariantList()
|
||||
Dim sMaxIndex As String = ""
|
||||
Dim nMaxIndex As Integer = 0
|
||||
EgtUILib.GetPrivateProfileString([VARIANT], K_MAXINDEX, "", sMaxIndex, m_sBTLIniFile)
|
||||
Integer.TryParse(sMaxIndex, nMaxIndex)
|
||||
For Index As Integer = 0 To nMaxIndex - 1
|
||||
m_VARIANTList.Add(Index)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
@@ -383,7 +395,7 @@ Public Class BTLFeatureM
|
||||
Dim TempList As New List(Of BTLParamM)
|
||||
Dim NewBTLParam As BTLParamM = Nothing
|
||||
' leggo tutti i P della feature
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, True, ParamIndex, Me, NewBTLParam)
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, nSelVARIANT, True, ParamIndex, Me, NewBTLParam)
|
||||
TempList.Add(NewBTLParam)
|
||||
ParamIndex += 1
|
||||
End While
|
||||
@@ -391,7 +403,7 @@ Public Class BTLFeatureM
|
||||
' leggo tutti i Q della feature
|
||||
ParamIndex = 1
|
||||
TempList = New List(Of BTLParamM)
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, False, ParamIndex, Me, NewBTLParam)
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, nSelVARIANT, False, ParamIndex, Me, NewBTLParam)
|
||||
TempList.Add(NewBTLParam)
|
||||
ParamIndex += 1
|
||||
End While
|
||||
@@ -475,13 +487,6 @@ Public Class BTLFeatureM
|
||||
Param.nSelValue = nParamValue
|
||||
End If
|
||||
Next
|
||||
' Se Variant
|
||||
'If IsVariant() AndAlso ParamList.Count() > 0 AndAlso ParamList(0).bIsP Then
|
||||
' Dim nCode As Integer = 0
|
||||
' If Integer.TryParse( m_sDES, nCode) AndAlso nCode > 0 Then
|
||||
' ParamList(0).dValue = nCode
|
||||
' End If
|
||||
'End If
|
||||
' Se necessario ricalcolo, lo eseguo
|
||||
If Not IsFreeContour() And bToRecalc Then
|
||||
' Disabilito segnalazione modificato
|
||||
@@ -560,8 +565,6 @@ Public Class BTLFeatureM
|
||||
Dim sPar As String = String.Empty
|
||||
Dim vParQ() As String = {}
|
||||
CalcParamArray(vPar, sPar, vParQ)
|
||||
' sistemazioni per feature Variant
|
||||
'If nNewPRC = 900 Then sNewDesc = vNewParP(3).ToString
|
||||
' recupero eventuali percorsi originali della feature
|
||||
Dim nCrvId As Integer = GDB_ID.NULL
|
||||
Dim nCrv2Id As Integer = GDB_ID.NULL
|
||||
@@ -575,7 +578,7 @@ Public Class BTLFeatureM
|
||||
For Each QPar In QBTLParamMList
|
||||
If QPar.bCustom Then EgtSetInfo(nFeatureId, QPar.sName & "A", 1)
|
||||
Next
|
||||
EgtSetInfo( nFeatureId, BTL_FTR_PRIORITY, nPriority)
|
||||
EgtSetInfo(nFeatureId, BTL_FTR_PRIORITY, nPriority)
|
||||
SetFeatureId(nFeatureId)
|
||||
' imposto modificato per copie
|
||||
EgtDuploSetModified(ParentPart.nPartId)
|
||||
|
||||
@@ -201,6 +201,7 @@
|
||||
Public Const BTL_GEN_USERATTRIBUTE = "USERATTRIBUTE"
|
||||
|
||||
Public Const PROCESSINGS As String = "Processings"
|
||||
Public Const [VARIANT] As String = "Variant"
|
||||
Public Const OUTLINE As String = "Outline"
|
||||
Public Const BTL_FTR_GRP As String = "GRP"
|
||||
Public Const BTL_FTR_PRC As String = "PRC"
|
||||
|
||||
@@ -24,6 +24,7 @@ Public Module ConstGen
|
||||
Public Const K_LOCKID As String = "LockId"
|
||||
Public Const K_KEY As String = "Key"
|
||||
Public Const K_NESTKEY As String = "NestKey"
|
||||
Public Const K_MAXINDEX As String = "MaxIndex"
|
||||
|
||||
' Pagine del programma
|
||||
Public Enum Pages As Integer
|
||||
|
||||
@@ -126,7 +126,7 @@ Public Module BTLIniFile
|
||||
End Function
|
||||
|
||||
' funzione che ottiene il parametro P/Q usando m_nBTLBWType del modulo
|
||||
Public Function GetBeamPrivateProfileParam(IpGRP As Integer, IpPRC As Integer, IsP As Boolean, IpFeatureParamIndex As String, IpParentFeature As BTLFeatureM, ByRef IpBTLParam As BTLParamM) As Boolean
|
||||
Public Function GetBeamPrivateProfileParam(IpGRP As Integer, IpPRC As Integer, IpVariant As Integer, IsP As Boolean, IpFeatureParamIndex As String, IpParentFeature As BTLFeatureM, ByRef IpBTLParam As BTLParamM) As Boolean
|
||||
Dim sBTLParam As String = String.Empty
|
||||
Dim sBWQParam As String = String.Empty
|
||||
If m_nBTLBWType = BWType.BEAM Then
|
||||
@@ -134,7 +134,7 @@ Public Module BTLIniFile
|
||||
ElseIf m_nBTLBWType = BWType.WALL Then
|
||||
sBWQParam = "W"
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileString(CalcBeamPrivateProfileGRP(IpGRP) & "." & IpPRC, If(IsP, "P", "Q" & sBWQParam) & IpFeatureParamIndex, String.Empty, sBTLParam, m_sBTLIniFile) > 0 Then
|
||||
If EgtUILib.GetPrivateProfileString(CalcBeamPrivateProfileGRP(IpGRP) & "." & If(IpPRC = 900 AndAlso IpVariant > 0, IpPRC & "." & IpVariant, IpPRC), If(IsP, "P", "Q" & sBWQParam) & IpFeatureParamIndex, String.Empty, sBTLParam, m_sBTLIniFile) > 0 Then
|
||||
Dim sBTLParamParams() As String = sBTLParam.Split(","c)
|
||||
' verifico numero minimo di parametri
|
||||
If sBTLParamParams.Count >= 6 Then
|
||||
|
||||
@@ -221,6 +221,13 @@ Public Class PRC
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nVARIANT As Integer = 0
|
||||
Public ReadOnly Property nVARIANT As Integer
|
||||
Get
|
||||
Return m_nVARIANT
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Nome
|
||||
Private m_sName As String
|
||||
Public ReadOnly Property sName As String
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Collections.Specialized
|
||||
Imports System.ComponentModel
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports System.Windows.Interop
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports Mysqlx.XDevAPI.Common
|
||||
|
||||
Public Class BTLFeatureVM
|
||||
Inherits Core.BTLFeatureVM
|
||||
@@ -129,23 +133,38 @@ Public Class BTLFeatureVM
|
||||
Return m_BTLFeatureM.nSelVARIANT
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
If value <> -1 Then
|
||||
If value <> m_BTLFeatureM.nSelVARIANT Then
|
||||
m_BTLFeatureM.nSelVARIANT = value
|
||||
' crea parametri per questa feature da file ini
|
||||
m_BTLFeatureM.CreateFeatureParams(m_BTLFeatureM)
|
||||
m_BTLFeatureM.ReadFeatureParams()
|
||||
CreatePBTLParamVMList()
|
||||
CreateQBTLParamVMList()
|
||||
' aggiorno la feature con nuovo valore
|
||||
Dim vPar() As Double = Nothing
|
||||
Dim sPar As String = String.Empty
|
||||
Dim vParQ() As String = Nothing
|
||||
m_BTLFeatureM.CalcParamArray(vPar, sPar, vParQ)
|
||||
Dim bOK As Boolean = m_BTLFeatureM.UpdateParams(nSelGRP, m_BTLFeatureM.nPRC, nSelSIDE, value.ToString(), m_BTLFeatureM.nPRID,
|
||||
If IsNothing(vPar) Then
|
||||
m_BTLFeatureM.nSelVARIANT = 0
|
||||
m_BTLFeatureM.CreateFeatureParams(m_BTLFeatureM)
|
||||
m_BTLFeatureM.ReadFeatureParams()
|
||||
CreatePBTLParamVMList()
|
||||
CreateQBTLParamVMList()
|
||||
m_BTLFeatureM.CalcParamArray(vPar, sPar, vParQ)
|
||||
End If
|
||||
m_BTLFeatureM.nSelVARIANT = value
|
||||
Dim bOK As Boolean = m_BTLFeatureM.UpdateParams(nSelGRP, m_BTLFeatureM.nPRC, nSelSIDE, sDES, m_BTLFeatureM.nPRID,
|
||||
m_BTLFeatureM.frFRAME, vPar, sPar, vParQ)
|
||||
If bOK Then
|
||||
m_BTLFeatureM.nSelVARIANT = value
|
||||
m_BTLFeatureM.sDES = value.ToString()
|
||||
' seleziono feature in disegno
|
||||
SelGeomFeature()
|
||||
' rendo non calcolata questa feature
|
||||
ResetCalcFeature()
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(nSelVARIANT))
|
||||
NotifyPropertyChanged(NameOf(PBTLParamVMList))
|
||||
NotifyPropertyChanged(NameOf(QBTLParamVMList))
|
||||
EgtDraw()
|
||||
End If
|
||||
End Set
|
||||
|
||||
@@ -213,11 +213,9 @@ Public Class BTLParamVM
|
||||
Dim bFound As Boolean = False
|
||||
If Not value Then
|
||||
' Cerco il parametro Q direttamente nel file ini
|
||||
Dim GRPType As Integer = Me.m_BTLFeatureM.nSelGRP
|
||||
Dim PRC As Integer = Me.m_BTLFeatureM.nPRC
|
||||
Dim ParamIndex As String = 1
|
||||
Dim NewBTLParam As BTLParamM = Nothing
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(GRPType, PRC, False, ParamIndex, Nothing, NewBTLParam)
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(Me.m_BTLFeatureM.nSelGRP, Me.m_BTLFeatureM.nPRC, Me.m_BTLFeatureM.nSelVARIANT, False, ParamIndex, Nothing, NewBTLParam)
|
||||
Dim QBTLParam As BTLParamVM = New BTLParamVM(NewBTLParam)
|
||||
If QBTLParam.sName = Me.sName Then
|
||||
Me.sValue = QBTLParam.sDefault
|
||||
|
||||
@@ -30,7 +30,7 @@ Public Class ChangeParameterWndVM
|
||||
Dim ParamIndex As Integer = 1
|
||||
Dim NewBTLParam As BTLParamM = Nothing
|
||||
' leggo tutti i P della feature
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(m_SelPRC.nGRP, m_SelPRC.nPRC, True, ParamIndex, Nothing, NewBTLParam)
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(m_SelPRC.nGRP, m_SelPRC.nPRC, m_SelPRC.nVARIANT, True, ParamIndex, Nothing, NewBTLParam)
|
||||
m_ParamList.Add(New Parameters(NewBTLParam))
|
||||
ParamIndex += 1
|
||||
End While
|
||||
|
||||
@@ -9,6 +9,8 @@ Imports Ionic.Zip
|
||||
Imports Org.BouncyCastle.Bcpg
|
||||
Imports Microsoft.VisualBasic.ApplicationServices
|
||||
Imports Renci.SshNet.Security
|
||||
Imports Google.Protobuf.WellKnownTypes
|
||||
Imports System.Globalization
|
||||
|
||||
Public Class ConfigurationPageVM
|
||||
Inherits VMBase
|
||||
@@ -960,7 +962,7 @@ Public Class ConfigurationPageVM
|
||||
ParamIndex = 1
|
||||
TempList = New List(Of QBTLParamVM)
|
||||
If IsP Then
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(GRPType, PRC, IsP, ParamIndex, Nothing, NewBTLParam)
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(GRPType, PRC, 0, IsP, ParamIndex, Nothing, NewBTLParam)
|
||||
TempList.Add(New QBTLParamVM(NewBTLParam, GRPType, PRC))
|
||||
ParamIndex += 1
|
||||
End While
|
||||
|
||||
@@ -20,15 +20,6 @@
|
||||
SelectedItem="{Binding Tag.nSelGRP, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
IsEnabled="{Binding FeatureManager_IsEnabled}"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
<TextBlock Text="{Binding Variant_Msg}"
|
||||
IsEnabled="{Binding FeatureManager_IsEnabled}"
|
||||
Visibility="{Binding Variant_Visibility}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding Tag.VARIANTList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
SelectedItem="{Binding Tag.nSelVARIANT, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
IsEnabled="{Binding FeatureManager_IsEnabled}"
|
||||
Visibility="{Binding Variant_Visibility}"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
<TextBlock Text="{Binding Priority_Msg}"
|
||||
IsEnabled="{Binding FeatureManager_IsEnabled}"
|
||||
Visibility="{Binding Priority_Visibility}"
|
||||
@@ -41,6 +32,12 @@
|
||||
Width="45"/>
|
||||
<TextBlock Text="{Binding Tag.sName, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding Tag.VARIANTList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
SelectedItem="{Binding Tag.nSelVARIANT, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
IsEnabled="{Binding FeatureManager_IsEnabled}"
|
||||
Visibility="{Binding Variant_Visibility}"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
|
||||
<Button Content="{Binding Edit_Msg}"
|
||||
Command="{Binding Tag.Edit_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
Visibility="{Binding Tag.Edit_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
|
||||
@@ -84,12 +84,6 @@ Public Class FeatureManagerVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Variant_Msg As String
|
||||
Get
|
||||
Return EgtMsg(60999)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<DataGridCheckBoxColumn x:Key="colDO" Binding="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
|
||||
MinWidth="28">
|
||||
<DataGridCheckBoxColumn.Header>
|
||||
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureListV}}}"/>
|
||||
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureListV}}}" HorizontalAlignment="Center"/>
|
||||
</DataGridCheckBoxColumn.Header>
|
||||
</DataGridCheckBoxColumn>
|
||||
<!--Validità feature-->
|
||||
|
||||
@@ -1354,7 +1354,6 @@ Public Class LeftPanelVM
|
||||
Dim sPar As String = String.Empty
|
||||
Dim vParQ() As String = Nothing
|
||||
NewFeat.CalcParamArray(vPar, sPar, vParQ)
|
||||
'If NewFeat.nPRC = 900 Then NewFeat.sDES = vPar(3).ToString
|
||||
' aggiorno la feature con nuovo valore
|
||||
EgtBeamSetPart(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId)
|
||||
nNewFeatureId = EgtBeamAddProcess(NewFeat.nSelGRP, NewFeat.nPRC, NewFeat.nSelSIDE, NewFeat.sDES,
|
||||
|
||||
Reference in New Issue
Block a user