EgtCAM5 :

- Modifiche varie.
This commit is contained in:
Emmanuele Sassi
2016-07-07 18:03:20 +00:00
parent 550057bf06
commit 8ee0f3bda1
13 changed files with 599 additions and 343 deletions
+88 -25
View File
@@ -35,6 +35,7 @@ Namespace EgtCAM5
' inizializzo gestore lavorazioni
EgtInitMachMgr(IniFile.m_sMachinesRoot)
EgtOpenFile("c:\EgtData\Varie\Temp\Fiera02.Nge")
m_Controller.ExecuteCommand(Controller.CMD.NEWPART)
EgtZoom(ZM.ALL)
m_bfirst = False
End If
@@ -50,13 +51,13 @@ Namespace EgtCAM5
Private m_bShowGrid As Boolean
Private m_bShowGridFrame As Boolean
'Private m_bCPlaneTypePos As Boolean
Private m_bCPlaneTypePos As Boolean
Private m_bMmUnits As Boolean
'Private WithEvents m_Controller As New Controller
'Private m_MruFiles As New MruList
'Private m_MruScripts As New MruList
Private m_bScriptRunning As Boolean = False
'Private m_bStopExec As Boolean = False
Private m_bStopScript As Boolean = False
'Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
'Private m_OutTextCallback As New OutTextCallback(AddressOf OutText)
@@ -96,32 +97,31 @@ Namespace EgtCAM5
Private Sub InitializeEgtProject()
'Impostazioni Controller
m_Controller.SetScene(m_ProjectScene)
'Dim bLuaReg As Boolean = (GetPrivateProfileInt(S_GENERAL, K_COMMANDLOG, 0, m_sIniFile) <> 0)
'Dim sCmdLogFile As String = CMDLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
Dim bLuaReg As Boolean = (GetPrivateProfileInt(S_GENERAL, K_COMMANDLOG, 0) <> 0)
'If Not m_Controller.SetCommandLog(bLuaReg, m_sTempDir, sCmdLogFile) Then
' EgtOutLog("Command log not started")
' 'If My.Application.CommandLineArgs.Count() = 0 Then
' ' MessageBox.Show("Command log not started", "TestEIn Warning",
' ' MessageBoxButtons.OK, MessageBoxIcon.Warning)
' 'End If
EgtOutLog("Command log not started")
If Environment.GetCommandLineArgs.Count() = 0 Then
MessageBox.Show("Command log not started", "TestEIn Warning",
MessageBoxButton.OK, MessageBoxImage.Warning)
End If
'End If
'' imposto unità di misura per interfaccia utente
'm_bMmUnits = (GetPrivateProfileInt(S_SCENE, K_MMUNITS, 1, m_sIniFile) <> 0)
'UpdateStatusUnits()
'' imposto visualizzazione riferimento globale
'Dim bShowGlobFrame As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWGFRAME, 1, m_sIniFile) <> 0)
'EgtSetGlobFrameShow(bShowGlobFrame)
' imposto unità di misura per interfaccia utente
m_bMmUnits = (GetPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0)
Application.Msn.NotifyColleagues(Application.UPDATESTATUSUNITS, m_bMmUnits)
' imposto visualizzazione riferimento globale
Dim bShowGlobFrame As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWGFRAME, 1) <> 0)
EgtSetGlobFrameShow(bShowGlobFrame)
' imposto i dati della griglia
LoadGridData()
' imposto stato di visualizzazione della griglia
m_bShowGrid = (GetPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0)
m_bShowGridFrame = (GetPrivateProfileInt(S_GRID, K_SHOWFRAME, 1) <> 0)
Application.Msn.NotifyColleagues(Application.UPDATESTATUSGRID, New UpdateStatusGridParam(m_bShowGrid, m_bShowGridFrame))
'' imposto tipo coordinate
'm_bCPlaneTypePos = True
'Scene1.SetGridCursorPos(m_bCPlaneTypePos)
'' modo di visualizzazione
'Dim nShowMode As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.SHADING, m_sIniFile)
' imposto tipo coordinate
m_bCPlaneTypePos = True
m_ProjectScene.SetGridCursorPos(m_bCPlaneTypePos)
' modo di visualizzazione
Dim nShowMode As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.SHADING)
'If nShowMode = SM.WIREFRAME Then
' btnWireFrame.Checked = True
'ElseIf nShowMode = SM.HIDDENLINE Then
@@ -132,13 +132,13 @@ Namespace EgtCAM5
'' visualizzazione direzione curve
'Dim nShowCurveDir As Integer = GetPrivateProfileInt(S_SCENE, K_CURVEDIR, 0, m_sIniFile)
'chkCurveDir.Checked = (nShowCurveDir <> 0)
'' visualizzazione avanzata dei triangoli costituenti le superfici
'Dim bShowTriaAdv As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1, m_sIniFile) <> 0)
'EgtSetShowTriaAdv(bShowTriaAdv)
' visualizzazione avanzata dei triangoli costituenti le superfici
Dim bShowTriaAdv As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
EgtSetShowTriaAdv(bShowTriaAdv)
'' ObjTree non selezionato
'm_nObjTreeOldId = GDB_ID.NULL
'' nascondo input box
'ResetInputBox()
' nascondo input box
Application.Msn.NotifyColleagues(Application.RESETINPUTBOX)
End Sub
@@ -477,6 +477,31 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.UPDATESTATUSGRID, New UpdateStatusGridParam(m_bShowGrid, m_bShowGridFrame))
EgtDraw()
End Sub)
Application.Msn.Register(Application.STATUSCURRPOSTYPECOMMAND, Sub()
m_bCPlaneTypePos = Not m_bCPlaneTypePos
If m_bCPlaneTypePos Then
Application.Msn.NotifyColleagues(Application.STATUSCURRPOSTYPETEXT, "CPLANE")
Else
Application.Msn.NotifyColleagues(Application.STATUSCURRPOSTYPETEXT, "WORLD")
End If
m_ProjectScene.SetGridCursorPos(m_bCPlaneTypePos)
End Sub)
Application.Msn.Register(Application.STATUSUNITSCOMMAND, Sub()
m_bMmUnits = Not m_bMmUnits
Application.Msn.NotifyColleagues(Application.UPDATESTATUSUNITS, m_bMmUnits)
LoadGridData()
EgtDraw()
End Sub)
Application.Msn.Register(Application.STATUSSTOPCOMMAND, Sub()
m_bStopScript = True
End Sub)
End Sub
Sub RegisterMainWindowCommands()
Application.Msn.Register(Application.LOADGRIDDATA, Sub()
LoadGridData()
End Sub)
End Sub
#End Region
@@ -687,6 +712,44 @@ Namespace EgtCAM5
#End Region
#Region "STATUSBAR EVENTS"
Private Sub ProjectScene_OnChangedSnapPointType(ByVal sender As Object, ByVal nSpType As SP, ByVal bUser As Boolean) Handles m_ProjectScene.OnChangedSnapPointType
If bUser Then
Application.Msn.NotifyColleagues(Application.STATUSSNAPPOINTTYPEBACKGROUND, New SolidColorBrush(SystemColors.ControlColor))
Else
Application.Msn.NotifyColleagues(Application.STATUSSNAPPOINTTYPEBACKGROUND, Brushes.Bisque)
End If
Select Case nSpType
Case SP.PT_SKETCH
Application.Msn.NotifyColleagues(Application.STATUSSNAPPOINTTYPETEXT, EgtMsg(1102)) 'Sketch Point
Case SP.PT_GRID
Application.Msn.NotifyColleagues(Application.STATUSSNAPPOINTTYPETEXT, EgtMsg(1104)) 'Grid Point
Case SP.PT_END
Application.Msn.NotifyColleagues(Application.STATUSSNAPPOINTTYPETEXT, EgtMsg(1106)) 'End Point
Case SP.PT_MID
Application.Msn.NotifyColleagues(Application.STATUSSNAPPOINTTYPETEXT, EgtMsg(1108)) 'Mid Point
Case SP.CENTER
Application.Msn.NotifyColleagues(Application.STATUSSNAPPOINTTYPETEXT, EgtMsg(1110)) 'Center
Case SP.CENTROID
Application.Msn.NotifyColleagues(Application.STATUSSNAPPOINTTYPETEXT, EgtMsg(1112)) 'Centroid
Case SP.PT_NEAR
Application.Msn.NotifyColleagues(Application.STATUSSNAPPOINTTYPETEXT, EgtMsg(1114)) 'Near Point
Case SP.PT_INTERS
Application.Msn.NotifyColleagues(Application.STATUSSNAPPOINTTYPETEXT, EgtMsg(1116)) 'Inters Point
Case SP.PT_TANGENT
Application.Msn.NotifyColleagues(Application.STATUSSNAPPOINTTYPETEXT, EgtMsg(1118)) 'Tang Point
Case SP.PT_PERPENDICULAR
Application.Msn.NotifyColleagues(Application.STATUSSNAPPOINTTYPETEXT, EgtMsg(1120)) 'Perp Point
Case SP.PT_MINDIST
Application.Msn.NotifyColleagues(Application.STATUSSNAPPOINTTYPETEXT, EgtMsg(1122)) 'MinDist Point
Case Else
Application.Msn.NotifyColleagues(Application.STATUSSNAPPOINTTYPETEXT, "---")
End Select
End Sub
#End Region ' StatusBar events
End Class
End Namespace