Example #1
0
        private void new_Click(object sender, RoutedEventArgs e)
        {
            string[] aa = current.getCredintials();
            if (aa[0].Equals(null) || aa[0].Equals("") || aa[1].Equals(null) || aa[1].Equals(""))
            {
                return;
            }
            if (aa[0].Equals("admin") && aa[1].Equals("admin"))
            {
                HomeView home = new HomeView();
                home.Show();

                this.Close();
            }
            else
            {
                infoDialog ii = new infoDialog("Login", "Incorrect ID or Password :(");
                ii.ShowDialog();
            }
        }
Example #2
0
        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Return)
            {
                string[] aa = current.getCredintials();
                if (aa[0].Equals(null) || aa[0].Equals("") || aa[1].Equals(null) || aa[1].Equals(""))
                {
                    return;
                }
                if (aa[0].Equals("admin") && aa[1].Equals("admin"))
                {
                    HomeView home = new HomeView();
                    home.Show();

                    this.Close();
                }
                else
                {
                    infoDialog ii = new infoDialog("Login", "Incorrect ID or Password :(");
                    ii.ShowDialog();
                }
            }
        }