Imports EgtUILib Imports EgtBEAMWALL.Core Public Class PartInRawPartListV Private Sub PartInRawPartList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) If TypeOf sender Is DataGridRow Then Dim Row As DataGridRow = DirectCast(sender, DataGridRow) If Not IsNothing(Row) AndAlso Row.IsSelected Then If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then Dim BeamMachGroup As BeamMachGroupVM = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup If EgtGetCurrMachGroup() = GDB_ID.NULL Then Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup = BeamMachGroup BeamMachGroup.SelPart = BeamMachGroup.SelPart ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL Then Dim WallMachGroup As WallMachGroupVM = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup If EgtGetCurrMachGroup() = GDB_ID.NULL Then Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup = WallMachGroup WallMachGroup.SelPart = WallMachGroup.SelPart End If End If End If End Sub End Class