private void OpenLogin() { IsLogin lg = new IsLogin("登录"); LoginWindow lw = new LoginWindow(lg); lw.ShowDialog(); if (lg.Login) { this.Show(); } else { this.Close(); } }
/// <summary> /// 退出选项 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void exit_Click(object sender, EventArgs e) { IsLogin lg = new IsLogin("退出"); LoginWindow lgw = new LoginWindow(lg); lgw.ShowDialog(); if(lg.Login){ System.Windows.Application.Current.Shutdown(); } }