EgtCAM5 :
- Aggiunta verifica nome in rinomina lavorazione e segno progetto modificato.
This commit is contained in:
@@ -38,7 +38,9 @@ Public Class OperationExpanderV
|
||||
If IsNothing(TextBox) Then Return
|
||||
Dim SelOp As MachiningOpListBoxItem = TryCast(TextBox.DataContext, MachiningOpListBoxItem)
|
||||
If IsNothing(SelOp) Then Return
|
||||
SelOp.ModifyNameEsc()
|
||||
If MachiningOpListBoxItem.m_CloseModifyLostFocus Then
|
||||
SelOp.ModifyNameEsc()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
+22
-11
@@ -87,17 +87,6 @@ Public Class MachiningOpListBoxItem
|
||||
' do il focus al nome
|
||||
RaiseEvent m_ModifyNameGetFocus()
|
||||
' se esco da modifica
|
||||
Else
|
||||
'se premuto enter
|
||||
If m_ModifyNameOk Then
|
||||
' Imposto il nuovo nome
|
||||
If Not EgtSetOperationName(Id, m_ModifiedName) Then Return
|
||||
' aggiorno il nome con quello modificato
|
||||
Name = m_ModifiedName
|
||||
Else
|
||||
' resetto il nome modificato
|
||||
m_ModifiedName = ""
|
||||
End If
|
||||
End If
|
||||
NotifyPropertyChanged("ModifiedName")
|
||||
NotifyPropertyChanged("Name")
|
||||
@@ -194,9 +183,31 @@ Public Class MachiningOpListBoxItem
|
||||
''' </summary>
|
||||
Public Sub ModifyNameEnter()
|
||||
m_ModifyNameOk = True
|
||||
' verifico che il nome non inizi con disp
|
||||
If m_ModifiedName.StartsWith("disp", StringComparison.InvariantCultureIgnoreCase) Then
|
||||
m_CloseModifyLostFocus = False
|
||||
MessageBox.Show(EgtMsg(MSG_OPERATION + 21), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
Return
|
||||
End If
|
||||
' Imposto il nuovo nome
|
||||
If String.Compare(m_ModifiedName, Name, True) <> 0 Then
|
||||
If Not EgtSetOperationName(Id, m_ModifiedName) Then
|
||||
m_CloseModifyLostFocus = False
|
||||
MessageBox.Show(EgtMsg(MSG_OPERATION + 22), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
Return
|
||||
End If
|
||||
' aggiorno il nome con quello modificato
|
||||
Name = m_ModifiedName
|
||||
End If
|
||||
' aggiorno titolo
|
||||
Application.Msn.NotifyColleagues(Application.EMITTITLE)
|
||||
' termino il rinomina
|
||||
m_CloseModifyLostFocus = True
|
||||
IsActive_ModifyName = False
|
||||
End Sub
|
||||
|
||||
Friend Shared m_CloseModifyLostFocus As Boolean = True
|
||||
|
||||
#End Region ' ModifyNameEnterCommand
|
||||
|
||||
#Region "ModifyNameEscCommand"
|
||||
|
||||
Reference in New Issue
Block a user