Files
omagoffice/UnderDrillControl/UnderDrillControlVM.vb
T
Emmanuele Sassi 84bddeec9a OmagOFFICE :
- Gestione dati TRF.
- Stime tempi e costi.
- Lavorazioni da sotto.
2018-08-10 16:40:06 +00:00

60 lines
1.9 KiB
VB.net

Imports EgtUILib
Imports EgtWPFLib5
Public Class UnderDrillControlVM
Inherits VMBase
Private m_dDrillDepth As Double
Public Property dDrillDepth As String
Get
Return LenToString(m_dDrillDepth, -2)
End Get
Set(value As String)
StringToLen(value, m_dDrillDepth)
WriteMainPrivateProfileString(S_SIDES, K_UNDERDRILLDEPTH, DoubleToString(m_dDrillDepth, 2))
' Aggiorno affondamento dei fori da sotto già definiti
Dim nPartId As Integer = EgtGetFirstPart()
While nPartId <> GDB_ID.NULL
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
While nLayId <> GDB_ID.NULL
Dim sLayName As String = ""
If EgtGetName(nLayId, sLayName) And sLayName = NAME_UNDERDRILL Then
Dim nEntId As Integer = EgtGetFirstInGroup(nLayId)
EgtSetInfo(nEntId, INFO_DEPTH, m_dDrillDepth)
End If
nLayId = EgtGetNextLayer(nLayId)
End While
nPartId = EgtGetNextPart(nPartId)
End While
End Set
End Property
Private Sub SetdDrillDepth(value As Double)
m_dDrillDepth = value
NotifyPropertyChanged("dDrillDepth")
End Sub
#Region "Messages"
Public ReadOnly Property DrillDepthMsg As String
Get
Return EgtMsg(MSG_IMPORTPAGEUC + 11) ' Affondamento
End Get
End Property
#End Region ' Messages
#Region "CONSTRUCTOR"
Sub New(CallingWndScene As Scene)
' Avvio l'inizializzazione della mappa passandogli il riferimento al DxfImportWindowVM
DxfImportWindowMap.SetRefUnderDrillControlVM(Me)
' Imposto contesto corrente
EgtSetCurrentContext(CallingWndScene.GetCtx())
' Aggiorno valori
SetdDrillDepth(GetMainPrivateProfileDouble(S_SIDES, K_UNDERDRILLDEPTH, 10))
End Sub
#End Region ' CONSTRUCTOR
End Class