コード例 #1
0
        public void OnDeclineCInvite(object sender, EventArgs e)
        {
            var type = (MenuItem)sender;
            CommunityProfile profile = (CommunityProfile)type.CommandParameter;
            string           current = fb.GetCurrentUser();

            fb.RemoveInvite(null, profile.CommunityID, current);
            int index = CommunityInvites.IndexOf(profile);

            CommunityInvites.RemoveAt(index);
            NoNotifications();
        }
コード例 #2
0
        public async void OnAcceptCInvite(object sender, EventArgs e)
        {
            var type = (MenuItem)sender;

            if (type.CommandParameter.ToString() == "LetsGo.Model.CommunityProfile")
            {
                CommunityProfile profile     = (CommunityProfile)type.CommandParameter;
                string           current     = fb.GetCurrentUser();
                UserProfile      currentUser = await fb.GetUserObject(current);

                fb.AcceptRequest(null, profile, currentUser);
                CommunityInvites.Remove(type.CommandParameter);
            }
            NoNotifications();
        }