private void LoginCheck() { LoginWin login = new LoginWin(); login.Owner = this; bool?result = login.ShowDialog(); if (result == true) { frame_content.Navigate(new Uri("view/Pages/Home.xaml", UriKind.Relative)); if (login.CheckBox.IsChecked == (bool?)true) { loginVM.SetBool(true); } } }
public bool Login(LoginInfo logininfo) { if (winshow == true) { return(false); } try { winshow = true; loginSucceed = false; logininfo.RrrorInformation = "";//清空信息 loginWin = new LoginWin(logininfo); loginWin.Title = (string)Application.Current.Resources["strLogin"]; loginWin.Parachanged += Win_Parachanged; loginWin.ShowDialog(); return(loginSucceed); } finally { winshow = false; } }