diff --git a/CS/BlazorAppWordProcessing.sln b/CS/BlazorAppWordProcessing.sln new file mode 100644 index 0000000..9273a82 --- /dev/null +++ b/CS/BlazorAppWordProcessing.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35527.113 d17.12 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorAppWordProcessing", "BlazorAppWordProcessing\BlazorAppWordProcessing.csproj", "{3E860A22-CEDF-4FC1-A9D4-52102B917229}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3E860A22-CEDF-4FC1-A9D4-52102B917229}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E860A22-CEDF-4FC1-A9D4-52102B917229}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E860A22-CEDF-4FC1-A9D4-52102B917229}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E860A22-CEDF-4FC1-A9D4-52102B917229}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/CS/BlazorApp_WordDocumentAPI/BlazorApp_WordDocumentAPI.csproj b/CS/BlazorAppWordProcessing/BlazorAppWordProcessing.csproj similarity index 70% rename from CS/BlazorApp_WordDocumentAPI/BlazorApp_WordDocumentAPI.csproj rename to CS/BlazorAppWordProcessing/BlazorAppWordProcessing.csproj index 04873f6..785ef59 100644 --- a/CS/BlazorApp_WordDocumentAPI/BlazorApp_WordDocumentAPI.csproj +++ b/CS/BlazorAppWordProcessing/BlazorAppWordProcessing.csproj @@ -1,4 +1,4 @@ - + net8.0 @@ -7,9 +7,10 @@ - - - + + + + diff --git a/CS/BlazorAppWordProcessing/Components/App.razor b/CS/BlazorAppWordProcessing/Components/App.razor new file mode 100644 index 0000000..f067c5e --- /dev/null +++ b/CS/BlazorAppWordProcessing/Components/App.razor @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/CS/BlazorAppWordProcessing/Components/Layout/MainLayout.razor b/CS/BlazorAppWordProcessing/Components/Layout/MainLayout.razor new file mode 100644 index 0000000..5a24bb1 --- /dev/null +++ b/CS/BlazorAppWordProcessing/Components/Layout/MainLayout.razor @@ -0,0 +1,23 @@ +@inherits LayoutComponentBase + +
+ + +
+
+ About +
+ +
+ @Body +
+
+
+ +
+ An unhandled error has occurred. + Reload + 🗙 +
diff --git a/CS/BlazorAppWordProcessing/Components/Pages/Error.razor b/CS/BlazorAppWordProcessing/Components/Pages/Error.razor new file mode 100644 index 0000000..576cc2d --- /dev/null +++ b/CS/BlazorAppWordProcessing/Components/Pages/Error.razor @@ -0,0 +1,36 @@ +@page "/Error" +@using System.Diagnostics + +Error + +

Error.

+

An error occurred while processing your request.

+ +@if (ShowRequestId) +{ +

+ Request ID: @RequestId +

+} + +

Development Mode

+

+ Swapping to Development environment will display more detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

+ +@code{ + [CascadingParameter] + private HttpContext? HttpContext { get; set; } + + private string? RequestId { get; set; } + private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + protected override void OnInitialized() => + RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; +} diff --git a/CS/BlazorApp_WordDocumentAPI/Pages/Index.razor b/CS/BlazorAppWordProcessing/Components/Pages/Home.razor similarity index 75% rename from CS/BlazorApp_WordDocumentAPI/Pages/Index.razor rename to CS/BlazorAppWordProcessing/Components/Pages/Home.razor index d73a0dd..118cb3d 100644 --- a/CS/BlazorApp_WordDocumentAPI/Pages/Index.razor +++ b/CS/BlazorAppWordProcessing/Components/Pages/Home.razor @@ -1,11 +1,11 @@ @page "/" +@rendermode InteractiveServer @inject IJSRuntime JS -@using System.IO -@using DevExpress.XtraRichEdit @using MimeKit; @using MailKit.Net.Smtp @using Microsoft.Extensions.Logging @inject ILogger logger +
@@ -16,7 +16,7 @@