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); } } } }
private async void GetSK() { var tosplit = await WebsiteCon.GetUNKL(); var splittxt = tosplit.Split(';'); User.Text = splittxt[0]; Klasse.Text = splittxt[1]; }
private async void GetWSP() { DateTime datum_montag = StartingDateOfWeek(DateTime.Now), datum_freitag = datum_montag.AddDays(4); Mondat.Text = datum_montag.ToString("dd.MM.yyyy"); Frdat.Text = datum_freitag.ToString("dd.MM.yyyy"); WSP_MON.ItemsSource = await WebsiteCon.getStundenplan(datum_montag); WSP_DIE.ItemsSource = await WebsiteCon.getStundenplan(datum_montag.AddDays(1)); WSP_MIT.ItemsSource = await WebsiteCon.getStundenplan(datum_montag.AddDays(2)); WSP_DON.ItemsSource = await WebsiteCon.getStundenplan(datum_montag.AddDays(3)); WSP_FR.ItemsSource = await WebsiteCon.getStundenplan(datum_montag.AddDays(4)); }
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); } } } }
private void ExitApp(object sender, RoutedEventArgs e) { WebsiteCon.logout(); this.Close(); }
private async void GetSPTM() { SP.ItemsSource = await WebsiteCon.getStundenplan(); TM.ItemsSource = await WebsiteCon.getTermine(); }