' The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

''' <summary>
''' An empty page that can be used on its own or navigated to within a Frame.
''' </summary>
Public NotInheritable Class MainPage
    Inherits Page

    'Promenne cisloJedna a cisloDva deklarovany jako cisla
    's plovouci desetinnou carkou s dvojnasobnou presnosti
    Dim cisloJedna, cisloDva As Double

    Private Sub TlacitkoVypocet_Click(sender As Object, e As RoutedEventArgs) Handles TlacitkoVypocet.Click
        'Prirazeni hodnot z textovych poli jednotlivym promennym
        cisloJedna = TextovePole1.Text
        cisloDva = TextovePole2.Text

        'Urceni vybrane varianty vypoctu a vypocet
        If PrepinacScitani.IsChecked Then
            TextovePoleVysledek.Text = cisloJedna + cisloDva
        End If
        If PrepinacOdecitani.IsChecked Then
            TextovePoleVysledek.Text = cisloJedna - cisloDva
        End If
        If PrepinacNasobeni.IsChecked Then
            TextovePoleVysledek.Text = cisloJedna * cisloDva
        End If
        If PrepinacDeleni.IsChecked Then
            TextovePoleVysledek.Text = cisloJedna / cisloDva
        End If
    End Sub
End Class
