diff --git a/EgtBEAMWALL.Core/BTLModel/BTLFeatureM.vb b/EgtBEAMWALL.Core/BTLModel/BTLFeatureM.vb
index 70cd594c..9d080d88 100644
--- a/EgtBEAMWALL.Core/BTLModel/BTLFeatureM.vb
+++ b/EgtBEAMWALL.Core/BTLModel/BTLFeatureM.vb
@@ -1,5 +1,4 @@
Imports System.Collections.ObjectModel
-Imports System.Globalization
Imports System.Windows
Imports System.Windows.Input
Imports System.Windows.Media
@@ -101,6 +100,26 @@ Public Class BTLFeatureM
End Set
End Property
+ Protected m_VARIANTList As New ObservableCollection(Of Integer)({0, 1, 2, 3, 4, 5, 6, 7, 8, 9})
+ 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
@@ -132,16 +151,6 @@ 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
@@ -152,16 +161,6 @@ 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
@@ -265,7 +264,6 @@ Public Class BTLFeatureM
#Region "CONSTRUCTOR"
Protected Sub New()
- CreateVariantList()
End Sub
Public Shared Function CreateNewBTLFeature() As BTLFeatureM
@@ -281,6 +279,7 @@ 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)
@@ -344,7 +343,6 @@ 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
@@ -395,7 +393,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, nSelVARIANT, True, ParamIndex, Me, NewBTLParam)
+ While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, True, ParamIndex, Me, NewBTLParam)
TempList.Add(NewBTLParam)
ParamIndex += 1
End While
@@ -403,7 +401,7 @@ Public Class BTLFeatureM
' leggo tutti i Q della feature
ParamIndex = 1
TempList = New List(Of BTLParamM)
- While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, nSelVARIANT, False, ParamIndex, Me, NewBTLParam)
+ While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, False, ParamIndex, Me, NewBTLParam)
TempList.Add(NewBTLParam)
ParamIndex += 1
End While
@@ -487,6 +485,13 @@ 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
@@ -565,6 +570,8 @@ 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
@@ -578,7 +585,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)
diff --git a/EgtBEAMWALL.Core/Constants/ConstBeam.vb b/EgtBEAMWALL.Core/Constants/ConstBeam.vb
index 4216c7e6..58b520d6 100644
--- a/EgtBEAMWALL.Core/Constants/ConstBeam.vb
+++ b/EgtBEAMWALL.Core/Constants/ConstBeam.vb
@@ -201,7 +201,6 @@
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"
diff --git a/EgtBEAMWALL.Core/Constants/ConstGen.vb b/EgtBEAMWALL.Core/Constants/ConstGen.vb
index 0813e469..ae545074 100644
--- a/EgtBEAMWALL.Core/Constants/ConstGen.vb
+++ b/EgtBEAMWALL.Core/Constants/ConstGen.vb
@@ -24,7 +24,6 @@ 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
diff --git a/EgtBEAMWALL.Core/Utility/BTLIniFile.vb b/EgtBEAMWALL.Core/Utility/BTLIniFile.vb
index 5f00914d..f1c048bc 100644
--- a/EgtBEAMWALL.Core/Utility/BTLIniFile.vb
+++ b/EgtBEAMWALL.Core/Utility/BTLIniFile.vb
@@ -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, IpVariant 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, 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) & "." & If(IpPRC = 900 AndAlso IpVariant > 0, IpPRC & "." & IpVariant, IpPRC), If(IsP, "P", "Q" & sBWQParam) & IpFeatureParamIndex, String.Empty, sBTLParam, m_sBTLIniFile) > 0 Then
+ If EgtUILib.GetPrivateProfileString(CalcBeamPrivateProfileGRP(IpGRP) & "." & 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
diff --git a/EgtBEAMWALL.ViewerOptimizer/AddFeatureWnd/AddFeatureWndVM.vb b/EgtBEAMWALL.ViewerOptimizer/AddFeatureWnd/AddFeatureWndVM.vb
index cf98c1b6..28d31136 100644
--- a/EgtBEAMWALL.ViewerOptimizer/AddFeatureWnd/AddFeatureWndVM.vb
+++ b/EgtBEAMWALL.ViewerOptimizer/AddFeatureWnd/AddFeatureWndVM.vb
@@ -221,13 +221,6 @@ 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
diff --git a/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLFeatureVM.vb b/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLFeatureVM.vb
index 175f88bd..96ceebaf 100644
--- a/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLFeatureVM.vb
+++ b/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLFeatureVM.vb
@@ -1,14 +1,10 @@
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
@@ -133,38 +129,23 @@ Public Class BTLFeatureVM
Return m_BTLFeatureM.nSelVARIANT
End Get
Set(value As Integer)
- 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()
+ If value <> -1 Then
' 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)
- 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,
+ Dim bOK As Boolean = m_BTLFeatureM.UpdateParams(nSelGRP, m_BTLFeatureM.nPRC, nSelSIDE, value.ToString(), 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
diff --git a/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLParamVM.vb b/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLParamVM.vb
index 67c52e5f..8d562621 100644
--- a/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLParamVM.vb
+++ b/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLParamVM.vb
@@ -213,9 +213,11 @@ 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(Me.m_BTLFeatureM.nSelGRP, Me.m_BTLFeatureM.nPRC, Me.m_BTLFeatureM.nSelVARIANT, False, ParamIndex, Nothing, NewBTLParam)
+ While BTLIniFile.GetBeamPrivateProfileParam(GRPType, PRC, False, ParamIndex, Nothing, NewBTLParam)
Dim QBTLParam As BTLParamVM = New BTLParamVM(NewBTLParam)
If QBTLParam.sName = Me.sName Then
Me.sValue = QBTLParam.sDefault
diff --git a/EgtBEAMWALL.ViewerOptimizer/ChangeParameterWnd/ChangeParameterWndVM.vb b/EgtBEAMWALL.ViewerOptimizer/ChangeParameterWnd/ChangeParameterWndVM.vb
index 1eee926b..e73e0a6c 100644
--- a/EgtBEAMWALL.ViewerOptimizer/ChangeParameterWnd/ChangeParameterWndVM.vb
+++ b/EgtBEAMWALL.ViewerOptimizer/ChangeParameterWnd/ChangeParameterWndVM.vb
@@ -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, m_SelPRC.nVARIANT, True, ParamIndex, Nothing, NewBTLParam)
+ While BTLIniFile.GetBeamPrivateProfileParam(m_SelPRC.nGRP, m_SelPRC.nPRC, True, ParamIndex, Nothing, NewBTLParam)
m_ParamList.Add(New Parameters(NewBTLParam))
ParamIndex += 1
End While
diff --git a/EgtBEAMWALL.ViewerOptimizer/ConfigurationPage/ConfigurationPageVM.vb b/EgtBEAMWALL.ViewerOptimizer/ConfigurationPage/ConfigurationPageVM.vb
index 8c7f7f34..e813597d 100644
--- a/EgtBEAMWALL.ViewerOptimizer/ConfigurationPage/ConfigurationPageVM.vb
+++ b/EgtBEAMWALL.ViewerOptimizer/ConfigurationPage/ConfigurationPageVM.vb
@@ -9,8 +9,6 @@ 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
@@ -962,7 +960,7 @@ Public Class ConfigurationPageVM
ParamIndex = 1
TempList = New List(Of QBTLParamVM)
If IsP Then
- While BTLIniFile.GetBeamPrivateProfileParam(GRPType, PRC, 0, IsP, ParamIndex, Nothing, NewBTLParam)
+ While BTLIniFile.GetBeamPrivateProfileParam(GRPType, PRC, IsP, ParamIndex, Nothing, NewBTLParam)
TempList.Add(New QBTLParamVM(NewBTLParam, GRPType, PRC))
ParamIndex += 1
End While
diff --git a/EgtBEAMWALL.ViewerOptimizer/FeatureManager/FeatureManagerV.xaml b/EgtBEAMWALL.ViewerOptimizer/FeatureManager/FeatureManagerV.xaml
index 7ccf02e6..cd5a596e 100644
--- a/EgtBEAMWALL.ViewerOptimizer/FeatureManager/FeatureManagerV.xaml
+++ b/EgtBEAMWALL.ViewerOptimizer/FeatureManager/FeatureManagerV.xaml
@@ -20,6 +20,15 @@
SelectedItem="{Binding Tag.nSelGRP, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Style="{StaticResource FeatureComboBox}"/>
+
+
-
-