diff --git a/DrawPanel/DrawPanelVM.vb b/DrawPanel/DrawPanelVM.vb
index df0c1bd..8bb8930 100644
--- a/DrawPanel/DrawPanelVM.vb
+++ b/DrawPanel/DrawPanelVM.vb
@@ -2219,6 +2219,7 @@ Public Class DrawPanelVM
If Not IniFile.m_ProjectSceneContext = 0 Then
bSelOk = EgtGetFirstSelectedObj() <> GDB_ID.NULL
bLayerOkAndSelOk = m_bLayerOk And m_bSelOk
+ Map.refStatusBarVM.UpdateSelectedCount()
End If
If Application.m_UpdateLayerTree Then
diff --git a/ExecuteWindow/ExecuteWindowVM.vb b/ExecuteWindow/ExecuteWindowVM.vb
index 27eb94e..3a00c6e 100644
--- a/ExecuteWindow/ExecuteWindowVM.vb
+++ b/ExecuteWindow/ExecuteWindowVM.vb
@@ -10,7 +10,7 @@ Public Class ExecuteWindowVM
' Evento per chiusura finestra
Friend Event OnCloseWindow(bDialogResult As Boolean)
- Private ReadOnly sScriptFilePath As String = Path.Combine(IniFile.m_sTempDir, "ImmExec" & IniFile.m_nInstance.ToString() & ".tua")
+ Private ReadOnly sScriptFilePath As String = Path.Combine(IniFile.m_sTempDir, "ImmExec" & IniFile.m_nInstance.ToString() & ".lua")
Private m_sScriptText As String
Public Property sScriptText As String
@@ -96,12 +96,9 @@ Public Class ExecuteWindowVM
' Salva il file script
SaveScript(sScriptFilePath, m_sScriptText)
' Esegue il file script
- EgtLuaExecFile(sScriptFilePath)
- ' Aggiorna visualizzazione
- EgtDraw()
- ' Aggiorna interfaccia
- If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.LoadObjTree()
- UpdateUI()
+ Map.refProjectVM.ExecScript(sScriptFilePath)
+ ' Se non passato a lavorazione, aggiornamento visualizzazione
+ If IniFile.m_ProjectMode <> ProjectModeOpt.MACHINING Then EgtDraw()
' Chiudo finestra
RaiseEvent OnCloseWindow(True)
End Sub
diff --git a/SpecialPanel/SpecialPanelVM.vb b/SpecialPanel/SpecialPanelVM.vb
index 80f91ca..97db945 100644
--- a/SpecialPanel/SpecialPanelVM.vb
+++ b/SpecialPanel/SpecialPanelVM.vb
@@ -169,9 +169,9 @@ Public Class ButtonItem
End If
If Not File.Exists(m_sLuaCmdPath) Then Return
If Not Path.GetExtension(m_sLuaCmdPath).ToLower = ".lua" Then Return
- ' Abilito eventi se comando lua termina con Beam\Process.lua
+ ' Abilito eventi se comando lua lanciato da Beam o Wall
m_sCurrBarName = m_sBarName
- Dim bRaiseEvent As Boolean = ( m_sBarName = "Beam" OrElse m_sBarName = "Wall")
+ Dim bRaiseEvent As Boolean = ( m_sBarName = "Beam" OrElse m_sBarName = "Wall")
' eseguo file Lua
Map.refProjectVM.PreExecScript(False)
Map.refProjectVM.ExecScript(m_sLuaCmdPath, bRaiseEvent)
diff --git a/StatusBar/MyStatusBarVM.vb b/StatusBar/MyStatusBarVM.vb
index fb302ea..e4f8423 100644
--- a/StatusBar/MyStatusBarVM.vb
+++ b/StatusBar/MyStatusBarVM.vb
@@ -14,51 +14,6 @@ Public Class MyStatusBarVM
Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
Private m_OutTextCallback As New OutTextCallback(AddressOf OutText)
- ' GRAPHICAL ELEMENTS
- 'Private m_StatusOutput As String
- 'Public Property StatusOutput As String
- ' Get
- ' Return m_StatusOutput
- ' End Get
- ' Set(value As String)
- ' m_StatusOutput = value
- ' NotifyPropertyChanged("StatusOutput")
- ' End Set
- 'End Property
-
- 'Private m_StatusCurrPos As String
- 'Public Property StatusCurrPos As String
- ' Get
- ' Return m_StatusCurrPos
- ' End Get
- ' Set(value As String)
- ' m_StatusCurrPos = value
- ' NotifyPropertyChanged("StatusCurrPos")
- ' End Set
- 'End Property
-
- 'Private m_StatusProgress As Integer
- 'Public Property StatusProgress As Integer
- ' Get
- ' Return m_StatusProgress
- ' End Get
- ' Set(value As Integer)
- ' m_StatusProgress = value
- ' NotifyPropertyChanged("StatusProgress")
- ' End Set
- 'End Property
-
- 'Private m_StatusStopIsEnabled As Boolean
- 'Public Property StatusStopIsEnabled As Boolean
- ' Get
- ' Return m_StatusStopIsEnabled
- ' End Get
- ' Set(value As Boolean)
- ' m_StatusStopIsEnabled = value
- ' NotifyPropertyChanged("StatusStopIsEnabled")
- ' End Set
- 'End Property
-
Private m_GridDimensionText As String
Public Property GridDimensionText As String
Get
@@ -92,84 +47,32 @@ Public Class MyStatusBarVM
End Set
End Property
- 'Private m_StatusUnitsText As String
- 'Public Property StatusUnitsText As String
- ' Get
- ' Return m_StatusUnitsText
- ' End Get
- ' Set(value As String)
- ' m_StatusUnitsText = value
- ' NotifyPropertyChanged("StatusUnitsText")
- ' End Set
- 'End Property
+ Private m_nSelCount As Integer = 0
+ Public ReadOnly Property SelCount As String
+ Get
+ Return "Sel : " & m_nSelCount.ToString()
+ End Get
+ End Property
+ Public Sub UpdateSelectedCount()
+ Dim nSelCnt As Integer = EgtGetSelectedObjCount()
+ If nSelCnt <> m_nSelCount Then
+ m_nSelCount = nSelCnt
+ NotifyPropertyChanged("SelCount")
+ End If
+ End Sub
- 'Private m_SnapPointTypeText As String
- 'Public Property SnapPointTypeText As String
- ' Get
- ' Return m_SnapPointTypeText
- ' End Get
- ' Set(value As String)
- ' m_SnapPointTypeText = value
- ' NotifyPropertyChanged("SnapPointTypeText")
- ' End Set
- 'End Property
-
- 'Private m_SnapPointTypeBackground As SolidColorBrush
- 'Public Property SnapPointTypeBackground As SolidColorBrush
- ' Get
- ' Return m_SnapPointTypeBackground
- ' End Get
- ' Set(value As SolidColorBrush)
- ' m_SnapPointTypeBackground = value
- ' NotifyPropertyChanged("SnapPointTypeBackground")
- ' End Set
- 'End Property
-
- '' Lista delle macchine disponibili nel programma
- 'Private m_MachinesList As New ObservableCollection(Of Machine)
- 'Public Property MachinesList As ObservableCollection(Of Machine)
- ' Get
- ' Return m_MachinesList
- ' End Get
- ' Set(value As ObservableCollection(Of Machine))
- ' m_MachinesList = value
- ' End Set
- 'End Property
- '' Macchina correntemente selezionata e quindi attiva
- 'Private m_SelectedMachine As Machine
- 'Public Property SelectedMachine As Machine
- ' Get
- ' Return m_SelectedMachine
- ' End Get
- ' Set(value As Machine)
- ' If IsNothing(value) Then
- ' m_SelectedMachine = Nothing
- ' ElseIf value IsNot m_SelectedMachine Then
- ' EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
- ' If EgtSetCurrMachine(value.Name) Then
- ' m_SelectedMachine = value
- ' IniFile.m_sMachineName = m_SelectedMachine.Name
- ' IniFile.m_sCurrMachIniFilePath = m_SelectedMachine.MachineDirPath & "\" & m_SelectedMachine.Name & ".ini"
- ' IniFile.m_sCurrMachToolsDirPath = m_SelectedMachine.MachineDirPath & "\Tools"
- ' IniFile.m_sCurrMachSetUpDirPath = m_SelectedMachine.MachineDirPath & "\SetUp"
- ' IniFile.m_sCurrMachScriptsDirPath = m_SelectedMachine.MachineDirPath & "\Scripts"
- ' UpdateToolAndMachDbParamVisibility()
- ' NotifyPropertyChanged("SelectedMachine")
- ' End If
- ' End If
- ' End Set
- 'End Property
-
- 'Private m_MachineListIsEnabled As Boolean
- 'Public Property MachineListIsEnabled As Boolean
- ' Get
- ' Return m_MachineListIsEnabled
- ' End Get
- ' Set(value As Boolean)
- ' m_MachineListIsEnabled = value
- ' NotifyPropertyChanged("MachineListIsEnabled")
- ' End Set
- 'End Property
+ Public ReadOnly Property SelCountVisibility As Visibility
+ Get
+ If IniFile.m_ProjectMode = ProjectModeOpt.DRAW OrElse IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW Then
+ Return Visibility.Visible
+ Else
+ Return Visibility.Hidden
+ End If
+ End Get
+ End Property
+ Friend Sub UpdateSelCountVisibility()
+ NotifyPropertyChanged("SelCountVisibility")
+ End Sub
' Commands definition
Private m_cmdGridDimension As ICommand
@@ -434,94 +337,6 @@ Public Class MyStatusBarVM
EgtSetGridShow(bShowGrid, bShowGrid And bShowGridFrame)
End Sub
- ''''
- '''' Method that search the machines in the correct folder and add to the MachinesList those valid.
- ''''
- 'Private Sub SearchMachines()
- ' ' Svuoto la lista delle macchine
- ' m_MachinesList.Clear()
- ' ' Se direttorio base macchine non definito o non esiste, ritorno
- ' If String.IsNullOrWhiteSpace(IniFile.m_sMachinesRoot) OrElse
- ' Not Directory.Exists(IniFile.m_sMachinesRoot) OrElse Directory.GetDirectories(IniFile.m_sMachinesRoot).Count = 0 Then
- ' IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW
- ' EgtOutLog(EgtMsg(MSG_STATUSBAR + 1))
- ' Return
- ' End If
- ' ' Cerco le macchine
- ' Dim TempArray As String() = Directory.GetDirectories(IniFile.m_sMachinesRoot)
- ' For i As Integer = 0 To TempArray.Count - 1
- ' AddMachine(TempArray(i))
- ' Next
- ' If m_MachinesList.Count = 0 Then
- ' IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW
- ' EgtOutLog(EgtMsg(MSG_STATUSBAR + 1))
- ' Return
- ' End If
- 'End Sub
-
- 'Private Function AddMachine(sPath As String) As Boolean
- ' ' Verifico presenza file caratteristici
- ' Dim sName As String = Path.GetFileName(sPath)
- ' Dim MachineIniPath As String = sPath & "\" & sName & ".ini"
- ' Dim MachineMldePath As String = sPath & "\" & sName & ".mlde"
- ' If Not File.Exists(MachineIniPath) Or Not File.Exists(MachineMldePath) Then Return False
- ' ' Aggiungo alla lista
- ' m_MachinesList.Add(New Machine With {.Name = sName, .MachineDirPath = sPath})
- ' Return True
- 'End Function
-
- 'Friend Function InsertMachine(sPath As String) As Boolean
- ' ' Verifico presenza file caratteristici
- ' Dim sName As String = Path.GetFileName(sPath)
- ' Dim MachineIniPath As String = sPath & "\" & sName & ".ini"
- ' Dim MachineMldePath As String = sPath & "\" & sName & ".mlde"
- ' If Not File.Exists(MachineIniPath) Or Not File.Exists(MachineMldePath) Then Return False
- ' ' Cerco la posizione di inserimento
- ' Dim nPos As Integer = 0
- ' For nI As Integer = 0 To m_MachinesList.Count() - 1
- ' Dim nRes As Integer = String.Compare(sName, m_MachinesList(nI).Name, True)
- ' If nRes = 0 Then
- ' Return True
- ' ElseIf nRes < 0 Then
- ' Exit For
- ' Else
- ' nPos += 1
- ' End If
- ' Next
- ' ' Inserisco nella lista
- ' m_MachinesList.Insert(nPos, New Machine With {.Name = sName, .MachineDirPath = sPath})
- ' Return True
- 'End Function
-
- ''''
- '''' Class that create the association Name/IniPath for the machine's
- ''''
- 'Class Machine
-
- ' Private m_sName As String
- ' Public Property Name As String
- ' Get
- ' Return m_sName
- ' End Get
- ' Set(value As String)
- ' m_sName = value
- ' End Set
- ' End Property
-
- ' Friend MachineDirPath As String
-
- 'End Class
-
- 'Private Sub UpdateToolAndMachDbParamVisibility()
- ' If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWINGONARCS, 0, IniFile.m_sCurrMachIniFilePath) <> 0 Then
- ' Sawing(39) = Visibility.Visible ' StepExtArc
- ' Sawing(40) = Visibility.Visible ' StepIntArc
- ' Else
- ' Sawing(39) = Visibility.Collapsed ' StepExtArc
- ' Sawing(40) = Visibility.Collapsed ' StepIntArc
- ' End If
- 'End Sub
-
Public Function OutText(ByRef psText As IntPtr) As Boolean
' Assegno stringa
OutputMessage = (Marshal.PtrToStringUni(psText))
diff --git a/StatusBar/StatusBarV.xaml b/StatusBar/StatusBarV.xaml
index 6c32863..bdbf0f8 100644
--- a/StatusBar/StatusBarV.xaml
+++ b/StatusBar/StatusBarV.xaml
@@ -67,6 +67,11 @@
+
+
+
+
diff --git a/ToolsDbWindow/MyToolDbWindowVM.vb b/ToolsDbWindow/MyToolDbWindowVM.vb
index da61c95..87c2fef 100644
--- a/ToolsDbWindow/MyToolDbWindowVM.vb
+++ b/ToolsDbWindow/MyToolDbWindowVM.vb
@@ -99,7 +99,7 @@ Public Class MyToolDbWindowVM
End Sub
- Public Overrides Sub OnCursorPos(ByVal sender As Object, ByVal sCursorPos As String) 'Handles m_ToolScene.OnCursorPos
+ Public Overrides Sub OnCursorPos(ByVal sender As Object, ByVal sCursorPos As String)
Map.refStatusBarVM.NotifyCurrPos(sCursorPos)
End Sub
diff --git a/TopCommandBar/TopCommandBarVM.vb b/TopCommandBar/TopCommandBarVM.vb
index dc4d6a6..9f7c7e9 100644
--- a/TopCommandBar/TopCommandBarVM.vb
+++ b/TopCommandBar/TopCommandBarVM.vb
@@ -210,6 +210,10 @@ Public Class TopCommandBarVM
If Not IsNothing(Map.refSpecialPanelVM) Then
Map.refSpecialPanelVM.SpecialPanelIsEnabled(value)
End If
+ ' aggiorno visibilità indicatore numero di entità selezionate
+ If Not IsNothing(Map.refStatusBarVM) Then
+ Map.refStatusBarVM.UpdateSelCountVisibility()
+ End If
End If
End Sub
@@ -236,7 +240,7 @@ Public Class TopCommandBarVM
If EgtGetCurrMachGroup() = GDB_ID.NULL Then
ExecExitMachScript()
EgtDraw()
- ' altrimenti, aggiusto...
+ ' altrimenti, aggiusto...
Else
' se parametri di una lavorazione aperti, disattivo database utensili, lavorazioni e setup
Dim bIsEnabled As Boolean = Not IsNothing(Map.refOperationParametersExpanderVM) AndAlso Not Map.refOperationParametersExpanderVM.ParametersIsExpanded
@@ -244,6 +248,8 @@ Public Class TopCommandBarVM
' se parametri di una lavorazione aperti, disattivo MTable e SpecialPanel
If Not IsNothing(Map.refDoorPanelVM) Then Map.refDoorPanelVM.MTableIsEnabled(bIsEnabled)
If Not IsNothing(Map.refSpecialPanelVM) Then Map.refSpecialPanelVM.SpecialPanelIsEnabled(bIsEnabled)
+ ' aggiorno visibilità indicatore numero di entità selezionate
+ If Not IsNothing(Map.refStatusBarVM) Then Map.refStatusBarVM.UpdateSelCountVisibility()
End If
Else
' Deseleziono tutto