From 90db6565493e728739a38f4b64b6e59db330c95c Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Fri, 5 May 2017 07:55:07 +0000 Subject: [PATCH] OmagOFFICE : - Aggiunti componenti parametrici con anche componenti interni. --- CompoWindow/CompoListPage/CompoListPageV.xaml | 21 +- CompoWindow/CompoListPage/CompoListPageVM.vb | 50 +- CompoWindow/CompoManager/CompoManagerV.xaml | 50 ++ .../CompoManager/CompoManagerV.xaml.vb | 3 + CompoWindow/CompoManager/CompoManagerVM.vb | 215 ++++++++ .../CompoParamPage/CompoParamPageV.xaml | 140 +++-- .../CompoParamPage/CompoParamPageVM.vb | 500 +++++++++--------- CompoWindow/CompoSceneHostV.xaml.vb | 64 +++ CompoWindow/CompoWindowMap.vb | 16 +- CompoWindow/CompoWindowV.xaml.vb | 13 +- CompoWindow/CompoWindowVM.vb | 281 +++++++++- CsvWindow/CsvWindowV.xaml | 11 + CsvWindow/CsvWindowV.xaml.vb | 3 + CsvWindow/CsvWindowVM.vb | 3 + My Project/AssemblyInfo.vb | 4 +- OmagOFFICE.vbproj | 16 + OptionPanel/NestingTab/NestingTabVM.vb | 1 - 17 files changed, 1031 insertions(+), 360 deletions(-) create mode 100644 CompoWindow/CompoManager/CompoManagerV.xaml create mode 100644 CompoWindow/CompoManager/CompoManagerV.xaml.vb create mode 100644 CompoWindow/CompoManager/CompoManagerVM.vb create mode 100644 CsvWindow/CsvWindowV.xaml create mode 100644 CsvWindow/CsvWindowV.xaml.vb create mode 100644 CsvWindow/CsvWindowVM.vb diff --git a/CompoWindow/CompoListPage/CompoListPageV.xaml b/CompoWindow/CompoListPage/CompoListPageV.xaml index 39c1706..a641324 100644 --- a/CompoWindow/CompoListPage/CompoListPageV.xaml +++ b/CompoWindow/CompoListPage/CompoListPageV.xaml @@ -27,15 +27,20 @@ - + + + + + + + diff --git a/CompoWindow/CompoListPage/CompoListPageVM.vb b/CompoWindow/CompoListPage/CompoListPageVM.vb index 3da6812..374e0b6 100644 --- a/CompoWindow/CompoListPage/CompoListPageVM.vb +++ b/CompoWindow/CompoListPage/CompoListPageVM.vb @@ -14,6 +14,17 @@ Public Class CompoListPageVM End Get End Property + Private m_CompoManagerControl As CompoManagerV + Public Property CompoManagerControl As CompoManagerV + Get + Return m_CompoManagerControl + End Get + Set(value As CompoManagerV) + m_CompoManagerControl = value + NotifyPropertyChanged("CompoManagerControl") + End Set + End Property + Private m_BackVisibility As Visibility Public ReadOnly Property BackVisibility As Visibility Get @@ -40,6 +51,16 @@ Public Class CompoListPageVM Friend Sub InitCompoListPage() RefreshCompoList() + ' porto in CompoParam il CompoManager + If IsNothing(CompoWindowMap.refCompoWindowVM.m_SelCompo) Then + CompoWindowMap.refCompoParamPageVM.CompoManagerControl = Nothing + CompoManagerControl = Nothing + Else + CompoWindowMap.refCompoParamPageVM.CompoManagerControl = Nothing + CompoManagerControl = CompoWindowMap.refCompoWindowVM.CompoManagerV + End If + ' lancio inizializzazione CompoManager + CompoWindowMap.refCompoManagerVM.InitCompoManager() End Sub Private Sub RefreshCompoList() @@ -47,9 +68,12 @@ Public Class CompoListPageVM If IsNothing(CompoWindowMap.refCompoWindowVM.m_SelCompoFamily) Then LoadMainCompoList() m_BackVisibility = Visibility.Collapsed - Else + ElseIf IsNothing(CompoWindowMap.refCompoWindowVM.m_SelCompo) Then LoadSelCompoList() m_BackVisibility = Visibility.Visible + Else + LoadInternalCompoList() + m_BackVisibility = Visibility.Visible End If NotifyPropertyChanged("BackVisibility") End Sub @@ -73,12 +97,18 @@ Public Class CompoListPageVM Private Sub LoadSelCompoList() Dim SelCompoIndex As Integer = CompoWindowMap.refCompoWindowVM.m_SelCompoFamily.Index Dim CompoNumber As Integer = GetMainPrivateProfileInt("Compo" & SelCompoIndex, "Count", 0) - Dim sCompoImage As String = String.Empty For CompoIndex = 1 To CompoNumber m_CompoList.Add(GetPrivateProfileCompo("Compo" & SelCompoIndex, "Compo" & CompoIndex)) Next End Sub + Private Sub LoadInternalCompoList() + Dim CompoNumber As Integer = GetMainPrivateProfileInt("InternalCompo", "Count", 0) + For CompoIndex = 1 To CompoNumber + m_CompoList.Add(GetPrivateProfileCompo("InternalCompo" & CompoIndex, "InternalCompo" & CompoIndex)) + Next + End Sub + Public Function GetPrivateProfileCompo( ByVal lpAppName As String, ByVal lpKeyName As String) As CompoItem @@ -124,9 +154,12 @@ Public Class CompoListPageVM Else RefreshCompoList() End If - Else + ElseIf IsNothing(CompoWindowMap.refCompoWindowVM.m_SelCompo) Then CompoWindowMap.refCompoWindowVM.m_SelCompo = DirectCast(param, CompoItem) CompoWindowMap.refCompoWindowVM.CompoPage = CompoWindowVM.CompoPageOpt.PARAM + Else + CompoWindowMap.refCompoWindowVM.m_SelInternalCompo = DirectCast(param, CompoItem) + CompoWindowMap.refCompoWindowVM.CompoPage = CompoWindowVM.CompoPageOpt.PARAM End If End Sub @@ -146,8 +179,15 @@ Public Class CompoListPageVM ' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded. Public Sub Back(ByVal param As Object) - CompoWindowMap.refCompoWindowVM.m_SelCompoFamily = Nothing - RefreshCompoList() + If IsNothing(CompoWindowMap.refCompoWindowVM.m_SelCompo) Then + CompoWindowMap.refCompoWindowVM.m_SelCompoFamily = Nothing + InitCompoListPage() + Else + CompoWindowMap.refCompoWindowVM.m_SelCompo = Nothing + InitCompoListPage() + EgtNewFile() + EgtDraw() + End If End Sub #End Region ' BackCommand diff --git a/CompoWindow/CompoManager/CompoManagerV.xaml b/CompoWindow/CompoManager/CompoManagerV.xaml new file mode 100644 index 0000000..6e6c5f5 --- /dev/null +++ b/CompoWindow/CompoManager/CompoManagerV.xaml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +