Skip to content

Commit 7ff1a76

Browse files
xpo
1 parent 8680934 commit 7ff1a76

File tree

215 files changed

+807
-7030
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+807
-7030
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ bld/
2323
[Bb]in/
2424
[Oo]bj/
2525
[Ll]og/
26+
CSOld/
2627

2728
# Visual Studio 2015 cache/options directory
2829
.vs/

ItemCount/ASP.NET/Blazor/ItemCount.Blazor.Server/App.razor renamed to CS/XPO/ItemCount/ItemCount.Blazor.Server/App.razor

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
</Found>
55
<NotFound>
66
<LayoutView>
7-
<p>Sorry, there's nothing at this address.</p>
7+
<PageTitle>Not found</PageTitle>
8+
<p role="alert">Sorry, there's nothing at this address.</p>
89
</LayoutView>
910
</NotFound>
1011
</Router>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
using DevExpress.ExpressApp;
2+
using DevExpress.ExpressApp.ApplicationBuilder;
3+
using DevExpress.ExpressApp.Blazor;
4+
using DevExpress.ExpressApp.SystemModule;
5+
using DevExpress.ExpressApp.Xpo;
6+
using ItemCount.Blazor.Server.Services;
7+
8+
namespace ItemCount.Blazor.Server;
9+
10+
public class ItemCountBlazorApplication : BlazorApplication {
11+
public ItemCountBlazorApplication() {
12+
ApplicationName = "ItemCount";
13+
CheckCompatibilityType = DevExpress.ExpressApp.CheckCompatibilityType.DatabaseSchema;
14+
DatabaseVersionMismatch += ItemCountBlazorApplication_DatabaseVersionMismatch;
15+
}
16+
protected override void OnSetupStarted() {
17+
base.OnSetupStarted();
18+
#if DEBUG
19+
if(System.Diagnostics.Debugger.IsAttached && CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema) {
20+
DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
21+
}
22+
#endif
23+
}
24+
private void ItemCountBlazorApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e) {
25+
#if EASYTEST
26+
e.Updater.Update();
27+
e.Handled = true;
28+
#else
29+
if(System.Diagnostics.Debugger.IsAttached) {
30+
e.Updater.Update();
31+
e.Handled = true;
32+
}
33+
else {
34+
string message = "The application cannot connect to the specified database, " +
35+
"because the database doesn't exist, its version is older " +
36+
"than that of the application or its schema does not match " +
37+
"the ORM data model structure. To avoid this error, use one " +
38+
"of the solutions from the https://www.devexpress.com/kb=T367835 KB Article.";
39+
40+
if(e.CompatibilityError != null && e.CompatibilityError.Exception != null) {
41+
message += "\r\n\r\nInner exception: " + e.CompatibilityError.Exception.Message;
42+
}
43+
throw new InvalidOperationException(message);
44+
}
45+
#endif
46+
}
47+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System.ComponentModel;
2+
using DevExpress.ExpressApp;
3+
using DevExpress.ExpressApp.DC;
4+
using DevExpress.ExpressApp.Model;
5+
using DevExpress.ExpressApp.Editors;
6+
using DevExpress.ExpressApp.Actions;
7+
using DevExpress.ExpressApp.Updating;
8+
using DevExpress.ExpressApp.Model.Core;
9+
using DevExpress.ExpressApp.Model.DomainLogics;
10+
using DevExpress.ExpressApp.Model.NodeGenerators;
11+
using DevExpress.Persistent.BaseImpl;
12+
13+
namespace ItemCount.Blazor.Server;
14+
15+
[ToolboxItemFilter("Xaf.Platform.Blazor")]
16+
// For more typical usage scenarios, be sure to check out https://docs.devexpress.com/eXpressAppFramework/DevExpress.ExpressApp.ModuleBase.
17+
public sealed class ItemCountBlazorModule : ModuleBase {
18+
public ItemCountBlazorModule() {
19+
}
20+
public override IEnumerable<ModuleUpdater> GetModuleUpdaters(IObjectSpace objectSpace, Version versionFromDB) {
21+
return ModuleUpdater.EmptyModuleUpdaters;
22+
}
23+
public override void Setup(XafApplication application) {
24+
base.Setup(application);
25+
}
26+
}

ItemCount/ASP.NET/Blazor/ItemCount.Module.Blazor/Controllers/ReadMe.txt renamed to CS/XPO/ItemCount/ItemCount.Blazor.Server/Controllers/ReadMe.txt

File renamed without changes.

ItemCount/ASP.NET/Blazor/ItemCount.Module.Blazor/Editors/ReadMe.txt renamed to CS/XPO/ItemCount/ItemCount.Blazor.Server/Editors/ReadMe.txt

File renamed without changes.

ItemCount/ASP.NET/Blazor/ItemCount.Module.Blazor/Images/ReadMe.txt renamed to CS/XPO/ItemCount/ItemCount.Blazor.Server/Images/ReadMe.txt

File renamed without changes.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
<PropertyGroup>
3+
<TargetFramework>net6.0</TargetFramework>
4+
<CheckEolTargetFramework>false</CheckEolTargetFramework>
5+
<Deterministic>false</Deterministic>
6+
<AssemblyVersion>1.0.*</AssemblyVersion>
7+
<FileVersion>1.0.0.0</FileVersion>
8+
<Configurations>Debug;Release;EasyTest</Configurations>
9+
<ImplicitUsings>enable</ImplicitUsings>
10+
</PropertyGroup>
11+
<ItemGroup>
12+
<None Remove="Model.xafml" />
13+
</ItemGroup>
14+
<ItemGroup>
15+
<Content Include="Model.xafml">
16+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
17+
</Content>
18+
</ItemGroup>
19+
<ItemGroup>
20+
<PackageReference Include="DevExpress.ExpressApp.Blazor" Version="22.2.5" />
21+
<PackageReference Include="DevExpress.ExpressApp.CodeAnalysis" Version="22.2.5" />
22+
</ItemGroup>
23+
<ItemGroup>
24+
<ProjectReference Include="..\ItemCount.Module\ItemCount.Module.csproj" />
25+
</ItemGroup>
26+
</Project>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Application>
3+
<NavigationItems NavigationStyle="Accordion">
4+
</NavigationItems>
5+
<Views DefaultListEditor="DevExpress.ExpressApp.Blazor.Editors.DxGridListEditor">
6+
</Views>
7+
</Application>

ItemCount/ASP.NET/Blazor/ItemCount.Blazor.Server/Pages/_Host.cshtml renamed to CS/XPO/ItemCount/ItemCount.Blazor.Server/Pages/_Host.cshtml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
<!-- meta name="theme-color" content="#000000" -->
1414
<title>ItemCount</title>
1515
<base href="~/" />
16+
<component type="typeof(BootstrapThemeLink)" render-mode="Static" />
1617
</head>
1718
<body>
1819
@{
1920
string userAgent = Request.Headers["User-Agent"];
2021
bool isIE = userAgent.Contains("MSIE") || userAgent.Contains("Trident");
2122
}
2223
@if(isIE) {
23-
<component type="typeof(BootstrapThemeLink)" render-mode="Static" />
2424
<link href="css/site.css" rel="stylesheet" />
2525
<div class="d-flex flex-column justify-content-center align-items-center h-100">
2626
<div class="d-flex">
@@ -35,8 +35,6 @@
3535
else {
3636
<component type="typeof(SplashScreen)" render-mode="Static" param-Caption='"ItemCount"' param-ImagePath='"images/SplashScreen.svg"' />
3737

38-
<component type="typeof(BootstrapThemeLink)" render-mode="Static" />
39-
<link href="_content/DevExpress.Blazor/dx-blazor.css" rel="stylesheet" />
4038
<link href="_content/DevExpress.ExpressApp.Blazor/styles.css" rel="stylesheet" />
4139
<link href="css/site.css" rel="stylesheet" />
4240
<script src="_content/DevExpress.ExpressApp.Blazor/scripts.js"></script>

0 commit comments

Comments
 (0)