コード例 #1
0
        /// <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);
        }
コード例 #2
0
        /// <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;
        }
コード例 #3
0
        /// <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);
        }
コード例 #4
0
        /// <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;
            }
        }
コード例 #5
0
        /// <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();
            }
        }
コード例 #6
0
 /// <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();
     }
 }
コード例 #7
0
        /// <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();
                }
            }
        }
コード例 #8
0
        /// <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;
            }
        }