diff --git a/CompoLib/ParametricCompoVM.vb b/CompoLib/ParametricCompoVM.vb
index fc06c79..6102013 100644
--- a/CompoLib/ParametricCompoVM.vb
+++ b/CompoLib/ParametricCompoVM.vb
@@ -7,19 +7,28 @@ Public Class ParametricCompoVM
#Region "FIELDS & PROPERTIES"
- Private ReadOnly sLuaPath As String = String.Empty
+ Private m_sLuaPath As String = String.Empty
+ Friend ReadOnly bFileExsist As Boolean = False
+ Private m_nVeinCtx As Integer
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
- Sub New(sFile As String)
+ Sub New(sFile As String, nVeinCtx As Integer)
MyBase.New()
+ m_nVeinCtx = nVeinCtx
Title = EGT_PARAMETRIC.ToUpper()
' Recupero path cartella che contiene i componenti
- GetMainPrivateProfileString(K_COMPO, COMPO_DIR, "", sLuaPath)
- sLuaPath &= sFile
- LoadParamList()
+ GetMainPrivateProfileString(K_COMPO, COMPO_DIR, "", m_sLuaPath)
+ ' Controllo se il file esiste
+ m_sLuaPath &= sFile
+ If File.Exists(m_sLuaPath) Then
+ LoadParamList()
+ bFileExsist = True
+ Else
+ EgtOutLog("File " & m_sLuaPath & " non esiste nella cartella dei componenti")
+ End If
' aggiorno visualizzazione
EgtSetView(VT.TOP, False)
EgtZoom(ZM.ALL)
@@ -32,7 +41,7 @@ Public Class ParametricCompoVM
Public Overrides Sub LoadParamList()
' Pulisco lista variabili
ParamList.Clear()
- EgtLuaExecFile(sLuaPath)
+ EgtLuaExecFile(m_sLuaPath)
Dim sPar As String = "0"
EgtLuaGetGlobStringVar("CMP.Npar", sPar)
Dim sName As String = String.Empty
@@ -49,14 +58,13 @@ Public Class ParametricCompoVM
End Sub
Private Sub ExecLua()
- Dim nVeinCtx As Integer = Map.refSceneHostVM.MainScene.GetCtx()
- If Not File.Exists(sLuaPath) Then
- EgtOutLog("Matching error: missing file (" & sLuaPath & ")")
+ If Not File.Exists(m_sLuaPath) Then
+ EgtOutLog("Matching error: missing file (" & m_sLuaPath & ")")
Return
End If
' Parsing
- EgtLuaExecFile(sLuaPath)
- EgtSetCurrentContext(nVeinCtx)
+ EgtLuaExecFile(m_sLuaPath)
+ EgtSetCurrentContext(m_nVeinCtx)
For Index As Integer = 0 To ParamList.Count - 1
If TypeOf ParamList(Index) Is _TextBoxParam Then
Dim _TextBox As _TextBoxParam = DirectCast(ParamList(Index), _TextBoxParam)
diff --git a/EgtStone3D.vbproj b/EgtStone3D.vbproj
index d304f28..eb7e9fd 100644
--- a/EgtStone3D.vbproj
+++ b/EgtStone3D.vbproj
@@ -118,9 +118,15 @@
EgtMessageBoxV.xaml
+
+ GridDimensionPanelV.xaml
+
-
- GridPaneV.xaml
+
+ GridPanelV.xaml
+
+
+ GridViewPanelV.xamlMainWindowV.xaml
@@ -240,7 +246,15 @@
DesignerMSBuild:Compile
-
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+ DesignerMSBuild:Compile
diff --git a/GridPanel/GridDimensionPanelV.xaml b/GridPanel/GridDimensionPanelV.xaml
new file mode 100644
index 0000000..35e28e8
--- /dev/null
+++ b/GridPanel/GridDimensionPanelV.xaml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GridPanel/GridDimensionPanelV.xaml.vb b/GridPanel/GridDimensionPanelV.xaml.vb
new file mode 100644
index 0000000..d91744b
--- /dev/null
+++ b/GridPanel/GridDimensionPanelV.xaml.vb
@@ -0,0 +1,3 @@
+Public Class GridDimensionPanelV
+
+End Class
diff --git a/GridPanel/GridPaneV.xaml b/GridPanel/GridPaneV.xaml
deleted file mode 100644
index 5306ade..0000000
--- a/GridPanel/GridPaneV.xaml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/GridPanel/GridPaneV.xaml.vb b/GridPanel/GridPaneV.xaml.vb
deleted file mode 100644
index 7081c58..0000000
--- a/GridPanel/GridPaneV.xaml.vb
+++ /dev/null
@@ -1,3 +0,0 @@
-Public Class GridPaneV
-
-End Class
diff --git a/GridPanel/GridPanelV.xaml b/GridPanel/GridPanelV.xaml
new file mode 100644
index 0000000..3ba7b8b
--- /dev/null
+++ b/GridPanel/GridPanelV.xaml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
diff --git a/GridPanel/GridPanelV.xaml.vb b/GridPanel/GridPanelV.xaml.vb
new file mode 100644
index 0000000..8e127fd
--- /dev/null
+++ b/GridPanel/GridPanelV.xaml.vb
@@ -0,0 +1,3 @@
+Public Class GridPanelV
+
+End Class
diff --git a/GridPanel/GridPanelVM.vb b/GridPanel/GridPanelVM.vb
index dcffb6b..3842501 100644
--- a/GridPanel/GridPanelVM.vb
+++ b/GridPanel/GridPanelVM.vb
@@ -39,6 +39,50 @@ Public Class GridPanelVM
NotifyPropertyChanged(NameOf(MeasureUnit))
End Sub
+ Private m_FileGridOnOffSVG As String = String.Empty
+ Public Property FileGridOnOffSVG As String
+ Get
+ Return m_FileGridOnOffSVG
+ End Get
+ Set(value As String)
+ m_FileGridOnOffSVG = value
+ NotifyPropertyChanged(NameOf(FileGridOnOffSVG))
+ End Set
+ End Property
+ Friend Sub SetFileGridOnOffSVG(sFileGridOnOffSVG As String)
+ m_FileGridOnOffSVG = sFileGridOnOffSVG
+ NotifyPropertyChanged(NameOf(FileGridOnOffSVG))
+ End Sub
+
+ Private m_FileGridDimSVG As String = String.Empty
+ Public Property FileGridDimSVG As String
+ Get
+ Return m_FileGridDimSVG
+ End Get
+ Set(value As String)
+ m_FileGridDimSVG = value
+ NotifyPropertyChanged(NameOf(FileGridDimSVG))
+ End Set
+ End Property
+ Friend Sub SetFileGridDimSVG(sFileGridDimSVG As String)
+ m_FileGridDimSVG = sFileGridDimSVG
+ NotifyPropertyChanged(NameOf(FileGridDimSVG))
+ End Sub
+
+ Private m_IsOpenGridDimension As Boolean = False
+ Public Property IsOpenGridDimension As Boolean
+ Get
+ Return m_IsOpenGridDimension
+ End Get
+ Set(value As Boolean)
+ m_IsOpenGridDimension = value
+ End Set
+ End Property
+ Friend Sub SetIsOpenGridDimension(bIsOpenGridDimension As Boolean)
+ m_IsOpenGridDimension = bIsOpenGridDimension
+ NotifyPropertyChanged(NameOf(IsOpenGridDimension))
+ End Sub
+
#Region "Messages"
Public ReadOnly Property MeasureUnit_Msg
@@ -64,6 +108,7 @@ Public Class GridPanelVM
Private m_cmdGridDimension As ICommand
Private m_cmdStatusUnits As ICommand
Private m_cmdZoomAll As ICommand
+ Private m_cmdShowPopUpCmd As ICommand
#End Region ' Fields & Properties
@@ -71,6 +116,8 @@ Public Class GridPanelVM
Sub New()
Map.SetRefGridPanelVM(Me)
+ SetFileGridOnOffSVG(Map.refMainWindowVM.MainWindowM.sResourcesDir & "\GridON.svg")
+ SetFileGridDimSVG(Map.refMainWindowVM.MainWindowM.sResourcesDir & "\GridDIM.svg")
End Sub
#End Region ' Constructor
@@ -190,6 +237,28 @@ Public Class GridPanelVM
#End Region ' ZoomAllCommand
+#Region "ShowPopUpCommand"
+
+ Public ReadOnly Property ShowPopUpCommand As ICommand
+ Get
+ If m_cmdShowPopUpCmd Is Nothing Then
+ m_cmdShowPopUpCmd = New Command(AddressOf ShowPopUp)
+ End If
+ Return m_cmdShowPopUpCmd
+ End Get
+ End Property
+
+ Public Sub ShowPopUp(ByVal param As Object)
+ If m_IsOpenGridDimension Then
+ SetIsOpenGridDimension(False)
+ 'SetView_Msg("▼" & EgtMsg(110019)) ' Vista
+ Else
+ SetIsOpenGridDimension(True)
+ 'SetView_Msg("▲" & EgtMsg(110019)) ' Vista
+ End If
+ End Sub
+
+#End Region ' ShowPopUpCommand
#End Region ' Commands
diff --git a/GridPanel/GridViewPanelV.xaml b/GridPanel/GridViewPanelV.xaml
new file mode 100644
index 0000000..d524169
--- /dev/null
+++ b/GridPanel/GridViewPanelV.xaml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/GridPanel/GridViewPanelV.xaml.vb b/GridPanel/GridViewPanelV.xaml.vb
new file mode 100644
index 0000000..4a7d22c
--- /dev/null
+++ b/GridPanel/GridViewPanelV.xaml.vb
@@ -0,0 +1,3 @@
+Public Class GridViewPanelV
+
+End Class
diff --git a/Panel/EditPanelVM.vb b/Panel/EditPanelVM.vb
index d7665b8..3bfe358 100644
--- a/Panel/EditPanelVM.vb
+++ b/Panel/EditPanelVM.vb
@@ -2,6 +2,7 @@
Public Class EditPanelVM
Inherits SceneUserControlVM
+
#Region "FIELDS & PROPERTIES"
Private ReadOnly m_MsgList As New List(Of String)({TopBar_Msg_Stg0, TopBar_Msg_Stg1, TopBar_Msg_Stg2})
diff --git a/SceneButton/SceneButtonVM.vb b/SceneButton/SceneButtonVM.vb
index b8670c8..40493a3 100644
--- a/SceneButton/SceneButtonVM.vb
+++ b/SceneButton/SceneButtonVM.vb
@@ -79,6 +79,16 @@ Public Class SceneButtonVM
End Set
End Property
+ Private m_ParametricListGroupBtn As New List(Of GroupSceneBtn)
+ Public Property ParametricListGroupBtn As List(Of GroupSceneBtn)
+ Get
+ Return m_ParametricListGroupBtn
+ End Get
+ Set(value As List(Of GroupSceneBtn))
+ m_ParametricListGroupBtn = value
+ End Set
+ End Property
+
Friend Enum TopPanel As Integer
TOP_PANEL = 0
TOP_PANEL_1 = 1
@@ -105,7 +115,8 @@ Public Class SceneButtonVM
Sub New()
Map.SetRefSceneButtonVM(Me)
LoadButtons()
- LoadGroupButtons()
+ LoadGroupButtons(TOPPANELLIST_BTN, m_TopPanelListGroupBtn)
+ LoadGroupButtons("ParametricListBtn", m_ParametricListGroupBtn)
End Sub
#End Region ' Constructor
@@ -123,14 +134,14 @@ Public Class SceneButtonVM
SetButtonsLocation(BOTTOMCENTERLIST_BTN, m_BottomCenterListBtn)
End Sub
- Private Sub LoadGroupButtons()
+ Private Sub LoadGroupButtons(NameList As String, GroupSceneBtnList As List(Of GroupSceneBtn))
Dim Index As Integer = 1
Dim SubTitle As String = String.Empty
- Dim sKeyTitle As String = TOPPANELLIST_BTN & "_" & Index.ToString()
+ Dim sKeyTitle As String = NameList & "_" & Index.ToString()
While GetMainPrivateProfileString(sKeyTitle, ConstEgtStone3D.SUBTITLE, "", SubTitle) > 0
- SetGroupButtonsLocation(sKeyTitle, m_TopPanelListGroupBtn)
+ SetGroupButtonsLocation(sKeyTitle, GroupSceneBtnList)
Index += 1
- sKeyTitle = TOPPANELLIST_BTN & "_" & Index.ToString()
+ sKeyTitle = NameList & "_" & Index.ToString()
End While
End Sub
@@ -446,8 +457,22 @@ Module SceneCmd
#Region "METHODS"
- Public Sub Exec(Flag)
- Dim nVeinCtx As Integer = Map.refSceneHostVM.MainScene.GetCtx()
+ Public Function ExecFile(Flag As String, nVeinCtx As Integer) As Boolean
+ Dim bNewParametricExsists As Boolean = False
+ If Flag.Contains(".lua") Then
+ If IsNothing(Map.refSceneButtonVM.m_ParametricCompoUC) Then Map.refSceneButtonVM.m_ParametricCompoUC = New SceneUserControlV
+ Dim LocalParametricCompo As New ParametricCompoVM(Flag, nVeinCtx)
+ If LocalParametricCompo.bFileExsist Then
+ Map.refSceneButtonVM.m_ParametricCompoUC.DataContext = LocalParametricCompo
+ Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_ParametricCompoUC)
+ bNewParametricExsists = True
+ End If
+ End If
+ Return bNewParametricExsists
+ End Function
+
+ Public Function ExecMethod(Flag As String, nVeinCtx As Integer) As Boolean
+ Dim bNewMethodsExsists As Boolean = True
Select Case Flag
Case EGT_AUTOPAIR
EgtSetCurrentContext(nVeinCtx)
@@ -490,23 +515,23 @@ Module SceneCmd
Case EGT_DELETE
SolidManagerM.Delete(Map.refSceneHostVM.m_nIdPart)
Map.refSceneHostVM.m_nIdPart = GDB_ID.NULL
- Case EGT_RECTANGE
- If IsNothing(Map.refSceneButtonVM.m_ParametricCompoUC) Then Map.refSceneButtonVM.m_ParametricCompoUC = New SceneUserControlV
- Map.refSceneButtonVM.m_ParametricCompoUC.DataContext = New ParametricCompoVM(EGT_RECTANGE & ".lua")
- Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_ParametricCompoUC)
- Case EGT_POLIGON
- If IsNothing(Map.refSceneButtonVM.m_ParametricCompoUC) Then Map.refSceneButtonVM.m_ParametricCompoUC = New SceneUserControlV
- Map.refSceneButtonVM.m_ParametricCompoUC.DataContext = New ParametricCompoVM(EGT_POLIGON & ".lua")
- Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_ParametricCompoUC)
- Case EGT_ELLIPSE
- If IsNothing(Map.refSceneButtonVM.m_ParametricCompoUC) Then Map.refSceneButtonVM.m_ParametricCompoUC = New SceneUserControlV
- Map.refSceneButtonVM.m_ParametricCompoUC.DataContext = New ParametricCompoVM(EGT_ELLIPSE & ".lua")
- Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_ParametricCompoUC)
Case EGT_EDIT_PANEL
If IsNothing(Map.refSceneButtonVM.m_EditPanelUC) Then Map.refSceneButtonVM.m_EditPanelUC = New SceneUserControlV
Map.refSceneButtonVM.m_EditPanelUC.DataContext = New EditPanelVM()
Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_EditPanelUC)
+ Case Else
+ EgtOutLog("La chiamata del metodo '" & Flag & "' non è andata a buon fine")
+ bNewMethodsExsists = False
End Select
+ Return bNewMethodsExsists
+ End Function
+
+ Public Sub Exec(Flag As String)
+ Dim nVeinCtx As Integer = Map.refSceneHostVM.MainScene.GetCtx()
+
+ If Not ExecFile(Flag, nVeinCtx) Then
+ ExecMethod(Flag, nVeinCtx)
+ End If
End Sub
Friend Sub Undo()
diff --git a/TopPanel/TopPanelListButton_1V.xaml b/TopPanel/TopPanelListButton_1V.xaml
index b3e8272..04f8bda 100644
--- a/TopPanel/TopPanelListButton_1V.xaml
+++ b/TopPanel/TopPanelListButton_1V.xaml
@@ -3,7 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtStone3D="clr-namespace:EgtStone3D">
-
@@ -19,7 +18,7 @@