Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
1 change: 1 addition & 0 deletions .github/workflows/Nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ jobs:
runs-on: windows-latest
permissions:
contents: write
packages: write
steps:
- name: Update draft on GitHub Releases
id: release_drafter
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ jobs:
- uses: actions/setup-dotnet@main
with:
dotnet-version: '10.x'
workloads: maui-ios, maui-maccatalyst, maui-android, wasm-tools
workloads: maui, wasm-tools
- name: Build GitHub Releases draft artifacts
env:
RELEASE_NOTES: |
# ${{ github.event.release.name }}
${{ format('# {0}', github.event.release.name) }}

${{ github.event.release.body }}
run: |
# .NET Core MSBuild cannot parse , and ; correctly so we replace them with MSBuild XML escapes: https://github.com/dotnet/msbuild/issues/471#issuecomment-366268743
$env:RELEASE_NOTES = $env:RELEASE_NOTES -replace ',','%2C' -replace ';','%3B'

dotnet build -c Release -p:PackageReleaseNotes="$env:RELEASE_NOTES" -p:PackageVersion="${{ github.event.release.tag_name }}"
# For why Not.Uno.Example is used, see Nightly.yml
dotnet build -c Not.Uno.Example -p:PackageReleaseNotes="$env:RELEASE_NOTES" -p:PackageVersion="${{ github.event.release.tag_name }}"
shell: pwsh
- name: Upload to GitHub Releases
uses: svenstaro/upload-release-action@v2
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,9 @@ jobs:
# Check required Xcode version for latest "dotnet workload restore": https://github.com/dotnet/macios/releases
xcode-version: '26.2' # If this is to be changed, also check macos-version in matrix.os above
- uses: actions/setup-dotnet@main
if: matrix.os != 'ubuntu-latest'
with:
dotnet-version: '10.x'
workloads: maui, wasm-tools
- uses: actions/setup-dotnet@main
if: matrix.os == 'ubuntu-latest'
with:
dotnet-version: '10.x'
workloads: maui-android, wasm-tools
workloads: ${{ case(startsWith(matrix.os, 'ubuntu'), 'maui-android, wasm-tools', 'maui, wasm-tools') }}
- uses: actions/checkout@v6
with:
submodules: 'recursive'
Expand Down
58 changes: 29 additions & 29 deletions CSharpMath.Avalonia.Example/MainView.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Avalonia.Styling;
namespace CSharpMath.Avalonia.Example {
public class MainView : UserControl {
public MainView() {
InitializeComponent();
var light = this.Find<RadioButton>("lightThemeRbn")!;
var dark = this.Find<RadioButton>("darkThemeRbn")!;
if ((string)Application.Current!.ActualThemeVariant.Key == "Dark")
dark.IsChecked = true;
else light.IsChecked = true;
light.IsCheckedChanged += (sender, e) => {
Application.Current!.RequestedThemeVariant =
light.IsChecked == true ? ThemeVariant.Light : ThemeVariant.Dark;
};
dark.IsCheckedChanged += (sender, e) => {
Application.Current!.RequestedThemeVariant =
dark.IsChecked == false ? ThemeVariant.Light : ThemeVariant.Dark;
};
}
private void InitializeComponent() {
AvaloniaXamlLoader.Load(this);
}
}
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Avalonia.Styling;

namespace CSharpMath.Avalonia.Example {
public class MainView : UserControl {
public MainView() {
InitializeComponent();

var light = this.Find<RadioButton>("lightThemeRbn")!;
var dark = this.Find<RadioButton>("darkThemeRbn")!;
if ((string)Application.Current!.ActualThemeVariant.Key == "Dark")
dark.IsChecked = true;
else light.IsChecked = true;
light.IsCheckedChanged += (sender, e) => {
Application.Current!.RequestedThemeVariant =
light.IsChecked == true ? ThemeVariant.Light : ThemeVariant.Dark;
};
dark.IsCheckedChanged += (sender, e) => {
Application.Current!.RequestedThemeVariant =
dark.IsChecked == false ? ThemeVariant.Light : ThemeVariant.Dark;
};
}

private void InitializeComponent() {
AvaloniaXamlLoader.Load(this);
}
}
}
16 changes: 8 additions & 8 deletions CSharpMath.Evaluation.Tests/CSharpMath.Evaluation.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!--The Xunit auto-generated namespace should not overwrite CSharpMath.Evaluation-->
<RootNamespace>CSharpMath.EvaluationTests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../CSharpMath.Evaluation/CSharpMath.Evaluation.csproj" />
</ItemGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!--The Xunit auto-generated namespace should not overwrite CSharpMath.Evaluation-->
<RootNamespace>CSharpMath.EvaluationTests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../CSharpMath.Evaluation/CSharpMath.Evaluation.csproj" />
</ItemGroup>
</Project>
Loading