Commit Graph

13 Commits

Author SHA1 Message Date
Tian L
fdae1000fc
Hello C# - Migrating the codebase from C++/CX to C# (Phase 1) (#1598)
* Hello C# - Going to an official feature branch (#1544)

* change CalcViewModel into a WindowsRuntimeComponent project (#5)

* change CalcViewModel into a WindowsRuntimeComponent project

* remove the old UI codebase (#6)

* initially migrated C# codebase by tian (#7)

* initial migrated C# codebase by tian

* format the codebase

* resolve comments

* undo: modifications on UI test project

* Remove the blocks that have more than 1 empty line.

* Register DP using keyword 'nameof'

* C# Migration: Initially migrated C# codebase by Han (#8)

* C# Migration: Initially migrated C# codebase by Han

* Resolved comments and misssing asset

* Added three files to Calculator project

* Added TODO comment and updated Object

* NavCategory: temporary resolution of the hang issue (#9)

* Updated CalcViewModel and missing files (#10)

* Updated CalcViewModel and WinMeta

* Added Calculator.rc

* Resolved comment for InitializeLocalizationSettings

* add: views/unitconverter.xaml (#11)

* add: views/unitconverter.xaml

* format the code

* remove the extra empty line

* add an empty line

* check null before invoking event handlers (#12)

* fix problems of the migration of OBSERVABLE_PROPERTY_RW (#13)

* fixes crash in MathRichEditBox.ctor() (#14)

* fixes crash in MathRichEditBox.ctor()

* typo

* Update azure-pipelines.ci.yaml for Azure Pipelines

* Added a link copy of CalcViewModel to temporarily pass Unit Tests (#16)

* Updated CalcViewModelCopyForUT configuration (#17)

* changes output path of the UI project to align with other projects (#15)

* fixes EETypeLoadException issue: export class DelegateCommand (#18)

* fixes EETypeLoadException issue: export class DelegateCommand

* weak-reference in C++/CX

* WeakRef in C# codebase

* UTF-8-BOM

* spaces in macro

* resolve some comments from the offline review

* format

* rename file

* fixes the memory list issue (#20)

* fixes a wrongly migrated property

* UTF-8-BOM

* fixes up the crash of type casting (#21)

* Update localized strings 2021-01-04 (#1458) (#23)

(cherry picked from commit cdcb95656d)

Co-authored-by: Matt Cooley <macool@microsoft.com>

* Fixup tests (#1429) (#24)

- Removed unneeded "ToString" calls
- Fixed typos
- Renamed "fEButtonState" to "FEButtonState"

(cherry picked from commit 66ad328d00)

Co-authored-by: N <71219152+PokeCodec@users.noreply.github.com>

* Update graph internal engine verseion (#1466) (#25)

(cherry picked from commit 0048dcb500)

Co-authored-by: Quentin Al-Timimi <27322516+quentin987@users.noreply.github.com>

* Turn off DFS file shares in internal build system (#1470) (#26)

(cherry picked from commit 885fa23a89)

Co-authored-by: Matt Cooley <macool@microsoft.com>

* Improve clarity of math expressions in history for Standard Calculator (feature #138) (#1453) (#27)

* Implemented feature & added unit tests

* Fixed more unit/ui tests

* Refactored tests

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp

(cherry picked from commit 565e3e2714)

Co-authored-by: Wei (Waley) Zhang <waley.zhang@microsoft.com>

* Adds unit-test cases for NarratorAnnouncement after fixing issue #1386 (#1469) (#28)

* fix bug: No confirmation is announced by the narrator after activating 'Remove equation' button #1386

* Unit Test: Add NarratorAnnouncementUnitTests

Co-authored-by: tain <tankle_@hotmail.com>
(cherry picked from commit 9d8e2ad18c)

Co-authored-by: Tian L <60599517+MSFT-Tilia@users.noreply.github.com>

* Move localization pipeline sync schedule to the YAML file (#1478) (#30)

(cherry picked from commit 007eccd940)

Co-authored-by: Matt Cooley <macool@microsoft.com>

* remove the strong reference carried from delegate (#32)

* Remove the finalizer of ControlSizeTrigger (#31)

* Normalize the namespace of CalcViewModel (#33)

* ViewMode: arrange namespaces

* UI build pass

* run release

* UT build pass

* pass build

* resolve comment: make the diff results cleaner

* resolve comment: make the diff results cleaner (2)

* resolve comment: make the diff results cleaner (3)

* resolve comment: move impl into a namespace

* update: spaces

* update: CalculatorButtonUser.h

* UTF-8 to UTF-8-BOM

* remove ViewState.h/.cpp from CalcViewModel path

* revert changes for NavCategory.cpp

* remove extra space

* remove UCM

* remove BOM

* Fixed a graphing calculator "permissions" bug caused by PR #1426 (#1471) (#34)

- The PR #1426 can cause a crash when no users are returned via `User::FindAllAsync(UserType::LocalUser)` when subsequently trying to access the first user. The existing code also does not guarantee that the returned user is the currently active user.
- This fix retrieves the user that opened the app and passes this user into a function to check if this user has the proper permissions to access the graphing mode. This makes sense since the active user is indistinguishable (at least from the app's perspective) to the user who opened the app. This user's permissions are then propagated downwards to properly set up the navigation menu of the app.
- Implementation detail worth pointing out: `s_categoryManifest` is what is used to populate the navigation menu of the app, but this variable is static by design, so a separate function was written to override the appropriate `isEnabled` value in `s_categoryManifest`. This function is called by `onLaunched`.

- Manual testing

Co-authored-by: Wei (Waley) Zhang <waley.zhang@microsoft.com>

* fixes up a bug (#35)

* fix csproj (#37)

Co-authored-by: hanzhang54 <zhangh@microsoft.com>
Co-authored-by: Matt Cooley <macool@microsoft.com>
Co-authored-by: N <71219152+PokeCodec@users.noreply.github.com>
Co-authored-by: Quentin Al-Timimi <27322516+quentin987@users.noreply.github.com>
Co-authored-by: Wei (Waley) Zhang <waley.zhang@microsoft.com>
Co-authored-by: Tian L <60599517+MSFT-Tilia@users.noreply.github.com>

* **BYPASS_SECRET_SCANNING** (#1546)

* Fixes a bug about the UI of expression tokens (#1547)

* fix

* [FeatureBranch] Fixes x86/ARM/ARM64 builds for the CI-Pipeline (#1550)

* **BYPASS_SECRET_SCANNING**

* fix

* fixes x86/ARM/ARM64 builds for CI-Pipeline

* Add headers missing for compilation with GCC (#1468) (#1551)

Things that required such update included:
* `wstringstream`
* `setprecision`
* `SCODE_CODE`, `E_BOUNDS`
* Various SAL macros

Co-authored-by: Michał Janiszewski <janisozaur@users.noreply.github.com>

* Update nuget.config file (#1486) (#1552)

Co-authored-by: Matt Cooley <macool@microsoft.com>

* Fixes up some simple miscellaneous TODO items (#1556)

* #DEBUG is a known C# preprocessor directive

* So far, we haven't observed the problem described in the comment from C# async

* fixes misc TODO items

* resolve some warnings (#1564)

* Add internal CI pipeline (#1553) (#1565)

* Add CI-internal pipeline

* No ARM64, to match release

Co-authored-by: Matt Cooley <macool@microsoft.com>

* Temporarily disable PGO NuGet package (#1510) (#1566)

Co-authored-by: Matt Cooley <macool@microsoft.com>

* [C# Calc]Removes WinMeta.cs (#1567)

* remove WinMeta.cs

* undo a trivial change

* UTF-8 BOM

* [C# Calc] Reverts some changes for Currency constants (#1570)

* Update2108release - experimental (#1572)

* adjusts Calculator.csproj (#1571)

* fixes BinSkim problems (#1573)

* fixes an issue around line style (#1575)

* fixes the missed NULLs (#1576) (#1578)

* Fix the Missing Part in Unit Converter Constructor (#1579)

* fixes: calculator doesn't remember its previous mode (#1580)

* Fixes: GraphingNumber doesn't work correctly (#1585)

* fixes: GraphingNumber doesn't work correctly

* Avoid crashing

* fixes binding (#1586)

* resolve TODO items (#1589)

* Improving keyboard support in VariableValueSlider (#1559) (#1595)

Co-authored-by: Dave Grochocki <grochocki@users.noreply.github.com>

* [C# Calc] Fixes: Keep the value away from getting rounded in Graphing Mode (#1596)

* keep the value away from getting rounded

* set the display precision to 6 to align with C++ impl

* fixes the button-light-up time (#1597)

* fixes up merging flaws

* Update2108release

* fixes (#1599)

* keep master for ci pipeline

* remove the Resources filter from CalcViewModel project

* removes `that` since `this` can be captured automatically

* AppxBundlePlatforms

* StampAssemblyInfo

* removes PreferredToolArchitecture

* Change the arg AppVersion into Version

* Change the arg AppVersion into Version

* from Calculator.rc to AssemblyInfo.cs

* Adds assembly-info

Co-authored-by: hanzhang54 <zhangh@microsoft.com>
Co-authored-by: Matt Cooley <macool@microsoft.com>
Co-authored-by: N <71219152+PokeCodec@users.noreply.github.com>
Co-authored-by: Quentin Al-Timimi <27322516+quentin987@users.noreply.github.com>
Co-authored-by: Wei (Waley) Zhang <waley.zhang@microsoft.com>
Co-authored-by: Tian L <60599517+MSFT-Tilia@users.noreply.github.com>
Co-authored-by: Michał Janiszewski <janisozaur@users.noreply.github.com>
Co-authored-by: Dave Grochocki <grochocki@users.noreply.github.com>
2021-07-15 17:12:38 +08:00
Michał Janiszewski
f30e9494ce
Clang-format most of the sources (#1467) 2021-05-10 10:18:39 -07:00
Stephanie Anderl
96c1a45774
Revert "Updated the Calculator projects to include the /Z7 compiler flag" (#1356)
* Revert "Updated the Calculator projects to include the /Z7 compiler flag (#1337)"

This reverts commit 6299ec2303.

* Update Calculator.vcxproj

Add  %(AdditionalOptions) where it is missing

* Update TraceLogging.vcxproj

Updated the AdditionalOptions to add /await /std:c++17 /utf-8  so this project is consistent with the other projects.
2020-08-25 09:31:40 -07:00
Stephanie Anderl
6299ec2303
Updated the Calculator projects to include the /Z7 compiler flag (#1337)
* Added the /Z7 compiler flag

* added /Z7 compiler flag to remaining calculator projects

* Add %(AdditionalOptions) to complier configuration where it is missing
2020-08-11 15:39:32 -07:00
Quentin Al-Timimi
0175b51655
Updated APIs to use new GetClosePointData() from Graphing Engine. (#1250)
* Updated APIs to use new GetClosePointData() from Graphing Engine. Now specifiying precision on API consumption to aid with correct display and rounding.

* Updated function to be const-corect

* Updated to use correct APIs

* Converted TraceValue from Point to two doubles, point's X and Y was using float and conversion between float and doubles was causing unwanted rounding.

* Update to pch file and fixing typo

* Point to updated graphing version
2020-06-30 15:08:54 -07:00
Stephanie Anderl
76e33ef159
Updates ResetGrid to account for when equations are added during Manual Adjustment mode (#1231)
* updated the reset grid logic to track and set the initial range after an equation is added

* When in manual adjustment mode and an equation is added, replot the graph when reset is called

* remove members that are no longer needed

* Added logic to include the PrepareGraph() and removed re-graphing in the ResetGrid method

* skip SetDisplayRanges if TryInitialize returns a nullopt so there is no crash

* Updated the logic to handle the case where the range is updated via settings

* Fix bug with reset view hyperlink

* Updated the logic for graph settings updating the graph range

* Rebased with the latest, fixed issues with the rebase

 Author:    Stephanie Anderl <46726333+sanderl@users.noreply.github.com>

* Update the internals version of calculator to the latest so that the PrepareGraph API available
2020-06-17 12:30:19 -07:00
Stephanie Anderl
cf735bbcf5
Dark Theme For Graph Control (#1106)
* Added dark them to graph control, started dark theme for the controls on the graph

* Dark theme for graphing mode updated to use event model, diagnostics added, cleaned up code that wasn't needed

* Updated prepare-release-internalonly.yaml internal package version

* Updated Theme Settings properties, removed version change, other small changes from PR feedback>

* Updated the localSettings check and updated the GraphTheme event to send bool instead of string

* Updated the equation line color to change with the graph theme

* Rebased onto master and issues created during the rebase

* Updates per code review feedback

* Update settings properties to just have IsMatchAppTheme property and updated the high contrast settings for the graph control

* Match version to current in master

* Updated per PR feedback

* Fix resetting the m_lastLineColorIndex to only happen when reassignColors is true

* Changed second if to else if in the OnPropertyChanged method

* fixed control button and equation line colors
2020-03-27 17:20:35 -07:00
Pepe Rivera
fc19ddcbcb
Improve error handling by displaying an error message (#1075)
* wire up error messages

* more errors

* fix crash on render error

* Always show copy and cut

* PR comments

* Fix spelling
2020-03-25 15:18:34 -07:00
Pepe Rivera
f1d53fba61
Support other locales for decimal and list separators (#1060)
* Support other locales for decimal and list seperators

* PR fixes
2020-03-04 15:15:18 -08:00
Pepe Rivera
724d12b762
Update mocks (#967) 2020-02-06 15:15:28 -08:00
Pepe Rivera
9329af37f1 Fix crash when setting graph options to very large numbers (#904)
* fix crash

* Fixes

* Update build/pipelines/templates/build-app-internal.yaml

Co-Authored-By: Stephanie Anderl <46726333+sanderl@users.noreply.github.com>

Co-authored-by: Stephanie Anderl <46726333+sanderl@users.noreply.github.com>
2020-01-08 15:06:26 -08:00
Rudy Huyn
8357f5d5c5
Add Graph Settings (#879) 2020-01-03 15:06:14 -08:00
Stephanie Anderl
f593c621aa
Update GraphingCalculator Projects to allow official builds (#852)
* renamed MockGraphingImpl to GraphingImpl, updated the nuget.config to include the WindowsApps feed

* Revert nuget.config change

* Updated vcxproj files to output to the same directory regardless of configuration

* Removed outder used GenerateProjectSpecificOutputfolder instead

* revert commenting out the temporary.pfx cert in the calculator.vcxproj file
2019-12-10 16:15:49 -08:00