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) { } }
static public void action_post_score_OnDone(object sender, Actions.ActionArgs e) { Actions.ActionFacebookPostHighScoreArg arg = e as Actions.ActionFacebookPostHighScoreArg; if (arg != null) { if (arg.score_inform.success) { ServerStream svstream = _stream_wating[(Actions.Action)sender]; svstream.Status = (int)ServerStreamStatus.STREAM_STATUS_RESPONSED; _stream_wating.Remove((Actions.Action)sender); } else { ServerStream svstream = _stream_wating[(Actions.Action)sender]; svstream.Status = (int)ServerStreamStatus.STREAM_STATUS_ERROR; _stream_wating.Remove((Actions.Action)sender); } } }
static private void action_fbinfo_stream_onDone(object sender, Actions.ActionArgs e) { try { Actions.ActionFacebookGetInfomationArgs fbarg = e as Actions.ActionFacebookGetInfomationArgs; if (fbarg != null) { ServerStream svstream = _stream_wating[(Actions.Action)sender]; svstream.Status = (int)ServerStreamStatus.STREAM_STATUS_RESPONSED; _stream_wating.Remove((Actions.Action)sender); } 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) { } }
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); } }
static private void action_twitter_login_OnDone(object sender, Actions.ActionArgs e) { try { Actions.ActionTwitterLoginArgs twarg = e as Actions.ActionTwitterLoginArgs; foreach (ActionArgLinker link in AppObject.PopupOfAction) { if (link.AttachArg == twarg) { AppObject.PopupOfAction.Remove(link); break; } } if (twarg != null && (twarg.IsCancelByLogedin || (twarg.Result != null && twarg.Result.IsSuccess))) { if (twarg.IsCancelByLogedin) { ServerStream svstream = _stream_wating[(Actions.Action)sender]; svstream.Status = (int)ServerStreamStatus.STREAM_STATUS_RESPONSED; _stream_wating.Remove((Actions.Action)sender); ////ApplicationInfomation.onPopupOff(); } else { ServerStream svstream = _stream_wating[(Actions.Action)sender]; svstream.Status = (int)ServerStreamStatus.STREAM_STATUS_RESPONSED; _stream_wating.Remove((Actions.Action)sender); ////ApplicationInfomation.onPopupOff(); } } else { ServerStream svstream = _stream_wating[(Actions.Action)sender]; svstream.Status = (int)ServerStreamStatus.STREAM_STATUS_ERROR; _stream_wating.Remove((Actions.Action)sender); //// ApplicationInfomation.onPopupOff(); } AppObject.PopupOfAction.Clear(); } catch (Exception ex) { } }