/// <summary> /// 设置成功登录的用户 /// </summary> /// <param name="user"></param> public void SetLoginSuccessUser(UserInfoModel user) { if (user != null) { _curUserInfoClone = user.ToReadOnly(); CurUserInfo = user.ToReadOnly(); //设置监听事件,防止外部修改 if (_curUserInfoPropChanged != null) { _curUserInfoPropChanged.PropertyChanged -= _curUserInfoPropChanged_PropertyChanged; } _curUserInfoPropChanged = CurUserInfo as INotifyPropertyChanged; _curUserInfoPropChanged.PropertyChanged += _curUserInfoPropChanged_PropertyChanged; } }