コード例 #1
0
        void btnConnect_Click(object sender, EventArgs e)
        {
            switch (_friendStatus)
            {
            case Constants.TelligentFriendStatus.NotSpecified:
                if (TelligentService.CreateFriendRequest(CurrentMember.ScreenName, TargetScreenName, String.Format(DictionaryConstants.ConnectAction, TargetScreenName, "REPLACE")))
                {
                    //Change Text
                    btnConnect.Text = DictionaryConstants.RequestSent;

                    //TODO: send connection email
                }
                break;

            case Constants.TelligentFriendStatus.Approved:
                if (TelligentService.DeleteFriendRequest(CurrentMember.ScreenName, TargetScreenName))
                {
                    btnConnect.Text = DictionaryConstants.ConnectBtnText;
                }
                break;
            }
        }