diff --git a/AboutBoxWindow/AboutBoxView.xaml b/AboutBoxWindow/AboutBoxView.xaml
index 537943b..93dd927 100644
--- a/AboutBoxWindow/AboutBoxView.xaml
+++ b/AboutBoxWindow/AboutBoxView.xaml
@@ -47,7 +47,7 @@
+ VerticalAlignment="Center" FontSize="12" />
diff --git a/Application.xaml.vb b/Application.xaml.vb
index 9ae5e84..deceb19 100644
--- a/Application.xaml.vb
+++ b/Application.xaml.vb
@@ -151,6 +151,7 @@ Class Application
' ToolsDbPage messages
Friend Const REMOVETOOL As String = "RemoveTool"
Friend Const ERRORONTOOL As String = "ErrorOnTool"
+ Friend Const SAVETOOLDRAW As String = "SaveToolDraw"
' MachiningsDbPage messages
Friend Const REMOVEMACHINING As String = "RemoveMachining"
diff --git a/IniFile.vb b/IniFile.vb
index 5b99a6a..4337d13 100644
--- a/IniFile.vb
+++ b/IniFile.vb
@@ -6,6 +6,9 @@ Module IniFile
Friend m_nInstance As Integer = 0
Friend m_nUserLevel As Integer = 1
Friend m_nKeyOptions As UInteger
+ Friend Enum KEY_OPT As UInteger
+ BASE = 1
+ End Enum
Public ReadOnly Property nUserLevel As Integer
Get
Return m_nUserLevel
diff --git a/MainWindow/MainWindowViewModel.vb b/MainWindow/MainWindowViewModel.vb
index 2cc1f0d..6c84005 100644
--- a/MainWindow/MainWindowViewModel.vb
+++ b/MainWindow/MainWindowViewModel.vb
@@ -330,8 +330,7 @@ Namespace EgtCAM5
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
EgtSetKey(sKey)
' Recupero opzioni della chiave
- Dim bKey As Boolean = EgtGetKeyOptions(17615, 16, 1, m_nKeyOptions)
- EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString())
+ Dim bKey As Boolean = EgtGetKeyOptions(3279, 16, 1, m_nKeyOptions)
' Inizializzazione generale di EgtInterface
m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
Dim sLogFile As String = m_sTempDir & "\" & GENLOG_FILE_NAME
@@ -388,6 +387,8 @@ Namespace EgtCAM5
'EgtSetProcessEvents(m_ProcEventsCallback)
'' Installo funzione output testo su status per lua
'EgtSetOutText(m_OutTextCallback)
+ ' Info su opzioni chiave
+ EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString())
End Sub
diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb
index 5726cde..37941d3 100644
--- a/My Project/AssemblyInfo.vb
+++ b/My Project/AssemblyInfo.vb
@@ -11,11 +11,26 @@ Imports System.Windows
' Review the values of the assembly attributes
-
-
-
+#If PLATFORM = "x64" Then
+#If DEBUG Then
+
+
+#Else
+
+
+#End if
+#Else
+#If DEBUG Then
+
+
+#Else
+
+
+#End If
+#End If
+
-
+
@@ -55,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below:
'
-
-
+
+
diff --git a/ProjectPage/ProjectViewModel.vb b/ProjectPage/ProjectViewModel.vb
index 8a1a2b0..d4ff1ef 100644
--- a/ProjectPage/ProjectViewModel.vb
+++ b/ProjectPage/ProjectViewModel.vb
@@ -29,8 +29,13 @@ Namespace EgtCAM5
PreInitializeScene()
If Not m_ProjectScene.Init() Then
EgtOutLog("Error in Project scene creation")
- ' Chiudo il programma
+ ' Box di avviso
+ MsgBox(EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3), MsgBoxStyle.OkOnly, EgtMsg(MSG_MISSINGKEYWD + 1))
+ ' Chiudo il programma
Application.Msn.NotifyColleagues(Application.CLOSEAPPLICATIONCOMMAND)
+ ' Verifico abilitazione prodotto
+ ElseIf (IniFile.m_nKeyOptions And KEY_OPT.BASE) = 0 Then
+ MsgBox(EgtMsg(MSG_MISSINGKEYWD + 5), MsgBoxStyle.OkOnly, EgtMsg(MSG_MISSINGKEYWD + 1))
End If
IniFile.m_ProjectSceneContext = m_ProjectScene.GetCtx
PostInitializeScene()
diff --git a/SharedFieldsClass.vb b/SharedFieldsClass.vb
index bf2855e..c1adc2c 100644
--- a/SharedFieldsClass.vb
+++ b/SharedFieldsClass.vb
@@ -31,12 +31,12 @@
Drill_Std(7) = Visibility.Visible ' Feed
Drill_Std(8) = Visibility.Visible ' EndFeed
Drill_Std(9) = Visibility.Visible ' StartFeed
- Drill_Std(10) = Visibility.Visible ' TipFeed
+ Drill_Std(10) = Visibility.Visible ' TipFeed
Drill_Std(11) = Visibility.Visible ' Len
Drill_Std(12) = Visibility.Visible ' TotLen
Drill_Std(13) = Visibility.Visible ' MaxMat
- Drill_Std(14) = Visibility.Visible ' LonOffset
- Drill_Std(15) = Visibility.Visible ' RadOffset
+ Drill_Std(14) = Visibility.Hidden ' LonOffset
+ Drill_Std(15) = Visibility.Hidden ' RadOffset
Drill_Std(16) = Visibility.Visible ' Speed
Drill_Std(17) = Visibility.Hidden ' SideAng
Drill_Std(18) = Visibility.Visible ' MaxSpeed
@@ -64,8 +64,8 @@
Drill_Long(11) = Visibility.Visible ' Len
Drill_Long(12) = Visibility.Visible ' TotLen
Drill_Long(13) = Visibility.Visible ' MaxMat
- Drill_Long(14) = Visibility.Visible ' LonOffset
- Drill_Long(15) = Visibility.Visible ' RadOffset
+ Drill_Long(14) = Visibility.Hidden ' LonOffset
+ Drill_Long(15) = Visibility.Hidden ' RadOffset
Drill_Long(16) = Visibility.Visible ' Speed
Drill_Long(17) = Visibility.Hidden ' SideAng
Drill_Long(18) = Visibility.Visible ' MaxSpeed
@@ -355,8 +355,8 @@
Drilling(46) = Visibility.Visible ' DepthStr
Drilling(47) = Visibility.Visible ' UserNotes
Drilling(48) = Visibility.Hidden ' OverLapStr
- Drilling(49) = Visibility.Visible ' OffsetStr
- Drilling(50) = Visibility.Visible ' SubType
+ Drilling(49) = Visibility.Hidden ' OffsetStr
+ Drilling(50) = Visibility.Hidden ' SubType
' Parametri Sawing
Sawing(0) = Visibility.Visible ' Invert
diff --git a/ToolsDbPage/ToolTreeView.vb b/ToolsDbPage/ToolTreeView.vb
index 8bb1218..fd7c461 100644
--- a/ToolsDbPage/ToolTreeView.vb
+++ b/ToolsDbPage/ToolTreeView.vb
@@ -212,7 +212,7 @@ Public Class ToolTreeViewItem
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
Dim dCornRad As Double = 0
EgtTdbGetCurrToolParam(MCH_TP.CORNRAD, dCornRad)
- Return LenToString(dCornRad, 3)
+ Return LenToString(dCornRad, 4)
End Get
Set(value As String)
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
@@ -232,7 +232,7 @@ Public Class ToolTreeViewItem
Dim dDiam As Double = 0
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dDiam)
m_Diam = dDiam
- Return LenToString(dDiam, 3)
+ Return LenToString(dDiam, 4)
End Get
Set(value As String)
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
@@ -252,7 +252,7 @@ Public Class ToolTreeViewItem
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
Dim dTotDiam As Double = 0
EgtTdbGetCurrToolParam(MCH_TP.TOTDIAM, dTotDiam)
- Return LenToString(dTotDiam, 3)
+ Return LenToString(dTotDiam, 4)
End Get
Set(value As String)
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
@@ -344,7 +344,7 @@ Public Class ToolTreeViewItem
Dim dLen As Double = 0
EgtTdbGetCurrToolParam(MCH_TP.LEN, dLen)
m_Len = dLen
- Return LenToString(dLen, 3)
+ Return LenToString(dLen, 4)
End Get
Set(value As String)
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
@@ -366,7 +366,7 @@ Public Class ToolTreeViewItem
Dim dTotLen As Double = 0
EgtTdbGetCurrToolParam(MCH_TP.TOTLEN, dTotLen)
m_TotLen = dTotLen
- Return LenToString(dTotLen, 3)
+ Return LenToString(dTotLen, 4)
End Get
Set(value As String)
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
@@ -388,7 +388,7 @@ Public Class ToolTreeViewItem
Dim dMaxMat As Double = 0
EgtTdbGetCurrToolParam(MCH_TP.MAXMAT, dMaxMat)
m_MaxMat = dMaxMat
- Return LenToString(dMaxMat, 3)
+ Return LenToString(dMaxMat, 4)
End Get
Set(value As String)
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
@@ -408,7 +408,7 @@ Public Class ToolTreeViewItem
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
Dim dLonOffset As Double = 0
EgtTdbGetCurrToolParam(MCH_TP.LONOFFSET, dLonOffset)
- Return LenToString(dLonOffset, 3)
+ Return LenToString(dLonOffset, 4)
End Get
Set(value As String)
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
@@ -426,7 +426,7 @@ Public Class ToolTreeViewItem
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
Dim dRadOffset As Double = 0
EgtTdbGetCurrToolParam(MCH_TP.RADOFFSET, dRadOffset)
- Return LenToString(dRadOffset, 3)
+ Return LenToString(dRadOffset, 4)
End Get
Set(value As String)
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
@@ -506,7 +506,7 @@ Public Class ToolTreeViewItem
Dim dThick As Double = 0
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
m_Thick = dThick
- Return LenToString(dThick, 3)
+ Return LenToString(dThick, 4)
End Get
Set(value As String)
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
@@ -649,6 +649,9 @@ Public Class ToolTreeViewItem
Sub New(Name As String)
MyBase.New(Name)
+ Application.Msn.Register(Application.SAVETOOLDRAW, Sub()
+ SaveToolDraw()
+ End Sub)
End Sub
Sub New(Name As String, IsSelected As Boolean, IsExpanded As Boolean, IsActive As Boolean)
@@ -942,7 +945,7 @@ Public Class ToolTreeViewItem
If m_MaxMat < EPS_SMALL Then
Return EgtMsg(MSG_TOOLSERRORS + 6)
End If
- If m_MaxMat > m_Len Then
+ If m_MaxMat > m_Len + EPS_SMALL Then
Return EgtMsg(MSG_TOOLSERRORS + 7)
End If
End If
@@ -968,7 +971,7 @@ Public Class ToolTreeViewItem
If m_Len < EPS_SMALL Then
Return EgtMsg(MSG_TOOLSERRORS + 10)
End If
- If m_Len > m_TotLen Then
+ If m_Len > m_TotLen + EPS_SMALL Then
Return "La lunghezza non può essere maggiore della lunghezza totale"
End If
End If
@@ -980,15 +983,15 @@ Public Class ToolTreeViewItem
If m_TotLen < EPS_SMALL Then
Return "La lunghezza totale deve essere maggiore di zero"
End If
- If m_TotLen < m_Len Then
- Return "La lunghezza totale non può essere maggiore della lunghezza"
+ If m_TotLen < m_Len - EPS_SMALL Then
+ Return "La lunghezza totale non può essere minore della lunghezza"
End If
End If
Return Nothing
End Function
Private Function ValidateSpeed() As String
- If m_Speed > m_MaxSpeed Then
+ If m_Speed > m_MaxSpeed + EPS_ZERO Then
Return EgtMsg(MSG_TOOLSERRORS + 11)
End If
Return Nothing
diff --git a/ToolsDbPage/ToolsDbViewModel.vb b/ToolsDbPage/ToolsDbViewModel.vb
index 80dc6f4..1482e60 100644
--- a/ToolsDbPage/ToolsDbViewModel.vb
+++ b/ToolsDbPage/ToolsDbViewModel.vb
@@ -479,6 +479,7 @@ Namespace EgtCAM5
''' Saves the current tool. This method is invoked by the SaveCommand.
'''
Public Sub Save(ByVal param As Object)
+ Application.Msn.NotifyColleagues(Application.SAVETOOLDRAW)
EgtTdbSaveCurrTool()
EgtTdbSave()
End Sub
diff --git a/Utility.vb b/Utility.vb
index f8c447b..3e13b20 100644
--- a/Utility.vb
+++ b/Utility.vb
@@ -4,7 +4,7 @@ Imports EgtUILib
Public Module Utility
- Friend Const ToolDrawUUIDName As String = "***********"
+ Friend Const ToolDrawUUIDName As String = "*AUTOMATIC*"
Friend Function DoubleToString(ByVal dVal As Double, ByVal nNumDec As Integer) As String
Dim sFormat As String = "F" + Math.Abs(nNumDec).ToString()