OmagCUT :

- diverse migliorie sulla separazione dei grezzi.
This commit is contained in:
Dario Sassi
2016-02-16 17:20:39 +00:00
parent 0aca7e56cc
commit a50a4e674a
3 changed files with 23 additions and 21 deletions
+1 -1
View File
@@ -308,7 +308,7 @@ Public Module CamAuto
' Deve contenere qualcosa
If EgtIsMachiningEmpty() Then Return False
' Deve essere abilitata oppure disabilitata direttamente dall'utente
If Not EgtGetOperationMode(nOperId) And Not EgtExistsInfo(nOperId, INFO_MCH_USER_OFF) Then Return False
If Not (EgtGetOperationMode(nOperId) Or EgtExistsInfo(nOperId, INFO_MCH_USER_OFF)) Then Return False
' E' valida
Return True
End Function
+4
View File
@@ -365,6 +365,10 @@ Public Class CurrentProjectPageUC
Dim sPath As String = m_MainWindow.GetSaveNameDir() & "\" & CurrProjName & ".nge"
' Aggiorno file Ini
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, CurrProjName, m_MainWindow.GetIniFile())
' Se nome vuoto, non salvo
If String.IsNullOrEmpty(CurrProjName) Then
Return False
End If
' Rinomino eventuale fotografia
Dim nPhotoId As Integer = GetPhoto()
If nPhotoId <> GDB_ID.NULL Then
+18 -20
View File
@@ -29,12 +29,12 @@ Public Class SplitPageUC
Private Sub SplitPageUC_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
' Se non c'è ordine delle lavorazioni, ne faccio uno automatico
If Not m_MainWindow.m_CurrentProjectPageUC.GetOrderMachiningFlag() Then
'If Not m_MainWindow.m_CurrentProjectPageUC.GetOrderMachiningFlag() Then
Dim bOk As Boolean = SortAllMachinings()
If bOk Then
m_MainWindow.m_CurrentProjectPageUC.SetOrderMachiningFlag()
End If
End If
' If bOk Then
' m_MainWindow.m_CurrentProjectPageUC.SetOrderMachiningFlag()
' End If
'End If
' Disabilito impostazione modificato
EgtDisableModified()
' Creo gruppo per numeri identificativi di lavorazione (colore default grigio)
@@ -133,6 +133,8 @@ Public Class SplitPageUC
m_bModified = False
' Reset flag tipo uscita
m_bToNext = False
' Abilitazione bottone Next
NextBtn.IsEnabled = (GetDisabledCutsCount() > 0)
End Sub
Private Sub MachiningLsBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles MachiningLsBx.SelectionChanged
@@ -201,6 +203,8 @@ Public Class SplitPageUC
EgtDraw()
' Imposto flag di modifica
m_bModified = True
' Abilitazione bottone Next
NextBtn.IsEnabled = (GetDisabledCutsCount() > 0)
End Sub
Private Sub AllOnBtn_Click(sender As Object, e As RoutedEventArgs) Handles AllOnBtn.Click
@@ -215,6 +219,8 @@ Public Class SplitPageUC
EgtDraw()
' Imposto flag di modifica
m_bModified = True
' Abilitazione bottone Next
NextBtn.IsEnabled = (GetDisabledCutsCount() > 0)
End Sub
Private Sub AllOffBtn_Click(sender As Object, e As RoutedEventArgs) Handles AllOffBtn.Click
@@ -229,6 +235,8 @@ Public Class SplitPageUC
EgtDraw()
' Imposto flag di modifica
m_bModified = True
' Abilitazione bottone Next
NextBtn.IsEnabled = (GetDisabledCutsCount() > 0)
End Sub
Private Sub CutBtn_Click(sender As Object, e As RoutedEventArgs) Handles CutBtn.Click
@@ -362,26 +370,16 @@ Public Class SplitPageUC
End If
End Sub
Friend Sub GetEnabledCuts(ByRef Cuts() As Integer)
' Determino il numero di tagli abilitati
Friend Function GetDisabledCutsCount() As Integer
' Determino il numero di tagli disabilitati
Dim nCount As Integer = 0
For nI As Integer = 0 To m_MachiningList.Count() - 1
If m_MachiningList(nI).m_bEnabled Then
If Not m_MachiningList(nI).m_bEnabled Then
nCount += 1
End If
Next
' Creo l'array con gli indici
Dim MyCuts(nCount - 1) As Integer
Dim nInd As Integer = 0
For nI As Integer = 0 To m_MachiningList.Count() - 1
If m_MachiningList(nI).m_bEnabled Then
MyCuts(nInd) = m_MachiningList(nI).m_nId
nInd += 1
End If
Next
' Lo restituisco
Cuts = MyCuts
End Sub
Return nCount
End Function
Friend Sub GetSplitCuts(ByRef Cuts() As Integer)
' Determino il numero di tagli di separazione