protected override void OnInitialization() { _regionManager.RegisterViewWithRegion(RegionNames.RightUserRegion, typeof(LoggedInUserView)); EventServiceFactory.EventService.GetEvent <GenericEvent <string> >().Subscribe(x => { if (x.Topic == EventTopicNames.PinSubmitted) { PinEntered(x.Value); } }); EventServiceFactory.EventService.GetEvent <GenericEvent <VisibleViewModelBase> >().Subscribe(s => { if (s.Topic == EventTopicNames.ViewClosed) { if (s.Value == _userListViewModel) { _userListViewModel = null; } if (s.Value == _userRolesListViewModel) { _userRolesListViewModel = null; } } }); }
public void OnListRoles(string value) { if (_userRolesListViewModel == null) { _userRolesListViewModel = new UserRoleListViewModel(); } CommonEventPublisher.PublishViewAddedEvent(_userRolesListViewModel); }