static private void action_fblogin_stream_OnCancel(object sender, Actions.ActionArgs e)
 {
     try {
         ServerStream            svstream = _stream_wating[(Actions.Action)sender];
         ActionFacebookLoginArgs arg      = e as ActionFacebookLoginArgs;
         foreach (ActionArgLinker link in AppObject.PopupOfAction)
         {
             if (link.AttachArg == arg)
             {
                 AppObject.PopupOfAction.Remove(link);
                 break;
             }
         }
         svstream.Status = (int)ServerStreamStatus.STREAM_STATUS_ERROR;
         _stream_wating.Remove((Actions.Action)sender);
         ////ApplicationInfomation.onPopupOff();
     } catch (Exception ex) {
     }
 }
Beispiel #2
0
 static private void action_fblogin_stream_OnDone(object sender, Actions.ActionArgs e)
 {
     try {
         Actions.ActionFacebookLoginArgs fbarg = e as Actions.ActionFacebookLoginArgs;
         ActionFacebookLoginArgs         arg   = e as ActionFacebookLoginArgs;
         foreach (ActionArgLinker link in AppObject.PopupOfAction)
         {
             if (link.AttachArg == arg)
             {
                 AppObject.PopupOfAction.Remove(link);
                 break;
             }
         }
         if (fbarg != null && (fbarg.IsCancelByLogedin || (fbarg.Result != null && fbarg.Result.IsSuccess)))
         {
             if (fbarg.IsCancelByLogedin)
             {
                 ServerStream svstream = _stream_wating[(Actions.Action)sender];
                 svstream.Status = (int)ServerStreamStatus.STREAM_STATUS_RESPONSED;
                 ApplicationInfomation.onPopupOff();
             }
             else
             {
                 FacebookClient.Instance.Token        = fbarg.Result.Token;
                 FacebookClient.Instance.TokenExprite = fbarg.Result.TokenExprite;
                 FacebookClient.Instance.SaveUserData();
                 ServerStream svstream = _stream_wating[(Actions.Action)sender];
                 action_fbinfo_stream_do(svstream);
             }
         }
         else
         {
             ServerStream svstream = _stream_wating[(Actions.Action)sender];
             svstream.Status = (int)ServerStreamStatus.STREAM_STATUS_ERROR;
             _stream_wating.Remove((Actions.Action)sender);
             ApplicationInfomation.onPopupOff();
         }
     } catch (Exception ex) {
         Debug.WriteLine(ex.Message);
     }
 }