diff --git a/Application.xaml.vb b/Application.xaml.vb
index 5290da7..ec665b9 100644
--- a/Application.xaml.vb
+++ b/Application.xaml.vb
@@ -12,13 +12,13 @@
Protected Overrides Sub OnStartup(e As StartupEventArgs)
MyBase.OnStartup(e)
ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
- If e.Args.Count = 0 Then
- ' creo finestra SplashScreen
- Dim SplashScreen As New SplashScreenV
- Me.MainWindow = SplashScreen
- Me.MainWindow.Show()
- Map.SetRefSplashScreen(SplashScreen)
- End If
+ 'If e.Args.Count = 0 Then
+ ' ' creo finestra SplashScreen
+ ' Dim SplashScreen As New SplashScreenV
+ ' Me.MainWindow = SplashScreen
+ ' Me.MainWindow.Show()
+ ' Map.SetRefSplashScreen(SplashScreen)
+ 'End If
' Creo la View principale
Me.MainWindow = New MainWindowV
' Mostro la View principale
diff --git a/Constants/ConstEgtStone3D.vb b/Constants/ConstEgtStone3D.vb
index 2c52e31..7afbf5e 100644
--- a/Constants/ConstEgtStone3D.vb
+++ b/Constants/ConstEgtStone3D.vb
@@ -43,6 +43,7 @@
Public Const RIGHTLIST_BTN As String = "RightListBtn"
Public Const BOTTOMLIST_BTN As String = "BottomListBtn"
Public Const BOTTOMCENTERLIST_BTN As String = "BottomCenterListBtn"
+ Public Const TOPPANELLIST_BTN As String = "TopPanelListBtn"
Public Const UTILITY_FOLDER As String = "Utility"
diff --git a/MainWindow/MainWindowVM.vb b/MainWindow/MainWindowVM.vb
index ad4ed2b..bc91366 100644
--- a/MainWindow/MainWindowVM.vb
+++ b/MainWindow/MainWindowVM.vb
@@ -21,6 +21,13 @@ Public Class MainWindowVM
End Get
End Property
+ Private m_SceneButtonVM As SceneButtonVM
+ Friend ReadOnly Property SceneButtonVM As SceneButtonVM
+ Get
+ Return m_SceneButtonVM
+ End Get
+ End Property
+
' Definizione Comandi
Private m_cmdAboutBox As ICommand
Private m_cmdCloseApplication As ICommand
@@ -36,6 +43,8 @@ Public Class MainWindowVM
m_MainWindowM = New MainWindowM
' Creo Option
m_OptionWindowVM = New OptionWindowVM
+ ' Creo SceneButton
+ m_SceneButtonVM = New SceneButtonVM
End Sub
#End Region ' Constructor
diff --git a/SceneButton/SceneButtonV.xaml.vb b/SceneButton/SceneButtonV.xaml.vb
index fe988f8..0bca6ba 100644
--- a/SceneButton/SceneButtonV.xaml.vb
+++ b/SceneButton/SceneButtonV.xaml.vb
@@ -18,7 +18,7 @@
InitializeComponent()
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
- m_refSceneButtonVM = New SceneButtonVM()
+ m_refSceneButtonVM = Map.refSceneButtonVM
Map.SetRefSceneButtonVM(m_refSceneButtonVM)
SolidManagerM.ManageUndoRedo()
Me.DataContext = m_refSceneButtonVM
diff --git a/SceneButton/SceneButtonVM.vb b/SceneButton/SceneButtonVM.vb
index bc0b519..538425c 100644
--- a/SceneButton/SceneButtonVM.vb
+++ b/SceneButton/SceneButtonVM.vb
@@ -2,9 +2,13 @@ Imports EgtUILib
Imports EgtWPFLib5
Public Class SceneButtonVM
+ Inherits VMBase
#Region "FIELDS & PROPERTIES"
+ Public Shared m_nIndexList As Integer = 0
+ Public Shared m_nIndexListConverter As Integer = 0
+
Private m_TopListBtn As New List(Of SceneBtn)
Public Property TopListBtn As List(Of SceneBtn)
Get
@@ -55,11 +59,14 @@ Public Class SceneButtonVM
End Set
End Property
- Private m_TopPanelVM As TopPanelVM
- Friend ReadOnly Property TopPanelVM As TopPanelVM
+ Private m_TopPanelListGroupBtn As New List(Of GroupSceneBtn)
+ Public Property TopPanelListGroupBtn As List(Of GroupSceneBtn)
Get
- Return m_TopPanelVM
+ Return m_TopPanelListGroupBtn
End Get
+ Set(value As List(Of GroupSceneBtn))
+ m_TopPanelListGroupBtn = value
+ End Set
End Property
#End Region ' Fields & Properties
@@ -67,7 +74,9 @@ Public Class SceneButtonVM
#Region "CONSTRUCTOR"
Sub New()
+ Map.SetRefSceneButtonVM(Me)
LoadButtons()
+ LoadGroupButtons()
End Sub
#End Region ' Constructor
@@ -85,6 +94,17 @@ Public Class SceneButtonVM
SetButtonsLocation(BOTTOMCENTERLIST_BTN, m_BottomCenterListBtn)
End Sub
+ Private Sub LoadGroupButtons()
+ Dim Index As Integer = 1
+ Dim SubTitle As String = String.Empty
+ Dim sKeyTitle As String = TOPPANELLIST_BTN & "_" & Index.ToString()
+ While GetMainPrivateProfileString(sKeyTitle, "SubTitle", "", SubTitle) > 0
+ SetGroupButtonsLocation(sKeyTitle, m_TopPanelListGroupBtn)
+ Index += 1
+ sKeyTitle = TOPPANELLIST_BTN & "_" & Index.ToString()
+ End While
+ End Sub
+
'''
''' Funzione che permette di posizionare i bottoni letti da file ini
'''
@@ -116,6 +136,14 @@ Public Class SceneButtonVM
End While
End Sub
+ Private Sub SetGroupButtonsLocation(PositionList As String, ListGroupBtn As List(Of GroupSceneBtn))
+ Dim LocalListSceneBtn As New List(Of SceneBtn)
+ Dim SubTitle As String = String.Empty
+ SetButtonsLocation(PositionList, LocalListSceneBtn)
+ GetMainPrivateProfileString(PositionList, "SubTitle", "", SubTitle)
+ ListGroupBtn.Add(New GroupSceneBtn(LocalListSceneBtn, SubTitle))
+ End Sub
+
Public Function IsTgBtnChecked(Flag As String) As Boolean
' cerco il bottone con il flag richiesto
Dim Btn As _ToggleButton = m_BottomListBtn.FirstOrDefault(Function(x) x.Flag = Flag)
@@ -151,6 +179,43 @@ Public Class SceneButtonVM
End Class
+Public Class GroupSceneBtn
+
+#Region "FIELDS & PROPERTIES"
+
+ Private m_SubTitle As String
+ Public Property SubTitle As String
+ Get
+ Return m_SubTitle
+ End Get
+ Set(value As String)
+ m_SubTitle = value
+ End Set
+ End Property
+
+ Private m_TopPanelListBtn As New List(Of SceneBtn)
+ Public Property TopPanelListBtn As List(Of SceneBtn)
+ Get
+ Return m_TopPanelListBtn
+ End Get
+ Set(value As List(Of SceneBtn))
+ m_TopPanelListBtn = value
+ End Set
+ End Property
+
+#End Region ' Fields & Properties
+
+#Region "CONSTRUCTOR"
+
+ Sub New(TopPanelListBtn As List(Of SceneBtn), sSubTitle As String)
+ m_TopPanelListBtn = TopPanelListBtn
+ m_SubTitle = sSubTitle
+ End Sub
+
+#End Region ' Constructor
+
+End Class
+
Public Class SceneBtn
Inherits VMBase
@@ -414,4 +479,20 @@ Module SceneCmd
#End Region ' Methods
-End Module
\ No newline at end of file
+End Module
+
+Public Class SplitConverter
+ Implements IValueConverter
+
+ Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.Convert
+ Dim dValue As Double = CDbl(value)
+ Dim dParam As Double = Map.refSceneButtonVM.TopPanelListGroupBtn(SceneButtonVM.m_nIndexListConverter).TopPanelListBtn.Count
+ SceneButtonVM.m_nIndexListConverter += 1
+ Return (Math.Floor(dParam / 2) + 1) * 35
+ End Function
+
+ Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
+ Throw New NotImplementedException
+ End Function
+
+End Class
\ No newline at end of file
diff --git a/SecondaryWindow/SecondaryWindowVM.vb b/SecondaryWindow/SecondaryWindowVM.vb
index a7ed37d..5914938 100644
--- a/SecondaryWindow/SecondaryWindowVM.vb
+++ b/SecondaryWindow/SecondaryWindowVM.vb
@@ -30,6 +30,7 @@ Public Class SecondaryWindowVM
End Get
End Property
+ Private m_SceneButtonVM As SceneButtonVM
Public ReadOnly Property sProjectPath As String
Get
Dim sFilePath As String = ""
@@ -73,6 +74,7 @@ Public Class SecondaryWindowVM
EgtResetModified()
' segno su contatore splashscreen render finito
m_WaitAfterRender = 1
+ '
End Sub
Private Sub SplashScreenTimer_Tick()
diff --git a/TopPanel/TopPanelButtonV.xaml b/TopPanel/TopPanelButtonV.xaml
index 7e6b456..025acf2 100644
--- a/TopPanel/TopPanelButtonV.xaml
+++ b/TopPanel/TopPanelButtonV.xaml
@@ -1,84 +1,44 @@
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:EgtStone3D="clr-namespace:EgtStone3D" Margin="15,-5,0,0"
+ x:Name="GridTopPanelButton">
+
+
+
-
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TopPanel/TopPanelButtonV.xaml.vb b/TopPanel/TopPanelButtonV.xaml.vb
index edb08e3..f0068e4 100644
--- a/TopPanel/TopPanelButtonV.xaml.vb
+++ b/TopPanel/TopPanelButtonV.xaml.vb
@@ -1,3 +1,24 @@
Public Class TopPanelButtonV
+#Region "FIELDS & PROPERTIES"
+
+ Private m_SceneButtonVM As SceneButtonVM
+
+#End Region ' Fields & Properties
+
+#Region "CONSTRUCTOR"
+
+ Sub New()
+
+ ' La chiamata è richiesta dalla finestra di progettazione.
+ InitializeComponent()
+
+ ' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
+ m_SceneButtonVM = Map.refSceneButtonVM
+ Me.DataContext = m_SceneButtonVM.TopPanelListGroupBtn(SceneButtonVM.m_nIndexList)
+ SceneButtonVM.m_nIndexList += 1
+ End Sub
+
+#End Region ' Constructor
+
End Class
diff --git a/TopPanel/TopPanelV.xaml b/TopPanel/TopPanelV.xaml
index 3b81a8a..0d1296f 100644
--- a/TopPanel/TopPanelV.xaml
+++ b/TopPanel/TopPanelV.xaml
@@ -32,10 +32,29 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TopPanel/TopPanelVM.vb b/TopPanel/TopPanelVM.vb
index 066bc30..d2c3dc1 100644
--- a/TopPanel/TopPanelVM.vb
+++ b/TopPanel/TopPanelVM.vb
@@ -125,6 +125,12 @@ Public Class TopPanelVM
End Get
End Property
+ Public ReadOnly Property TopPanelListGroupBtn As List(Of GroupSceneBtn)
+ Get
+ Return Map.refSceneButtonVM.TopPanelListGroupBtn
+ End Get
+ End Property
+
#Region "Messages"
Public ReadOnly Property NewFile_Msg
diff --git a/Utility/EgtStone3DDefaultStyle.xaml b/Utility/EgtStone3DDefaultStyle.xaml
index 1a3cd2d..ab60527 100644
--- a/Utility/EgtStone3DDefaultStyle.xaml
+++ b/Utility/EgtStone3DDefaultStyle.xaml
@@ -19,6 +19,7 @@
+