Пример #1
0
        public UglyDisplayViewModel()
        {
            _twitterizerService  = TweetServiceLocator.GetDataService <LinqTweet>();
            _uiDispatcherService = UiDispatcherLocator.GetDispatcher();
            _mediator            = MediatorLocator.GetMediator();
            _mediator.Subscribe(ViewModelEvents.SwitchViewBlocked, ignore =>
            {
                _allowSwitch = false;
                OnSwitchToPretty.RaiseCanExecuteChanged("OnSwitchToPretty");
            });

            _mediator.Subscribe(ViewModelEvents.SwitchViewUnblocked, ignore =>
            {
                _allowSwitch = true;
                OnSwitchToPretty.RaiseCanExecuteChanged("OnSwitchToPretty");
            });
        }
Пример #2
0
 static ShellViewModel()
 {
     Mediator            = MediatorLocator.GetMediator();
     UiDispatcherService = UiDispatcherLocator.GetDispatcher();
 }