-aggiunto immagine al posto del tooltip in ppparameter

-gestito vista assemblato
-aggiornato cotrolli su vista assemblato
-aggiornato selezione multipla pezzi
This commit is contained in:
Demetrio Cassarino
2025-07-29 10:26:22 +02:00
parent e878069ffd
commit feb943cfb1
15 changed files with 85 additions and 35 deletions
@@ -167,6 +167,11 @@ Public Class BTLFeatureVM
sPar = Nothing
vParQ = Nothing
m_BTLFeatureM.CalcParamArray(vPar, sPar, vParQ)
If value > 0 AndAlso IO.File.Exists(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & "." & sDES & ".png") Then
Map.refPParameterListVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & "." & sDES & ".png")
Else
Map.refPParameterListVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & ".png")
End If
End Sub
Public Property sPriority As String
@@ -257,6 +262,12 @@ Public Class BTLFeatureVM
End Get
Set(value As BTLParamVM)
m_SelPBTLParam = value
If Not IsNothing(m_SelPBTLParam) Then
' imposto path disegno da mostrare in BottomPanel
If Not IsNothing(Map.refProjectVM) Then
Map.refPParameterListVM.SetCurrDraw(m_SelPBTLParam.sDrawPath)
End If
End If
NotifyPropertyChanged(NameOf(SelPBTLParam))
End Set
End Property
@@ -1537,6 +1537,7 @@ Public Class BTLPartVM
If Not IsNothing(m_SelBTLFeatureVM) Then
m_SelBTLFeatureVM.SelGeomFeature()
m_PrevSelBTLFeatureVM = value
Map.refPParameterListVM.SetCurrDraw(DirectCast(m_SelBTLFeatureVM, BTLFeatureVM).sDrawPath)
' deseleziono i parametri
If Not IsNothing(SelBTLFeatureVM.SelPBTLParam) Then SelBTLFeatureVM.SelPBTLParam = Nothing
' rinfresco bottoni freecontour
@@ -1548,6 +1549,13 @@ Public Class BTLPartVM
If Integer.TryParse(m_SelBTLFeatureVM.sDES, nVariant) Then
m_SelBTLFeatureVM.nSelVARIANT = nVariant
End If
If m_SelBTLFeatureVM.nSelVARIANT > 0 AndAlso
System.IO.File.Exists(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & "." & m_SelBTLFeatureVM.sDES & ".png") Then
' imposto path disegno da mostrare in BottomPanel
Map.refPParameterListVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & "." & m_SelBTLFeatureVM.sDES & ".png")
Else
Map.refPParameterListVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & ".png")
End If
Else
Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Collapsed)
End If
@@ -1557,15 +1565,6 @@ Public Class BTLPartVM
' EgtDeselectAll()
End If
If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged()
'End If
'If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
' If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.MACHGROUP Then
' EgtResetCurrMachGroup()
' ResetSearchFound()
' Map.refStatisticsTimePanelVM.SetViewPage_Visibility(Visibility.Visible)
' Map.refStatisticsTimePanelVM.SetMachiningPage_Visibility(Visibility.Collapsed)
' End If
'End If
EgtDraw()
NotifyPropertyChanged(NameOf(SelBTLFeatureVM))
' se modalità building, la tolgo
@@ -2755,6 +2754,7 @@ Public Class BTLPartVM
CalcGlobalUpdate(True)
' imposto path disegno da mostrare in BottomPanel
Dim SelPBTLParam As BTLParamVM = Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SelPBTLParam
If Not IsNothing(Map.refProjectVM) AndAlso Not IsNothing(SelPBTLParam) Then Map.refPParameterListVM.SetCurrDraw(SelPBTLParam.sDrawPath)
Case NameOf(sender.bDO), NameOf(sender.sPriority)
NotifyPropertyChanged(NameOf(bDOALL))
' setto pezzo da ricalcolare
@@ -1,6 +1,8 @@
Imports System.Collections.ObjectModel
Imports System.Collections.Specialized
Imports System.ComponentModel
Imports System.Web.UI.WebControls.WebParts
Imports System.Windows.Interop
Imports System.Windows.Threading
Imports EgtBEAMWALL.Core
Imports EgtUILib
@@ -120,6 +122,8 @@ Public Class BTLStructureVM
End Property
Private Sub SelBTLParts_CollectionChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
' Setto contesto finestra principale
if Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
If m_bOnlySelectItem Then Return
Select Case e.Action
Case NotifyCollectionChangedAction.Add
@@ -155,6 +159,9 @@ Public Class BTLStructureVM
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup) AndAlso Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
End If
SceneSelPartSelection()
' seleziono pezzo in Db geometrico
@@ -196,9 +203,6 @@ Public Class BTLStructureVM
If Not bIsReselect AndAlso m_SelBTLParts.Count = 1 Then
BtlPart.SetOpenFeatureList(True)
End If
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
Map.refShowBeamPanelVM.SetShowBuilding(False)
End If
End Sub
Private Sub DeselectBTLPart(BtlPart As BTLPartVM)
' se necessario tolgo solido dal precedentemente selezionato
@@ -891,14 +895,18 @@ Public Class BTLStructureVM
' disabilito impostazione modificato
Dim DisableMgr As New DisableModifiedMgr
' ciclo sui pezzi
For Each Part As BTLPartVM In m_BTLPartVMList
' se non è quello selezionato, lo nascondo
If Part IsNot m_SelBTLPart Then
EgtSetMode(Part.nPartId, GDB_MD.HIDDEN)
Else
EgtSetMode(Part.nPartId, GDB_MD.STD)
End If
Next
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift OrElse (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
EgtSetMode(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId, GDB_MD.STD)
Else
For Each Part As BTLPartVM In m_BTLPartVMList
' se non è quello selezionato, lo nascondo
If Part IsNot m_SelBTLPart Then
EgtSetMode(Part.nPartId, GDB_MD.HIDDEN)
Else
EgtSetMode(Part.nPartId, GDB_MD.STD)
End If
Next
End If
' ripristino precedente impostazione modificato
DisableMgr.ReEnable()
End Sub
@@ -968,12 +976,9 @@ Public Class BTLStructureVM
End Sub
Friend Sub ShowBuilding(bShow As Boolean, Optional bRedraw As Boolean = True)
'If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) AndAlso Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup) Then
' EgtSetStatus(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.Id, GDB_ST.OFF)
'End If
If bShow Then
ShowAll(False)
Dim CurrProdPathFile As String = ProjectManagerVM.CurrProj.sProjPath
Dim CurrProdPathFile As String = ProjectManagerVM.CurrProd.sProdPath
If IO.File.Exists(CurrProdPathFile) Then
EgtOpenFile(CurrProdPathFile)
Else
@@ -1073,6 +1073,9 @@
<ItemGroup>
<Resource Include="Resources\NewPage\MoveRight.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\Inversion.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.OptimizerR32.exe
@@ -9,6 +9,10 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<EgtBEAMWALLCORE:EgtDataGrid CanUserDeleteRows="False"
SelectionMode="Single"
Margin="0,0,0,5"
@@ -70,15 +74,18 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.Text}"
Style="{StaticResource OnlyProd_TextBlock}">
Style="{StaticResource OnlyProd_TextBlock}">
<TextBlock.ToolTip>
<ToolTip Style="{StaticResource OnlyProd_ToolTip}">
<ToolTip.Content>
<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.Text}"/>
<TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.Text}"
Style="{StaticResource OnlyProd_TextBlock}"/>
<!--<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.Text}"
Style="{StaticResource OnlyProd_TextBlock}"/>
<Image Source="{Binding sDrawPath}"
Style="{StaticResource OnlyProdFeatureList_Image}"/>
</StackPanel>
Style="{StaticResource OnlyProdFeatureList_Image}"/>
</StackPanel>-->
</ToolTip.Content>
</ToolTip>
</TextBlock.ToolTip>
@@ -130,7 +137,12 @@
</DataGrid.Resources>
</EgtBEAMWALLCORE:EgtDataGrid>
<Image Grid.Column="1" Width="250"
Source="{Binding sCurrDraw}"
Margin="2.5"/>
<StackPanel Grid.Row="1"
Grid.ColumnSpan="2"
HorizontalAlignment="Right"
Style="{StaticResource OnlyProdPartManager_StackPanel}">
<Button Command="{Binding Ok_Command}"
@@ -35,6 +35,17 @@ Public Class PParameterListVM
End Set
End Property
Private m_sCurrDraw As String
Public ReadOnly Property sCurrDraw As String
Get
Return m_sCurrDraw
End Get
End Property
Friend Sub SetCurrDraw(sCurrDraw As String)
m_sCurrDraw = sCurrDraw
NotifyPropertyChanged(NameOf(sCurrDraw))
End Sub
#Region "Messages"
Public ReadOnly Property Custom_Msg As String
@@ -246,7 +246,7 @@ Public Class RawPartListVM
m_colPartInRawPart_PosY = PartInRawPartColumns.FirstOrDefault(Function(x) x.Name = COL_POSY)
' aggiorno la visibilità delle colonne
For Each col In PartInRawPartColumns
If Not bOnlyProd AndAlso nMachType = MachineType.BEAM AndAlso (col.Name.Equals(COL_ROT) OrElse col.Name.Equals(COL_FLIP) OrElse col.Name.Equals(COL_POSX)) Then
If Not bOnlyProd AndAlso nMachType = MachineType.BEAM AndAlso (col.Name.Equals(COL_ROT) OrElse col.Name.Equals(COL_FLIP)) Then
col.Visible = False
Else
col.Visible = True
@@ -129,7 +129,7 @@
ToolTip="Inverti Tutti"
IsEnabled="{Binding RotatePart_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/PartManager/LeftInvert.png" Stretch="Uniform"/>
<Image Source="/Resources/NewPage/Inversion.png" Stretch="Uniform"/>
</Button>
<Button Grid.Column="7"
ToolTip="Modifica Multipla"
@@ -18,9 +18,12 @@ Public Class MyMachGroupPanelVM
EgtBeamShowLoadingSide(False, False)
' se modalita' assemblato
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed)
' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup) AndAlso Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
End If
End If
If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
@@ -38,6 +41,9 @@ Public Class MyMachGroupPanelVM
Map.refStatisticsTimePanelVM.SetMachiningPage_Visibility(Visibility.Visible)
Map.refStatisticsTimePanelVM.SetViewPage_Visibility(Visibility.Collapsed)
End If
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then
Map.refProjectVM.SetFeatureListVisibility(Visibility.Collapsed)
End If
NotifyPropertyChanged(NameOf(SelectedMachGroup))
End Set
End Property
@@ -80,8 +80,11 @@ Public Class MyMachGroupVM
NotifyPropertyChanged(NameOf(SelPart))
' se modalità building, la tolgo
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed)
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup) AndAlso Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
End If
End Set
End Property
@@ -249,7 +249,6 @@ Public Class MainMenuVM
Next
DimensionsIniFile.ReadGridDimensions(ConstDims.PROJECT_ONLYPROD, Map.refProjectVM.GridDims)
' inizializzo gruppi di lavorazione
If Not IsNothing(ProjectManagerVM.CurrProd) AndAlso Not IsNothing(ProjectManagerVM.CurrProd.nProdId) AndAlso ProjectManagerVM.CurrProd.nProdId > 0 Then
If Not m_bOpenProject Then
+1 -1
View File
@@ -555,7 +555,7 @@ Public Class ProjectVM
Public Sub Back()
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup) AndAlso Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
Map.refProjectVM.SetStrategyManagerVisibility(Visibility.Collapsed)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER)
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -61,7 +61,7 @@ Public Class ShowBeamPanelVM
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup) AndAlso Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
End If
NotifyPropertyChanged(NameOf(ShowBuilding_IsChecked))
End Set
@@ -12,7 +12,7 @@
<Grid>
<Image Source="/Resources/NewPage/LogoProvaStrategy.png"
Stretch="UniformToFill"/>
Stretch="Uniform"/>
<TextBlock x:Name="VersionTxBl"
Style="{StaticResource SplashScreenV_TxBl}"/>
</Grid>