From 2a056bc9be5dffeb4581a42f91b1f4eac0074978 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 14 Mar 2024 20:08:31 +0100 Subject: [PATCH] =?UTF-8?q?EgtCAM5=20:=20-=20aggiunti=20bottoni=20toolbar?= =?UTF-8?q?=20per=20quotature=20angolari=20e=20diametrali/radiali=20-=20co?= =?UTF-8?q?rretta=20gestione=20DecDigit=20di=20quotature=20in=20pagina=20O?= =?UTF-8?q?pzioni=20(valore=20pu=C3=B2=20essere=20negativo).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DrawPanel/DrawPanelV.xaml | 22 +++++-- DrawPanel/DrawPanelVM.vb | 70 ++++++++++++++++++++- EgtCAM5.vbproj | 6 ++ OptionsWindow/OptionWindowVM.vb | 2 +- Resources/DrawPanel/AngularDimension.png | Bin 0 -> 470 bytes Resources/DrawPanel/DiametralDimension.png | Bin 0 -> 395 bytes 6 files changed, 91 insertions(+), 9 deletions(-) create mode 100644 Resources/DrawPanel/AngularDimension.png create mode 100644 Resources/DrawPanel/DiametralDimension.png diff --git a/DrawPanel/DrawPanelV.xaml b/DrawPanel/DrawPanelV.xaml index ea843cd..1f2b439 100644 --- a/DrawPanel/DrawPanelV.xaml +++ b/DrawPanel/DrawPanelV.xaml @@ -74,17 +74,27 @@ Command="{Binding PolygonSideCommand}" IsEnabled="{Binding bLayerOk}"> - - + + + + diff --git a/DrawPanel/DrawPanelVM.vb b/DrawPanel/DrawPanelVM.vb index c4ea23b..7dbc221 100644 --- a/DrawPanel/DrawPanelVM.vb +++ b/DrawPanel/DrawPanelVM.vb @@ -97,12 +97,22 @@ Public Class DrawPanelVM End Property Public ReadOnly Property TextToolTip As String Get - Return EgtMsg( 5214) + Return EgtMsg( 5214) ' Testo
Testo Avanzato (Shift) End Get End Property Public ReadOnly Property LinearDimensionToolTip As String Get - Return EgtMsg( 5155) + Return EgtMsg( 5155) ' Quota Lineare
Quota Allineata (Shift) + End Get + End Property + Public ReadOnly Property AngularDimensionToolTip As String + Get + Return EgtMsg( 5167) ' Quota Angolare
Quota Angolare Avanzata (Shift) + End Get + End Property + Public ReadOnly Property DiamRadDimensionToolTip As String + Get + Return EgtMsg( 5168) ' Quota Diametrale
Quota Radiale (Shift) End Get End Property @@ -460,6 +470,8 @@ Public Class DrawPanelVM Private m_cmdPolygonSide As ICommand Private m_cmdText As ICommand Private m_cmdLinDim As ICommand + Private m_cmdAngDim As ICommand + Private m_cmdDiamRadDim As ICommand Private m_cmdModifyCurve As ICommand Private m_cmdAddPointCurve As ICommand Private m_cmdPlane As ICommand @@ -878,6 +890,60 @@ Public Class DrawPanelVM #End Region ' LinearDimensionCommand +#Region "AngularDimensionCommand" + + ''' + ''' Returns a command that do Angular Dimension. + ''' + Public ReadOnly Property AngularDimensionCommand As ICommand + Get + If m_cmdAngDim Is Nothing Then + m_cmdAngDim = New RelayCommand(AddressOf AngularDimension) + End If + Return m_cmdAngDim + End Get + End Property + + ''' + ''' Execute the AngularDimension. This method is invoked by the AngDimCommand. + ''' + Public Sub AngularDimension(ByVal param As Object) + If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then + Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ANGULARDIMENSIONPLUS) + Else + Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ANGULARDIMENSION) + End If + End Sub + +#End Region ' AngularDimensionCommand + +#Region "DiamRadDimensionCommand" + + ''' + ''' Returns a command that do DiamRad Dimension. + ''' + Public ReadOnly Property DiamRadDimensionCommand As ICommand + Get + If m_cmdDiamRadDim Is Nothing Then + m_cmdDiamRadDim = New RelayCommand(AddressOf DiamRadDimension) + End If + Return m_cmdDiamRadDim + End Get + End Property + + ''' + ''' Execute the DiamRadDimension. This method is invoked by the DiamRadDimCommand. + ''' + Public Sub DiamRadDimension(ByVal param As Object) + If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then + Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.RADIALDIMENSION) + Else + Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.DIAMETRALDIMENSION) + End If + End Sub + +#End Region ' DiamRadDimensionCommand + #Region "ModifyCurve" ''' diff --git a/EgtCAM5.vbproj b/EgtCAM5.vbproj index 09364cc..71905cc 100644 --- a/EgtCAM5.vbproj +++ b/EgtCAM5.vbproj @@ -1005,6 +1005,12 @@ + + + + + + IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe diff --git a/OptionsWindow/OptionWindowVM.vb b/OptionsWindow/OptionWindowVM.vb index e421938..53fa86c 100644 --- a/OptionsWindow/OptionWindowVM.vb +++ b/OptionsWindow/OptionWindowVM.vb @@ -386,7 +386,7 @@ Public Class OptionWindowVM End Get Set(value As String) Dim nVal As Integer = 0 - If Integer.TryParse(value, nVal) AndAlso nVal > 0 Then + If Integer.TryParse(value, nVal) Then OptionModule.m_nDecDigit = nVal EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight) WritePrivateProfileString(S_DIMENSIONSTYLE, K_DECDIGIT, OptionModule.m_nDecDigit.ToString()) diff --git a/Resources/DrawPanel/AngularDimension.png b/Resources/DrawPanel/AngularDimension.png new file mode 100644 index 0000000000000000000000000000000000000000..b8bed05193c2c0e2f2a0e561c9af521274249a14 GIT binary patch literal 470 zcmeAS@N?(olHy`uVBq!ia0vp^svyk43?x4}TrdPujKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCijQ0(?STmo8nJkdQEW^5nL*HU|fX=H}+k&d!x9SJv0pH#9VKbaVg}b{~4F zyXs+6Q&VGOb|fr6JkT^vI! z{O?YBDAc6D)3A1ffrGZDuJ*nEy0bUDH2C!AviyGQ_uD?+<-23Fy`?nbW?FY3*QPS1 z^1S*3Ib4xJ9^oCzX~8p8S!ZO2#(8f|7xZ@BpRlE&HEhY>O^^P(zqYd_UMIEkpiORQ;-W>zYBsFdBJs85 zruYoQ*Qa#XZ+w<y7H7^(F-8^`2Vg%AjMu1c)mncaXw zoCO|{#S9F5M?jcysy3fAQ1FeXi(`m||Ix|0!iN-inr~M8{BM6#t@`|W_X`Sg*1nMcuOAikh12(zf|=6R^6jOY zSk3G#rM4aTB__9a!*=zk8x>{-<%`*?(%Z~+dHCa>TQrHp_UsAzw$7`-`O#I^3A1j; e*}tw1$<`0wDamx>cyJNW-wd9velF{r5}E)nZJeC| literal 0 HcmV?d00001