* 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
* 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.
* Added the /Z7 compiler flag
* added /Z7 compiler flag to remaining calculator projects
* Add %(AdditionalOptions) to complier configuration where it is missing
* 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
* 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
* Added IGraphAnalyzer
* Key Graph Features called and getting returned to the client. To do put all strings into the Equation object
* Updated UpdateKeyGraphFeatures to add function analysis data to all properties in Equation object
* Update KGF when variables are updated
* Key graph features ui started
* Added MathRichEditBox and started hooking up key graph features to the UI
* Updated EquationViewModel to include parity and periodicity
* Updated key graph features to update the EquationViewModel
* updated key graph features to display more values
* Key graph features populating uing MathRichEdit mode
* moved KeyGraphFeatures control to GraphingCalculator.xaml
* Use MathML formatting instead of MathRichEdit for strings passed back from the engine
* cleaned up project targeting and equation.h comments
* Updated equation edit box to populate for KeyGraphFeatures
* Fixed vcxproj files to have the correct targeting and certificates. KGF Title strings moved to x:Uid instead of the code behind
* Updated per PR feedback
* Update MathRichEditBox to detect if the string is a mathml string and use the appropriate set method to set the text
* fixed the issue where parity, periodicity and monotonicity could be set with an old value if the next one is empty
* KGF control UI adjustments and error handling
* Error control updates
* Error handling added when analysis fails
* fixed alignment on rich edit boxes
* Add monotonicity direction into the mathml string and only have 1 richeditbox
* Set hover state on KGF EquationEditBox to change button opacity and fixed spacing in Monotonicity RichEditBox
* remove sideload package certificate info VS added
* updated logic for setting error strings to be in the viewmodel
* Updated KeyGraphFeatures to populate dynamically using a ListView and TemplateSelector
* Update periodicity to not show if it isn't supported
* Fixed issue where y-intercept was using the x-intercept value
* Remove ItemsControl ItemsContainerStyle
* Updated per pr feedback. Fixed bug where analysis error would not reset
* Update MathRichEdit box to remove selection when focus is lost
* Updated mathrichedit to get LAF access for Dev, Release and Graphing projects
* Remove OnLostFocus in MathRichEdit, Change KGF ItemsControl back to ListView
* Clean up styles for KGF and ensure the match the comps
* Moved formatoptions logic to the Grapher constructor and reverted LineColor.Text resource that was mistakenly taken out
* Add copyright header to KGF Files
* fixed issue where asymptote values were not populating
* Disable KGF button when there is no equation. Fixed issue where equation populated in a new equationtextbox after the previous one was deleted
* Removed formatoptions testing lines used for debugging
* Replacing CalculatorVector usage with std::vector
Assumptions made here are that memory allocations
are not recoverable. If it can be proved that an index
will be in range, then the indexing operation is used.
If not (without manual checks) the std::vector::at function
is used to throw an exception in case of a programmer bug.
* Changes based on PR feedback
Using auto& in CalculatorCollector::UpdateHistoryExpression
so the token.first value is properly updated.
Using range for loop to GenerateExpressions.
Setting isEditable directly to the result of boolean expression.
Using token.second directly instead of creating a
separate tokenCommandIndex variable.
* Fixing issue with generating expressions strings.
A space should not be added before the first item.
### Description of the changes:
**1) Do not set units to default values if they already have valid values**
This fixes the actual issue. `UnitConverter::InitializeSelectedUnits()` ( this function resets all units to their default units if available for the current category ) gets called after `UnitConverterViewModel::RestoreUserPreferences()` ( this function restores user preferences ).
So Calculator has been restoring saved values, and then overriding the restored values with default values.
I modified `InitializeSelectedUnits()` so that we only initialize units only when they are not already set to valid units for the current category.
**2) Removed `m_isFirstTime`**
I noticed that we are calling `RestoreUserPreferences()` twice when Calculator starts up, and the function is restoring the same value both times
The below happens when Calculator starts up
1) On startup, in `UnitConverterViewModel::InitializeView()`, `RestoreUserPreferences()` is called.
2) `RestoreUserPreferences()` in turn triggers `OnUnitChanged()`
3) During the first call to `OnUnitChanged()`, m_IsFirstTime is `True`, so we call `RestoreUserPreferences()` again while also setting `m_IsFirstTime` to `False`.
4) `RestoreUserPreference()` again triggers `OnUnitChanged()`
5) During the second call to `OnUnitChanged()`, m_IsFirstTime is `False`, so we call `SaveUserPreferences()`
I think we should only call `SaveUserPreferences()` inside `OnUnitChanged()` since we already restored user preferences during view initialization. I can't really think of a reason to restore units after view has been initialized. This led me to just delete `m_isFirstTime`.
### How changes were validated:
Manually tested that units and the current category are properly selected when you quit and start Calculator.


## Fixes#445.