コード例 #1
0
ファイル: LoginBS.cs プロジェクト: dsm0709/wp
        /// <summary>
        /// 解析用户信息
        /// </summary>
        /// <param name="result">数据</param>
        private void DecoderUserInfo(string result)
        {
            try
            {
                UserList userlist = new UserList();
                userlist.User_List = (ObservableCollection <UserDetails>)JsonUtility.DeserializeObj(
                    new MemoryStream(Encoding.UTF8.GetBytes(result)), typeof(ObservableCollection <UserDetails>));
                RenrenSDK.RenrenInfo.SetDetailInfo(userlist.User_List[0]);
            }
            catch
            {
                NotifyError("encoding error");
                return;
            }

            if (LoginCompleted != null)
            {
                System.Windows.Deployment.Current.Dispatcher.BeginInvoke(delegate()
                {
                    LoginCompleted(this, new LoginCompletedEventArgs("success"));
                });
            }
        }
コード例 #2
0
ファイル: GetUserInfoBS.cs プロジェクト: xplusky/MoeRhythm
 /// <summary>
 /// 构造
 /// </summary>
 public GetUserInfoBS()
 {
     getCurUserInfoRequest = new GetCurUserInfoRequest();
     getUserInfoRequest    = new GetUserInfoRequest();
     userlist = new UserList();
 }
コード例 #3
0
ファイル: LoginBS.cs プロジェクト: thynson/renren-api-wp7-sdk
        /// <summary>
        /// 解析用户信息
        /// </summary>
        /// <param name="result">数据</param>
        private void DecoderUserInfo(string result)
        {
            try
            {
                UserList userlist = new UserList();
                userlist.User_List = (ObservableCollection<UserDetails>)JsonUtility.DeserializeObj(
                    new MemoryStream(Encoding.UTF8.GetBytes(result)), typeof(ObservableCollection<UserDetails>));
                RenrenSDK.RenrenInfo.SetDetailInfo(userlist.User_List[0]);
            }
            catch
            {
                NotifyError("encoding error");
                return;
            }

            if (LoginCompleted != null)
            {
                System.Windows.Deployment.Current.Dispatcher.BeginInvoke(delegate()
                {
                    LoginCompleted(this, new LoginCompletedEventArgs("success"));
                });
            }
        }
コード例 #4
0
 /// <summary>
 /// Creates a new instance of DownloadStringCompletedEventArgs with the specified result data.
 /// </summary>
 /// <param name="result">The data that is downloaded by a DownloadStringAsync method.</param>
 public GetUsersCompletedEventArgs(UserList result)
 {
     Result = result;
 }
コード例 #5
0
 /// <summary>
 /// Creates a new instance of DownloadStringCompletedEventArgs with the specified result data.
 /// </summary>
 /// <param name="result">The data that is downloaded by a DownloadStringAsync method.</param>
 public GetUsersCompletedEventArgs(UserList result)
 {
     Result = result;
 }
コード例 #6
0
        UserList userlist; //获得的User数据

        #endregion Fields

        #region Constructors

        /// <summary>
        /// 构造
        /// </summary>
        public GetUserInfoBS()
        {
            getCurUserInfoRequest = new GetCurUserInfoRequest();
            getUserInfoRequest = new GetUserInfoRequest();
            userlist = new UserList();
        }
コード例 #7
0
 /// <summary>
 /// 通知查找用户成功信息
 /// </summary>
 /// <param name="msg">内容</param>
 private void GetUsersNotifyMessage(UserList msg)
 {
     if (GetUserInfoCompleted != null)
     {
         System.Windows.Deployment.Current.Dispatcher.BeginInvoke(delegate()
         {
             GetUserInfoCompleted(this, new GetUsersCompletedEventArgs(msg));
         });
     }
 }