Пример #1
0
 private void UriHelper_OnLocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
 {
     if (dialogs.Count > 0)
     {
         this.Close();
     }
 }
Пример #2
0
 private void NavigationManager_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
 {
     NavigationManager.LocationChanged -= NavigationManager_LocationChanged;
     ParentMenu?.MarkAsRequireRender();
     TopMenu.MarkAsRequireRender();
     TopMenu.Refresh();
 }
Пример #3
0
        private async void OnLocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
        {
            //var relativeUri = new Uri(args.Location).PathAndQuery;

            //await JSRuntime.InvokeAsync<string>(GoogleAnalyticsInterop.Navigate,
            //    TrackingId, relativeUri);
        }
Пример #4
0
 private async void _navigationManger_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
 {
     if (modules != null)
     {
         await UpdateCurrentModule(e.Location);
     }
 }
Пример #5
0
 /// <summary>
 /// Handles the OnLocationChanged event of the UriHelper control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs"/> instance containing the event data.</param>
 private void UriHelper_OnLocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
 {
     if (this.OnNavigate != null)
     {
         this.OnNavigate();
     }
 }
Пример #6
0
 private void NavigationManager_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
 {
     // When going from editing a game to adding a game the page goes from
     // /game/edit/1 ---> /game/add the route changes but both routes lead
     // to GameForm.razor so nothing changes. The page is therefore manually
     // reloaded.
     JSRuntime.InvokeVoidAsync("LocationReload");
 }
Пример #7
0
        private void _NavigationManager_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
        {
            _navItems.SetItemActive(
                _NavigationManager.Uri.Replace(_NavigationManager.BaseUri, "")
                );

            StateHasChanged();
        }
Пример #8
0
        void Nav_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
        {
            if (_count < ButterflyCount)
            {
                _count++;
            }

            _openLeft  = false;
            _openRight = false;
        }
Пример #9
0
 private void NavigationManager_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
 {
     if (!e.Location.Contains("/Login"))
     {
         if (string.IsNullOrWhiteSpace(AuthState.Value.UserName))
         {
             NavigationManager.NavigateTo("/Login");
         }
     }
 }
        /// <summary>
        /// Destroy all reused Modal
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void NavigationManager_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
        {
            if (ReusedModals.Count > 0)
            {
                // Since Modal cannot be captured, it can only be removed through JS
                await _jsRuntime.InvokeVoidAsync(JSInteropConstants.DestroyAllDialog);

                ReusedModals.Clear();
            }
        }
Пример #11
0
 private async void NavigationManager_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
 {
     try
     {
         await TrackVisit(createNewSession : false);
     }
     catch (Exception ex)
     {
         await Error.ProcessErrorAsync(ex);
     }
 }
Пример #12
0
 private void NavigationManager_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
 {
     if (navigationManager.Uri.Contains('?'))
     {
         queries = navigationManager.Uri.Split('?')[1].Split('&').Select(query => new Query(query)).ToList();
     }
     else
     {
         queries = new List <Query>();
     }
 }
Пример #13
0
 private async void NavigationManager_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
 {
     try
     {
         var name = e.Location.Split("/").LastOrDefault();
         await ShowLogAsync(name);
     }
     catch (Exception ex)
     {
         ErrorMessage = ex.Message;
     }
 }
Пример #14
0
        private void NavigationManager_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
        {
            if (!e.IsNavigationIntercepted)
            {
                return;
            }

            var lastSlashIndex = e.Location.LastIndexOf("/");
            var route          = e.Location.Substring(lastSlashIndex, e.Location.Length - lastSlashIndex);

            OnNavigatedTo(route);
        }
Пример #15
0
 private void UriHelper_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
 {
     if (_lastUri != e.Location)
     {
         _lastUri = e.Location;
         foreach (Section s in _sections)
         {
             s.Elements.Clear();
             s.InvokeChangesDone();
         }
     }
     else
     {
         foreach (Section s in _sections)
         {
             s.Elements.Where(x => x is InlineJavaScript).ToList().ForEach(x => { x.ShouldUpdate = true; x.Sequence = -1; });
             s.InvokeChangesDone();
         }
     }
 }
Пример #16
0
 private void NavigationManager_LocationChanged(object?sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
 {
     CheckUriAndOpenDocument();
 }
Пример #17
0
 private void UriHelper_OnLocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
 {
     ProcessUri(e.Location);
 }
Пример #18
0
        private void NavigationManager_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
        {
            var path = new Uri(e.Location).LocalPath;

            AddTab(path);
        }
        private async void _navigationManager_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
        {
            _logger.LogDebug($"Change location: {e.Location}");

            await this.SetActiveAsync(e.Location);
        }
Пример #20
0
 private void Navigation_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
 {
     Logger.LogInformation($"Navigation Location Changed: {e.Location}");
 }
Пример #21
0
 private void _NavigationManager_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
 {
     GetArticlesContent();
 }
Пример #22
0
 private void NavigationManager_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
 {
     NavigationManager.NavigateTo(NavigationManager.Uri, true);
 }