private void gemB_Click(object sender, RoutedEventArgs e) { int value; if (int.TryParse(intervalTB.Text, out value)) { _reminderControl.IntervalSet(Convert.ToInt32(intervalTB.Text)); MessageBox.Show("Nyt interval gemt!"); this.Close(); _homeWindow.Show(); } else { MessageBox.Show("Indtast venligst et heltal!"); } }
private void loginB_Click(object sender, RoutedEventArgs e) { if (_passwordIsVisible) { pwPB.Password = pwTB.Text; } if (_loginControl.LoginButtonIsPressed(cprTB.Text, Convert.ToString(pwPB.Password))) { _patient = _loginControl.GetPatientInfo(cprTB.Text, Convert.ToString(pwPB.Password)); _homeWindow = new HomeWindow(_patient); _homeWindow.Show(); this.Close(); } else { MessageBoxResult result = MessageBox.Show("Login er invalid", "", MessageBoxButton.OK); switch (result) { case MessageBoxResult.OK: if (_passwordIsVisible) { SetupShowHideImgPbTbVisible(); this.cprTB.Clear(); this.pwTB.Clear(); this.pwPB.Clear(); this.cprTB.Focus(); } else { this.cprTB.Clear(); this.pwTB.Clear(); this.pwPB.Clear(); this.cprTB.Focus(); } break; } } }
/// <summary> /// navigere tilbage til homewindow /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void backB_Click(object sender, RoutedEventArgs e) { //Her er dobbelt dependency this.Close(); _homeWindow.Show(); }
/// <summary> /// navigere tilbage til dagbosvindue når der trykkes på denne knap /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void backB_Click(object sender, RoutedEventArgs e) { _homeWindow.Show(); browserWB.Navigate("https://www.google.dk"); //det her er en dum måde at gøre det på, men det virker Close(); }