OmagOFFICE :
- Aggiunta possibilità di devinire l'inclinazione dei singoli lati con angoli diversi grazie all'apposita opzione.
This commit is contained in:
@@ -23,6 +23,8 @@ Public Class SideEntityControlVM
|
||||
' Variabile che indica se sono in sideangle o drip
|
||||
Friend m_Mode As ModeOpt
|
||||
|
||||
Friend Shared m_SideAngleCheck As Boolean = False
|
||||
|
||||
' Lista di tutte le entità inclinabili presenti nel progetto
|
||||
Private m_SideEntityList As ObservableCollection(Of SideEntity)
|
||||
Public Property SideEntityList As ObservableCollection(Of SideEntity)
|
||||
@@ -45,6 +47,21 @@ Public Class SideEntityControlVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Parameter1_Visibility As Visibility
|
||||
Public ReadOnly Property Parameter1_Visibility As Visibility
|
||||
Get
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
If m_SideAngleCheck Then
|
||||
Return Visibility.Visible
|
||||
Else
|
||||
Return Visibility.Collapsed
|
||||
End If
|
||||
Else
|
||||
Return Visibility.Visible
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_Parameter1 As Double
|
||||
Public Property Parameter1 As String
|
||||
Get
|
||||
@@ -155,6 +172,7 @@ Public Class SideEntityControlVM
|
||||
m_Mode = Mode
|
||||
m_SideEntityList = If(IsNothing(SideEntityList), New ObservableCollection(Of SideEntity), New ObservableCollection(Of SideEntity)(SideEntityList))
|
||||
NotifyPropertyChanged("SideEntityList")
|
||||
m_SideAngleCheck = If(GetMainPrivateProfileInt(S_COMPO, K_SIDEMODE, 0) = 0, True, False)
|
||||
If CallingWindow = CallingWindowOpt.COMPO Then
|
||||
|
||||
' Imposto contesto corrente
|
||||
@@ -480,13 +498,13 @@ Public Class SideEntityControlVM
|
||||
Dim sEntityName As String = String.Empty
|
||||
EgtGetName(CurrLine, sEntityName)
|
||||
If m_CallingWindow = CallingWindowOpt.COMPO Then
|
||||
m_SideEntityList.Add(New SideAngleEntity(CurrLine, sEntityName, TextLayer, 0))
|
||||
m_SideEntityList.Add(New SideAngleEntity(CurrLine, sEntityName, TextLayer, 0, m_Mode))
|
||||
' Cancello inclinazione nell'apposito campo info
|
||||
EgtRemoveInfo(CurrLine, INFO_SIDE_ANGLE)
|
||||
' Creo testo con angolo di inclinazione 0
|
||||
AddTextToLine(sEntityName & " = 0°", TextLayer, CurrLine, 10, dBBoxRad, True)
|
||||
Else
|
||||
m_SideEntityList.Add(New SideAngleEntity(CurrLine, sEntityName, TextLayer, dSideAngleVal))
|
||||
m_SideEntityList.Add(New SideAngleEntity(CurrLine, sEntityName, TextLayer, dSideAngleVal, m_Mode))
|
||||
' Creo testo con angolo di inclinazione 0
|
||||
AddTextToLine(sEntityName & " = " & DoubleToString(dSideAngleVal, 1) & "°", TextLayer, CurrLine, 10, dBBoxRad, True)
|
||||
End If
|
||||
@@ -507,13 +525,13 @@ Public Class SideEntityControlVM
|
||||
Dim sEntityName As String = String.Empty
|
||||
EgtGetName(CurrLine, sEntityName)
|
||||
If m_CallingWindow = CallingWindowOpt.COMPO Then
|
||||
m_SideEntityList.Add(New DripEntity(CurrLine, sEntityName, TextLayer, False))
|
||||
m_SideEntityList.Add(New DripEntity(CurrLine, sEntityName, TextLayer, False, m_Mode))
|
||||
' Cancello gocciolatoio nell'apposito campo info
|
||||
EgtRemoveInfo(CurrLine, INFO_HAVE_DRIP)
|
||||
' Creo testo entità
|
||||
AddTextToLine(sEntityName, TextLayer, CurrLine, 10, dBBoxRad, True)
|
||||
Else
|
||||
m_SideEntityList.Add(New DripEntity(CurrLine, sEntityName, TextLayer, bHaveDripVal))
|
||||
m_SideEntityList.Add(New DripEntity(CurrLine, sEntityName, TextLayer, bHaveDripVal, m_Mode))
|
||||
' Creo testo con angolo di inclinazione 0
|
||||
AddTextToLine(sEntityName, TextLayer, CurrLine, 10, dBBoxRad, True)
|
||||
End If
|
||||
@@ -816,12 +834,43 @@ Public MustInherit Class SideEntity
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_Mode As SideEntityControlVM.ModeOpt
|
||||
Public ReadOnly Property Value_Visibility As Visibility
|
||||
Get
|
||||
If m_Mode = SideEntityControlVM.ModeOpt.SIDEANGLE Then
|
||||
If SideEntityControlVM.m_SideAngleCheck Then
|
||||
Return Visibility.Collapsed
|
||||
Else
|
||||
Return Visibility.Visible
|
||||
End If
|
||||
Else
|
||||
Return Visibility.Visible
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Private m_Check_Visibility As Visibility
|
||||
Public ReadOnly Property Check_Visibility As Visibility
|
||||
Get
|
||||
If m_Mode = SideEntityControlVM.ModeOpt.SIDEANGLE Then
|
||||
If SideEntityControlVM.m_SideAngleCheck Then
|
||||
Return Visibility.Visible
|
||||
Else
|
||||
Return Visibility.Collapsed
|
||||
End If
|
||||
Else
|
||||
Return Visibility.Visible
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public MustOverride Property bIsChecked As Boolean
|
||||
|
||||
Sub New(nId As Integer, sEntityName As String, nTextId As Integer)
|
||||
Sub New(nId As Integer, sEntityName As String, nTextId As Integer, Mode As SideEntityControlVM.ModeOpt)
|
||||
m_nGeomId = nId
|
||||
m_sEntityName = sEntityName
|
||||
m_nTextId = nTextId
|
||||
m_Mode = Mode
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -834,6 +883,25 @@ Friend Class SideAngleEntity
|
||||
Friend Shared m_RefreshSideAngleText As Action
|
||||
|
||||
Private m_dSideAngle As Double
|
||||
Public Property GrphSideAngle As String
|
||||
Get
|
||||
Return DoubleToString(m_dSideAngle, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
If value <> m_dSideAngle Then
|
||||
If Not String.IsNullOrWhiteSpace(value) Then
|
||||
StringToDouble(value, m_dSideAngle)
|
||||
Else
|
||||
' altrimenti lo imposto a zero
|
||||
m_dSideAngle = 0
|
||||
End If
|
||||
' Lo modifico nella geometria e nella lista inclinazioni
|
||||
m_ModifySideAngle(sEntityName, dSideAngle)
|
||||
' Aggiorno tutti i testi
|
||||
m_RefreshSideAngleText()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Public Property dSideAngle As Double
|
||||
Get
|
||||
Return m_dSideAngle
|
||||
@@ -864,8 +932,8 @@ Friend Class SideAngleEntity
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(nId As Integer, sEntityName As String, nTextId As Integer, dSideAngle As Double)
|
||||
MyBase.New(nId, sEntityName, nTextId)
|
||||
Sub New(nId As Integer, sEntityName As String, nTextId As Integer, dSideAngle As Double, Mode As SideEntityControlVM.ModeOpt)
|
||||
MyBase.New(nId, sEntityName, nTextId, Mode)
|
||||
m_dSideAngle = dSideAngle
|
||||
End Sub
|
||||
|
||||
@@ -906,8 +974,8 @@ Friend Class DripEntity
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(nId As Integer, sEntityName As String, nTextId As Integer, bHaveDrip As Boolean)
|
||||
MyBase.New(nId, sEntityName, nTextId)
|
||||
Sub New(nId As Integer, sEntityName As String, nTextId As Integer, bHaveDrip As Boolean, Mode As SideEntityControlVM.ModeOpt)
|
||||
MyBase.New(nId, sEntityName, nTextId, Mode)
|
||||
m_bHaveDrip = bHaveDrip
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user