* 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
* Plumebd with data transfer
* Getting mainpage to talk to getbitmap. moving share callbacks from mainpage to graphingcalculator
* Trying to get bitmap from renderer.
* work
* Share worked
* cleanups
* Cleanups progressing
* Share working, need loc for title string and user notification incase of a failure. Then add the equations key.
* More cleanup, now using share icon image and resources for strings. Still need to do the graph equation key.
* Change share to html based start.
* Key working, with UL but going to try changing to table.
* Fix a html formating error, generating a new UL for each equation.
* Switched over to a table for equation key and have color block formating
* Updates from PR feedback, using Graphing::IBitmap abstraction.
* Update src/Calculator/Views/GraphingCalculator/GraphingCalculator.xaml.h
Fixed
Co-Authored-By: Pepe Rivera <joseartrivera@gmail.com>
* PR Updates.
* Add variables to the graph key.
* PR Updates.
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
* precisely calculates the number of digits of the source and compute the number of significant digits of the result based on that.
* fix unit test
* Fix warning C4267
* Optimize how we calculate the number of digits in the integer part and don't trim the value when used by the currency converter
* modify GetNumberSignificantDigits
* fix CI error
* Access to wstring::npos from static calls
* Move UnitConverter static methods related to number to NumberFormattingUtils
* rename namespace
* Add comment and fix typo
* Move standard headers
Calculator's build number in release builds follows the pattern 10.{YYMM}.{build}.0. We use the build number in lots of places, including the app binaries, the app package version, and the app bundle version. Before Calculator moved to GitHub, the app bundle version was generated using a date-based formula which produced versions like "2019.105.612.0". This means that the bundles generated from GitHub have a lower version than previous bundles. This appears to cause some issues during device reset.
This change sets the app bundle major version number to "2020" to ensure that newly-produced appxbundles have higher versions than legacy bundles. The remaining parts of the bundle version number will match the build number for easy reference.
Also updating the MakeAppx version used in bundle creation to 18362.
Having an extra integer variable to hold onto an i or i-1 value is inefficient, for "if (m_token.at(i) != chZero)", the code under "fDigitsFound" will always run, so it makes sense to put the fDigitsFound code under the if statement, which can return from the function entirely instead of breaking.
### How changes were validated:
- Manual Testing verified the code having identical behavior as before, with no side effects.
* Display date difference in days if can't display in days/weeks/months/...
* add comments
* remove not used variable totalDaysDiff
* improve UpdateDisplayResult
* Display error message when the calculator can't calculate the difference between 2 dates
Simplifies the layout of `ConverterNumPad` to match that
seen of `NumpadPanel` in Calculator.xaml by using the same
static margin and removing the use of columns that had been used
for dynamic margins.
Fixes#87
Fixes#462
- Add x64 and x86 UI tests to the release builds (internal builds for the store)
- UI tests now accept the target app ID as a parameter in the runsettings file
- Added the CalculatorUIFramework to handle the WinAppDriver logic.
- Added Standard Mode smoke tests and BVTs to the CalculatorUITests project.
- Removed old UI tests that did not use the CalculatorUIFramework
The incrementally calling `Window::Globalization::Calendar::AddMonths`
resulted in a negative value for `GetDifferenceInDays` which was then
assigned to an unsigned variable `daysDiff`.
One example of the issue when running the calculator in UTC+2 was the
difference between July 31st and December 30th.
The initial guess was 4 months which then landed on November 30th.
This date was stored and then in the loop incremeted by one month.
This then landed precisely on the end date December 30th.
After the loop the final value is then used July 31st + 5 months
which results in the 31st of December.
The resulting difference of -1 days is then assigned to the unsigned
value `daysDiff`.
This commit makes the minimal changes to remedy this bug.
It makes sure to only ever call `AddMonths` with the same starting date
instead of incrementally to different dates.
fixes#552
* Bound the calendar picker to the control above
* collapsed textbox and added headertext to the calendar picker element
* collpased textbox from both To and From calendar picker used headertext instead
* localized strings for the new headers added for the calendar date pickers
* modified the resoruces file so as to localize the strings
* remapped the grid components after the removal of the text Block
* restored original spacing between components
`mulnum` et al. are declared `extern` in `ratpak.h`, which conflicts
with the `__inline` used with them. Additionally, most similar functions
don't have such keyword applied to them.