From ae204b7ee2bb555abd62062abca4aa20dc86690d Mon Sep 17 00:00:00 2001 From: NicolaP Date: Thu, 28 Oct 2021 18:19:31 +0200 Subject: [PATCH] Inizio nuova gestione pulsante Back per compo interni e alzatine --- AlzAndFront/AlzAndFront.vb | 20 ++ AlzAndFront/AlzAndFront.xaml | 137 +++++++++++++ AlzAndFront/AlzAndFront.xaml.vb | 13 ++ CompoWindow/CompoListPage/CompoListPageVM.vb | 33 +++- .../CompoParamPage/CompoParamPageV.xaml | 9 +- .../CompoParamPage/CompoParamPageVM.vb | 187 +++++++++++++++++- CompoWindow/CompoWindowVM.vb | 12 ++ OmagOFFICE.vbproj | 8 + OptionPanel/NestingTab/NestingTabVM.vb | 1 + SideEntityControl/SideEntityControlVM.vb | 161 ++++++++++++++- 10 files changed, 572 insertions(+), 9 deletions(-) create mode 100644 AlzAndFront/AlzAndFront.vb create mode 100644 AlzAndFront/AlzAndFront.xaml create mode 100644 AlzAndFront/AlzAndFront.xaml.vb 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}"/> + +