Imports IntraSell_DLL

Public Class Calculator
    Property TextBoxMoney As TextBox
    Property Kurs As Decimal = 1.955

    Private Sub ButtonEur_Click(sender As Object, e As EventArgs) Handles ButtonEur.Click
        Try
            Kurs = VarValue_Default("KURS_EUR_LEV", "1.995") / 1000
            If IsNumeric(TextBoxMoney.Text) Then
                Dim wert As Decimal = TextBoxMoney.Text
                TextBoxMoney.Text = Decimal.Round(wert / Kurs)
            End If
        Catch ex As Exception
            HandleAppError(ex)
        End Try
    End Sub

    Private Sub ButtonLv_Click(sender As Object, e As EventArgs) Handles ButtonLv.Click
        Try
            Kurs = VarValue_Default("KURS_EUR_LEV", "1.995") / 1000
            If IsNumeric(TextBoxMoney.Text) Then
                Dim wert As Decimal = TextBoxMoney.Text
                TextBoxMoney.Text = Decimal.Round(wert * Kurs, 2)
            End If
        Catch ex As Exception
            HandleAppError(ex)
        End Try
    End Sub

    Private Sub Calculator_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub
End Class
