Пример #1
0
        /// <summary>
        /// Raise a toast notification which is shown in the bottom of the main UI window.
        /// </summary>
        /// <param name="message">The body of the notification</param>
        public virtual void RaiseNotification(string message)
        {
            var notif = new ShowNotificationEvent()
            {
                Notification = message
            };

            NotifyUi(notif);
        }
Пример #2
0
        protected override async Task Context()
        {
            await base.Context();

            _userSettings.ShowUpdateNotification = true;
            A.CallTo(() => _versionChecker.NewVersionIsAvailableAsync()).Returns(true);
            A.CallTo(() => _versionChecker.LatestVersion).Returns(_newVersion);

            A.CallTo(() => _eventPublisher.PublishEvent(A <ShowNotificationEvent> ._))
            .Invokes(x => _event = x.GetArgument <ShowNotificationEvent>(0));
        }
Пример #3
0
 public void Handle(ShowNotificationEvent eventToHandle)
 {
     showNotification(eventToHandle.Caption, eventToHandle.Notification, eventToHandle.Url);
 }
 public void SkipNotificationOnBattleScreen(ShowNotificationEvent evt, SingleNode <IgnoreBattleScreenNotificationComponent> notification, [JoinAll] BattleScreenNode screen)
 {
     evt.CanShowNotification = false;
 }