Files
OmagCUT/CompoTrfData.xaml.vb
T
Dario Sassi 9a89cb6402 OmagCUT :
- in inserimento pezzi aggiunto controllo compatibilità per pezzi da Trf
- aggiunta possibilità di assegnare dati Trf ai componenti (se Trf import abilitato).
2018-07-11 06:22:07 +00:00

50 lines
1.8 KiB
VB.net

Imports System.Collections.ObjectModel
Imports EgtUILib
Public Class CompoTrfData
' Riferimento alla MainWindow
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Sub New(Owner As Window)
Me.Owner = Owner
InitializeComponent()
End Sub
Private Sub CompoTrfData_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
OrdCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 10) 'Order Code
OrdDescTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 11) 'Order Description
MatCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 12) 'Material Code
SurfCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 13) 'Surface Code
ThicknessTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 14) 'Thickness
End Sub
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
DialogResult = True
Close()
End Sub
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
DialogResult = False
Close()
End Sub
Friend Sub SetData(sOrdCode As String, sOrdDesc As String, sMatCode As String, sSurfCode As String, dTh As Double)
OrdCodeTxBx.Text = sOrdCode
OrdDescTxBx.Text = sOrdDesc
MatCodeTxBx.Text = sMatCode
SurfCodeTxBx.Text = sSurfCode
ThicknessTxBx.Text = LenToString(dTh, 2)
End Sub
Friend Sub GetData(ByRef sOrdCode As String, ByRef sOrdDesc As String, ByRef sMatCode As String, ByRef sSurfCode As String, ByRef dTh As Double)
sOrdCode = OrdCodeTxBx.Text
sOrdDesc = OrdDescTxBx.Text
sMatCode = MatCodeTxBx.Text
sSurfCode = SurfCodeTxBx.Text
StringToLen(ThicknessTxBx.Text, dTh)
End Sub
End Class