diff --git a/Constants/ConstEgtStone3D.vb b/Constants/ConstEgtStone3D.vb
new file mode 100644
index 0000000..d1a0925
--- /dev/null
+++ b/Constants/ConstEgtStone3D.vb
@@ -0,0 +1,11 @@
+Module ConstEgtStone3D
+
+ Public Const EGT_ROTATE As String = "Rotate"
+
+ Public Const EGT_PAIR As String = "Pair"
+
+ Public Const ASSEMBLER_FILENAME As String = "AssemblerLog.txt"
+
+ Public Const ASSEMBLER As String = " Avvio Assembler"
+
+End Module
diff --git a/Constants/ConstGen.vb b/Constants/ConstGen.vb
index 08de7f4..09beb2b 100644
--- a/Constants/ConstGen.vb
+++ b/Constants/ConstGen.vb
@@ -32,4 +32,11 @@
' Sottodirettorio di default per toolmakers
Public Const TOOLMAKERS_DFL_DIR As String = "ToolMakers"
+ ' Sottodirettorio del Vein 3D
+ Public Const VEIND3D_DIR As String = "Vein3D_Dir"
+ ' Sottodirettorio del Create Solid
+ Public Const CREATESOLID_DIR As String = "CreateSolid"
+ ' Sottodirettorio dell'Operation Solid
+ Public Const OPERATIONSOLID_DIR As String = "OperationSolid"
+
End Module
diff --git a/Constants/ConstIni.vb b/Constants/ConstIni.vb
index 6404dd6..4ddcd17 100644
--- a/Constants/ConstIni.vb
+++ b/Constants/ConstIni.vb
@@ -10,4 +10,6 @@
Public Const K_LINEWIDTH As String = "LineWidth"
Public Const K_CUSTOMCOLORS As String = "CustomColors"
+ Public Const K_VEIND3D As String = "Vein3D"
+
End Module
diff --git a/EgtStone3D.vbproj b/EgtStone3D.vbproj
index ed03a51..ab8bb1c 100644
--- a/EgtStone3D.vbproj
+++ b/EgtStone3D.vbproj
@@ -98,6 +98,7 @@
MSBuild:CompileDesigner
+ MainWindowV.xaml
diff --git a/MainWindow/MainWindowM.vb b/MainWindow/MainWindowM.vb
index 11610f2..7afeb6e 100644
--- a/MainWindow/MainWindowM.vb
+++ b/MainWindow/MainWindowM.vb
@@ -162,11 +162,11 @@ Public Class MainWindowM
Sub New()
InitializeEgtEnvironment()
' carico il file LUA con tutte le funzioni di accoppiamento
- GetMainPrivateProfileString("Vein3D", "Vein3D_Dir", "", m_sVein3DDir)
+ GetMainPrivateProfileString(K_VEIND3D, VEIND3D_DIR, "", m_sVein3DDir)
' Path del lua da utilizzare
- GetMainPrivateProfileString("Vein3D", "CreateSolid", "", m_sCreateSolidPath)
+ GetMainPrivateProfileString(K_VEIND3D, CREATESOLID_DIR, "", m_sCreateSolidPath)
' Path del lua da utilizzare
- GetMainPrivateProfileString("Vein3D", "OperationSolid", "", m_sOperationSolidPath)
+ GetMainPrivateProfileString(K_VEIND3D, OPERATIONSOLID_DIR, "", m_sOperationSolidPath)
End Sub
#End Region ' Constructor
diff --git a/MainWindow/MainWindowV.xaml b/MainWindow/MainWindowV.xaml
index 6bbad52..2e7cfd9 100644
--- a/MainWindow/MainWindowV.xaml
+++ b/MainWindow/MainWindowV.xaml
@@ -7,7 +7,6 @@
AllowDrop="True"
ShowInTaskbar="True"
Topmost="False"
- Title="EgtStone3D"
Style="{StaticResource NoStyle_Window}">
diff --git a/Pair/PairV.xaml b/Pair/PairV.xaml
index 7ce3ee7..5d0dde0 100644
--- a/Pair/PairV.xaml
+++ b/Pair/PairV.xaml
@@ -1,43 +1,36 @@
-
-
-
- Flip ∥
- Flip ⟂
+ xmlns:EgtStone3D="clr-namespace:EgtStone3D">
+
+
+
+
+
-
-
+
+
diff --git a/Pair/PairV.xaml.vb b/Pair/PairV.xaml.vb
index ecd11a1..6d66b5f 100644
--- a/Pair/PairV.xaml.vb
+++ b/Pair/PairV.xaml.vb
@@ -1,26 +1,42 @@
Public Class PairV
- Private PairOperation As PairVM
+
+#Region "FIELDS & PROPERTIES"
+
+ Private m_PairVM As PairVM
+
+#End Region ' Fields & Properties
+
+#Region "CONSTRUCTOR"
+
Sub New()
' La chiamata è richiesta dalla finestra di progettazione.
InitializeComponent()
- PairOperation = New PairVM
+
+ ' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
+ m_PairVM = New PairVM
+ Me.DataContext = m_PairVM
+
PairOption.ItemsSource = New List(Of String)({"Start-Start", "Start-End", "End-Start", "End-End", "Middle-Middle"})
PairOption.SelectedIndex = 1
- ' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
-
End Sub
+#End Region ' Constructor
+
+#Region "EVENTS"
+
Public Sub Conferma_click() Handles Conferma.Click
- PairOperation.Conferma(Me)
+ m_PairVM.Conferma(Me)
End Sub
Public Sub Annulla_click() Handles Annulla.Click
- PairOperation.Annulla(Me)
+ m_PairVM.Annulla(Me)
End Sub
Private Sub PairOption_Changed() Handles PairOption.SelectionChanged, FlipOption1.Click, FlipOption2.Click
- If Not IsNothing(Map.refSceneButtonV.m_PairUC) Then PairOperation.PairPartsAgain()
+ If Not IsNothing(Map.refSceneButtonV.m_PairUC) Then m_PairVM.PairPartsAgain()
End Sub
+#End Region ' Events
+
End Class
diff --git a/Pair/PairVM.vb b/Pair/PairVM.vb
index 533f603..4bb21ac 100644
--- a/Pair/PairVM.vb
+++ b/Pair/PairVM.vb
@@ -1,12 +1,65 @@
-Public Class PairVM
+Imports EgtUILib
+Imports EgtWPFLib5
+
+Public Class PairVM
+ Inherits VMBase
+
+#Region "FIELDS & PROPERTIES"
+
+#Region "Messages"
+
+ Public ReadOnly Property TopBar_Msg As String
+ Get
+ Return EgtMsg(110000)
+ End Get
+ End Property
+
+ Public ReadOnly Property FlipOption1_Msg As String
+ Get
+ Return EgtMsg(110001)
+ End Get
+ End Property
+
+ Public ReadOnly Property FlipOption2_Msg As String
+ Get
+ Return EgtMsg(110002)
+ End Get
+ End Property
+
+ Public ReadOnly Property Conferma_Msg As String
+ Get
+ Return EgtMsg(110003)
+ End Get
+ End Property
+
+ Public ReadOnly Property Annulla_Msg As String
+ Get
+ Return EgtMsg(110004)
+ End Get
+ End Property
+
+#End Region ' Messages
+
+#End Region ' Fields & Properties
+
+#Region "CONSTRUCTOR"
+
+ Sub New()
+
+ End Sub
+
+#End Region ' Constructor
+
+#Region "METHODS"
+
Public Sub Conferma(PairView As PairV)
Map.refSceneButtonV.RemovePairUC(PairView)
- DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton("Pair"), _ToggleButton).IsChecked = False
+ DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton(EGT_PAIR), _ToggleButton).IsChecked = False
End Sub
Public Sub Annulla(PairView As PairV)
Map.refSceneButtonV.RemovePairUC(PairView)
- DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton("Pair"), _ToggleButton).IsChecked = False
+ DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton(EGT_PAIR), _ToggleButton).IsChecked = False
End Sub
Public Sub PairPartsAgain()
@@ -19,4 +72,7 @@
Dim a As Integer = 0
'debug
End Sub
+
+#End Region ' Methods
+
End Class
diff --git a/ProjManager/ProjManagerVM.vb b/ProjManager/ProjManagerVM.vb
index 29f3f2f..af606f1 100644
--- a/ProjManager/ProjManagerVM.vb
+++ b/ProjManager/ProjManagerVM.vb
@@ -3,10 +3,20 @@ Imports EgtUILib
Imports System.Windows.Forms
Public Class ProjManagerVM
+
+#Region "FIELDS & PROPERTIES"
+
+ ' Definizione Comandi
Private m_NewFileCmd As ICommand
Private m_SaveFileCmd As ICommand
Private m_OpenFileCmd As ICommand
+#End Region ' Fields & Properties
+
+#Region "COMMANDS"
+
+#Region "NewFileCmd"
+
Public ReadOnly Property NewFileCmd As ICommand
Get
If IsNothing(m_NewFileCmd) Then
@@ -20,6 +30,10 @@ Public Class ProjManagerVM
End Sub
+#End Region ' NewFileCmd
+
+#Region "OpenFileCmd"
+
Public ReadOnly Property OpenFileCmd As ICommand
Get
If IsNothing(m_OpenFileCmd) Then
@@ -48,6 +62,10 @@ Public Class ProjManagerVM
End Sub
+#End Region ' OpenFileCmd
+
+#Region "SaveFileCmd"
+
Public ReadOnly Property SaveFileCmd As ICommand
Get
If IsNothing(m_SaveFileCmd) Then
@@ -60,4 +78,9 @@ Public Class ProjManagerVM
Private Sub SaveFile()
End Sub
+
+#End Region ' SaveFileCmd
+
+#End Region ' Commands
+
End Class
diff --git a/Rotate/RotateV.xaml b/Rotate/RotateV.xaml
index 5ed37f2..09dd771 100644
--- a/Rotate/RotateV.xaml
+++ b/Rotate/RotateV.xaml
@@ -1,47 +1,38 @@
-
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+
+
+ Content="Seleziona l'asse di rotazione"
+ Style="{DynamicResource TopBar}"/>
-
-
+
+
-
-
+
+
diff --git a/Rotate/RotateV.xaml.vb b/Rotate/RotateV.xaml.vb
index 6cf328d..c39d9e2 100644
--- a/Rotate/RotateV.xaml.vb
+++ b/Rotate/RotateV.xaml.vb
@@ -1,24 +1,42 @@
Public Class RotateV
- Private RotateOperation As RotateVM
+
+#Region "FIELDS & PROPERTIES"
+
+ Private m_RotateVM As RotateVM
+
+#End Region ' Fields & Properties
+
+#Region "CONSTRUCTOR"
+
Sub New()
' La chiamata è richiesta dalla finestra di progettazione.
InitializeComponent()
- RotateOperation = New RotateVM
+ m_RotateVM = New RotateVM
+ Me.DataContext = m_RotateVM
+
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
Dim PartSolidSel As PartSolidM = SolidManagerM.GetPartSolid(Map.refSceneHostV.m_nIdPart)
If IsNothing(PartSolidSel) Then Annulla_click()
PartSolidSel.ShowAxis()
End Sub
+
+#End Region ' Constructor
+
+#Region "EVENTS"
+
Private Sub Conferma_click() Handles Conferma.Click
- RotateOperation.Conferma(Me)
+ m_RotateVM.Conferma(Me)
End Sub
Private Sub Annulla_click() Handles Annulla.Click
- RotateOperation.Annulla(Me)
+ m_RotateVM.Annulla(Me)
End Sub
Public Sub AngText_Changed() Handles RotInputData.TextChanged
- If Not IsNothing(Map.refSceneButtonV.m_RotateUC) Then RotateOperation.AngText_Changed()
+ If Not IsNothing(Map.refSceneButtonV.m_RotateUC) Then m_RotateVM.AngText_Changed()
End Sub
+
+#End Region ' Events
+
End Class
diff --git a/Rotate/RotateVM.vb b/Rotate/RotateVM.vb
index 5086015..c3f8186 100644
--- a/Rotate/RotateVM.vb
+++ b/Rotate/RotateVM.vb
@@ -1,18 +1,34 @@
Imports EgtUILib.EgtInterface
Public Class RotateVM
+
+ Public ReadOnly Property Conferma_Msg As String
+ Get
+ Return EgtMsg(110003)
+ End Get
+ End Property
+
+ Public ReadOnly Property Annulla_Msg As String
+ Get
+ Return EgtMsg(110004)
+ End Get
+ End Property
+
+
+#Region "METHODS"
+
Public Sub Conferma(RotateView As RotateV)
Map.refSceneButtonV.RemoveRotateUC(RotateView)
- DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton("Rotate"), _ToggleButton).IsChecked = False
+ DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton(EGT_ROTATE), _ToggleButton).IsChecked = False
End Sub
Public Sub Annulla(RotateView As RotateV)
Map.refSceneButtonV.RemoveRotateUC(RotateView)
- DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton("Rotate"), _ToggleButton).IsChecked = False
+ DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton(EGT_ROTATE), _ToggleButton).IsChecked = False
End Sub
Public Sub AngText_Changed()
- If Not DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton("Rotate"), _ToggleButton).IsChecked Then Return
+ If Not DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton(EGT_ROTATE), _ToggleButton).IsChecked Then Return
Dim nId As Integer = Map.refSceneHostV.m_nIdPart
If nId = GDB_ID.NULL Then Return
Dim sAng As String = Map.refSceneButtonV.m_RotateUC.RotInputData.Text
@@ -32,4 +48,7 @@ Public Class RotateVM
Map.refSceneHostV.m_dAngRot = dAng
End Sub
+
+#End Region ' Methods
+
End Class
diff --git a/SceneButton/SceneButtonV.xaml b/SceneButton/SceneButtonV.xaml
index 552d9eb..b372549 100644
--- a/SceneButton/SceneButtonV.xaml
+++ b/SceneButton/SceneButtonV.xaml
@@ -5,92 +5,109 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SceneButton/SceneButtonV.xaml.vb b/SceneButton/SceneButtonV.xaml.vb
index 604c66d..63fb6d5 100644
--- a/SceneButton/SceneButtonV.xaml.vb
+++ b/SceneButton/SceneButtonV.xaml.vb
@@ -1,11 +1,13 @@
-Imports System.Windows.Interop
+Public Class SceneButtonV
-Public Class SceneButtonV
+#Region "FIELDS & PROPERTIES"
Private m_refSceneButtonVM As SceneButtonVM
Public m_PairUC As PairV
Public m_RotateUC As RotateV
+#End Region ' Fields & Properties
+
#Region "CONSTRUCTOR"
Sub New()
@@ -48,6 +50,7 @@ Public Class SceneButtonV
MainGrid.Children.Remove(PairUC)
PairUC = Nothing
End Sub
+
Public Sub LoadRotateUC()
If IsNothing(m_RotateUC) Then
m_RotateUC = New RotateV
diff --git a/SceneHost/MySceneHostVM.vb b/SceneHost/MySceneHostVM.vb
index c8f57a7..d32ce6e 100644
--- a/SceneHost/MySceneHostVM.vb
+++ b/SceneHost/MySceneHostVM.vb
@@ -1,6 +1,5 @@
Imports EgtUILib
Imports EgtWPFLib5
-Imports System.IO
Public Class MySceneHostVM
Inherits SceneHostVM
diff --git a/SceneHost/SceneHostV.xaml.vb b/SceneHost/SceneHostV.xaml.vb
index fbdb6bb..5266aef 100644
--- a/SceneHost/SceneHostV.xaml.vb
+++ b/SceneHost/SceneHostV.xaml.vb
@@ -1,5 +1,4 @@
-Imports System.Collections.ObjectModel
-Imports EgtUILib
+Imports EgtUILib
Imports EgtUILib.EgtInterface
Imports EgtWPFLib5
@@ -9,6 +8,8 @@ Public Class SceneHostV
Private m_MySceneHostVM As MySceneHostVM
+ Private m_SelType As Integer = GDB_TY.CRV_LINE
+
' variabili per la selezione in over
Private m_nIdMouseOverSel As Integer = 0
Private m_nIdMarked1 As Integer = 0
@@ -75,7 +76,8 @@ Public Class SceneHostV
#End Region ' Constructor
- Private m_SelType As Integer = GDB_TY.CRV_LINE
+#Region "EVENTS"
+
Private Sub OnMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles MainScene.OnMouseMoveScene
OnMouseOver(sender, e, m_SelType)
' Se drag non abilitato o già in esecuzione, esco
@@ -642,4 +644,6 @@ Line1:
EgtDraw()
End Sub
+#End Region ' Events
+
End Class
diff --git a/SecondaryWindow/SecondaryWindowV.xaml b/SecondaryWindow/SecondaryWindowV.xaml
index 9b8adda..c27ae7f 100644
--- a/SecondaryWindow/SecondaryWindowV.xaml
+++ b/SecondaryWindow/SecondaryWindowV.xaml
@@ -10,7 +10,7 @@
Background="Transparent"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtMainWindow}}">
-
+
diff --git a/SecondaryWindow/SecondaryWindowVM.vb b/SecondaryWindow/SecondaryWindowVM.vb
index b952ae9..fa339b8 100644
--- a/SecondaryWindow/SecondaryWindowVM.vb
+++ b/SecondaryWindow/SecondaryWindowVM.vb
@@ -47,5 +47,4 @@ Public Class SecondaryWindowVM
#End Region ' COMMANDS
-
End Class
diff --git a/Utility/AssLogM.vb b/Utility/AssLogM.vb
index 3d747c2..8ffb58d 100644
--- a/Utility/AssLogM.vb
+++ b/Utility/AssLogM.vb
@@ -1,11 +1,19 @@
Imports System.IO
Module AssLogM
+
+#Region "FIELDS & PROPERTIES"
+
Public Property AssemblerFunctionLog As String = String.Empty
+
+#End Region ' Fields & Properties
+
+#Region "METHODS"
+
Public Sub InitAssLog()
- AssemblerFunctionLog = Map.refMainWindowVM.MainWindowM.sDataRoot & "\Temp\" & "AssemblerLog.txt"
+ AssemblerFunctionLog = Map.refMainWindowVM.MainWindowM.sTempDir & "\" & ASSEMBLER_FILENAME
File.WriteAllText(AssemblerFunctionLog, String.Empty)
- AssLog(Date.Now.ToString & " Avvio Assembler")
+ AssLog(Date.Now.ToString & ASSEMBLER)
End Sub
Public Function AssLog(sMsg As String) As Boolean
@@ -14,4 +22,7 @@ Module AssLogM
AssLogWriter.Close()
Return True
End Function
+
+#End Region ' Methods
+
End Module
diff --git a/Utility/EgtStone3DDictionary.xaml b/Utility/EgtStone3DDictionary.xaml
index df738ea..2105b29 100644
--- a/Utility/EgtStone3DDictionary.xaml
+++ b/Utility/EgtStone3DDictionary.xaml
@@ -351,4 +351,148 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Utility/EstCalc.vb b/Utility/EstCalc.vb
index 21dc612..9651f41 100644
--- a/Utility/EstCalc.vb
+++ b/Utility/EstCalc.vb
@@ -1,8 +1,10 @@
Imports System.Globalization
Imports EgtUILib
-Imports EgtWPFLib5
Module EstCalc
+
+#Region "METHODS"
+
'Friend Function CompoColor(sIniFile As String) As Color3d
' Dim InsertColor As New Color3d(89, 210, 210, 25)
' Dim IndexColor As Integer = GetPrivateProfileInt(S_COMPO, K_LASTCOLOR, 1, sIniFile)
@@ -1089,5 +1091,7 @@ Module EstCalc
' Return ( nText <> GDB_ID.NULL)
' End Function
+#End Region ' Methods
+
End Module
diff --git a/Utility/PartSolidM.vb b/Utility/PartSolidM.vb
index 65bae96..f12510a 100644
--- a/Utility/PartSolidM.vb
+++ b/Utility/PartSolidM.vb
@@ -1,7 +1,9 @@
Imports EgtUILib.EgtInterface
Public Class PartSolidM
-#Region "properties"
+
+#Region "FIELDS & PROPERTIES"
+
Private m_PartId As Integer = -1
Public ReadOnly Property PartId As Integer
Get
@@ -180,9 +182,10 @@ Public Class PartSolidM
Private m_nLayTempId As Integer = -1
-#End Region ' properties
+#End Region ' Fields & Properties
+
+#Region "CONSTRUCTOR"
-#Region "metodi"
Sub New(nId As Integer)
' salvo il riferimento della VeinMatchingWindow
Dim nPartId As Integer = -1
@@ -243,6 +246,10 @@ Public Class PartSolidM
End If
End Sub
+#End Region ' Constructor
+
+#Region "METHODS"
+
Public Sub SelectSinglePart()
If EgtIsSelectedObj(m_PartId) Then Return
Dim bOk As Boolean = EgtSelectObj(m_PartId)
@@ -407,5 +414,6 @@ Public Class PartSolidM
Return EgtIsSelectedObj(PartId)
End Function
-#End Region ' metodi
+#End Region ' Methods
+
End Class
diff --git a/Utility/SolidManagerM.vb b/Utility/SolidManagerM.vb
index ac2a227..40b40dd 100644
--- a/Utility/SolidManagerM.vb
+++ b/Utility/SolidManagerM.vb
@@ -4,8 +4,15 @@ Imports EgtWPFLib5
Module SolidManagerM
+#Region "FIELDS & PROPERTIES"
+
Public m_PartSolidList As New ObservableCollection(Of PartSolidM) '' lista dei PartSolid
Public m_nVeinCtx As Integer = DirectCast(Map.refSceneHostV.DataContext, SceneHostVM).MainScene.GetCtx()
+
+#End Region ' Fields & Properties
+
+#Region "METHODS"
+
Public Function GetPartSolid(nId As Integer) As PartSolidM
' se la lista non esiste la creo
If m_PartSolidList.Count = 0 Then
@@ -474,4 +481,6 @@ Module SolidManagerM
Return False
End Function
+#End Region ' Methods
+
End Module