예제 #1
0
        protected override async Task OnInitializedAsync()
        {
            var url = "https://raw.githubusercontent.com/AdrienTorris/awesome-blazor/master/README.md";
            var awesomeBlazorContents = await this.HttpClient.GetStringAsync(url);

            this.RootGroup       = AwesomeBlazorParser.ParseMarkdown(awesomeBlazorContents);
            this.ParsingComplete = true;
        }
예제 #2
0
        public void GetExpandedDescendantsCount_Test()
        {
            var root = new AwesomeResourceGroup
            {
                Expanded  = true,
                SubGroups =
                {
                    new AwesomeResourceGroup         {
                    },                                 // 1
                    new AwesomeResourceGroup         { // 2
                        Expanded  = true,
                        SubGroups =
                        {
                            new AwesomeResourceGroup {
                            },                            // 3
                            new AwesomeResourceGroup {
                            }                             // 4
                        }
                    },
                    new AwesomeResourceGroup         {
                    },                                 // 5
                    new AwesomeResourceGroup         { // 6
                        Expanded  = false,
                        SubGroups =
                        {
                            new AwesomeResourceGroup {
                            },                            // No Count due to collapsed
                            new AwesomeResourceGroup {
                            }
                        }
                    }
                }
            };

            root.GetExpandedDescendantsCount().Is(6);
        }
예제 #3
0
 private Task _OnChangeSubGroupState(AwesomeResourceGroup group)
 {
     return(this.OnChangeGroupState.InvokeAsync(group));
 }
예제 #4
0
        public string GetSubGroupsHeight(AwesomeResourceGroup group)
        {
            var expandedDescendantsCount = group.GetExpandedDescendantsCount();

            return((expandedDescendantsCount * 26) + "px");
        }
예제 #5
0
 private Task OnClickExpandBox(AwesomeResourceGroup group)
 {
     group.Expanded = !group.Expanded;
     return(this.OnChangeGroupState.InvokeAsync(group));
 }
예제 #6
0
 private Task OnClickToggleBox(AwesomeResourceGroup group)
 {
     group.SelectionState = group.SelectionState != SelectionState.Selected ? SelectionState.Selected : SelectionState.Unselected;
     return(this.OnChangeGroupState.InvokeAsync(group));
 }
 private Task _OnChangeGroupSelection(AwesomeResourceGroup group)
 {
     return(this.OnChangeGroupSelection.InvokeAsync(group));
 }
 public string GetSubGroupsHeight(AwesomeResourceGroup group)
 {
     return(group.Expanded ? (group.SubGroups.Count * 26) + "px" : "0");
 }
 private Task OnClickExpandBox(AwesomeResourceGroup group)
 {
     group.Expanded = !group.Expanded;
     return(Task.CompletedTask);
 }