
Imports System.IO
    Imports System.Runtime.Serialization.Formatters.Binary

Public Class Form5

    Public Shared NemetMegnevezesStr As String
    Public Shared MagyarMegnevezesStr As String

    Public WWClicked As String
    Private Sub MyWindow_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)

        'Material skin select

    End Sub

    Private Sub MaterialRaisedButton2_Click(sender As Object, e As EventArgs) Handles MaterialRaisedButton2.Click
        WWClicked = "Cancel"
        Me.Close()
    End Sub


    Private Sub MaterialRaisedButton1_Click(sender As Object, e As EventArgs) Handles MaterialRaisedButton1.Click
        WWClicked = "OK"
        Me.Close()
    End Sub

    Private Sub MaterialRaisedButton3_Click(sender As Object, e As EventArgs) Handles MaterialRaisedButton3.Click
        Dim webAddress As String = "https://translate.google.com/?client=firefox-b-d&um=1&ie=UTF-8&hl=hu&client=tw-ob#view=home&op=translate&sl=de&tl=hu&text=" & NemetMegnevezes.Text
        Process.Start(webAddress)
    End Sub

    Private Sub MaterialRaisedButton4_Click(sender As Object, e As EventArgs) Handles MaterialRaisedButton4.Click
        Dim webAddress As String = "https://magyar-nemet-szotar.hu/" & NemetMegnevezes.Text & "-magyarul.html"
        Process.Start(webAddress)
    End Sub

    Private Sub MaterialRaisedButton5_Click(sender As Object, e As EventArgs) Handles MaterialRaisedButton5.Click
        WWClicked = "FB"
        Me.Close()
    End Sub

    Private Sub Button_Click(sender As Object, e As RoutedEventArgs)

    End Sub

    Private Sub NemetMegnevezes_LostFocus(sender As Object, e As RoutedEventArgs) Handles NemetMegnevezes.LostFocus

        Dim magyarmegnevezesstr As String = ""
        If MainWindow.dict.TryGetValue(NemetMegnevezes.Text, magyarmegnevezesstr) = True Then
            MaterialLabel4.Background = Brushes.Green
            MaterialLabel4.Content = "Megtaláható a szótárban!"
            MagyarMegnevezes.Text = magyarmegnevezesstr
            '       MsgBox("!!")
        Else
            MaterialLabel4.Content = ""
            MainWindow.gtranslate(NemetMegnevezes.Text, "de", "hu")
            '      MsgBox("!")
        End If
    End Sub

    Private Sub MaterialRaisedButton5_Click_1(sender As Object, e As RoutedEventArgs) Handles MaterialRaisedButton5.Click

    End Sub

    Private Sub NemetMegnevezes_TextChanged(sender As Object, e As TextChangedEventArgs) Handles NemetMegnevezes.TextChanged

    End Sub
End Class