diff --git a/.gitignore b/.gitignore index af2e7f3..8d13092 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ images/Thumbs.db .svn bin obj -.idea/** diff --git a/.idea/.idea.BlazorViz/.idea/.name b/.idea/.idea.BlazorViz/.idea/.name index 4658a86..a347b4c 100644 --- a/.idea/.idea.BlazorViz/.idea/.name +++ b/.idea/.idea.BlazorViz/.idea/.name @@ -1 +1 @@ -BlazorViz \ No newline at end of file +BlazorCslyViz \ No newline at end of file diff --git a/BlazorVizView/BlazorVizView.csproj b/BlazorVizView/BlazorVizView.csproj index 4c716c5..6d785a0 100644 --- a/BlazorVizView/BlazorVizView.csproj +++ b/BlazorVizView/BlazorVizView.csproj @@ -4,34 +4,35 @@ net7.0 enable enable - false - - - + + + + + + + + + + + - - - - - + + + - - - - diff --git a/BlazorVizView/Program.cs b/BlazorVizView/Program.cs index 4f7f3fe..9add380 100644 --- a/BlazorVizView/Program.cs +++ b/BlazorVizView/Program.cs @@ -1,16 +1,11 @@ using BlazorVizView; using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; -using Microsoft.JSInterop; var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add("#app"); builder.RootComponents.Add("head::after"); builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); -builder.Services.AddSingleton(serviceProvider => (IJSInProcessRuntime)serviceProvider.GetRequiredService()); -builder.Services.AddSingleton(serviceProvider => (IJSUnmarshalledRuntime)serviceProvider.GetRequiredService()); - -builder.Services.AddBlazorDialog(); await builder.Build().RunAsync(); diff --git a/BlazorVizView/Shared/ExtractDialog.razor b/BlazorVizView/Shared/ExtractDialog.razor deleted file mode 100644 index acd53b4..0000000 --- a/BlazorVizView/Shared/ExtractDialog.razor +++ /dev/null @@ -1,43 +0,0 @@ - -

Grammar extraction

-
- - - - -
- - - - -
- - - - - -@code { - - private string parser = ""; - - private string lexer = ""; - - [CascadingParameter(Name = "ParentDialog")] Dialog Dialog { get; set; } - - private async Task LoadParser(InputFileChangeEventArgs e) - { - - var content = - await new StreamReader(e.File.OpenReadStream()).ReadToEndAsync(); - parser = content; - } - - private async Task LoadLexer(InputFileChangeEventArgs e) - { - - var content = - await new StreamReader(e.File.OpenReadStream()).ReadToEndAsync(); - lexer = content; - } - -} \ No newline at end of file diff --git a/BlazorVizView/Shared/ExtractDialogResult.cs b/BlazorVizView/Shared/ExtractDialogResult.cs deleted file mode 100644 index 2f9a94b..0000000 --- a/BlazorVizView/Shared/ExtractDialogResult.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace BlazorVizView.Shared; - -public class ExtractDialogResult -{ - public string Lexer { get; set; } - - public string Parser { get; set; } - - public bool Ok { get; set; } - - public ExtractDialogResult(string lexer, string parser) - { - Ok = true; - Lexer = lexer; - Parser = parser; - } - - public ExtractDialogResult() - { - Ok = false; - } -} \ No newline at end of file diff --git a/BlazorVizView/Shared/GenerateDialog.razor b/BlazorVizView/Shared/GenerateDialog.razor deleted file mode 100644 index dd5b9a6..0000000 --- a/BlazorVizView/Shared/GenerateDialog.razor +++ /dev/null @@ -1,24 +0,0 @@ - -

Source generation options

-
- - - -
- - -
- - - - - -@code { - - private string nameSpace = "ns"; - - private string outputType = "object"; - - [CascadingParameter(Name = "ParentDialog")] Dialog Dialog { get; set; } - -} \ No newline at end of file diff --git a/BlazorVizView/Shared/GenerateDialogResult.cs b/BlazorVizView/Shared/GenerateDialogResult.cs deleted file mode 100644 index 873edb9..0000000 --- a/BlazorVizView/Shared/GenerateDialogResult.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace BlazorVizView.Shared; - -public class GenerateDialogResult -{ - public string NameSpace { get; set; } - - public string OutputType { get; set; } - - public bool Ok { get; set; } - - public GenerateDialogResult(string ns, string outputType) - { - NameSpace = ns; - OutputType = outputType; - Ok = true; - } - - public GenerateDialogResult() - { - Ok = false; - } -} \ No newline at end of file diff --git a/BlazorVizView/Shared/MainLayout.razor b/BlazorVizView/Shared/MainLayout.razor index ec33278..82a7081 100644 --- a/BlazorVizView/Shared/MainLayout.razor +++ b/BlazorVizView/Shared/MainLayout.razor @@ -6,6 +6,5 @@
@Body
- diff --git a/BlazorVizView/Shared/VizGraph.razor b/BlazorVizView/Shared/VizGraph.razor index 08e6c48..6399ed7 100644 --- a/BlazorVizView/Shared/VizGraph.razor +++ b/BlazorVizView/Shared/VizGraph.razor @@ -1,17 +1,13 @@ -@using System.IO.Compression -@using System.Text -@inject IJSRuntime JSRuntime +@inject IJSRuntime JSRuntime @inject NavigationManager NavManager -@inject IBlazorDialogService dialogService -@inject IJSUnmarshalledRuntime JSUnmarshalledRuntime - +@using Microsoft.JSInterop
@Title -

Visualization for CSLY with Viz.js

- - +

Visualization for CSLY with Viz.js

+ +
@@ -20,49 +16,75 @@
-
-