public static void LoadMenu(Views.LoginView loginForm) { Views.MainMenu menu = new Views.MainMenu(); loginForm.Hide(); menu.Closed += (senderObj, eventArgs) => loginForm.Close(); menu.Show(); }
public void CheckLogin(string username, string password, Views.LoginView loginview) { int Authentication = DatabaseFacade.CheckLogin(username, password); if (Authentication != 0) { MainView MainView = new MainView(Authentication, this); MainView.Show(); View = MainView; loginview.Close(); } else { System.Windows.MessageBox.Show("Forkert login"); } }