private void Window_Loaded(object sender, RoutedEventArgs e) { MainW.Hide(); loginW.ShowDialog(); if (LoginOK == true) { MainW.Show(); Username = SocSecNb; //Visning af brugernavn på hovedmenu } if (LoginOK == false) { MainW.Close(); } DataContext = this; }
private void Window_Loaded(object sender, RoutedEventArgs e) { this.Hide(); loginW.ShowDialog(); cpr_CB.Text = "Find CPR"; if (LoginOK == true) { MainW.Show(); } if (LoginOK == false) { MainW.Close(); } }