* Fix the result in wrong number base while leaving and switching back to Programmer
* Rename ResetDisplay() to ResetRadix()
* Update related unit test
* Fixed the decimal number with point in programmer memory
* 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>
## Fixes a bug caused by https://github.com/microsoft/calculator/pull/1426#.
### Description of the changes:
- 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`.
### How changes were validated:
- Manual testing
* Use different formatter for different currency
* Add functional tests for currency fraction digit format
* Revert "Add functional tests for currency fraction digit format"
This reverts commit bd8aab33847425f4dcfd0d76ce310c918729b2fd.
* Add TestCurrencyFormattingLogic in UnitConverterViewModelUnitTests
* Fix InitializeMultipleConverterTest
* Add comment for a line of code
* Add default case for switch in ConvertToLocalizedString
* Remove trailing decimal
Disable decimal input if maxFractionDigits is 0
Fix input may be blocked after switched active
* Fix: UpdateIsDecimalEnabled should do nothing for non-currency converter
* Remove unnecessary SetValue method
* Add a comment
* Add functional UI Tests for currency converter
Reset currency before tests
Fix: input is blocked after switching to currency with less fractional digits
* Set Priority=0 for currency format related tests
* Truncate digits in display value after switcing
To fix incorrect result after switching currency with less fractional digits
* Fixes issue #1409
Copy pasting into Currency locks the editor.
Skipping the validation of full editor lock when backspace or clear button is clicked.
* Adding code review feedback.
* Adding code review feedback.
When the unit converter's category is changed, the corresponding property setter for the CurrentCategory variable mistakenly calls OnPropertyChanged("CurrentCategory") instead of RaisePropertyChanged("CurrentCategory"). This results in a failure to notify XAML that the CurrentCategory variable has changed, resulting in the corresponding UI to not be updated accordingly.
* Updated the CanFunctionAnalysisBePerformed api to use the updated one with variableIsNotX error handling. Updated the UI to reflect the new descriptive error case to show an informative error.
* Fixed spacing and updated the moved the variableIsNotX check up into the parent if statement
* Update the internals version to match the version needed to support this change
* Take the high boundary of signed negative values into account
* UI unit tests for the Copy/Paste menu are added
* Additional corner case for the number notations without negative values
* 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.
The programmer radix buttons were being disabled when the bit flip panel was selected, causing keyboard events to be ignored.
They should actually only be hidden in bit flip mode.
- Corrected programmer radix buttons to continue being enabled just hidden when the programmer calculator is in bit flip mode.
- Renamed AreProgrammerRadixOperatorsEnabled property to the more appropriate AreProgrammerRadixOperatorsVisible.
* Added the /Z7 compiler flag
* added /Z7 compiler flag to remaining calculator projects
* Add %(AdditionalOptions) to complier configuration where it is missing
* fixed the trig units radio buttons rounded corners and narrator issues in kgf and graph reset
* removed extra whitespace
* Update src/Calculator/Resources/en-US/Resources.resw
Co-authored-by: Eric Wong <eriwong@microsoft.com>
* Update src/Calculator/Resources/en-US/Resources.resw
Co-authored-by: Eric Wong <eriwong@microsoft.com>
Co-authored-by: Eric Wong <eriwong@microsoft.com>
* Fixed contrast between background and foreground colors in the equation button. Fixed the issue where the text in the equation text box is white when the background is white
* Adjust the foreground color algorithm
* moved the contrast method to utils so that it is resuable
* Moved brushes for the GetContrastColor method to the app.xaml resource dictionary
* Removed the change for the edit box colors, so it can be in a different PR
* Maximize window during setup, and added divide by zero error test
* Added Error_CubedNegativeNumber test and AOT buttons
* Made Added AoT Tests and test are faster
* Hotkey and Mouse Input BVT Test added, Memory Test started
* Started Aligning BVTs with manual tests. Added TC23466694, TC17416429, and TC17416884, and a test to switching mode test
* Basic Scientific Mode Functional Test Tests
* Added history panel test, and history flyout test for Standard calculator, and added the supporting framework
* Added some functional tests for Scientific mode.
* Basic Scientific Mode functional tests, added solution to set Angle Operator button correctly.
* Created functions to resize the app to display history panel, to display history button, display memory panel, and memory button. Then I applied them to reduce areas with rewritten code, and to help with over all test stability and speed.
* I added the trigonometry functional tests
* Pull from latetest master, and retargeted solution
* Added a GetCalculatorWindowPostion function, when resizing window to show history/memory label, set window position to (0,0), and the same when resizing KOT calculator. This will make tests more stable by keeping calculator on screen. It will also help with any testing that may require tracking the apps postion. To fix a test failure, changed function from ResizeToDiplayHistoryButton to ResizeToNotDisplayHistoryLabel.
* Sorted Using Statements, modified .gitignore to ignore **src/out, etc...
* Merged CalcMemoryFlyout into MemoryPanel, and deleted CalcMemoryFlyout. Merged CalcHistoryFlyout in HistoryPanel, and deleted CalcMemory. Created GlobalCalculatorUI.cs. Updated tests to work with these changes.
* hold on to changes
* Changed all KOT to Aot,
Removed equal button click in Test Cleanup/History method uses page source,
Removed extra line in Calculator.vcxproj.filters, Removed Try/Catch in the ClearHistory method
* Removed unused elses
Added CalculatorResults class
Added StandardAoTCalculatorPage
Removed manual test case info in the comments
* - In test framework, where it worked,
made some elements private
- Created EnsureCalculatorHasFocus() in GlobalCalculatorUI.cs
- Due to new classes, moved some methods to more correct classes
- Moved "page.MemoryPanel.ResizeWindowToDiplayMemoryLabel();" from
SetupCalculatorSession() to ClassInitialize()
* Sorted Using
* Updating fork from latest master
* Don't stand so
* Minor edits, fixing things from PR comments
* Merging scientific and standard mode tests, minor merge conflict fixes
* Method work
- Created ResizeAoTWindowToDiplayInvertButton()
- Applied to test method AoT_ErrorMessage()
- Added page.ScientificOperators.ResetFEButton(fEButtonState.Normal);
to TestIniT in ScientificModeFunctionalTests
- Fixed if statement in public void ResetFEButton(fEButtonState value)
* Added StandardOperatorsPanel and removed duplicated code
* Created tests for Programmer mode, fixed a typo that appeared in multiple locations
* Fixed clear entry not working in Scientific test
* This time I really fixed the problem with clear memory not being found every time
* Revert shared changes
* Rebased onto master and resolved conflicts
* Fixed the 15 second delay on every scientific mode test
* Greatly shortened bitflipkeypad test
Co-authored-by: Crystal Edwards (Insight Global Inc) <v-credwa@microsoft.com>
Co-authored-by: Crystal Edwards <45952655+v-credwa@users.noreply.github.com>
* Update icon file
* function analysis and negate button icons updated
* Replace zoom reset button with graph view button
* Fixed issue where the window settings did not update after panning/zooming
* Updated icon styling and added logic for updating the graph view button state when user manipulates the graph and when all equations are removed
* updated LogGraphButton clicked to have an enum for the button value instead of a string
* Updated the logic for how to set the IsManualAdjustment, ensured graphsettings now update IsManualAdjustment when changed
* Missing EquationInputArea and KGF Automation Names added
* Updated the KGF back button automation name and tooltip and added the automation name string for the KGF equation edit box
* Reverted the removal of x:names and updated Variable Step Textbox to Variable Step Value Textbox per PR feedback
* Updated the VariableListViewItem narrator announcement to include the name of the variable
* Fix#851: inconsistent operand order for log_y(x)
- fixed the bug in scioper.cpp
- changed the related test in CalculatorUnitTests
- also changed the text in GraphingNumpad
* Change the name of LogBaseX for consistency
basically every occurence is repalced by logbasey, except
for the localized string for narrator, which I left for
the localization team to fix.
* Fix the test
* Revert GraphingNumPad.cpp
* Fixup according to review
* 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
* Add telemetry for keyboard button usage in graphing mode
* Added the diagnostics for EquationAdded and FunctionAnalysis
* Added remaining diagnostics events for graphing calculator
* Fix proj files to include the IsStoreBuild condition. Move the Delayer class to the Calculator/Utils folder
* Ensure the variable textbox has focus before logging diagnostics
* Move maxVariableCount check into the tracelogger class
* Created enums and updated the slider value changed method to remove the variable from the map after the log method is called
* Re-enable hidden lines when the expression is updated
* Fixed extra line in grapher.h and removed the conditional logging for variable count
* Updated logging per PR feedback
* Updated variable logging and fixed issues in the IsEquationLineDisabled binding the EditTextBox control.
* Update per PR feedback
* Added TraceLogging project to contain shared logging logic.
* Updated TraceLogging project and updated tracelogger classes to use the TraceLogging project methods
* Updated VariableLogging to log variable name. And updated per PR comments
* Updated Variables logging to log count changed instead of variable added and fixed issue with variableSliders not being initialized
* Remove outdated tracelogging call caused by rebase
* Updated Delayer class to DispatcherTimerDelayer and fixed some small formatting issues
* Fixed missing Dalyer class name updates
* Removed extra line in traceloger.h