Skip to content

Commit 6558134

Browse files
committed
Update the project
1 parent 4094caa commit 6558134

43 files changed

Lines changed: 1602 additions & 1317 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<Router AppAssembly="@typeof(App).Assembly">
2-
<Found Context="routeData">
3-
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
4-
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
5-
</Found>
6-
<NotFound>
7-
<PageTitle>Not found</PageTitle>
8-
<LayoutView Layout="@typeof(MainLayout)">
9-
<p role="alert">Sorry, there's nothing at this address.</p>
10-
</LayoutView>
11-
</NotFound>
12-
</Router>
1+
<Router AppAssembly="@typeof(App).Assembly">
2+
<Found Context="routeData">
3+
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
4+
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
5+
</Found>
6+
<NotFound>
7+
<PageTitle>Not found</PageTitle>
8+
<LayoutView Layout="@typeof(MainLayout)">
9+
<p role="alert">Sorry, there's nothing at this address.</p>
10+
</LayoutView>
11+
</NotFound>
12+
</Router>
Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1-
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
2-
3-
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
5-
<Nullable>enable</Nullable>
6-
<ImplicitUsings>enable</ImplicitUsings>
7-
</PropertyGroup>
8-
9-
<ItemGroup>
10-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.2" />
11-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.2" PrivateAssets="all" />
12-
<PackageReference Include="Syncfusion.Blazor.BarcodeGenerator" Version="19.4.0.56" />
13-
<PackageReference Include="Syncfusion.Blazor.Buttons" Version="19.4.0.56" />
14-
</ItemGroup>
15-
16-
</Project>
1+
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net7.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.2" />
11+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.2" PrivateAssets="all" />
12+
<PackageReference Include="Syncfusion.Blazor.BarcodeGenerator" Version="23.1.44" />
13+
<PackageReference Include="Syncfusion.Blazor.Buttons" Version="23.1.44" />
14+
<PackageReference Include="Syncfusion.Blazor.Themes" Version="23.1.44" />
15+
</ItemGroup>
16+
17+
<ItemGroup>
18+
<ProjectReference Include="..\Shared\GettingStarted.Shared.csproj" />
19+
</ItemGroup>
20+
21+
</Project>
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
@page "/counter"
2-
3-
<PageTitle>Counter</PageTitle>
4-
5-
<h1>Counter</h1>
6-
7-
<p role="status">Current count: @currentCount</p>
8-
9-
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
10-
11-
@code {
12-
private int currentCount = 0;
13-
14-
private void IncrementCount()
15-
{
16-
currentCount++;
17-
}
18-
}
1+
@page "/counter"
2+
3+
<PageTitle>Counter</PageTitle>
4+
5+
<h1>Counter</h1>
6+
7+
<p role="status">Current count: @currentCount</p>
8+
9+
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
10+
11+
@code {
12+
private int currentCount = 0;
13+
14+
private void IncrementCount()
15+
{
16+
currentCount++;
17+
}
18+
}
Lines changed: 47 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,47 @@
1-
@page "/fetchdata"
2-
@inject HttpClient Http
3-
4-
<PageTitle>Weather forecast</PageTitle>
5-
6-
<h1>Weather forecast</h1>
7-
8-
<p>This component demonstrates fetching data from the server.</p>
9-
10-
@if (forecasts == null)
11-
{
12-
<p><em>Loading...</em></p>
13-
}
14-
else
15-
{
16-
<table class="table">
17-
<thead>
18-
<tr>
19-
<th>Date</th>
20-
<th>Temp. (C)</th>
21-
<th>Temp. (F)</th>
22-
<th>Summary</th>
23-
</tr>
24-
</thead>
25-
<tbody>
26-
@foreach (var forecast in forecasts)
27-
{
28-
<tr>
29-
<td>@forecast.Date.ToShortDateString()</td>
30-
<td>@forecast.TemperatureC</td>
31-
<td>@forecast.TemperatureF</td>
32-
<td>@forecast.Summary</td>
33-
</tr>
34-
}
35-
</tbody>
36-
</table>
37-
}
38-
39-
@code {
40-
private WeatherForecast[]? forecasts;
41-
42-
protected override async Task OnInitializedAsync()
43-
{
44-
forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("sample-data/weather.json");
45-
}
46-
47-
public class WeatherForecast
48-
{
49-
public DateTime Date { get; set; }
50-
51-
public int TemperatureC { get; set; }
52-
53-
public string? Summary { get; set; }
54-
55-
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
56-
}
57-
}
1+
@page "/fetchdata"
2+
@using GettingStarted.Shared
3+
@inject HttpClient Http
4+
5+
<PageTitle>Weather forecast</PageTitle>
6+
7+
<h1>Weather forecast</h1>
8+
9+
<p>This component demonstrates fetching data from the server.</p>
10+
11+
@if (forecasts == null)
12+
{
13+
<p><em>Loading...</em></p>
14+
}
15+
else
16+
{
17+
<table class="table">
18+
<thead>
19+
<tr>
20+
<th>Date</th>
21+
<th>Temp. (C)</th>
22+
<th>Temp. (F)</th>
23+
<th>Summary</th>
24+
</tr>
25+
</thead>
26+
<tbody>
27+
@foreach (var forecast in forecasts)
28+
{
29+
<tr>
30+
<td>@forecast.Date.ToShortDateString()</td>
31+
<td>@forecast.TemperatureC</td>
32+
<td>@forecast.TemperatureF</td>
33+
<td>@forecast.Summary</td>
34+
</tr>
35+
}
36+
</tbody>
37+
</table>
38+
}
39+
40+
@code {
41+
private WeatherForecast[]? forecasts;
42+
43+
protected override async Task OnInitializedAsync()
44+
{
45+
forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("WeatherForecast");
46+
}
47+
}
Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
@page "/"
2-
@using Syncfusion.Blazor.Buttons;
3-
4-
<SfButton OnClick="OnExport">Export</SfButton>
5-
6-
<SfBarcodeGenerator @ref="BarcodeInst" Value="SYNC123"
7-
Type="BarcodeType.Code39"
8-
Height="100px"
9-
Width="200px"
10-
ForeColor="Red">
11-
<BarcodeGeneratorDisplayText Text="CODE39-BARCODE"></BarcodeGeneratorDisplayText>
12-
</SfBarcodeGenerator>
13-
14-
@code{
15-
SfBarcodeGenerator BarcodeInst;
16-
17-
private void OnExport()
18-
{
19-
BarcodeInst.Export("Syncfusion-image", BarcodeExportType.JPG);
20-
}
21-
}
22-
23-
<SfQRCodeGenerator Value="SYNC123"
24-
Height="100px"
25-
Width="200px"
26-
ForeColor="Red">
27-
<QRCodeGeneratorDisplayText Text="Syncfusion"></QRCodeGeneratorDisplayText>
28-
</SfQRCodeGenerator>
29-
30-
<SfDataMatrixGenerator Value="SYNCUser"
31-
Height="100px"
32-
Width="200px"
33-
ForeColor="Red"></SfDataMatrixGenerator>
1+
@page "/"
2+
@using Syncfusion.Blazor.Buttons;
3+
4+
<SfButton OnClick="OnExport">Export</SfButton>
5+
6+
<SfBarcodeGenerator @ref="BarcodeInst" Value="SYNC123"
7+
Type="BarcodeType.Code39"
8+
Height="100px"
9+
Width="200px"
10+
ForeColor="Red">
11+
<BarcodeGeneratorDisplayText Text="CODE39-BARCODE"></BarcodeGeneratorDisplayText>
12+
</SfBarcodeGenerator>
13+
14+
@code {
15+
SfBarcodeGenerator BarcodeInst;
16+
17+
private void OnExport()
18+
{
19+
BarcodeInst.Export("Syncfusion-image", BarcodeExportType.JPG);
20+
}
21+
}
22+
23+
<SfQRCodeGenerator Value="SYNC123"
24+
Height="100px"
25+
Width="200px"
26+
ForeColor="Red">
27+
<QRCodeGeneratorDisplayText Text="Syncfusion"></QRCodeGeneratorDisplayText>
28+
</SfQRCodeGenerator>
29+
30+
<SfDataMatrixGenerator Value="SYNCUser"
31+
Height="100px"
32+
Width="200px"
33+
ForeColor="Red"></SfDataMatrixGenerator>
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
using Microsoft.AspNetCore.Components.Web;
2-
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
3-
using MyBlazorApp;
4-
using Syncfusion.Blazor;
5-
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("NTkyMTQ5QDMxMzkyZTM0MmUzMEVXUE9pUll5VTdDZ1o4YXhuVWdLY2NuVlZXWnhmTnZJdzR1NEt3V1JaUEE9");
6-
var builder = WebAssemblyHostBuilder.CreateDefault(args);
7-
builder.RootComponents.Add<App>("#app");
8-
builder.RootComponents.Add<HeadOutlet>("head::after");
9-
builder.Services.AddSyncfusionBlazor(options => { options.IgnoreScriptIsolation = true; });
10-
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
11-
12-
await builder.Build().RunAsync();
1+
using GettingStarted.Client;
2+
using Microsoft.AspNetCore.Components.Web;
3+
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
4+
using Syncfusion.Blazor;
5+
6+
var builder = WebAssemblyHostBuilder.CreateDefault(args);
7+
builder.RootComponents.Add<App>("#app");
8+
builder.RootComponents.Add<HeadOutlet>("head::after");
9+
10+
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
11+
builder.Services.AddSyncfusionBlazor();
12+
await builder.Build().RunAsync();
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,40 @@
1-
{
2-
"iisSettings": {
3-
"windowsAuthentication": false,
4-
"anonymousAuthentication": true,
5-
"iisExpress": {
6-
"applicationUrl": "http://localhost:46741",
7-
"sslPort": 44370
8-
}
9-
},
10-
"profiles": {
11-
"MyBlazorApp": {
12-
"commandName": "Project",
13-
"dotnetRunMessages": true,
14-
"launchBrowser": true,
15-
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
16-
"applicationUrl": "https://localhost:7212;http://localhost:5212",
17-
"environmentVariables": {
18-
"ASPNETCORE_ENVIRONMENT": "Development"
19-
}
20-
},
21-
"IIS Express": {
22-
"commandName": "IISExpress",
23-
"launchBrowser": true,
24-
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
25-
"environmentVariables": {
26-
"ASPNETCORE_ENVIRONMENT": "Development"
27-
}
28-
}
29-
}
30-
}
1+
{
2+
"iisSettings": {
3+
"windowsAuthentication": false,
4+
"anonymousAuthentication": true,
5+
"iisExpress": {
6+
"applicationUrl": "http://localhost:15246",
7+
"sslPort": 44343
8+
}
9+
},
10+
"profiles": {
11+
"http": {
12+
"commandName": "Project",
13+
"dotnetRunMessages": true,
14+
"launchBrowser": true,
15+
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
16+
"applicationUrl": "http://localhost:5242",
17+
"environmentVariables": {
18+
"ASPNETCORE_ENVIRONMENT": "Development"
19+
}
20+
},
21+
"https": {
22+
"commandName": "Project",
23+
"dotnetRunMessages": true,
24+
"launchBrowser": true,
25+
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
26+
"applicationUrl": "https://localhost:7032;http://localhost:5242",
27+
"environmentVariables": {
28+
"ASPNETCORE_ENVIRONMENT": "Development"
29+
}
30+
},
31+
"IIS Express": {
32+
"commandName": "IISExpress",
33+
"launchBrowser": true,
34+
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
35+
"environmentVariables": {
36+
"ASPNETCORE_ENVIRONMENT": "Development"
37+
}
38+
}
39+
}
40+
}

0 commit comments

Comments
 (0)