EgtCAM5 :

- DrawPanel portato a tre colonne e cambiata disposizione alcuni comandi.
This commit is contained in:
Dario Sassi
2021-04-03 09:40:52 +00:00
parent 49592c4fb6
commit cccf764dca
8 changed files with 156 additions and 52 deletions
+56 -40
View File
@@ -11,7 +11,7 @@
<Expander.Header>
<TextBlock Text="{Binding Draw2DMsg}"/>
</Expander.Header>
<UniformGrid Columns="2">
<UniformGrid Columns="3">
<Button ToolTip="{Binding PointToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding PointCommand}" IsEnabled="{Binding bLayerOk}">
@@ -27,16 +27,6 @@
Command="{Binding LinePDLCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/LinePDL.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding CirclePDToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding CircleCPCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/CircleCP.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding CircleCDToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding CircleCDCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/CircleCD.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ArcCSEToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ArcCSECommand}" IsEnabled="{Binding bLayerOk}">
@@ -52,15 +42,20 @@
Command="{Binding ArcPDPCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/ArcPDP.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding FilletToolTip}" Style="{StaticResource DrawPanelButton}"
<Button ToolTip="{Binding CirclePDToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding FilletCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Fillet.png" Stretch="Uniform"/>
Command="{Binding CircleCPCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/CircleCP.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChamferToolTip}" Style="{StaticResource DrawPanelButton}"
<Button ToolTip="{Binding Circle3PToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ChamferCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Chamfer.png" Stretch="Uniform"/>
Command="{Binding Circle3PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Circle3P.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding CircleCDToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding CircleCDCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/CircleCD.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Rectangle2PToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
@@ -77,6 +72,18 @@
Command="{Binding PolygonSideCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/PolygonSide.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding FilletToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding FilletCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Fillet.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChamferToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ChamferCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Chamfer.png" Stretch="Uniform"/>
</Button>
<Button Style="{StaticResource DrawPanelButton}"
Visibility="Hidden"/>
<Button ToolTip="{Binding TextToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding TextCommand}" IsEnabled="{Binding bLayerOk}">
@@ -94,7 +101,7 @@
<Expander.Header>
<TextBlock Text="{Binding Draw3DMsg}"/>
</Expander.Header>
<UniformGrid Columns="2">
<UniformGrid Columns="3">
<Button ToolTip="{Binding PlaneToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding PlaneCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
@@ -140,11 +147,6 @@
Command="{Binding SolidIntersectSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/SolidIntersectSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding InvertSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding InvertSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/InvertSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding IntersectSurfSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding IntersectSurfSurfCommand}" IsEnabled="{Binding bSelOk}">
@@ -155,23 +157,38 @@
Command="{Binding ExtractLoopsCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExtractLoops.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExtractFacetLoopsToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtractFacetLoopsCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExtractFacetLoops.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExplodeSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExplodeSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExplodeSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExtractSurfFacetToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtractSurfFacetCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExtractSurfFacet.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding MergeSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding MergeSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/MergeSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding InvertSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding InvertSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/InvertSurf.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Expander>
<Expander Name="Modify" Style="{StaticResource ExpanderStyle}" Grid.Row="2" IsExpanded="{Binding ModifyIsExpanded}">
<Expander.Header>
<TextBlock Text="{Binding ModifyMsg}"/>
</Expander.Header>
<UniformGrid Columns="2">
<UniformGrid Columns="3">
<Button ToolTip="{Binding DeleteToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding DeleteCommand}" IsEnabled="{Binding bSelOk}">
@@ -182,6 +199,8 @@
Command="{Binding ChangeLayerCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeLayer.png" Stretch="Uniform"/>
</Button>
<Button Style="{StaticResource DrawPanelButton}"
Visibility="Hidden"/>
<Button ToolTip="{Binding ChangeColorToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeColorCommand}" IsEnabled="{Binding bSelOk}">
@@ -207,6 +226,11 @@
Command="{Binding ChangeStartCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeStart.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ThickCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding SetCurveThCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ThickCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExtendCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtendCurveCommand}" IsEnabled="{Binding bSelOk}">
@@ -232,6 +256,11 @@
Command="{Binding JoinCurveCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/JoinCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding OffsetToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding OffsetCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Offset.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ModifyCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ModifyCurveCommand}" IsEnabled="{Binding bSelOk}">
@@ -247,16 +276,6 @@
Command="{Binding RemovePointCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/RemovePointCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ThickCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" Visibility="Hidden"
Command="{Binding SetCurveThCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ThickCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ThickCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding SetCurveThCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ThickCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ModifyTextToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ModifyTextCommand}" IsEnabled="{Binding bSelOk}">
@@ -268,7 +287,7 @@
<Expander.Header>
<TextBlock Text="{Binding TransformMsg}"/>
</Expander.Header>
<UniformGrid Columns="2">
<UniformGrid Columns="3">
<Button ToolTip="{Binding MoveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding MoveCommand}" IsEnabled="{Binding bSelOk}">
@@ -294,6 +313,8 @@
Command="{Binding Mirror3DCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Mirror3D.png" Stretch="Uniform"/>
</Button>
<Button Style="{StaticResource DrawPanelButton}"
Visibility="Hidden"/>
<Button ToolTip="{Binding ScaleToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ScaleCommand}" IsEnabled="{Binding bSelOk}">
@@ -304,11 +325,6 @@
Command="{Binding Scale3DCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Scale3D.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding OffsetToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding OffsetCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Offset.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Expander>
<Interactivity:Interaction.Behaviors>
+91 -12
View File
@@ -60,6 +60,11 @@ Public Class DrawPanelVM
Return EgtMsg(MSG_DRAWPANEL + 5)
End Get
End Property
Public ReadOnly Property Circle3PToolTip As String
Get
Return EgtMsg(5156)
End Get
End Property
Public ReadOnly Property ArcCSEToolTip As String
Get
Return EgtMsg(MSG_DRAWPANEL + 6)
@@ -148,7 +153,12 @@ Public Class DrawPanelVM
End Property
Public ReadOnly Property ExplodeSurfToolTip As String
Get
Return EgtMsg( 5221) 'Esplodi Superfici e Regioni Piane<br/>Estrai Faccia da Superficie (Shift)
Return EgtMsg( 5221) 'Esplodi Superfici e Regioni Piane
End Get
End Property
Public ReadOnly Property ExtractSurfFacetToolTip As String
Get
Return EgtMsg( 5158) 'Estrai Faccia da Superficie
End Get
End Property
Public ReadOnly Property InvertSurfToolTip As String
@@ -158,7 +168,12 @@ Public Class DrawPanelVM
End Property
Public ReadOnly Property ExtractLoopsToolTip As String
Get
Return EgtMsg( 5150) 'Estrai Bordi Liberi di Superfici<br/>Estrai Bordi di Faccia di superficie (Shift)
Return EgtMsg( 5150) 'Estrai Bordi Liberi di Superfici e Regioni Piane
End Get
End Property
Public ReadOnly Property ExtractFacetLoopsToolTip As String
Get
Return EgtMsg( 5157) 'Estrai Bordi di Faccia di superficie e di Parti di Regioni Piane
End Get
End Property
Public ReadOnly Property SolidAddSurfToolTip As String
@@ -405,6 +420,7 @@ Public Class DrawPanelVM
Private m_cmdLinePDL As ICommand
Private m_cmdCircleCP As ICommand
Private m_cmdCircleCD As ICommand
Private m_cmdCircle3P As ICommand
Private m_cmdArcCSE As ICommand
Private m_cmdArc3P As ICommand
Private m_cmdArcPDP As ICommand
@@ -425,8 +441,10 @@ Public Class DrawPanelVM
Private m_cmdRuled As ICommand
Private m_cmdMergeSurf As ICommand
Private m_cmdExplodeSurf As ICommand
Private m_cmdExtractSurfFacet As ICommand
Private m_cmdInvertSurf As ICommand
Private m_cmdExtractLoops As ICommand
Private m_cmdExtractFacetLoops As ICommand
Private m_cmdSolidAddSurf As ICommand
Private m_cmdSolidSubtractSurf As ICommand
Private m_cmdSolidIntersectSurf As ICommand
@@ -601,6 +619,29 @@ Public Class DrawPanelVM
#End Region ' CircleCDCommand
#Region "Circle3PCommand"
''' <summary>
''' Returns a command that do Circle3P.
''' </summary>
Public ReadOnly Property Circle3PCommand As ICommand
Get
If m_cmdCircle3P Is Nothing Then
m_cmdCircle3P = New RelayCommand(AddressOf Circle3P)
End If
Return m_cmdCircle3P
End Get
End Property
''' <summary>
''' Execute the Circle3P. This method is invoked by the Circle3PDCommand.
''' </summary>
Public Sub Circle3P(ByVal param As Object)
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CIRCLE3P)
End Sub
#End Region ' Circle3PCommand
#Region "ArcCSECommand"
''' <summary>
@@ -642,11 +683,7 @@ Public Class DrawPanelVM
''' Execute the Arc3P. This method is invoked by the Arc3PCommand.
''' </summary>
Public Sub Arc3P(ByVal param As Object)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CIRCLE3P)
Else
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARC3P)
End If
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARC3P)
End Sub
#End Region ' Arc3PCommand
@@ -1111,6 +1148,29 @@ Public Class DrawPanelVM
#End Region ' ExplodeSurfCommand
#Region "ExtractSurfFacetCommand"
''' <summary>
''' Returns a command that do ExtractSurfFacet.
''' </summary>
Public ReadOnly Property ExtractSurfFacetCommand As ICommand
Get
If m_cmdExtractSurfFacet Is Nothing Then
m_cmdExtractSurfFacet = New RelayCommand(AddressOf ExtractSurfFacet)
End If
Return m_cmdExtractSurfFacet
End Get
End Property
''' <summary>
''' Execute the ExtractSurfFacet. This method is invoked by the ExtractSurfFacetCommand.
''' </summary>
Public Sub ExtractSurfFacet(ByVal param As Object)
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXTRACTSURFFACET)
End Sub
#End Region ' ExplodeSurfCommand
#Region "InvertSurfCommand"
''' <summary>
@@ -1152,15 +1212,34 @@ Public Class DrawPanelVM
''' Execute the ExtractLoops. This method is invoked by the ExtractLoopsCommand.
''' </summary>
Public Sub ExtractLoops(ByVal param As Object)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXTRACTSURFFACETLOOPS)
Else
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXTRACTSURFLOOPS)
End If
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXTRACTSURFLOOPS)
End Sub
#End Region ' ExtractLoopsCommand
#Region "ExtractFacetLoopsCommand"
''' <summary>
''' Returns a command that do ExtractFacetLoops.
''' </summary>
Public ReadOnly Property ExtractFacetLoopsCommand As ICommand
Get
If m_cmdExtractFacetLoops Is Nothing Then
m_cmdExtractFacetLoops = New RelayCommand(AddressOf ExtractFacetLoops)
End If
Return m_cmdExtractFacetLoops
End Get
End Property
''' <summary>
''' Execute the ExtractFacetLoops. This method is invoked by the ExtractFacetLoopsCommand.
''' </summary>
Public Sub ExtractFacetLoops(ByVal param As Object)
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXTRACTSURFFACETLOOPS)
End Sub
#End Region ' ExtractFaceLoopsCommand
#Region "SolidAddSurfCommand"
''' <summary>
+9
View File
@@ -928,6 +928,15 @@
<ItemGroup>
<Resource Include="Resources\DrawPanel\RemovePointCurve.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\Circle3P.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\ExtractFacetLoops.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\ExtractSurfFacet.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 B

After

Width:  |  Height:  |  Size: 658 B