private void buttonHomePage_Click(object sender, RoutedEventArgs e)
        {
            HomePageWindow homePageWindow = new HomePageWindow();

            homePageWindow.Show();
            this.Close();
        }
 private void Window_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.M)
     {
         ProfileWindow profileWindow = new ProfileWindow();
         profileWindow.Show();
         this.Close();
     }
     else if (e.Key == Key.H)
     {
         HomePageWindow homePageWindow = new HomePageWindow();
         homePageWindow.Show();
         this.Close();
     }
     else if (e.Key == Key.Escape)
     {
         MainWindow mainWindow = new MainWindow();
         mainWindow.Show();
         this.Close();
     }
     else if (e.Key == Key.U)
     {
         ReviewWeeklyTherapyWindow reviewWeeklyTherapyWindow = new ReviewWeeklyTherapyWindow();
         reviewWeeklyTherapyWindow.Show();
         this.Close();
     }
 }
Exemple #3
0
        private void buttonSignIn_Click(object sender, RoutedEventArgs e)
        {
            string patientUserName = username.Text;
            string patientPassword = password.Password;

            if (patientUserName == "" || patientPassword == "")
            {
                ValidationMessageWindow validationMessage = new ValidationMessageWindow();
                validationMessage.Show();
            }
            else
            {
                patient = (Patient)userController.SignIn(patientUserName, patientPassword);

                if (patient != null)
                {
                    HomePageWindow homePageWindow = new HomePageWindow();
                    homePageWindow.Show();
                    this.Close();
                }
                else
                {
                    SignInMessageWindow signInMessage = new SignInMessageWindow();
                    signInMessage.Show();
                    resetInputText();
                }
            }
        }
 private void Window_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.O)
     {
         ReviewNotificationWindows reviewNotificationWindows = new ReviewNotificationWindows();
         reviewNotificationWindows.Show();
         this.Close();
     }
     else if (e.Key == Key.Escape)
     {
         MainWindow mainWindow = new MainWindow();
         mainWindow.Show();
         this.Close();
     }
     else if (e.Key == Key.I)
     {
         EditInformationWindow editInformationWindow = new EditInformationWindow();
         editInformationWindow.Show();
         this.Close();
     }
     else if (e.Key == Key.H)
     {
         HomePageWindow homePageWindow = new HomePageWindow();
         homePageWindow.Show();
         this.Close();
     }
     else if (e.Key == Key.L)
     {
         EditPasswordWindow editPasswordWindow = new EditPasswordWindow();
         editPasswordWindow.Show();
         this.Close();
     }
     else if (e.Key == Key.A)
     {
         // Moje ALERGIJE
         AllergiesWindow allergiesWindow = new AllergiesWindow();
         allergiesWindow.Show();
     }
     else if (e.Key == Key.T)
     {
         // MOJE Terapije
         ReviewTherapyWindow therapy = new ReviewTherapyWindow();
         therapy.Show();
         this.Close(); ;
     }
 }
 private void Window_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.M)
     {
         ProfileWindow profileWindow = new ProfileWindow();
         profileWindow.Show();
         this.Close();
     }
     else if (e.Key == Key.H)
     {
         HomePageWindow homePageWindow = new HomePageWindow();
         homePageWindow.Show();
         this.Close();
     }
     else if (e.Key == Key.Escape)
     {
         MainWindow mainWindow = new MainWindow();
         mainWindow.Show();
         this.Close();
     }
 }