/// <summary> /// The authentication has changed, notify the changes in serviceProviderInfo /// </summary> protected override void OnAuthenticationChanged(SpatialEye.Framework.Authentication.AuthenticationContext context, bool isAuthenticated) { base.OnAuthenticationChanged(context, isAuthenticated); RaisePropertyChanged(ServerNamePropertyName); RaisePropertyChanged(ServerDescriptionPropertyName); }
/// <summary> /// Callback for changes in authentication (context) /// </summary> /// <param name="context">The new authentication context</param> /// <param name="isAuthenticated">A flag indicating success of authentication</param> protected override void OnAuthenticationChanged(SpatialEye.Framework.Authentication.AuthenticationContext context, bool isAuthenticated) { base.OnAuthenticationChanged(context, isAuthenticated); // Get the print settings this.IsPrintVisible = LiteClientSettingsViewModel.Instance.AllowPrint; }
/// <summary> /// Called whenever authentication changes; make sure we stop caching /// </summary> protected override void OnAuthenticationChanged(SpatialEye.Framework.Authentication.AuthenticationContext context, bool isAuthenticated) { // Reset the table _triedRetrievingTables = false; _tableDescriptor = null; // Get base behavior happening base.OnAuthenticationChanged(context, isAuthenticated); }
/// <summary> /// Authentication changed callback /// </summary> protected override void OnAuthenticationChanged(SpatialEye.Framework.Authentication.AuthenticationContext context, bool isAuthenticated) { base.OnAuthenticationChanged(context, isAuthenticated); if (isAuthenticated) { // Set the authorization options AllowInserts = LiteClientSettingsViewModel.Instance.AllowGeoNoteEdits; } }
/// <summary> /// Callback when the authentication is changed /// </summary> protected override void OnAuthenticationChanged(SpatialEye.Framework.Authentication.AuthenticationContext context, bool isAuthenticated) { base.OnAuthenticationChanged(context, isAuthenticated); if (isAuthenticated) { // Reset the viewmodel when authenticated, can also be done upon de-authentication // doing on both will send unnecessary messages ResetViewModel(); } }
/// <summary> /// Callback for authentication changes; updates the content of the insert items /// </summary> protected override void OnAuthenticationChanged(SpatialEye.Framework.Authentication.AuthenticationContext context, bool isAuthenticated) { if (isAuthenticated) { // Setup the insertable items SetupItems(); } else { // Not authenticated - clear the items ClearItems(); } }
/// <summary> /// When authentication changes, start the application /// </summary> protected override async void OnAuthenticationChanged(SpatialEye.Framework.Authentication.AuthenticationContext context, bool isAuthenticated) { StopTimer(); if (isAuthenticated) { // Hand over the initial value; which is dateTime.MinValue (with some extra seconds, // being picked up by the server to tell the interval) _lastRequestDateTime = DateTime.MinValue.AddMilliseconds(CheckEditabilityChangesEveryMs); var hasEditable = await HasEditableCollections(); if (hasEditable) { StartTimer(); } } }
/// <summary> /// Callback for changes in authentication (context) /// </summary> /// <param name="context">The new authentication context</param> /// <param name="isAuthenticated">A flag indicating success of authentication</param> protected override void OnAuthenticationChanged(SpatialEye.Framework.Authentication.AuthenticationContext context, bool isAuthenticated) { base.OnAuthenticationChanged(context, isAuthenticated); if (context != null) { if (context.Roles.Count > 0) { for (int i = 0; i < context.Roles.Count; i++) { ISRoles = ISRoles + context.Roles[i].Name + '|'; } } } else { ISRoles = string.Empty; } }