Пример #1
0
        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;
                    }
                }
            });
        }
Пример #2
0
 public void OnListRoles(string value)
 {
     if (_userRolesListViewModel == null)
     {
         _userRolesListViewModel = new UserRoleListViewModel();
     }
     CommonEventPublisher.PublishViewAddedEvent(_userRolesListViewModel);
 }