public MainViewModel()
 {
     StundenDauer.SetupStundenDauerListe();
     UserName   = Settings.Default.UserName;
     KeepData   = Settings.Default.keepData;
     connection = new DigiCon(this);
 }
        public async void OnLoginClick(object obj)
        {
            var passwordBox = obj as PasswordBox;

            Password = passwordBox.Password;
            //RequestMessageBox(null, $"{await DigiCon.AuthorizeAsync(Username, Password)}", "demoCaption", false);
            bool authorized = await DigiCon.AuthorizeAsync(Username, Password);

            if (authorized)
            {
                // ToDo illegal
                new MasterWindow().Show();
            }
            else
            {
                RequestMessageBox(null, $"Nutzername und/oder Passwort falsch", "Fehler", false);
            }
        }
Esempio n. 3
0
 public MasterWindow()
 {
     InitializeComponent();
     tb.Text = DigiCon.GetScheduleOfTodayAsync().Result;
 }