/// <summary>
 /// constructor til setIntervalWindow
 /// </summary>
 /// <param name="homewindow"></param>
 /// <param name="patient">patienten, intervallet skal ændres for</param>
 public SetIntervalWindow(HomeWindow homewindow, Patient patient)
 {
     _homeWindow      = homewindow;
     _patient         = patient;
     _reminderControl = new TrainingReminderControl(_patient);
     InitializeComponent();
 }
Beispiel #2
0
        /// <summary>
        /// constructor for journalwindow som opretter alle de ting, der skal oprettes údfra patientens informationer. sætter ´patientens øvelsespakker ind i comboboxen
        /// </summary>
        /// <param name="window">homewindow, som der skal navigeres tilbage til</param>
        /// <param name="journal"></param>
        /// <param name="patient">patienten, der følger med, hvis informationer, der skal bruges</param>
        public JournalWindow(HomeWindow window, Journal journal, Patient patient)
        {
            _patient        = patient;
            _homeWindow     = window;
            _journalControl = new UpdateJournalControl(patient);
            InitializeComponent();

            foreach (var item in _patient.ExercisePackages)
            {
                journalCB.Items.Add(item.Name);
            }
            journalCB.SelectedItem = journalCB.Items[0];
        }
        /// <summary>
        /// constructor til exercisewindow, opretter de ting, der skal bruges og putter exercisepakker ind i comboboxen
        /// </summary>
        /// <param name="homewindow"></param>
        /// <param name="patient"></param>
        public ExerciseWindow(HomeWindow homewindow, Patient patient)
        {
            _patient         = patient;
            _homeWindow      = homewindow;
            _exerciseControl = new ExerciseControl();
            InitializeComponent();

            DescriptionTB.Text = "Vælg en øvelsespakke!";
            RepititionsTB.Text = "";
            setNumberTB.Text   = "";
            //browserWB.Visibility = Visibility.Collapsed;
            foreach (var item in _patient.ExercisePackages)
            {
                exercisepackageCB.Items.Add(item.Name);
            }
            exercisepackageCB.SelectedItem = exercisepackageCB.Items[0];

            videopath = _exerciseList[CurrentExerciseID].ExerciseLink;
            browserWB.NavigateToString(NavigateToYoutube(videopath));
        }
        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;
                }
            }
        }