private async void Button_Click(object sender, RoutedEventArgs e)
        {
            if (Nutzer.Text != string.Empty)
            {
                if (PW.Password != string.Empty)
                {
                    string retval = await WebsiteCon.Einloggen(Nutzer.Text, PW.Password);

                    if (retval.Contains("Erfolgreich"))
                    {
                        if (LoginKeep.IsChecked == true)
                        {
                            Properties.Settings.Default.UN       = Nutzer.Text;
                            Properties.Settings.Default.PW       = PW.Password;
                            Properties.Settings.Default.keepData = true;
                            Properties.Settings.Default.Save();
                        }
                        MenuWindow mw = new MenuWindow();
                        this.Close();
                        mw.Show();
                    }
                    else
                    {
                        MessageBox.Show(retval, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
                    }
                }
            }
        }
示例#2
0
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            if (Nutzer.Text != string.Empty)
            {
                if (PW.Password != string.Empty)
                {
                    string retval = await WebsiteCon.Einloggen(Nutzer.Text, PW.Password);

                    if (retval.Contains("Erfolgreich"))
                    {
                        MenuWindow mw = new MenuWindow();
                        this.Close();
                        mw.Show();
                    }
                    else
                    {
                        MessageBox.Show(retval, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
                    }
                }
            }
        }