* 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.
The CalculatorUITestFramework project does not need Microsoft.NET.Test.Sdk or MSTest.TestAdapter. These dependencies are needed only in the project which produces the actual test assembly (in our case, the CalculatorUITests project).
Removing these resolves a build warning, since the test adapter package does not target .NET Standard.
There were two issues:
* The indentation for the PowerShell script task was off,
causing a parsing error
* The flighting task needed to be named so that the Aero
task would be able to reference its output variable.
Updating the release pipeline to use the newer StoreBroker v2 tasks
for automated deployment to the Store.
Must rev the version of the internals package in order to get the
latest version of the PDP files and config file.
* Added new dev app icons
* Removed VS added page include in calculator.vcsxproj.filters and increased the internal version number and the app version number
Now that the RaiseNotificationEvent API is available on all platforms where the Calculator app runs, we can remove the factory classes which switched between RaiseNotificationEvent and an alternative implementation based on live regions.
Adds a Copy button to the context menu for history menu items located above the delete button in the menu. Copy only copies the result and not the entire content of the history item (equation and result).
Fixes#429
* Make sure TitleBar takes into account the AOT mode change
* remove namespaces in cpp files
* code linting
* use macro for IsAlwaysOnTop and make IsAlwaysOnTop/DisplayNormalAlwaysOnTopOption read-only
* Fix FontWeight
Move back the VisualStateManager node to the root XAML element to fix visual states of the titlebar.
### How changes were validated:
- Manually
Fixes#631
Commit 0722781fc updated the app to use `DevAppName` for the
app's window title when it was a non-official build, based on
the state of `IsStoreBuild`.
Unfortunately, `IsStoreBuild` is a _project_ level variable defined in
[build-app-internal.yaml](0722781fc6/build/pipelines/templates/build-app-internal.yaml (L36)),
but not a _compile-time_ defined value.
To solve this, we are now defining `IS_STORE_BUILD` in
`Calculator.vcxproj` when `IsStoreBuild='True'`, the same way that
we set `SEND_DIAGNOSTICS` for official builds, and we'll change the
window title based on that new `#define`.
Using this new `#define` can lead us down a slippery slope. We need to
limit the amount of divergent code that we have between dev/official
builds. This should be hopefully one of very few instances where
this value is ever used.
- Our documentation should make it clear to contributors what the expected developer
environment is in order for the project to work. In this case, a user tried to run the UI
tests, unaware that they needed WinAppDriver installed on their machine. This updates
the README to indicate that requirement.
- Trailing spaces from other parts of the document were also removed as part of this change
Fixes#621
* Currency rate: Compute how many decimals we need to display two meaningful digits at minimum
* formatting
* nit
* Increase the number of meaningfull digits (2->4)
* Revert "Increase the number of meaningfull digits (2->4)"
This reverts commit 9ad93e0d591a386e3e229e09b39a58158d544069.
* Rename constants
* modify FORMATTER_RATE_* values
* format CurrencyConverterUnitTests.cpp
### 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.
* Fixed the WindowIdLog so that it is updated when a new WindowCreated event is fired
* Updated the windowidlog check in LogWindowCreated to use IsWindowIdInLog