diff --git a/AlzAndFront/AlzAndFront.vb b/AlzAndFront/AlzAndFront.vb
new file mode 100644
index 0000000..0e9e65c
--- /dev/null
+++ b/AlzAndFront/AlzAndFront.vb
@@ -0,0 +1,20 @@
+Imports System.Collections.ObjectModel
+Imports EgtUILib
+Imports EgtWPFLib5
+
+Public Class AlzAndFrontVM
+ Inherits VMBase
+
+#Region "CONSTRUCTOR"
+
+ Sub New()
+
+
+ End Sub
+
+#End Region ' CONSTRUCTOR
+
+
+End Class
+
+
diff --git a/AlzAndFront/AlzAndFront.xaml b/AlzAndFront/AlzAndFront.xaml
new file mode 100644
index 0000000..e99b114
--- /dev/null
+++ b/AlzAndFront/AlzAndFront.xaml
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AlzAndFront/AlzAndFront.xaml.vb b/AlzAndFront/AlzAndFront.xaml.vb
new file mode 100644
index 0000000..e4aff66
--- /dev/null
+++ b/AlzAndFront/AlzAndFront.xaml.vb
@@ -0,0 +1,13 @@
+Public Class AlzAndFrontV
+
+ Private WithEvents m_AlzAndFrontVM As AlzAndFrontVM
+
+ Sub New(AlzAndFrontVM As AlzAndFrontVM)
+ ' This call is required by the designer.
+ InitializeComponent()
+ Me.DataContext = AlzAndFrontVM
+ ' Assegno al riferimento locale al VM il VM preso dal DataContext
+ m_AlzAndFrontVM = AlzAndFrontVM
+ End Sub
+
+End Class
diff --git a/CompoWindow/CompoListPage/CompoListPageVM.vb b/CompoWindow/CompoListPage/CompoListPageVM.vb
index e11a3e2..873a2fc 100644
--- a/CompoWindow/CompoListPage/CompoListPageVM.vb
+++ b/CompoWindow/CompoListPage/CompoListPageVM.vb
@@ -300,9 +300,16 @@ Public Class CompoListPageVM
m_BackVisibility = Visibility.Visible
m_SideEntity_Visibility = Visibility.Collapsed
Else
- LoadInternalCompoList()
- m_BackVisibility = Visibility.Visible
- m_SideEntity_Visibility = Visibility.Visible
+ ' differenzio il caso di AlzAndFront
+ If CompoWindowMap.refCompoWindowVM.m_bSelAlzAndFront Then
+ ' carico la pagina per la definizione delle componenti Alette
+ m_BackVisibility = Visibility.Visible
+ m_SideEntity_Visibility = Visibility.Hidden
+ Else
+ LoadInternalCompoList()
+ m_BackVisibility = Visibility.Visible
+ m_SideEntity_Visibility = Visibility.Visible
+ End If
End If
NotifyPropertyChanged("BackVisibility")
NotifyPropertyChanged("SideEntity_Visibility")
@@ -449,6 +456,26 @@ Public Class CompoListPageVM
If IsNothing(CompoWindowMap.refCompoWindowVM.m_SelCompo) Then
CompoWindowMap.refCompoWindowVM.m_SelCompoFamily = Nothing
InitCompoListPage()
+ ElseIf CompoWindowMap.refCompoWindowVM.m_bSelInternalCompo Then
+ 'CompoWindowMap.refCompoWindowVM.CompoPage = CompoWindowVM.CompoPageOpt.PARAM
+ CompoWindowMap.refCompoWindowVM.SetCompoPage(CompoWindowVM.CompoPageOpt.PARAM)
+ CompoWindowMap.refCompoParamPageVM.MyInitCompoParamPage()
+ Dim PartId As Integer = EgtGetFirstPart()
+ EgtSetStatus(EgtGetFirstNameInGroup(PartId, CompoParamPageVM.COMPO_LAYER_AUX), GDB_ST.ON_)
+ EgtSetStatus(EgtGetFirstNameInGroup(PartId, CompoParamPageVM.COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
+ EgtSetStatus(EgtGetFirstNameInGroup(PartId, CompoParamPageVM.COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
+ EgtDraw()
+ CompoWindowMap.refCompoWindowVM.m_bSelInternalCompo = False
+ ' disbilito la modifica del componente piano cucicna/bagno corrente
+ For Each Item In CompoWindowMap.refCompoParamPageVM.CompoParamOutLoopList
+ If TypeOf (Item) Is TextParamItem Then
+ Dim TxtParam As TextParamItem = DirectCast(Item, TextParamItem)
+ TxtParam.IsEnable = False
+ ElseIf TypeOf (Item) Is CheckParamItem Then
+ Dim ChkParam As CheckParamItem = DirectCast(Item, CheckParamItem)
+ ChkParam.IsEnable = False
+ End If
+ Next
Else
CompoWindowMap.refCompoWindowVM.m_SelCompo = Nothing
InitCompoListPage()
diff --git a/CompoWindow/CompoParamPage/CompoParamPageV.xaml b/CompoWindow/CompoParamPage/CompoParamPageV.xaml
index 5b62a70..55d3d17 100644
--- a/CompoWindow/CompoParamPage/CompoParamPageV.xaml
+++ b/CompoWindow/CompoParamPage/CompoParamPageV.xaml
@@ -89,7 +89,7 @@
+ Text="{Binding Value}" IsEnabled="{Binding IsEnable}"/>
@@ -100,7 +100,7 @@
@@ -123,6 +123,11 @@
Command="{Binding InternalCommand}"
Visibility="{Binding Internal_Visibility}"
Style="{StaticResource CompoWindow_Button}"/>
+
+
AboutBoxV.xaml
+
+ AlzAndFront.xaml
+
+ CompoCsvDataWindowV.xaml
@@ -333,6 +337,10 @@
DesignerMSBuild:Compile
+
+ MSBuild:Compile
+ Designer
+ MSBuild:CompileDesigner
diff --git a/OptionPanel/NestingTab/NestingTabVM.vb b/OptionPanel/NestingTab/NestingTabVM.vb
index 858b7fa..37b9513 100644
--- a/OptionPanel/NestingTab/NestingTabVM.vb
+++ b/OptionPanel/NestingTab/NestingTabVM.vb
@@ -523,6 +523,7 @@ Public Class NestingTabVM
Public Sub Draw(ByVal param As Object)
Dim CompoWindow As New CompoWindowV(Application.Current.MainWindow, New CompoWindowVM)
+ CompoWindow.Height = 700
CompoWindow.ShowDialog()
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
End Sub
diff --git a/SideEntityControl/SideEntityControlVM.vb b/SideEntityControl/SideEntityControlVM.vb
index 0cf63f1..7cc2f8b 100644
--- a/SideEntityControl/SideEntityControlVM.vb
+++ b/SideEntityControl/SideEntityControlVM.vb
@@ -10,6 +10,7 @@ Public Class SideEntityControlVM
DRIP = 1 ' incidi da sotto
ENGRAVE = 2 ' incidi da sopra
FILOTOP = 3 ' filo top
+ ALZANDFRONT = 4 ' alzatine e frontalini
End Enum
Public Enum CallingWindowOpt As Integer
@@ -410,7 +411,7 @@ Public Class SideEntityControlVM
m_dDepthFiloTop = GetMainPrivateProfileDouble(S_SIDES, K_FILOTOPDEPTH, 5)
SetParameter1(m_dOffsetFiloTop)
SetParameter2(m_dDepthFiloTop)
- Else
+ ElseIf m_Mode <> ModeOpt.ALZANDFRONT Then
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
Parameter2Msg = EgtMsg(MSG_IMPORTPAGEUC + 16) ' Offset 2
m_dDripOffset = GetMainPrivateProfileDouble(S_SIDES, K_DRIPOFFSET, 20)
@@ -426,6 +427,17 @@ Public Class SideEntityControlVM
SetParameter4(m_dDripShort)
End If
+ ' imposto la pagina per la gestione delle Alzatine e dei frontalini
+ If m_Mode = ModeOpt.ALZANDFRONT Then
+ Parameter23_Visibility = Windows.Visibility.Hidden
+ Parameter2_Visibility = Visibility.Visible
+ Parameter2ab_Visibility = Visibility.Hidden
+ Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 9) ' Angolo
+ Parameter2Msg = EgtMsg(91002) ' Tallone
+ m_dSideAngle = GetMainPrivateProfileDouble(S_SIDES, K_SIDEANGLE, 45)
+ SetParameter1(m_dSideAngle)
+ End If
+
' Aggiorno visualizzazione
If CallingWindow = CallingWindowOpt.COMPO Then
EgtZoom(ZM.ALL)
@@ -837,6 +849,7 @@ Public Class SideEntityControlVM
End Sub
Friend Sub CreateDripGeom(nPartId As Integer)
+ If nPartId = GDB_ID.NULL Then Return
' Recupero Id layer di contorno esterno
Dim nOutLoopId = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP)
' Preparo layer con geometria gocciolatoi (svuotandolo o creandolo)
@@ -1906,4 +1919,148 @@ Friend Class ColorEngrave
Return False
End Function
-End Class
\ No newline at end of file
+End Class
+
+Friend Class AlzAndFrontEntity
+ Inherits SideEntity
+
+ Public Const STD_MAXSIDEANG As Double = 50.0
+ Public Const MAX_MAXSIDEANG As Double = 75.0
+ Private Shared m_dMaxSideAng As Double = STD_MAXSIDEANG
+ Friend Shared WriteOnly Property dMaxSideAng As Double
+ Set(value As Double)
+ m_dMaxSideAng = Math.Max(Math.Min(value, MAX_MAXSIDEANG), 0)
+ End Set
+ End Property
+
+ Friend Shared m_Parameter1 As Double
+ Friend Shared m_Parameter2 As Double
+ Friend Shared m_Parameter2a As Integer
+ Friend Shared m_Parameter2b As Double
+ Friend Shared m_ModifySideAngle As Action(Of String, Double)
+ Friend Shared m_ModifySideHeel As Action(Of String, Double)
+ Friend Shared m_RefreshSideAngleText As Action
+
+ Private m_dSideAngle As Double
+ Public Property GrphSideAngle As String
+ Get
+ Return DoubleToString(m_dSideAngle, 2)
+ End Get
+ Set(value As String)
+ Dim dVal As Double = 0
+ If Not String.IsNullOrWhiteSpace(value) Then StringToDouble(value, dVal)
+ If dVal <> m_dSideAngle Then
+ ' Assegno controllando i limiti
+ If dVal < -m_dMaxSideAng Then
+ m_dSideAngle = -m_dMaxSideAng
+ NotifyPropertyChanged("GrphSideAngle")
+ ElseIf dVal > m_dMaxSideAng Then
+ m_dSideAngle = m_dMaxSideAng
+ NotifyPropertyChanged("GrphSideAngle")
+ Else
+ m_dSideAngle = dVal
+ End If
+ ' Lo modifico nella geometria e nella lista inclinazioni
+ m_ModifySideAngle(sEntityName, dSideAngle)
+ ' Aggiorno tutti i testi
+ m_RefreshSideAngleText()
+ End If
+ End Set
+ End Property
+ Public Property dSideAngle As Double
+ Get
+ Return m_dSideAngle
+ End Get
+ Set(value As Double)
+ ' Assegno controllando i limiti
+ If value < -m_dMaxSideAng Then
+ m_dSideAngle = -m_dMaxSideAng
+ ElseIf value > m_dMaxSideAng Then
+ m_dSideAngle = m_dMaxSideAng
+ Else
+ m_dSideAngle = value
+ End If
+ End Set
+ End Property
+
+ Private m_dSideHeel As Double
+ Public Property GrphSideHeel As String
+ Get
+ Return LenToString(m_dSideHeel, 2)
+ End Get
+ Set(value As String)
+ Dim dVal As Double = 0
+ If Not String.IsNullOrWhiteSpace(value) Then StringToLen(value, dVal)
+ If Math.Abs(dVal - m_dSideHeel) > EPS_SMALL Then
+ ' Verifico stia nei limiti
+ If dVal < 0 Then
+ m_dSideHeel = 0
+ NotifyPropertyChanged("GrphSideHeel")
+ Else
+ m_dSideHeel = dVal
+ End If
+ ' Lo modifico nella geometria e nella lista inclinazioni
+ m_ModifySideHeel(sEntityName, dSideHeel)
+ ' Aggiorno tutti i testi
+ m_RefreshSideAngleText()
+ End If
+ End Set
+ End Property
+ Public Property dSideHeel As Double
+ Get
+ Return m_dSideHeel
+ End Get
+ Set(value As Double)
+ ' Verifico stia nei limiti
+ If value < 0 Then
+ m_dSideHeel = 0
+ Else
+ m_dSideHeel = value
+ End If
+ End Set
+ End Property
+
+ Public Overrides Property bIsChecked As Boolean
+ Get
+ Return Not m_dSideAngle = 0
+ End Get
+ Set(value As Boolean)
+ If value Then
+ m_dSideAngle = m_Parameter1
+ m_dSideHeel = m_Parameter2
+ Else
+ m_dSideAngle = 0
+ m_dSideHeel = 0
+ End If
+ ' '' Converto nome checkbox in nome elemento tenendo conto dello slittamento verso il basso
+ ''Dim nCurrSide As Integer = m_SideAngleEntityList.Count() - (10 - CInt(CurrCheckBox.Name.Substring(1)))
+ ''Dim sCurrSide As String = "A" & nCurrSide.ToString()
+ ' Lo modifico nella geometria e nella lista inclinazioni
+ m_ModifySideAngle(sEntityName, m_dSideAngle)
+ m_ModifySideHeel(sEntityName, m_dSideHeel)
+ ' Aggiorno tutti i testi
+ m_RefreshSideAngleText()
+ NotifyPropertyChanged("bIsChecked")
+ End Set
+ End Property
+
+
+ Sub New(nId As Integer, sEntityName As String, nTextId As Integer, dSideAngle As Double, dSideHeel As Double, Mode As SideEntityControlVM.ModeOpt)
+ MyBase.New(nId, sEntityName, nTextId, Mode)
+ m_dSideAngle = dSideAngle
+ m_dSideHeel = dSideHeel
+ End Sub
+
+ Friend Shared Function FindEntity(sEntityName As String, EntityList As ObservableCollection(Of SideEntity)) As SideAngleEntity
+ If IsNothing(EntityList) Then
+ Return Nothing
+ End If
+ For Each Entity In EntityList
+ If Entity.sEntityName = sEntityName Then
+ Return DirectCast(Entity, SideAngleEntity)
+ End If
+ Next
+ Return Nothing
+ End Function
+
+End Class