Commit Graph

383 Commits

Author SHA1 Message Date
Howard Wolosky
a0e2dacd98 Updating all icons/images to latest version of the "developer build" icons
All Calculator app iconography uses the "developer version" icon from Design,
to help differentiate a developer build of Calculator from the official version.

Assets have been run through the image compression tools to ensure all unnecessary
metadata has been removed.
2019-03-04 12:30:30 -08:00
Stephanie Anderl
321672995d
Update Rates Hyperlink changed to a HyperlinkButton (#29)
* update currency hyperlink changed to a hyperlink button

* added bug report and feature request issue tempaltes

* copied pull_request_template.md to .github folder

* update currency hyperlink changed to a hyperlink button

* Updated hyperlink button to move text that should not be linked outside the hyperlink button

* Updated hyperlink button to move CurrencySecondaryStatus text out of the hyperlinkbutton control.

* Updated the HyperlinkButton to set the content without using a TextBlock and fixed the AutomationTree issue where the HyperlinkButton wasn't being seen
2019-03-01 13:11:05 -08:00
Lance McCarthy
060139f493 Readability Improvements to Calculator.xaml (#85)
* Calculator.xaml - Simple Readability Adjustments

Improved readability of the XAML document by inserting newline where they were missing and removed rextra newlines from others.

* Added comments and organized resources for superior readability

Using comments and grouping DataTemplates, Styles and other resources significantly increases the readability and discovery of resources.
2019-03-01 11:40:02 -08:00
Daniel Belcher
dd79d6fcd3 Move the CalculatorManager instance to be direct member data of the StandardCalculatorViewModel class.
Previously, the CalculatorManager was managed with a unique_ptr that was instantiated in the ViewModel's constructor and was never re-assigned.  Objects with long lifetime and larger memory footprint should live in dynamic memory, but the ViewModel itself lives in dynamic memory so that goal is still satisfied by storing the CalculatorManager directly in the class. The change allows the compiler to write a more efficient memory footprint for the same data.

- Verified by testing basic app functionality and running unit tests locally.
2019-02-28 16:26:19 -08:00
Matt Cooley
28f982a6e1
Apply spell check (#41) 2019-02-26 20:41:04 -08:00
Matt Cooley
654f09f544
Fix spelling in some comments (#38) 2019-02-25 15:41:16 -08:00
Josh Koon
ddc470949c
Rename scimath.h/cpp to RationalMath.h/cpp (#36) 2019-02-25 14:04:38 -08:00
Josh Koon
0cb5e9bae0
CalcEngine: Manage precision internally to Rational and convert functions to operator overrides (#35)
* Convert Rational::Negate to an operator override
* Convert Rational::Add to + and += operator overrides.
* Convert Rational::Sub to - and -= operator overrides.
* Convert Rational::Div and ::Mul to use /, /=, *, *= operator overrides.
* Convert Rational::Mod to use %= and % operator overrides
* Convert Rational::Rsh and ::Lsh to use >>=, >>, <<=, << operator overrides
* Convert Rational::And, ::Or, ::Xor to use &=, &, |=, |, ^=, ^ operator overrides
* Convert Rational relational functions to operator overrides
* Remove unnecessary precision arguments from Rational class and remove use of explicit Rational constructors in favor of implicit conversions for value types
* Remove unnecessary precision variable from RationalMath operations
* Replace unnecessary Rational::Not with Xor operation
* Remove unnecessary Rational::IsZero() in favor of == 0 comparisons
* Fix rounding issues in ratpak that result from using large precisions.
* Move assignment stmt out of IsCurrentTooBigForTrig
2019-02-25 11:41:32 -08:00
Josh Koon
73372283a0
CalcEngine: Remove the need to specify base/radix when working with Rational values (#31)
- Separates values from the representation (base/radix) of those values.
- Uses a single base for all values represented as Rationals.
- Rationals are converted to/from a specific base when they are converted to/from strings.
2019-02-22 10:00:19 -08:00
Josh Koon
5a530c4bed
Change m_nPrecNum from int to size_t and rename to m_precedenceOpCount (#33) 2019-02-21 16:36:54 -08:00
Josh Koon
32fb8500cb
Fix Log10 function (#27) 2019-02-21 10:50:32 -08:00
Josh Koon
2e18f6f477
Move RADIX_TYPE enum into its own header (#25)
This change moves the RADIX_TYPE enum into its own header. This resolves a compilation error and reduces the dependency graph by allowing RadixToStringConverter to include just the enum header rather than the entire CalcEngine header.

Change verified by ensuring Calculator build locally.
2019-02-20 11:07:32 -08:00
Josh Koon
995f077127
CalcEngine: Convert NumObj* functions to use Rationals and move under CalcEngine::RationalMath namespace (#12)
* Converts NumObj* functions to use Rationals. Places new functions under CalcEngine::RationalMath namespace
* Moves functions that correspond to an operator to the Rational class with intent to convert to operators in the future
* Consolidates use of RatPack's NUMBER and RAT data types to Number/Rational classes and RationalMath namespace.
2019-02-19 07:46:17 -08:00
Daniel Belcher
f210290ddc - Avoid referencing project headers from precompiled headers.
Before this change, the pchs for CalcViewModel and Calculator project referenced project headers.  If those project headers (or any of their dependencies) were to change, then the pch would be recompiled, slowing local build times.

  By removing references to project headers, the pch will be compiled once and is resilient to changes in the project.  Now that project headers are explicit about their dependencies, when there is a change to a project header only the translation units referencing the modified header will need to be rebuilt.

- Manually tested by ensuring Calculator project builds locally.

@Microsoft/calculator-team
2019-02-14 18:20:25 -08:00
Pepe Rivera
362b4f9d1e
Merge pull request #16 from joseartrivera/joriv/OnLaunchSize
Resize app to appropriate dimensions on first launch
2019-02-13 09:56:01 -08:00
Matt Cooley
2ab114a71f
Update WinUI to 2.0.181018004 (#18)
Update the Microsoft.UI.Xaml NuGet package to a new version. The ARM64 framework package in 2.0.181018003.1 had entries missing from its manifest, so the classes in the package couldn't be activated.
2019-02-13 09:44:02 -08:00
Pepe Rivera
531a8a1b7b Use TryResizeView to resize calc on first launch 2019-02-12 13:50:09 -08:00
Stephanie Anderl
cb8775926a
Merge pull request #13 from Microsoft/sanderl/JapaneseEra
Date Calculation: Updated AdjustCalendarDate() to ensure we always add 365 when adding 1 year for Japanese calendar
2019-02-08 15:51:28 -08:00
Stephanie Anderl
2fc8196104 Moved all the Japanese Era logic inside the Year case of the switch statement 2019-02-08 15:42:28 -08:00
Stephanie Anderl
1bd4f1870c Updated calendar strings to use the CalendarIdentifiers object 2019-02-08 15:33:00 -08:00
Stephanie Anderl
f8029942d4 Updated the AdjustCalendarDate() to account for the transition year quirk in the Japanese calendar. 2019-02-08 12:30:16 -08:00
Matt Cooley
a2739b8de2
Don't send AppLifecycle telemetry unless SEND_TELEMETRY is defined (#10)
The app currently logs diagnostic events to ETW in various places. If we add certain flags to those events, the data is eligible to be sent as telemetry. (Whether it actually gets sent is controlled outside of Calculator--for example, there are lots of checks at the system level to ensure privacy settings are honored.)

Currently we set the "eligible for telemetry" flags only in official builds, so no telemetry gets uploaded while the app is in development. We already have this set up for the main TraceLogging provider, but we also need to do this for the AppLifecycle performance logging.
2019-02-04 12:06:02 -08:00
Matt Cooley
ac63c1e1c2
Remove calcmanager ref (#9)
Calculator (the main app project) depends on CalcManager, but only transitively: Calculator -> CalcViewModel -> CalcManager.

However, Calculator's project file currently has a direct dependency on CalcManager. Let's remove this to make it harder to accidentally introduce new dependencies between the layers.

Also cleaning up some commented-out directives in the CalcManager MSBuild file.
2019-02-04 11:53:02 -08:00
Matt Cooley
177a606012
Clean up project structure in Visual Studio (#8)
A few small changes to improve the view of the code in Solution Explorer:
* Delete folders from solution explorer which don't appear on disk (Resource Files, PerfTrack)
* Delete files on disk which aren't compiled into the project (Type.xaml)
* Rename CalculatorHistory.Cpp to CalculatorHistory.cpp, for consistency with other files
2019-02-04 11:52:28 -08:00
Matt Cooley
4cadfb204d
Remove unused PLM code (#7)
Remove LayoutAwarePage, SuspensionManager, and other suspend-resume handling code. SuspensionManager::SaveAsync and related methods weren't actually called anywhere. I didn't attempt to remove the serialize/deserialize code at the ViewModel layer, although much of that is likely not needed either.

We may decide we want to persist more state through a suspend-terminate-resume cycle (as the app might have done a long time ago). But if we decide we want that, we should not use a persistence mechanism that's closely coupled to frame navigation.
2019-02-01 15:15:48 -08:00
Matt Cooley
8df88c7106
Fix file path in CalculatorUnitTests.vcxproj.filters (#6) 2019-01-31 13:05:10 -08:00
Matt Cooley
278a1e714e
Remove MSBuild directives which were used only in the internal build system (#5)
Remove some properties which were only used when XefOutputRoot was set in the previous internal-only build environment.
2019-01-29 19:39:20 -08:00
Matt Cooley
1c7187f632
Clean up unit test projects (#4)
* Rename CalculatorUnitTests_VS to CalculatorUnitTests, fix gitignore

* Delete internal unit tests

* Update pipeline paths
2019-01-29 19:37:37 -08:00
Josh Koon
ebfce5a8cd Remove empty COpndCommand destructor. Cleanup constructor declaration. 2019-01-29 14:28:03 -08:00
Josh Koon
b70a12c6cf Add clarifying comment to call to CHistoryCollector::AddOpndToHistory 2019-01-29 14:27:24 -08:00
Josh Koon
db4a6eb9ea Return to initialization pattern in ExpressionCommand 2019-01-28 19:34:36 -08:00
Josh Koon
4883fab7f7 Convert ExpressionCommand and History collector to use Rational instead of PRAT 2019-01-28 19:14:15 -08:00
Howard Wolosky
c13b8a099e Hello GitHub 2019-01-28 16:24:37 -08:00