Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change AngouriMath reference to use NuGet package instead of git submodule #149

Merged
merged 31 commits into from
Jul 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
60920b3
Waiting for AngouriMath to fix bugs
Happypig375 Jun 7, 2020
591a699
More interval tests
Happypig375 Jun 7, 2020
736fc30
Parse -> Visualize
Happypig375 Jun 8, 2020
e42ca86
Updated but more failing tests
Happypig375 Jun 8, 2020
057e1da
Merge master
Happypig375 Jun 14, 2020
9d2e9ff
Include Visual Studio automatic updates
Happypig375 Jun 14, 2020
e22eb64
A lot less failing tests now
Happypig375 Jun 14, 2020
2b48411
Fix intervals with same boundaries
Happypig375 Jun 15, 2020
712a902
Update simplification of fractions
Happypig375 Jun 19, 2020
b85bf32
Update
Happypig375 Jun 24, 2020
4a99531
Update!
Happypig375 Jun 24, 2020
85f1cce
Merge master
Happypig375 Jul 2, 2020
c3175e1
Make buildable
Happypig375 Jul 2, 2020
3094269
Fix typo
Happypig375 Jul 2, 2020
e361a00
Update
Happypig375 Jul 8, 2020
b6a5a12
Update
Happypig375 Jul 8, 2020
bfa4bce
Update
Happypig375 Jul 17, 2020
d714390
Use = instead of ->
Happypig375 Jul 19, 2020
a81feee
Merge branch 'master' into AngouriUpdate
Happypig375 Jul 20, 2020
81f315e
Add a calculator to Avalonia Example
Happypig375 Jul 20, 2020
2d7e835
Merge branch 'master' into AngouriUpdate
Happypig375 Jul 28, 2020
5674705
Update
Happypig375 Jul 28, 2020
388dfd2
Preparing to remove AngouriMath submodule
Happypig375 Jul 28, 2020
402c507
Use AngouriMath package
Happypig375 Jul 28, 2020
b8a5ab0
Allow matrices in square brackets
Happypig375 Jul 28, 2020
9122671
Maybe not exponentiations for ordinary matrix environments
Happypig375 Jul 28, 2020
43ed05c
Simplify reference
Happypig375 Jul 28, 2020
78d8348
Resolve the new possible test into QuarticSolution
Happypig375 Jul 28, 2020
993cbbd
Fix blurry MathButtons & Update Avalonia to 0.10.0-preview2
Happypig375 Jul 29, 2020
632747c
Fix test
Happypig375 Jul 29, 2020
d8b5f6b
Fix test (actually)
Happypig375 Jul 29, 2020
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
1 change: 0 additions & 1 deletion .github/workflows/Test all projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:
"CSharpMath.Rendering.Text.Tests"\
"CSharpMath.Xaml.Tests"\
"CSharpMath.Xaml.Tests.NuGet"\
"AngouriMath/Tests/UnitTests"\
"Typography/Typography.TextBreak/Typography.TextBreak.UnitTests"
do
dotnet add "$p" package Microsoft.NET.Test.Sdk # Update is required for GitHubActionsTestLogger to print anything
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@
[submodule "Wiki"]
path = CSharpMath.Wiki
url = https://github.com/verybadcat/CSharpMath.wiki.git
[submodule "AngouriMath"]
path = AngouriMath
url = https://github.com/asc-community/AngouriMath
1 change: 0 additions & 1 deletion AngouriMath
Submodule AngouriMath deleted from 4bfbd5
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
<Compile Update="**\*.xaml.cs" DependentUpon="%(Filename)" />
<AvaloniaResource Include="**\*.xaml" />
<EmbeddedResource Include="..\Icon.png" Link="Icon.png" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.0-preview1" />
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.0-preview1" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.0-preview2" />
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.0-preview2" />
<ProjectReference Include="..\CSharpMath.Avalonia\CSharpMath.Avalonia.csproj" />
<ProjectReference Include="..\CSharpMath.Evaluation\CSharpMath.Evaluation.csproj" />
</ItemGroup>

</Project>
3 changes: 3 additions & 0 deletions CSharpMath.Avalonia.Example/MainView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
<TabItem Header="MathButton">
<pages:MathButtonPage />
</TabItem>
<TabItem Header="Calculator">
<pages:CalculatorPage />
</TabItem>
</TabControl>

</DockPanel>
Expand Down
42 changes: 21 additions & 21 deletions CSharpMath.Avalonia.Example/MainView.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Avalonia.Markup.Xaml.Styling;

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

var light = AvaloniaXamlLoader.Parse<StyleInclude>(@"<StyleInclude xmlns='https://github.com/avaloniaui' Source='avares://Avalonia.Themes.Fluent/Accents/FluentLight.xaml'/>");
var dark = AvaloniaXamlLoader.Parse<StyleInclude>(@"<StyleInclude xmlns='https://github.com/avaloniaui' Source='avares://Avalonia.Themes.Fluent/Accents/FluentDark.xaml'/>");
var themes = this.Find<RadioButton>("lightThemeRbn");
themes.Checked += (sender, e) => Application.Current.Styles[0] = light;
themes.Unchecked += (sender, e) => Application.Current.Styles[0] = dark;
}

private void InitializeComponent() {
AvaloniaXamlLoader.Load(this);
}
}
}
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Avalonia.Styling;
namespace CSharpMath.Avalonia.Example {
public class MainView : UserControl {
public MainView() {
InitializeComponent();
var light = (Styles)AvaloniaXamlLoader.Load(new System.Uri("avares://Avalonia.Themes.Fluent/Accents/FluentLight.xaml"));
var dark = (Styles)AvaloniaXamlLoader.Load(new System.Uri("avares://Avalonia.Themes.Fluent/Accents/FluentDark.xaml"));
var themes = this.Find<RadioButton>("lightThemeRbn");
themes.Checked += (sender, e) => Application.Current.Styles[0] = light;
themes.Unchecked += (sender, e) => Application.Current.Styles[0] = dark;
}
private void InitializeComponent() {
AvaloniaXamlLoader.Load(this);
}
}
}
30 changes: 30 additions & 0 deletions CSharpMath.Avalonia.Example/Pages/CalculatorPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:csmath="clr-namespace:CSharpMath.Avalonia;assembly=CSharpMath.Avalonia"
xmlns:local="clr-namespace:CSharpMath.Avalonia.Example.Pages"
x:Class="CSharpMath.Avalonia.Example.Pages.CalculatorPage">

<ScrollViewer Margin="0, 8" HorizontalScrollBarVisibility="Auto">

<StackPanel Spacing="24">

<StackPanel Spacing="4">

<TextBlock Classes="h1"
Text="CSharpMath.Evaluation.Evaluate" />

<TextBlock Classes="h2"
Text="Evaluates a MathList that can be constructed from LaTeX" />

</StackPanel>

<TextBox Name="input" AcceptsReturn="True" TextWrapping="Wrap" Text="x^4+4x^3+16x^2+4x+1=y" />

<csmath:MathView LaTeX="{Binding #input.Text, Converter={x:Static local:CalculatorPageConverter.Singleton}}" />

</StackPanel>

</ScrollViewer>

</UserControl>
22 changes: 22 additions & 0 deletions CSharpMath.Avalonia.Example/Pages/CalculatorPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.Globalization;
using Avalonia.Controls;
using Avalonia.Data.Converters;
using Avalonia.Markup.Xaml;

namespace CSharpMath.Avalonia.Example.Pages {
public class CalculatorPage : UserControl {
public CalculatorPage() => AvaloniaXamlLoader.Load(this);
}
class CalculatorPageConverter : IValueConverter {
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) =>
value is string latex
? Atom.LaTeXParser.MathListFromLaTeX(latex)
.Bind(list => Evaluation.Interpret(list))
.Match(success => success, error => latex)
: value;
object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) =>
throw new NotImplementedException();
public static CalculatorPageConverter Singleton { get; } = new CalculatorPageConverter();
}
}
3 changes: 2 additions & 1 deletion CSharpMath.Avalonia/CSharpMath.Avalonia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<ItemGroup>
<Compile Update="**\*.xaml.cs" DependentUpon="%(Filename)" />
<AvaloniaResource Include="**\*.xaml" />
<PackageReference Include="Avalonia" Version="0.10.0-preview1" />
<PackageReference Include="Avalonia" Version="0.10.0-preview2" />
<ProjectReference Include="..\CSharpMath.Evaluation\CSharpMath.Evaluation.csproj" />
<ProjectReference Include="..\CSharpMath.Rendering\CSharpMath.Rendering.csproj" />
</ItemGroup>

Expand Down
Loading