Example #1
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {

            try
            {
                bool loginid = ServiceObj.IsUserValid(textBox1.Text, passwordBox1.Password);
                if (loginid == true)
                {
                    MainWindow form = new MainWindow();
                    form.Show();
                }
                else
                {
                    MessageBox.Show("Enter Proper User Credentials");
                }
            }
            catch (Exception)
            {
                MessageBox.Show("Enter Proper User Credentials");
            }
        }
Example #2
0
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     var main = new MainWindow(e.Args);
     main.Show();
 }