Esempio n. 1
0
        /// <summary>
        /// 登录,页面方式,有权限设置
        /// </summary>
        /// <param name="page">当前显示页面</param>
        /// <param name="scope">权限列表</param>
        /// <param name="redirectUri">转向</param>
        /// <param name="callback">回调</param>
        public void LogIn(PhoneApplicationPage page, List <string> scope,
                          string redirectUri, LoginCompletedHandler callback)
        {
            if (loginViewBS == null)
            {
                loginViewBS = new LoginViewBS();
            }

            loginViewBS.CleanLoginEvent();
            loginViewBS.LoginCompleted += callback;

            loginViewBS.InitView(page);
            loginViewBS.Login(redirectUri, scope);
        }
Esempio n. 2
0
        void FastUploadPage_Loaded(object sender, RoutedEventArgs e)
        {
            if (RenrenSDK.RenrenInfo.tokenInfo.access_token == null)
            {
                if (loginViewBS == null)
                {
                    loginViewBS = new LoginViewBS();
                }
                List <string> scope = new List <string>()
                {
                    "photo_upload"
                };
                loginViewBS.CleanDownloadStringEvent();
                loginViewBS.LoginCompleted += LoginCompletedHandler;

                loginViewBS.InitView(this);
                loginViewBS.Login(ConstantValue.Redirect_Uri, scope);
            }
            else
            {
                PrepareUploadPhotoPage();
            }
        }