diff --git a/Constants/ConstGen.vb b/Constants/ConstGen.vb index 594cc14..150af81 100644 --- a/Constants/ConstGen.vb +++ b/Constants/ConstGen.vb @@ -23,6 +23,7 @@ Module ConstGen Public Const LIC_FILE_NAME As String = "EgtCAM5.lic" Public Const S_LICENCE As String = "Licence" Public Const K_KEY As String = "Key" + Public Const K_NESTKEY As String = "NestKey" ' File di log generale Public Const GENLOG_FILE_NAME As String = "EgtCAM5Log#.txt" diff --git a/Constants/ConstIni.vb b/Constants/ConstIni.vb index a5494d3..271cd7c 100644 --- a/Constants/ConstIni.vb +++ b/Constants/ConstIni.vb @@ -62,6 +62,7 @@ Module ConstIni Public Const K_BACKTOP As String = "BackTop" Public Const K_BACKBOTTOM As String = "BackBottom" Public Const K_SHOWGFRAME As String = "ShowGFrame" + Public Const K_LINEWIDTH As String = "LineWidth" Public Const K_MARK As String = "Mark" Public Const K_SELSURF As String = "SelSurf" Public Const K_SHOWMODE As String = "ShowMode" diff --git a/MainWindow/MainWindowVM.vb b/MainWindow/MainWindowVM.vb index 1176bc5..0d3f420 100644 --- a/MainWindow/MainWindowVM.vb +++ b/MainWindow/MainWindowVM.vb @@ -318,13 +318,16 @@ Public Class MainWindowVM ManageInstance() ' Imposto tipo di chiave EgtSetLockType(KEY_TYPE.HW) - ' Leggo e imposto chiave di protezione - Dim sLicFileName As String = String.Empty - GetPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName) + ' Leggo e imposto chiave di protezione ed eventuale chiave nesting + Dim sLicFileName As String = "" + GetPrivateProfileString( S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName) Dim sLicFile As String = m_sConfigDir & "\" & sLicFileName - Dim sKey As String = String.Empty - EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile) - EgtSetKey(sKey) + Dim sKey As String = "" + EgtUILib.GetPrivateProfileString( S_LICENCE, K_KEY, "", sKey, sLicFile) + EgtSetKey( sKey) + Dim sNestKey As String = "" + EgtUILib.GetPrivateProfileString( S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile) + EgtSetNestKey( sNestKey) ' Recupero livello e opzioni della chiave Dim bKey As Boolean = EgtGetKeyLevel(3279, 21, 1, IniFile.m_nKeyLevel) And EgtGetKeyOptions(3279, 21, 1, IniFile.m_nKeyOptions) diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index bb68939..9e3a058 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/OptionsWindow/OptionModule.vb b/OptionsWindow/OptionModule.vb index 53bb07f..95acbb7 100644 --- a/OptionsWindow/OptionModule.vb +++ b/OptionsWindow/OptionModule.vb @@ -10,8 +10,10 @@ Friend Module OptionModule Friend m_TopSceneBackground As Color3d Friend m_BotSceneBackground As Color3d Friend m_GridColor As Color3d + ' Flag per visualizzazione spessa delle linee + Friend m_bThickLine As Boolean ' Flag per visualizzazione smussata delle superfici - Friend m_bTriMeshSmoothed As Boolean + Friend m_bSmoothTriMesh As Boolean ' Colore di default in disegno Friend m_DefMaterialColor As Color3d @@ -79,8 +81,10 @@ Friend Module OptionModule Dim GridColor As New Color3d(0, 0, 0) GetPrivateProfileColor(S_GRID, K_MINLNCOLOR, GridColor) m_GridColor = GridColor + ' Inizializzo flag linee ingrossate + m_bThickLine = GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1 ' Inizializzo flag visualizzazione smussata delle superfici - m_bTriMeshSmoothed = GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0 + m_bSmoothTriMesh = GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0 ' Inizio colore di default in disegno Dim DefColor As New Color3d(0, 0, 0) GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor) diff --git a/OptionsWindow/OptionWindowV.xaml b/OptionsWindow/OptionWindowV.xaml index 9f1b9ae..bf78805 100644 --- a/OptionsWindow/OptionWindowV.xaml +++ b/OptionsWindow/OptionWindowV.xaml @@ -59,10 +59,14 @@ + + + Grid.Row="1" Margin="0,5,0,5"/> + Grid.Column="1" Grid.Row="1" Margin="22,5,0,5" VerticalAlignment="Center"/> diff --git a/OptionsWindow/OptionWindowVM.vb b/OptionsWindow/OptionWindowVM.vb index ae6446d..a12111d 100644 --- a/OptionsWindow/OptionWindowVM.vb +++ b/OptionsWindow/OptionWindowVM.vb @@ -161,12 +161,23 @@ Public Class OptionWindowVM End Get End Property - Public Property SmoothTriMesh As Boolean + Public Property ThickLine As Boolean Get - Return OptionModule.m_bTriMeshSmoothed + Return OptionModule.m_bThickLine End Get Set(value As Boolean) - OptionModule.m_bTriMeshSmoothed = value + OptionModule.m_bThickLine = value + WritePrivateProfileString(S_SCENE, K_LINEWIDTH, If( value, "2", "1")) + EgtSetLineAttribs( If( value, 2, 1)) + End Set + End Property + + Public Property SmoothTriMesh As Boolean + Get + Return OptionModule.m_bSmoothTriMesh + End Get + Set(value As Boolean) + OptionModule.m_bSmoothTriMesh = value WritePrivateProfileString(S_SCENE, K_SHOWTRIAADV, If(value, "1", "0")) EgtSetShowTriaAdv(value) End Set @@ -290,9 +301,14 @@ Public Class OptionWindowVM Return EgtMsg(MSG_OPTIONPAGE + 17) End Get End Property + Public ReadOnly Property ThickLineMsg As String + Get + Return EgtMsg( 6536) ' Linee spesse + End Get + End Property Public ReadOnly Property SmoothTriMeshMsg As String Get - Return EgtMsg(MSG_OPTIONPAGE + 18) + Return EgtMsg( 6518) ' Superfici smussate End Get End Property diff --git a/Project/ProjectVM.vb b/Project/ProjectVM.vb index b284a38..e00f8a2 100644 --- a/Project/ProjectVM.vb +++ b/Project/ProjectVM.vb @@ -225,6 +225,10 @@ Public Class ProjectVM Dim BackBotColor As New Color3d(BackTopColor) GetPrivateProfileColor(S_SCENE, K_BACKBOTTOM, BackBotColor) m_ProjectScene.SetViewBackground(BackTopColor, BackBotColor) + ' imposto spessore linee + Dim nLineWidth As Integer = 1 + nLineWidth = GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, nLineWidth) + m_ProjectScene.SetLineWidth( nLineWidth) ' imposto colore di evidenziazione Dim MarkColor As New Color3d(255, 255, 0) GetPrivateProfileColor(S_SCENE, K_MARK, MarkColor)