示例#1
0
 public ConnectionEditDialog(IProviderFactory providerFactory, INotificationView notificationView, Window owner)
 {
     InitializeComponent();
     _providerFactory = providerFactory;
     _notificationView = notificationView;
     Owner = owner;
 }
 public StorePresenter(MapPresenter.IView mapPresenterView, IView view, GameContext gameContext, INotificationView notificationView)
 {
     _mapPresenterView = mapPresenterView;
     _view = view;
     _gameContext = gameContext;
     _notificationView = notificationView;
     _visibleStores = new List<StoreNode>();
     _gameContext.UserMoved += new EventHandler(_gameContext_UserMoved);
     _gameContext.HotZoneIdChanged += new EventHandler(_gameContext_HotZoneIdChanged);
     _gameContext.UserInventoryChanged += new EventHandler<UserInventoryChangedEventArgs>(_gameContext_UserInventoryChanged);
 }
示例#3
0
        public NotificationController(IInvoker aInvoker, INotificationPersistence aNotificationPersistence, INotificationServer aNotificationServer, INotificationView aView, TimeSpan aShowAgainTimespan)
        {
            iShowAgainTimespan       = aShowAgainTimespan;
            iNotificationPersistence = aNotificationPersistence;
            iNotificationServer      = aNotificationServer;
            iInvoker = aInvoker;
            iView    = aView;

            iCurrentVersion = iNotificationPersistence.LastNotificationVersion;

            Start();
        }
示例#4
0
        //Конструктор
        public NotificationPresenter(INotificationView notificationView, ICurrentUser currentUser,
                                     IDataAccessFactory dataAccessFactory)
        {
            _notificationView  = notificationView;
            _currentUser       = currentUser;
            _dataAccessFactory = dataAccessFactory;

            _notificationView.CanselClicked      += _notificationView_CanselClicked;
            _notificationView.SaveMessgaeClicked += _notificationView_SaveMessgaeClicked;
            _notificationView.WindowLoaded       += _notificationView_WindowLoaded;
            _notificationView.WindowActivated    += _notificationView_WindowActivated;
        }
        public void AddBlock(dax.Document.Block block, IQueryBlock queryBlock, INotificationView notificationView, Action<BindingClickEventArgs> bindingHandler)
        {
            var tableItem = new TableControl(block, queryBlock, notificationView);
            tableItem.OnBindingClick += (s, e) => bindingHandler(e);
            gridBlocks.Children.Add(tableItem);

            while (block.Order >= gridBlocks.RowDefinitions.Count)
            {
                gridBlocks.RowDefinitions.Add(new RowDefinition());
            }

            Grid.SetRow(tableItem, block.Order);
        }
示例#6
0
 public TabDocumentControl(DaxManager daxManager, INotificationView notificationView)
 {
     InitializeComponent();
     _daxManager = daxManager;
     _notificationView = notificationView;
     _daxManager.OnQueryReloaded += DaxManager_OnQueryReloaded;
     _daxManager.OnNewBlockAdded += DaxManager_OnNewBlockAdded;
     _daxManager.OnError += DaxManager_OnError;
     _daxManager.OnGroupsChanged += DaxManager_OnGroupsChanged;
     _daxManager.OnStateChanged += DaxManager_OnStateChanged;
     _daxManager.OnQueryFinished += DaxManager_OnQueryFinished;
     InitGrids();
 }
示例#7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NotificationViewPresenter"/> class.
        /// </summary>
        /// <param name="view">The <see cref="INotificationView"/> view instance.</param>
        /// <param name="projectService">The <see cref="IProjectService"/> service instance used to determine when to show the progress bar.</param>
        /// <param name="eventAggregator">The <seealso cref="IEventAggregator"/> service used to publish and subscribe to events.</param>
        /// <param name="errorViewResolver">The error view resolver.</param>
        public NotificationViewPresenter(INotificationView view, IProjectService projectService, IEventAggregator eventAggregator, Func <IErrorView> errorViewResolver)
        {
            this.View              = view;
            this.projectService    = projectService;
            this.eventAggregator   = eventAggregator;
            this.errorViewResolver = errorViewResolver;

            this.eventAggregator.GetEvent <SaveProjectEvent>().Subscribe(parameter => this.projectService.SaveProject(), true);

            this.projectService.ProjectSaving += this.ProjectService_ProjectSaving;
            this.projectService.ProjectSaved  += this.ProjectService_ProjectSaved;

            this.ToggleProgress();
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="view"></param>
        /// <param name="gameContext"></param>
        public HuntPresenter(MapPresenter.IView mapPresenterView, IView view, GameContext gameContext, INotificationView notificationView)
        {
            //set the view and the game context
            _view = view;
            _mapPresenterView = mapPresenterView;
            _gameContext = gameContext;
            _currentZombiePackId = Guid.Empty;
            _notificationView = notificationView;
            _visibleZombiePacks = new List<Node>();


            //wire up to the user moved event for the game context
            _gameContext.UserAttackPowerChanged += new EventHandler(_gameContext_UserAttackPowerChanged);
            _gameContext.HotZoneIdChanged += new EventHandler(_gameContext_HotZoneIdChanged);
            _gameContext.UserMoved += new EventHandler(_gameContext_UserMoved);
        }
示例#9
0
        public TableControl(dax.Document.Block block, IQueryBlock queryBlock, INotificationView notificationView)
        {
            InitializeComponent();

            _block = block;
            _queryBlock = queryBlock;
            _notificationView = notificationView;

            if (queryBlock.IsSkipped)
            {
                IsSelected = false;
            }

            if (queryBlock.IsEmpty)
            {
                gridTable.Visibility = Visibility.Collapsed;
                stackPanelControl.Visibility = Visibility.Collapsed;
            }

            RefreshView();
        }
        protected override void Context()
        {
            _view          = A.Fake <INotificationView>();
            _buildingBlock = A.Fake <IBuildingBlock>();
            _region        = A.Fake <IRegion>();
            _userSettings  = A.Fake <IUserSettings>();
            _viewItemContextMenuFactory       = A.Fake <IViewItemContextMenuFactory>();
            _userSettings.VisibleNotification = _settingsToUse;
            _regionResolver         = A.Fake <IRegionResolver>();
            _buildingBlockRetriever = A.Fake <IBuildingBlockRetriever>();
            _applicationController  = A.Fake <IMoBiApplicationController>();
            _context                   = A.Fake <IMoBiContext>();
            _dialogCreator             = A.Fake <IDialogCreator>();
            _notificationMessageMapper = new NotificationMessageMapper(new ObjectTypeResolver(), _buildingBlockRetriever);
            A.CallTo(() => _regionResolver.RegionWithName(RegionNames.NotificationList)).Returns(_region);
            sut = new NotificationPresenter(_view, _regionResolver, _userSettings, _notificationMessageMapper, _viewItemContextMenuFactory, _applicationController, _context, _dialogCreator);
            A.CallTo(() => _view.BindTo(A <NotifyList <NotificationMessageDTO> > ._))
            .Invokes(x => _allNotifications = x.GetArgument <IEnumerable <NotificationMessageDTO> >(0));

            sut.Initialize();
        }
示例#11
0
 public NotificationPrensenter(INotificationView view)
 {
     _view  = view;
     _model = new ModelNotification();
     SubscribeViewToEvents();
 }
示例#12
0
 public virtual void Setup()
 {
     mView = GetView();
     mView.Model = new MockModel();
     mView.NotifyIcon = mNotifyIcon;
 }