コード例 #1
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"))
                    {
                        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 GetSK()
        {
            var tosplit = await WebsiteCon.GetUNKL();

            var splittxt = tosplit.Split(';');

            User.Text   = splittxt[0];
            Klasse.Text = splittxt[1];
        }
コード例 #3
0
        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));
        }
コード例 #4
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);
                    }
                }
            }
        }
コード例 #5
0
 private void ExitApp(object sender, RoutedEventArgs e)
 {
     WebsiteCon.logout();
     this.Close();
 }
コード例 #6
0
        private async void GetSPTM()
        {
            SP.ItemsSource = await WebsiteCon.getStundenplan();

            TM.ItemsSource = await WebsiteCon.getTermine();
        }