/// <summary>
        /// Method for checking username and password
        /// </summary>
        /// <param name="o"></param>
        private void LoginExecute(object o)
        {
            try
            {
                string password = (o as PasswordBox).Password;
                if (Username == "Zaposleni" && password == "Zaposleni")
                {
                    MainWindow mw = new MainWindow();
                    view.Close();
                    mw.ShowDialog();
                }

                else if (JMBGisValid(Username) == true && Password == "Gost")
                {
                    GuestView guest = new GuestView(Username);
                    view.Close();
                    guest.Show();
                    return;
                }

                else
                {
                    MessageBox.Show("Incorrect username or password");
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            GuestView guestView = new GuestView();

            guestView.Show();
        }