* 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> |
||
---|---|---|
.github | ||
build | ||
docs | ||
src | ||
Tools | ||
.clang-format | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
NOTICE.txt | ||
nuget.config | ||
README.md | ||
SECURITY.md |
Calculator
The Windows Calculator app is a modern Windows app written in C++ that ships pre-installed with Windows. The app provides standard, scientific, and programmer calculator functionality, as well as a set of converters between various units of measurement and currencies.
Calculator ships regularly with new features and bug fixes. You can get the latest version of Calculator in the Microsoft Store.
Features
- Standard Calculator functionality which offers basic operations and evaluates commands immediately as they are entered.
- Scientific Calculator functionality which offers expanded operations and evaluates commands using order of operations.
- Programmer Calculator functionality which offers common mathematical operations for developers including conversion between common bases.
- Date Calculation functionality which offers the difference between two dates, as well as the ability to add/subtract years, months and/or days to/from a given input date.
- Calculation history and memory capabilities.
- Conversion between many units of measurement.
- Currency conversion based on data retrieved from Bing.
- Infinite precision for basic arithmetic operations (addition, subtraction, multiplication, division) so that calculations never lose precision.
Getting started
Prerequisites:
-
Your computer must be running Windows 10, version 1803 or newer.
-
Install the latest version of Visual Studio (the free community edition is sufficient).
- Install the "Universal Windows Platform Development" workload.
- Install the optional "C++ Universal Windows Platform tools" component.
- Install the latest Windows 10 SDK.
-
Install the XAML Styler Visual Studio extension.
-
Get the code:
git clone https://github.com/Microsoft/calculator.git
-
Open src\Calculator.sln in Visual Studio to build and run the Calculator app.
-
For a general description of the Calculator project architecture see ApplicationArchitecture.md.
-
To run the UI Tests, you need to make sure that Windows Application Driver (WinAppDriver) is installed.
Contributing
Want to contribute? The team encourages community feedback and contributions. Please follow our contributing guidelines.
If Calculator is not working properly, please file a report in the Feedback Hub. We also welcome issues submitted on GitHub.
Roadmap
For information regarding Windows Calculator plans and release schedule, please see the Windows Calculator Roadmap.
Graphing Mode
Adding graphing calculator functionality is on the project roadmap and we hope that this project can create a great end-user experience around graphing. To that end, the UI from the official in-box Windows Calculator is currently part of this repository, although the proprietary Microsoft-built graphing engine, which also drives graphing in Microsoft Mathematics and OneNote, is not. Community members can still be involved in the creation of the UI, however developer builds will not have graphing functionality due to the use of a mock implementation of the engine built on top of a common graphing API.
Diagnostic Data
This project collects usage data and sends it to Microsoft to help improve our products and services.
Read our privacy statement to learn more.
Diagnostic data is disabled in development builds by default, and can be enabled with the SEND_DIAGNOSTICS
build flag.
Currency Converter
Windows Calculator includes a currency converter feature that uses mock data in developer builds. The data that Microsoft uses for the currency converter feature (e.g., in the retail version of the application) is not licensed for your use. The mock data will be clearly identifiable as it references planets instead of countries, and remains static regardless of selected inputs.
Reporting Security Issues
Please refer to SECURITY.md.
License
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.