diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..a88e69e --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @DevExpressExampleBot \ No newline at end of file diff --git a/CS/BlazorAppSpreadsheet.sln b/CS/BlazorAppSpreadsheet.sln new file mode 100644 index 0000000..213b45d --- /dev/null +++ b/CS/BlazorAppSpreadsheet.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}") = "BlazorAppSpreadsheet", "BlazorAppSpreadsheet\BlazorAppSpreadsheet.csproj", "{320F556D-39EC-4DB7-BC8B-5561F93279DF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {320F556D-39EC-4DB7-BC8B-5561F93279DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {320F556D-39EC-4DB7-BC8B-5561F93279DF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {320F556D-39EC-4DB7-BC8B-5561F93279DF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {320F556D-39EC-4DB7-BC8B-5561F93279DF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/CS/BlazorApp_SpreadsheetDocumentAPI/BlazorApp_SpreadsheetDocumentAPI.csproj b/CS/BlazorAppSpreadsheet/BlazorAppSpreadsheet.csproj similarity index 64% rename from CS/BlazorApp_SpreadsheetDocumentAPI/BlazorApp_SpreadsheetDocumentAPI.csproj rename to CS/BlazorAppSpreadsheet/BlazorAppSpreadsheet.csproj index 8ef6353..2893f61 100644 --- a/CS/BlazorApp_SpreadsheetDocumentAPI/BlazorApp_SpreadsheetDocumentAPI.csproj +++ b/CS/BlazorAppSpreadsheet/BlazorAppSpreadsheet.csproj @@ -1,17 +1,29 @@ - + net8.0 enable enable + - - + + + + + + + + + + + + Always - \ No newline at end of file + + diff --git a/CS/BlazorApp_SpreadsheetDocumentAPI/Code/DocumentGenerator.cs b/CS/BlazorAppSpreadsheet/Code/DocumentGenerator.cs similarity index 99% rename from CS/BlazorApp_SpreadsheetDocumentAPI/Code/DocumentGenerator.cs rename to CS/BlazorAppSpreadsheet/Code/DocumentGenerator.cs index 933aa6c..7e6cf4a 100644 --- a/CS/BlazorApp_SpreadsheetDocumentAPI/Code/DocumentGenerator.cs +++ b/CS/BlazorAppSpreadsheet/Code/DocumentGenerator.cs @@ -2,7 +2,7 @@ using System.Drawing; using DevExpress.Spreadsheet; -namespace BlazorApp_SpreadsheetDocumentAPI +namespace BlazorAppSpreadsheet { public class LoanAmortizationScheduleGenerator { @@ -203,4 +203,4 @@ void SpecifyPrintOptions() Sheet.PrintOptions.FitToHeight = 0; } } -} +} \ No newline at end of file diff --git a/CS/BlazorApp_SpreadsheetDocumentAPI/Code/DocumentService.cs b/CS/BlazorAppSpreadsheet/Code/DocumentService.cs similarity index 97% rename from CS/BlazorApp_SpreadsheetDocumentAPI/Code/DocumentService.cs rename to CS/BlazorAppSpreadsheet/Code/DocumentService.cs index a1d5829..ef0640b 100644 --- a/CS/BlazorApp_SpreadsheetDocumentAPI/Code/DocumentService.cs +++ b/CS/BlazorAppSpreadsheet/Code/DocumentService.cs @@ -1,9 +1,10 @@ using System; using System.IO; using System.Threading.Tasks; +using BlazorAppSpreadsheet; using DevExpress.Spreadsheet; -namespace BlazorApp_SpreadsheetDocumentAPI +namespace BlazorAppSpreadsheet { public class DocumentService { @@ -58,4 +59,4 @@ async Task GenerateDocumentAsync(double loanAmount, return workbook; } } -} +} \ No newline at end of file diff --git a/CS/BlazorAppSpreadsheet/Components/App.razor b/CS/BlazorAppSpreadsheet/Components/App.razor new file mode 100644 index 0000000..1e1e6f5 --- /dev/null +++ b/CS/BlazorAppSpreadsheet/Components/App.razor @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/CS/BlazorAppSpreadsheet/Components/Layout/MainLayout.razor b/CS/BlazorAppSpreadsheet/Components/Layout/MainLayout.razor new file mode 100644 index 0000000..5a62ef5 --- /dev/null +++ b/CS/BlazorAppSpreadsheet/Components/Layout/MainLayout.razor @@ -0,0 +1,21 @@ +@inherits LayoutComponentBase + +
+ +
+
+ About + +
+ +
+ @Body +
+
+
+ +
+ An unhandled error has occurred. + Reload + 🗙 +
diff --git a/CS/BlazorAppSpreadsheet/Components/Pages/Error.razor b/CS/BlazorAppSpreadsheet/Components/Pages/Error.razor new file mode 100644 index 0000000..576cc2d --- /dev/null +++ b/CS/BlazorAppSpreadsheet/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_SpreadsheetDocumentAPI/Pages/Index.razor b/CS/BlazorAppSpreadsheet/Components/Pages/Home.razor similarity index 87% rename from CS/BlazorApp_SpreadsheetDocumentAPI/Pages/Index.razor rename to CS/BlazorAppSpreadsheet/Components/Pages/Home.razor index 72711cd..7c144db 100644 --- a/CS/BlazorApp_SpreadsheetDocumentAPI/Pages/Index.razor +++ b/CS/BlazorAppSpreadsheet/Components/Pages/Home.razor @@ -1,4 +1,7 @@ @page "/" +@rendermode InteractiveServer +@using System.Globalization +@using Microsoft.AspNetCore.WebUtilities @inject DocumentService DocumentService @inject IJSRuntime JS @@ -8,10 +11,11 @@ @@ -66,14 +70,14 @@