Aggiunto bottone reset MachGroup

Aggiunti tooltip beam show panel
This commit is contained in:
Emmanuele Sassi
2021-07-12 15:30:59 +02:00
parent a20f40085c
commit a58f7d9fda
5 changed files with 59 additions and 22 deletions
@@ -489,44 +489,44 @@ Public Class BTLStructureVM
Public ReadOnly Property sBTLTotParts As String
Get
Return Map.refProjectVM.BTLStructureVM.BTLPartVMList.Sum(Function(x) x.nCNT + x.nADDED)
Return m_BTLPartVMList.Sum(Function(x) x.nCNT + x.nADDED)
End Get
End Property
Public ReadOnly Property sBTLTotVolume As String
Get
Dim dMMTotVolume As Double = Map.refProjectVM.BTLStructureVM.BTLPartVMList.Sum(Function(x) x.dUnitVolume * (x.nCNT + x.nADDED))
Dim dMMTotVolume As Double = m_BTLPartVMList.Sum(Function(x) x.dUnitVolume * (x.nCNT + x.nADDED))
Return If(EgtUiUnitsAreMM(), DoubleToString(dMMTotVolume / 1000000000, 3), DoubleToString(dMMTotVolume * (12 / ONEINCH), 3))
End Get
End Property
Public ReadOnly Property sBTLTotTime As String
Get
Return TimeSpan.FromSeconds(Map.refProjectVM.BTLStructureVM.BTLPartVMList.Sum(Function(x) x.nCALC_TIME * (x.nCNT + x.nADDED))).ToString()
Return TimeSpan.FromSeconds(m_BTLPartVMList.Sum(Function(x) x.nCALC_TIME * (x.nCNT + x.nADDED))).ToString()
End Get
End Property
Public ReadOnly Property sTotCNTParts As String
Get
Return Map.refProjectVM.BTLStructureVM.BTLPartVMList.Sum(Function(x) x.nCNT)
Return m_BTLPartVMList.Sum(Function(x) x.nCNT)
End Get
End Property
Public ReadOnly Property sTotADDEDParts As String
Get
Return Map.refProjectVM.BTLStructureVM.BTLPartVMList.Sum(Function(x) x.nADDED)
Return m_BTLPartVMList.Sum(Function(x) x.nADDED)
End Get
End Property
Public ReadOnly Property sTotINPRODParts As String
Get
Return Map.refProjectVM.BTLStructureVM.BTLPartVMList.Sum(Function(x) x.nINPROD)
Return m_BTLPartVMList.Sum(Function(x) x.nINPROD)
End Get
End Property
Public ReadOnly Property sTotDONEParts As String
Get
Return Map.refProjectVM.BTLStructureVM.BTLPartVMList.Sum(Function(x) x.nDONE)
Return m_BTLPartVMList.Sum(Function(x) x.nDONE)
End Get
End Property
@@ -6,17 +6,20 @@
IsRightDockable="False" Style="{StaticResource ToolBar_EgtFloatingPanel}">
<Button Style="{StaticResource ToolBar_Button}"
Command="{Binding ShowAll_Command}">
Command="{Binding ShowAll_Command}"
ToolTip="{Binding ShowAll_ToolTip}">
<Image Source="/Resources/ShowBeamPanel/ShowAll.png" Stretch="Uniform"/>
</Button>
<ToggleButton Style="{StaticResource ToolBar_ToggleButton}"
IsChecked="{Binding ShowSolid_IsChecked}"
IsEnabled="{Binding ShowSolid_IsEnabled}">
IsEnabled="{Binding ShowSolid_IsEnabled}"
ToolTip="{Binding ShowSolid_ToolTip}">
<Image Source="/Resources/ShowBeamPanel/ShowSolid.png" Stretch="Uniform"/>
</ToggleButton>
<ToggleButton Style="{StaticResource ToolBar_ToggleButton}"
IsChecked="{Binding ShowBuilding_IsChecked}"
IsEnabled="{Binding ShowBuilding_IsEnabled}">
IsEnabled="{Binding ShowBuilding_IsEnabled}"
ToolTip="{Binding ShowBuilding_ToolTip}">
<Image Source="/Resources/ShowBeamPanel/ShowBuilding.png" Stretch="Uniform"/>
</ToggleButton>
@@ -7,27 +7,21 @@ Public Class ShowBeamPanelVM
#Region "ToolTip"
Public ReadOnly Property RenderingWFToolTip As String
Public ReadOnly Property ShowAll_ToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 1)
Return EgtMsg(61925)
End Get
End Property
Public ReadOnly Property RenderingHLToolTip As String
Public ReadOnly Property ShowSolid_ToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 2)
Return EgtMsg(61926)
End Get
End Property
Public ReadOnly Property RenderingSHToolTip As String
Public ReadOnly Property ShowBuilding_ToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 3)
End Get
End Property
Public ReadOnly Property CurveDirToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 16)
Return EgtMsg(61927)
End Get
End Property
@@ -38,6 +38,11 @@
ToolTip="{Binding ProduceAllRawPart_ToolTip}"
IsEnabled="{Binding TopPanel_IsEnabled}"
Style="{StaticResource LeftPanel_SmallButton}"/>
<Button Content="R"
Command="{Binding ResetCALCRawPart_Command}"
ToolTip="{Binding ResetCALCRawPart_ToolTip}"
IsEnabled="{Binding TopPanel_IsEnabled}"
Style="{StaticResource LeftPanel_SmallButton}"/>
<Button Content="C"
Command="{Binding CopyRawPart_Command}"
ToolTip="{Binding CopyRawPart_ToolTip}"
@@ -38,6 +38,7 @@ Public Class TopPanelVM
' Definizione comandi
Private m_cmdProduceAllRawPart As ICommand
Private m_cmdProduceRawPart As ICommand
Private m_cmdResetCALCRawPart As ICommand
Private m_cmdCopyRawPart As ICommand
Private m_cmdRemoveRawPart As ICommand
Private m_cmdRemovePart As ICommand
@@ -62,6 +63,12 @@ Public Class TopPanelVM
End Get
End Property
Public ReadOnly Property ResetCALCRawPart_ToolTip As String
Get
Return EgtMsg(61924)
End Get
End Property
Public ReadOnly Property ProduceAllRawPart_ToolTip As String
Get
Return EgtMsg(61913)
@@ -183,6 +190,34 @@ Public Class TopPanelVM
#End Region ' ProduceAllRawPart
#Region "ResetCALCRawPart"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property ResetCALCRawPart_Command As ICommand
Get
If m_cmdResetCALCRawPart Is Nothing Then
m_cmdResetCALCRawPart = New Command(AddressOf ResetCALCRawPart)
End If
Return m_cmdResetCALCRawPart
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub ResetCALCRawPart()
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
If IsNothing(SelMachGroup) Then Return
If SelMachGroup.nGlobalState <> CalcStates.NOTCALCULATED Then
SelMachGroup.ResetCalcMachGroup()
End If
End Sub
#End Region ' ResetCALCRawPart
#Region "CopyRawPart"
''' <summary>