Skip to content

Commit

Permalink
[Developer] Updated the demo project to run as wasm
Browse files Browse the repository at this point in the history
Closes #16
  • Loading branch information
Alex Knijf committed Jan 8, 2021
1 parent 84044c4 commit 177b7fe
Show file tree
Hide file tree
Showing 48 changed files with 120 additions and 294 deletions.
37 changes: 0 additions & 37 deletions Demo/Shared/NavMenu.razor

This file was deleted.

10 changes: 9 additions & 1 deletion FormGeneratorDemo.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30104.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FormGeneratorDemo", "Demo\FormGeneratorDemo.csproj", "{93087E84-D125-415E-822A-9805A48C473B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VxFormGeneratorDemo.Server", "VxFormGeneratorDemo.Server\VxFormGeneratorDemo.Server.csproj", "{93087E84-D125-415E-822A-9805A48C473B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VxFormGenerator.Core", "VxFormGenerator.Core\VxFormGenerator.Core.csproj", "{EDEF4FEC-5088-4DF5-B057-2CDA074505EC}"
EndProject
Expand All @@ -15,6 +15,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
changlog.bat = changlog.bat
README.md = README.md
run.cmd = run.cmd
run.sh = run.sh
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VxFormGenerator.Core.Tests", "VxFormGenerator.Core.Tests\VxFormGenerator.Core.Tests.csproj", "{73AE376A-E7AA-4C7B-972C-6CAD787364D3}"
Expand All @@ -23,6 +25,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VxFormGeneratorDemoData", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VxFormGeneratorDemo.Wasm", "VxFormGeneratorDemo.Wasm\VxFormGeneratorDemo.Wasm.csproj", "{D7388958-7877-4F05-A372-9639EEDF1C76}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VxFormGeneratorDemo.Shared", "VxFormGeneratorDemo.Shared\VxFormGeneratorDemo.Shared.csproj", "{EFD74D8B-C011-4464-B0DC-FDE5EFA1559E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -57,6 +61,10 @@ Global
{D7388958-7877-4F05-A372-9639EEDF1C76}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D7388958-7877-4F05-A372-9639EEDF1C76}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D7388958-7877-4F05-A372-9639EEDF1C76}.Release|Any CPU.Build.0 = Release|Any CPU
{EFD74D8B-C011-4464-B0DC-FDE5EFA1559E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EFD74D8B-C011-4464-B0DC-FDE5EFA1559E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EFD74D8B-C011-4464-B0DC-FDE5EFA1559E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EFD74D8B-C011-4464-B0DC-FDE5EFA1559E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
File renamed without changes.
5 changes: 4 additions & 1 deletion Demo/App.razor → VxFormGeneratorDemo.Server/App.razor
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<Router AppAssembly="@typeof(Program).Assembly">
@using VxFormGeneratorDemo.Shared.Navigation

<Router AppAssembly="@typeof(Program).Assembly"
AdditionalAssemblies="new[] { typeof(VxFormGeneratorDemo.Shared._Imports).Assembly }">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@page "/"
@namespace FormGeneratorDemo.Pages
@namespace VxFormGeneratorDemo.Server.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{
Layout = null;
Expand Down
2 changes: 1 addition & 1 deletion Demo/Program.cs → VxFormGeneratorDemo.Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

namespace FormGeneratorDemo
namespace VxFormGeneratorDemo.Server
{
public class Program
{
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Demo/Startup.cs → VxFormGeneratorDemo.Server/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@



namespace FormGeneratorDemo
namespace VxFormGeneratorDemo.Server
{
public class Startup
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@
<ItemGroup>
<ProjectReference Include="..\VxFormGenerator.Components.Bootstrap\VxFormGenerator.Components.Bootstrap.csproj" />
<ProjectReference Include="..\VxFormGenerator.Components.Plain\VxFormGenerator.Components.Plain.csproj" />
<ProjectReference Include="..\VxFormGeneratorDemo.Shared\VxFormGeneratorDemo.Shared.csproj" />
<ProjectReference Include="..\VxFormGeneratorDemoData\VxFormGeneratorDemoData.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="Shared\" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.JSInterop
@using FormGeneratorDemo
@using FormGeneratorDemo.Shared
@using VxFormGeneratorDemo
@using VxFormGeneratorDemo.Server

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@inherits LayoutComponentBase
@namespace VxFormGeneratorDemo.Shared.Navigation

@inherits LayoutComponentBase

<div class="sidebar">
<NavMenu />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<div class="top-row pl-4 navbar navbar-dark">
@namespace VxFormGeneratorDemo.Shared.Navigation

<div class="top-row pl-4 navbar navbar-dark">
<a class="navbar-brand" href="">VxFormGenerator Demo</a>
<button class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
Expand Down
21 changes: 21 additions & 0 deletions VxFormGeneratorDemo.Shared/VxFormGeneratorDemo.Shared.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<AssemblyName>VxFormGeneratorDemo.Shared</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\VxFormGenerator.Components.Bootstrap\VxFormGenerator.Components.Bootstrap.csproj" />
<ProjectReference Include="..\VxFormGenerator.Components.Plain\VxFormGenerator.Components.Plain.csproj" />
<ProjectReference Include="..\VxFormGeneratorDemoData\VxFormGeneratorDemoData.csproj" />
</ItemGroup>



</Project>
7 changes: 7 additions & 0 deletions VxFormGeneratorDemo.Shared/_Imports.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@using System.Net.Http
@using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
6 changes: 5 additions & 1 deletion VxFormGeneratorDemo.Wasm/App.razor
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<Router AppAssembly="@typeof(Program).Assembly">

@using VxFormGeneratorDemo.Shared.Navigation;

<Router AppAssembly="@typeof(Program).Assembly"
AdditionalAssemblies="new[] { typeof(VxFormGeneratorDemo.Shared._Imports).Assembly }">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
Expand Down
57 changes: 0 additions & 57 deletions VxFormGeneratorDemo.Wasm/Pages/DynamicForm.razor

This file was deleted.

16 changes: 0 additions & 16 deletions VxFormGeneratorDemo.Wasm/Pages/Error.razor

This file was deleted.

96 changes: 0 additions & 96 deletions VxFormGeneratorDemo.Wasm/Pages/FormDefinitionForm.razor

This file was deleted.

29 changes: 0 additions & 29 deletions VxFormGeneratorDemo.Wasm/Pages/Index.razor

This file was deleted.

Loading

0 comments on commit 177b7fe

Please sign in to comment.