7eb8240749
- MachGroupPanelVM, MachinePanelVM, StatusBarVM spostati in EgtWPFLib5. Ora qua sono presenti le versioni My_ che ereditano quelle della Libreria. - ComboBox della Macchina corrente spostata in MachinePanel (accanto a Db Ut./Lav./SetUp). - modificato OptionPanel in modo da gestire i nuovi DrawOptionPanel e MachiningOptionPanel in base alle modalità DISEGNA e LAVORA. - ogni Expander di MachiningOptionPanel ora ha il suo VM e il suo V. - nuova gestione degli Expander di MachiningOptionPanel tramite funzioni Init e Exit. - barra TOPTRAY ora può estendersi su una seconda riga in base a larghezza finestra. - eliminati molti Application.Msn.Register/NotifyColleagues. Ora le funzioni che chiamavano sono chiamate tramite i riferimenti in Map. - corretta selezione superfici quando si sceglie Nuova Lav. in LAVORA.
125 lines
3.8 KiB
VB.net
125 lines
3.8 KiB
VB.net
Imports EgtUILib
|
|
|
|
Public Class RawPartOptionVM
|
|
Inherits ViewModelBase
|
|
|
|
Private m_MoveWithFixture As Boolean = False
|
|
Public Property MoveWithFixture As Boolean
|
|
Get
|
|
Return m_MoveWithFixture
|
|
End Get
|
|
Set(value As Boolean)
|
|
If value <> m_MoveWithFixture Then
|
|
If value Then
|
|
' Abilito la selezione di RawPart con autoselezione delle sue ventose
|
|
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPARTWITHFIXTURE
|
|
' Seleziono le ventose associate ad uno dei grezzi selezionati
|
|
' ciclo sui grezzi selezionati
|
|
Dim nSelRawPartId As Integer = EgtGetFirstSelectedObj()
|
|
While nSelRawPartId <> GDB_ID.NULL
|
|
' seleziono i sottopezzi del grezzo
|
|
DispositionUtility.SelectRawPartFixture(nSelRawPartId)
|
|
nSelRawPartId = EgtGetNextSelectedObj()
|
|
End While
|
|
Else
|
|
' Abilito la selezione di RawPart
|
|
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPART
|
|
' ciclo sui grezzi selezionati
|
|
Dim nSelRawPartId As Integer = EgtGetFirstSelectedObj()
|
|
While nSelRawPartId <> GDB_ID.NULL
|
|
' deseleziono i sottopezzi del grezzo
|
|
DispositionUtility.DeselectRawPartFixture(nSelRawPartId)
|
|
nSelRawPartId = EgtGetNextSelectedObj()
|
|
End While
|
|
End If
|
|
EgtDraw()
|
|
m_MoveWithFixture = value
|
|
OnPropertyChanged("MoveWithFixture")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_bRawPartParamVisibility As Visibility
|
|
Public ReadOnly Property RawPartParamVisibility As Visibility
|
|
Get
|
|
Return m_bRawPartParamVisibility
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Messages"
|
|
|
|
Public ReadOnly Property NewMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_DISPOSITION + 3)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property RemoveMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_DISPOSITION + 4)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property LenghtMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_DISPOSITION + 5)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property WidthMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_DISPOSITION + 6)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property HeightMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_DISPOSITION + 7)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property PositionMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_DISPOSITION + 8)
|
|
End Get
|
|
End Property
|
|
|
|
#End Region ' Messages
|
|
|
|
' Definizione comandi
|
|
Private m_cmdNewRawPart As ICommand
|
|
Private m_cmdRemoveRawPart As ICommand
|
|
|
|
Sub New()
|
|
If EgtGetFirstSelectedObj() <> GDB_ID.NULL Then
|
|
m_bRawPartParamVisibility = Visibility.Visible
|
|
Else
|
|
m_bRawPartParamVisibility = Visibility.Collapsed
|
|
End If
|
|
End Sub
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "NewRawPartCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Done.
|
|
''' </summary>
|
|
Public ReadOnly Property NewRawPartCommand As ICommand
|
|
Get
|
|
If m_cmdNewRawPart Is Nothing Then
|
|
m_cmdNewRawPart = New RelayCommand(AddressOf NewRawPart)
|
|
End If
|
|
Return m_cmdNewRawPart
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Point. This method is invoked by the DoneCommand.
|
|
''' </summary>
|
|
Public Sub NewRawPart()
|
|
DispositionUtility.ShowParts()
|
|
m_bRawPartParamVisibility = Visibility.Visible
|
|
OnPropertyChanged("RawPartParamVisibility")
|
|
End Sub
|
|
|
|
#End Region ' NewRawPartCommand
|
|
|
|
#End Region ' Commands
|
|
|
|
End Class |