OmagOFFICE 2.1c1 :

- sistemata interfaccia per angoli sui lati
- disabilitato bottone VeinMatching se opzione disabilitata.
This commit is contained in:
Dario Sassi
2019-03-01 18:50:25 +00:00
parent 4a7d3f9891
commit bd21df7971
7 changed files with 75 additions and 68 deletions
+33 -6
View File
@@ -31,6 +31,18 @@ Public Class SideEntityControlVM
End Set
End Property
Public ReadOnly Property Legenda_Visibility As Visibility
Get
If m_Mode = SideEntityControlVM.ModeOpt.DRIP OrElse
SideEntityControlVM.m_SideAngleCheck OrElse
m_SideEntityList.Count() = 0 Then
Return Visibility.Collapsed
Else
Return Visibility.Visible
End If
End Get
End Property
Private m_Parameter23_Visibility As Visibility
Public Property Parameter23_Visibility As Visibility
Get
@@ -73,8 +85,8 @@ Public Class SideEntityControlVM
' Se checked lo imposto al valore letto dalla TxBx
If m_SideEntityList(Index).bIsChecked Then
StringToDouble(value, dSideAngle)
' altrimenti lo imposto a zero
Else
' altrimenti lo imposto a zero
dSideAngle = 0
End If
' Lo modifico nella geometria e nella lista inclinazioni
@@ -166,7 +178,7 @@ Public Class SideEntityControlVM
Private m_Parameter1Msg As String
Public Property Parameter1Msg As String
Get
Return EgtMsg(MSG_COMPONENTPAGEUC + 47)
Return m_Parameter1Msg
End Get
Set(value As String)
m_Parameter1Msg = value
@@ -509,6 +521,7 @@ Public Class SideEntityControlVM
Dim sEntityName As String = String.Empty
EgtGetName(CurrLine, sEntityName)
m_SideEntityList.Add(New SideAngleEntity(CurrLine, sEntityName, TextLayer, dSideAngleVal, dSideHeelVal, m_Mode))
NotifyPropertyChanged("Legenda_Visibility")
' Creo testo con angolo di inclinazione ed eventuale tallone
Dim sText As String = sEntityName & " = " & DoubleToString(dSideAngleVal, 1) & "°"
If dSideHeelVal > 10 * EPS_SMALL Then sText += "; " & LenToString(dSideHeelVal, 1)
@@ -526,6 +539,7 @@ Public Class SideEntityControlVM
Dim sEntityName As String = String.Empty
EgtGetName(CurrLine, sEntityName)
m_SideEntityList.Add(New DripEntity(CurrLine, sEntityName, TextLayer, bHaveDripVal, m_Mode))
NotifyPropertyChanged("Legenda_Visibility")
' Creo testo con angolo di inclinazione 0
AddTextToLine(sEntityName, TextLayer, CurrLine, 20, dBBoxRad, True)
End Sub
@@ -754,6 +768,7 @@ Public Class SideEntityControlVM
Friend Sub ReLoadSideAnglePage(CallingWindow As CallingWindowOpt)
m_SideEntityList.Clear()
NotifyPropertyChanged("Legenda_Visibility")
If CallingWindow = CallingWindowOpt.COMPO Then
' Imposto contesto corrente
@@ -851,12 +866,26 @@ Public Class SideEntityControlVM
While LineId <> GDB_ID.NULL
Dim dSideAngle As Double = 0
Dim bSA As Boolean = EgtGetInfo(LineId, INFO_SIDE_ANGLE, dSideAngle)
Dim dSideAngle2 As Double = 0
Dim bSA2 As Boolean = EgtGetInfo(LineId, INFO_SIDE_ANGLE2, dSideAngle2)
Dim dSideHeel As Double = 0
Dim bSH As Boolean = EgtGetInfo(LineId, INFO_HEEL, dSideHeel)
If Math.Abs(dSideAngle) > EPS_ANG_SMALL Or bSH Then
If Math.Abs(dSideAngle) > EPS_ANG_SMALL Or ( bSA2 And Not bSH) Then
' Creo testo con angolo di inclinazione
Dim sText As String = DoubleToString(dSideAngle, 1) & "°"
If dSideHeel > 10 * EPS_SMALL Then sText &= "; " & LenToString(dSideHeel, 1) & "°"
' Se presente tallone, lo indico
If bSH then
If dSideHeel > 10 * EPS_SMALL Then
If dSideAngle > 0 Then
sText = sText & "; " & LenToString(dSideHeel, 1)
Else
sText = LenToString(dSideHeel, 1) & "; " & sText
End If
End If
' se altrimenti presente secondo angolo, lo indico
ElseIf bSA2 then
sText = DoubleToString(dSideAngle2, 1) & "°" & "; " & sText
End If
SideEntityControlVM.AddTextToLine(sText, TextLayId, LineId, 15, dBBoxRad, False, True)
' Imposto angolo originale
EgtSetInfo(LineId, INFO_ORIG_SIDE_ANGLE, dSideAngle)
@@ -911,8 +940,6 @@ Public MustInherit Class SideEntity
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