Skip to content
Merged

sync #757

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
940c8f7
Merge remote-tracking branch 'origin/master' into MVVM_Tutorial
joecare99 May 21, 2026
9bd26a8
Merge remote-tracking branch 'GH_CSharp/MVVM_Tutorial'
joecare99 May 25, 2026
3fcc675
AA05_CommandParCalc
joecare99 May 27, 2026
991fae4
AA20_Sysdialogs
joecare99 May 27, 2026
9e24799
BaseLibTests
joecare99 May 27, 2026
6e1d88f
Avalonia_Apps
joecare99 May 27, 2026
968e23c
Merge remote-tracking branch 'GH_CSharp/Avalonia_Apps'
joecare99 May 27, 2026
2c35533
AA05_CommandParCalc
joecare99 May 27, 2026
4838efe
Avln_AnimationTiming
joecare99 May 27, 2026
76e8670
Avln_Brushes
joecare99 May 27, 2026
272831c
Avln_Geometry
joecare99 May 27, 2026
d220ea7
Avln_Hello_World
joecare99 May 27, 2026
47eb2cd
Avln_ImageView
joecare99 May 27, 2026
c498241
Avln_IntegrationTestApp
joecare99 May 27, 2026
b5ba038
Avln_MoveWindow
joecare99 May 27, 2026
7468bba
Avln_RenderDemo
joecare99 May 27, 2026
391358f
Avln_Sample_Template
joecare99 May 27, 2026
078befd
Avln_TextTestApp
joecare99 May 27, 2026
543769b
SampleControls
joecare99 May 27, 2026
98d9267
Avalonia_Apps
joecare99 May 27, 2026
b0b1580
AA05_CommandParCalc
joecare99 May 27, 2026
af7f939
Avalonia_Apps
joecare99 May 27, 2026
aedbd54
AA05_CommandParCalc
joecare99 May 28, 2026
350f753
AA98_AvlnCodeStudio.UI
joecare99 May 28, 2026
1369fd8
Avalonia_Apps
joecare99 May 28, 2026
3fb97e3
Common
joecare99 May 28, 2026
fcbfc9f
AA05_CommandParCalc
joecare99 May 28, 2026
43f9f0c
AA05_CommandParCalcTests
joecare99 May 28, 2026
d084e68
AA09_DialogBoxes
joecare99 May 28, 2026
af4050d
AA09_DialogBoxesTests
joecare99 May 28, 2026
c6212b3
Avln_RenderDemo
joecare99 May 28, 2026
359c6ca
SampleControls
joecare99 May 28, 2026
3ea49f4
Avalonia_Apps
joecare99 May 28, 2026
fc4a50a
Analyzer1.Test
joecare99 May 28, 2026
117d615
Merge remote-tracking branch 'GH_CSharp/Transpiler_pp'
joecare99 May 28, 2026
496d03f
GenDBImplOLEDBTests
joecare99 May 28, 2026
c4b7bc6
GenFreeBaseClassesTests
joecare99 May 28, 2026
077d93d
GenFreeBaseTests
joecare99 May 28, 2026
3edeed0
GenFreeBrowser.Tests
joecare99 May 28, 2026
52414b7
GenFreeDataTests
joecare99 May 28, 2026
b16de14
GenFreeHelperTests
joecare99 May 28, 2026
e199a15
GenFreeWinFormsTests
joecare99 May 28, 2026
8124adc
GenFreeWinTests
joecare99 May 28, 2026
ae210a9
GenSecure.Core.Tests
joecare99 May 28, 2026
d8a442d
MdbBrowserTests
joecare99 May 28, 2026
72b8e8a
MSQBrowserTests
joecare99 May 28, 2026
f5e89a3
VBUnObfusicatorTests
joecare99 May 28, 2026
f4915e0
WinAhnenClsTests
joecare99 May 28, 2026
b02abfc
WinAhnenNew.Model.Tests
joecare99 May 28, 2026
32481a6
WinAhnenNew.UI.Tests
joecare99 May 28, 2026
e6eeca0
GenFreeWin
joecare99 May 28, 2026
45a98e2
Merge remote-tracking branch 'GH_CSharp/GenFreeWin'
joecare99 May 28, 2026
b4c63c8
AA05_CommandParCalc
joecare99 May 28, 2026
55f3d08
AA15_Labyrinth
joecare99 May 28, 2026
38d14c8
Avln_RichTextEdit
joecare99 May 28, 2026
bd7f29a
AA98_AvlnCodeStudio.Tests
joecare99 May 28, 2026
c04bb8f
AA98_AvlnCodeStudio.UI
joecare99 May 28, 2026
34d4f16
Avalonia_App_01
joecare99 May 28, 2026
8abb902
Avalonia_App_01.Android
joecare99 May 28, 2026
f664c26
Avalonia_App_01.Desktop
joecare99 May 28, 2026
a8c5137
Avalonia_App_01.iOS
joecare99 May 28, 2026
bad4658
Avalonia_App02
joecare99 May 28, 2026
d24dd59
Avalonia_App02Tests
joecare99 May 28, 2026
9f2103e
Avln_AnimationTiming
joecare99 May 28, 2026
b97fd9f
Avln_AnimationTimingTests
joecare99 May 28, 2026
a6a371b
Avln_Brushes
joecare99 May 28, 2026
162c13f
Avln_Complex_Layout
joecare99 May 28, 2026
f8c995e
Avln_Complex_LayoutTests
joecare99 May 28, 2026
58528a4
Avln_CustomAnimation
joecare99 May 28, 2026
a1e2578
Avln_Geometry
joecare99 May 28, 2026
2bbc56e
Avln_Hello_World
joecare99 May 28, 2026
4bb87b5
Avln_Hello_WorldTests
joecare99 May 28, 2026
161754f
Avln_ImageView
joecare99 May 28, 2026
f7dd7ed
Avln_IntegrationTestApp
joecare99 May 28, 2026
db7ad38
Avln_MoveWindow
joecare99 May 28, 2026
8b40d26
Avln_MoveWindowTests
joecare99 May 28, 2026
86ba062
Avln_RenderDemo
joecare99 May 28, 2026
7f3a024
Avln_Sample_Template
joecare99 May 28, 2026
e155264
Avln_TextTestApp
joecare99 May 28, 2026
8a28c24
SampleControls
joecare99 May 28, 2026
f5d5cc8
Avln_Marble.Desktop
joecare99 May 28, 2026
48016a3
Avln_BaseLib
joecare99 May 28, 2026
fbbbd5b
Avln_BaseLibTests
joecare99 May 28, 2026
0f590ae
Avln_CommonDialogs.Avalonia
joecare99 May 28, 2026
e9bb712
RenderImage.BaseTests
joecare99 May 28, 2026
4a66ef5
Avalonia_Apps
joecare99 May 28, 2026
57e9fc2
Merge remote-tracking branch 'GH_CSharp/Avalonia_Apps'
joecare99 May 28, 2026
8ff71a6
AppWithPluginTest
joecare99 May 28, 2026
d2aee93
HelloPluginTest
joecare99 May 28, 2026
54dbead
TestGJKAlgTest
joecare99 May 28, 2026
932e4e0
TestStatementsTest
joecare99 May 28, 2026
00d6dd9
Merge remote-tracking branch 'GH_CSharp/TestStatements'
joecare99 May 28, 2026
cdbcf2a
Merge remote-tracking branch 'GH_CSharp/CSharpBible'
joecare99 May 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project>
<Import Project="..\Application.props" />
<PropertyGroup>
<TargetFramework>net10.0-browser</TargetFramework>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
</PropertyGroup>
<Import Sdk="Microsoft.NET.Sdk.WebAssembly" Project="Sdk.props" />
<Import Sdk="Microsoft.NET.Sdk.WebAssembly" Project="Sdk.targets" />
<ItemGroup>
<Compile Remove="obj\**" />
<Content Remove="obj\**" />
<EmbeddedResource Remove="obj\**" />
<None Remove="obj\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Browser" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AA05_CommandParCalc\AA05_CommandParCalc.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using AA05_CommandParCalc;
using Avalonia;
using Avalonia.Browser;
using System.Runtime.Versioning;
using System.Threading.Tasks;

[assembly: SupportedOSPlatform("browser")]

internal sealed partial class Program
{
private static async Task Main(string[] args)
{
await BrowserAppBuilder.StartBrowserAppAsync(
BuildAvaloniaApp()
.WithInterFont(),
"out",
new BrowserPlatformOptions());
}

public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[assembly:System.Runtime.Versioning.SupportedOSPlatform("browser")]
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"profiles": {
"AA05_CommandParCalc.Browser": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:7170;http://localhost:5236",
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
},
"WSL": {
"commandName": "WSL2",
"launchBrowser": true,
"launchUrl": "https://localhost:7170",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_URLS": "https://localhost:7170;http://localhost:5236"
},
"distributionName": ""
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
},
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:57862/",
"sslPort": 44327
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"wasmHostProperties": {
"perHostConfig": [
{
"name": "browser",
"host": "browser"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/* HTML styles for the splash screen */
.avalonia-splash {
position: absolute;
height: 100%;
width: 100%;
background: white;
font-family: 'Outfit', sans-serif;
justify-content: center;
align-items: center;
display: flex;
pointer-events: none;
}

@media (prefers-color-scheme: light) {
.avalonia-splash {
background: white;
}

.avalonia-splash h2 {
color: #1b2a4e;
}

.avalonia-splash a {
color: #0D6EFD;
}
}

@media (prefers-color-scheme: dark) {
.avalonia-splash {
background: #1b2a4e;
}

.avalonia-splash h2 {
color: white;
}

.avalonia-splash a {
color: white;
}
}

.avalonia-splash h2 {
font-weight: 400;
font-size: 1.5rem;
}

.avalonia-splash a {
text-decoration: none;
font-size: 2.5rem;
display: block;
}

.avalonia-splash.splash-close {
transition: opacity 200ms, display 200ms;
display: none;
opacity: 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<title>AA05_CommandParCalc.Browser</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./app.css" />
</head>
<body style="margin: 0; overflow: hidden">
<div id="out">
<div class="avalonia-splash">
<h2>AA05 CommandParCalc is loading...</h2>
</div>
</div>
<script type='module' src="./main.js"></script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { dotnet } from './_framework/dotnet.js'

const is_browser = typeof window != "undefined";
if (!is_browser) throw new Error(`Expected to be running in a browser`);

const dotnetRuntime = await dotnet
.withDiagnosticTracing(false)
.withApplicationArgumentsFromQuery()
.create();

const config = dotnetRuntime.getConfig();

await dotnetRuntime.runMain(config.mainAssemblyName, [globalThis.location.href]);
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<Project>
<Import Project="..\Application.props" />
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net8.0</TargetFrameworks>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" />
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />
<PropertyGroup Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreSdkVersion)', '9.0.100'))">
<TargetFrameworks>$(TargetFrameworks);net9.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreSdkVersion)', '10.0.100'))">
<TargetFrameworks>$(TargetFrameworks);net10.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreSdkVersion)', '11.0.100'))">
<TargetFrameworks>$(TargetFrameworks);net11.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Desktop" />
<PackageReference Include="Avalonia.Diagnostics">
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AA05_CommandParCalc\AA05_CommandParCalc.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using AA05_CommandParCalc;
using Avalonia;
using System;

namespace AA05_CommandParCalc.Desktop;

sealed class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
[STAThread]
public static void Main(string[] args) => BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);

// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
=> AppBuilderFactory.BuildAvaloniaApp()
.UsePlatformDetect();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="AA05_CommandParCalc.Desktop"/>

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
</assembly>
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<Project>
<Import Project="..\Application.props" />
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net8.0</TargetFrameworks>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Nullable>enable</Nullable>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
</PropertyGroup>
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" />
Expand All @@ -21,15 +19,9 @@

<ItemGroup>
<PackageReference Include="Avalonia" />
<PackageReference Include="Avalonia.Desktop" />
<PackageReference Include="Svg.Controls.Skia.Avalonia" />
<PackageReference Include="Avalonia.Themes.Fluent" />
<PackageReference Include="Avalonia.Fonts.Inter" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Include="Avalonia.Diagnostics">
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
</PackageReference>
<PackageReference Include="CommunityToolkit.Mvvm" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
</ItemGroup>
Expand Down
29 changes: 17 additions & 12 deletions Avalonia_Apps/AA05_CommandParCalc/AA05_CommandParCalc/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
using Avalonia.Platform;
using AA05_CommandParCalc.Models;
using AA05_CommandParCalc.Models.Interfaces;
using AA05_CommandParCalc.ViewModels;
Expand All @@ -14,38 +13,44 @@ namespace AA05_CommandParCalc;

public partial class App : Application
{
public IServiceProvider? Services { get; private set; }

public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}

public override void OnFrameworkInitializationCompleted()
{
Services = CreateServices();

if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
InitDesktopApp(desktop);
desktop.MainWindow = new MainWindow
{
DataContext = Services.GetRequiredService<ICommandParCalcViewModel>()
};
}
else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewPlatform)
{
singleViewPlatform.MainView = new CommandParCalcView
{
DataContext = Services.GetRequiredService<ICommandParCalcViewModel>()
};
}

base.OnFrameworkInitializationCompleted();
}

protected void InitDesktopApp(IClassicDesktopStyleApplicationLifetime desktop)
private static IServiceProvider CreateServices()
{
var services = new ServiceCollection();

services.AddTransient<ICommandParCalcViewModel, CommandParCalcViewModel>()
.AddTransient<ISysTime, SysTime>()
.AddTransient<ICyclTimer, TimerProxy>()
.AddSingleton<IPlatformHandle>((s)=>null!)
.AddSingleton<ICommandParCalcModel, CommandParCalcModel>();

Services = services.BuildServiceProvider();

desktop.MainWindow = new MainWindow
{
DataContext = Services.GetRequiredService<ICommandParCalcViewModel>()
};
return services.BuildServiceProvider();
}

public IServiceProvider? Services { get; private set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,9 @@
// </copyright>
// <summary></summary>
// ***********************************************************************
using Avalonia.Platform;
using AA05_CommandParCalc.Models.Interfaces;
using CommunityToolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Timers;

/// <summary>
/// The Models namespace.
Expand All @@ -32,21 +25,15 @@ namespace AA05_CommandParCalc.Models;
/// </summary>
public partial class CommandParCalcModel : ObservableObject, ICommandParCalcModel
{
/// <summary>
/// The platform handle
/// </summary>
private IPlatformHandle _platformHandle;
private ISysTime _sysTime;
private ICyclTimer _timer;
private readonly ISysTime _sysTime;
private readonly ICyclTimer _timer;

public DateTime Now => _sysTime.Now;
/// <summary>
/// Initializes a new instance of the <see cref="CommandParCalcModel"/> class.
/// </summary>
/// <param name="platformHandle">The platform handle.</param>
public CommandParCalcModel(IPlatformHandle platformHandle, ISysTime sysTime, ICyclTimer timer)
public CommandParCalcModel(ISysTime sysTime, ICyclTimer timer)
{
_platformHandle = platformHandle;
_sysTime = sysTime;
_timer = timer;
_timer.Interval = 1000;
Expand Down
Loading
Loading