コード例 #1
0
        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!");
            }
        }
コード例 #2
0
        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;
                }
            }
        }
コード例 #3
0
 /// <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();
 }
コード例 #4
0
 /// <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();
 }