private void OnLoginSuccess(object sender, UserEventArgs e) { _accountInfoUc = new AccountInfoUc(e.User); _accountInfoUc.Logout += OnLogout; LoadUserControl(_accountInfoUc); SetUserName(e.User.Name); }
private void OnLogout(object sender, EventArgs e) { SetUserName(string.Empty); _accountInfoUc = null; var loginUc = CreateLoginUc(); LoadUserControl(loginUc); }