Skip to content

Commit

Permalink
Updated to .NET MAUI GA Release
Browse files Browse the repository at this point in the history
  • Loading branch information
naweed committed Jun 10, 2022
1 parent 5e068cc commit cf2af99
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# UPDATED TO MAUI GA RELEASE
## (Not tested on iOS)


# MauiScientificCalculator
A simple scientific calculator built uisng .NET MAUI Preview 14. Based ont his [Behance Concept](https://www.behance.net/gallery/79810231/UIUX-Challenge-04-05-Calculator-App-Icon).

Expand Down
1 change: 0 additions & 1 deletion src/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
global using Microsoft.Maui;
global using Microsoft.Maui.Controls;
global using Microsoft.Maui.Controls.Hosting;
global using Microsoft.Maui.Essentials;
global using Microsoft.Maui.Hosting;

//Toolkit Specific
Expand Down
7 changes: 2 additions & 5 deletions src/MauiScientificCalculator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@

<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />

<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />

<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
Expand All @@ -61,8 +58,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0-preview2" />
<PackageReference Include="NCalcSync" Version="3.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0-preview4" />
<PackageReference Include="NCalcSync" Version="3.4.0" />
</ItemGroup>

<ItemGroup>
Expand Down
14 changes: 7 additions & 7 deletions src/ViewModels/CalculatorPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ public CalculatorPageViewModel()
{
}

[ICommand]
[RelayCommand]
private void Reset()
{
CalculatedResult = "0";
InputText = "";
isSciOpWaiting = false;
}

[ICommand]
[RelayCommand]
private void Calculate()
{
if (InputText.Length == 0)
Expand Down Expand Up @@ -79,20 +79,20 @@ private string NormalizeInputString()
return retString;
}

[ICommand]
[RelayCommand]
private void Backspace()
{
if (InputText.Length > 0)
InputText = InputText.Substring(0, InputText.Length - 1);
}

[ICommand]
[RelayCommand]
private void NumberInput(string key)
{
InputText += key;
}

[ICommand]
[RelayCommand]
private void MathOperator(string op)
{
if (isSciOpWaiting)
Expand All @@ -104,7 +104,7 @@ private void MathOperator(string op)
InputText += $" {op} ";
}

[ICommand]
[RelayCommand]
private void RegionOperator(string op)
{
if (op == ")")
Expand All @@ -113,7 +113,7 @@ private void RegionOperator(string op)
InputText += op;
}

[ICommand]
[RelayCommand]
private void ScientificOperator(string op)
{
InputText += $"{op}(";
Expand Down

0 comments on commit cf2af99

Please sign in to comment.