Ejemplo n.º 1
0
 private bool onFriendsServiceInitialized(FriendsServiceEvents.FriendsServiceInitialized evt)
 {
     Service.Get <EventDispatcher>().AddListener <FriendsServiceEvents.SendFriendInvitationSent>(onFriendInvitationSent);
     Service.Get <EventDispatcher>().AddListener <FriendsServiceEvents.AcceptFriendInvitationSent>(onAcceptFriendInvitationSent);
     Service.Get <EventDispatcher>().AddListener <FriendsServiceEvents.RejectFriendInvitationSent>(onRejectFriendInvitationSent);
     Service.Get <EventDispatcher>().AddListener <FriendsServiceEvents.UnfriendSent>(onUnfriendSent);
     dataEntityCollection.EventDispatcher.AddListener <DataEntityEvents.ComponentAddedEvent <IncomingFriendInvitationData> >(onIncomingFriendInvitationComponentAdded);
     dataEntityCollection.EventDispatcher.AddListener <DataEntityEvents.ComponentAddedEvent <OutgoingFriendInvitationData> >(onOutgoingFriendInvitationComponentAdded);
     return(false);
 }
Ejemplo n.º 2
0
        private bool onFriendsServiceInitialized(FriendsServiceEvents.FriendsServiceInitialized evt)
        {
            notificationBreadcrumbController.ResetBreadcrumbs(friendAddedBreadcrumb);
            notificationBreadcrumbController.ResetBreadcrumbs(friendRequestBreadcrumb);
            int count = FriendsDataModelService.IncomingInvitationsList.Count;

            if (count > 0)
            {
                notificationBreadcrumbController.AddBreadcrumb(friendRequestBreadcrumb, count);
            }
            dataEntityCollection.EventDispatcher.AddListener <DataEntityEvents.ComponentAddedEvent <FriendData> >(onFriendComponentAdded);
            dataEntityCollection.EventDispatcher.AddListener <DataEntityEvents.ComponentAddedEvent <IncomingFriendInvitationData> >(onIncomingFriendInvitationComponentAdded);
            return(false);
        }