private void HandleSignInResult(SignInResult signInResult, XboxLiveUser user) { switch (signInResult.Status) { case SignInStatus.Success: var xboxLiveContext = new Microsoft.Xbox.Services.XboxLiveContext(user); UserInfoLabel.Text = "Sign in succeeded"; m_xboxliveContexts.Add(user.WindowsSystemUser.NonRoamableId, xboxLiveContext); m_socialManagerUI.AddUser(user); break; case SignInStatus.UserCancel: UserInfoLabel.Text = "User cancel"; break; case SignInStatus.UserInteractionRequired: UserInfoLabel.Text = "User interaction required"; break; default: UserInfoLabel.Text = "Unknown Error"; break; } Log(UserInfoLabel.Text); }
async void SignIn() { Microsoft.Xbox.Services.System.SignInResult result = await m_user.SignInAsync(UIDispatcher); if (result.Status == Microsoft.Xbox.Services.System.SignInStatus.Success) { m_xboxLiveContext = new Microsoft.Xbox.Services.XboxLiveContext(m_user); debugText += "\n User signed in: " + m_xboxLiveContext.User.Gamertag; } }
private void XblSignInUI_OnUserSignedIn(object sender, XboxLiveUser user) { m_xboxLiveContext = new Microsoft.Xbox.Services.XboxLiveContext(user); xblSocialUI.AddUser(user); #if DEBUG m_xboxLiveContext.Settings.EnableServiceCallRoutedEvents = true; m_xboxLiveContext.Settings.DiagnosticsTraceLevel = Microsoft.Xbox.Services.XboxServicesDiagnosticsTraceLevel.Verbose; m_xboxLiveContext.Settings.ServiceCallRouted += Settings_ServiceCallRouted; #endif }
private void XblSignInUI_OnUserSignedIn(object sender, XboxLiveUser user) { m_xboxLiveContext = new Microsoft.Xbox.Services.XboxLiveContext(user); xblGameSaveUI.InitializeSaveSystem(m_xboxLiveContext); // In a real game, you should also call xblGameSaveUI.InitializeSaveSystem when resuming from // suspension, or you may encounter ObjectExpired errors. #if DEBUG m_xboxLiveContext.Settings.EnableServiceCallRoutedEvents = true; XboxLiveServicesSettings.SingletonInstance.DiagnosticsTraceLevel = Microsoft.Xbox.Services.XboxServicesDiagnosticsTraceLevel.Verbose; m_xboxLiveContext.Settings.ServiceCallRouted += Settings_ServiceCallRouted; #endif }
private void XblSignInUI_OnUserSignedOut(object sender, XboxLiveUser user) { m_xboxLiveContext = null; xblGameSaveUI.InitializeSaveSystem(null); }
private void XblSignInUI_OnUserSignedOut(object sender, XboxLiveUser user) { m_xboxLiveContext = null; xblSocialUI.RemoveUser(user); }
private void XblSignInUI_OnUserSignedOut(object sender, XboxLiveUser user) { m_xboxLiveContext = null; xblDataUI.SetXboxLiveContext(null); }