Commit Graph

566 Commits

Author SHA1 Message Date
Matt Cooley
f79a50d4e9
Fix sln file so it opens in Visual Studio 17.2 (#1833) 2022-05-16 19:01:55 -07:00
Tian L
1b03471c06
add a unit-test case (#1830) 2022-05-16 02:38:25 +08:00
Tian L
d070cbad64
fix crash: GetPolicyFromPathForUser (#1826) 2022-05-09 08:33:09 +08:00
Tian L
e9a974d1dd
fix a regression in keyboard manager (#1824) 2022-04-19 14:02:43 +08:00
Tian L
8e7ac87f01
NavCategory | Partial refactor and perf optimization (#1820)
* Partially refactor NavCategory

* Lazy load the states of GraphingMode Category

* code cleanup

* find_if to any_of

* remove Windows.System

* resolve warning WMC1507

* resolve comments

* fix indentations
2022-04-18 14:10:15 +08:00
hanzhang54
02a3c89ceb
Disable buttons when units are not loaded (#1805) 2022-03-14 14:34:11 +08:00
Tian L
72860fe494
Fixes a bug: currency converter never shows error message for service failures (#1799)
* check status before registering callback

* optimize the style for error msg
2022-02-18 21:57:24 +08:00
Matt Cooley
8870e55edd
Update localized strings 2022-02-15 (#1798) 2022-02-15 16:12:54 -08:00
Tim
04d91d6b87
Don't maximize Calculator's window on some small screen devices (#1791)
Added an AppExtension to Calculator so it no longer maximize by default on small screen device.
2022-02-11 12:14:36 -08:00
Matt Cooley
5326b8e646
Build with Visual Studio 2022 (#1793)
- Use Visual Studio 2022
- Use an Azure Pipelines image which has Visual Studio 2022 installed
- Use the v143 C++ build tools
- Use the Windows SDK version 22000
- Raise the minimum platform version to 17763
  - As a consequence of this change, we will use the "msix" file extension instead of "appx" for our packages
- Update UI tests from .NET Core 2.1 to .NET Core 3.1
2022-02-11 09:07:48 -08:00
wy-luke
5144871577
delete unuseful semicolon (#1783) 2022-02-07 11:12:07 -08:00
Matt Cooley
5a123eb840
Delete packages.config (#1781) 2022-01-24 17:35:23 -08:00
Matt Cooley
4ebacda62d
Update build year in settings page to 2022 (#1770) 2022-01-04 08:07:24 -08:00
hanzhang54
bf552ac9fb
Upgrade to WinUI 2.7 (#1766) 2021-12-22 14:53:42 +08:00
Michał Janiszewski
d428a768e0
Drop non-negative tests on unsigned values (#1729)
As some of the variables are of unsigned types, it makes no sense to
test them for non-negativeness, as this is enforced by type already.
2021-11-15 11:17:14 -08:00
Matt Cooley
01b563c0bb
Remove unnecessary metadata to reduce binary size (#1727) 2021-10-19 08:32:18 -07:00
Michał Janiszewski
82c4c9a227
Ensure element presence is checked prior to its use (#1715) 2021-10-19 11:14:04 +08:00
hanzhang54
51ef7e18bd
Update localized strings 2021-10-14 (#1721) 2021-10-14 14:25:58 +08:00
hanzhang54
605ed33225
Fix dropDown to dropdown (#1709) 2021-09-29 16:41:50 +08:00
Tian L
30d63d2dfe
fixes a UI test case: AoT_ButtonOnlyInStandard (#1702) 2021-09-27 10:14:20 +08:00
Matt Cooley
3432e4aed4
UI tests should use CI runsettings in internal CI builds (#1686)
After the change in #1682, the internal CI build uses the .Dev app identity. Use the runsettings for UI tests that has the .Dev app identity.
2021-09-16 15:10:57 -07:00
hanzhang54
951a555f17
Update resource value from title casing to sentence casing (#1687)
* Update resource value from title casing to sentence casing

* Update more resources
2021-09-10 15:31:20 +08:00
Matt Cooley
103ef92130
Make Calculator the default startup project (#1683)
Fix two issues with the solution file:
- List the "Calculator" project first, which causes Visual Studio to choose it as the startup project when the repo is first checked out. This makes it easier for people to get started coding in this repo.
- Don't nest the "CalcManager" project under the "Solution Items" folder.
2021-09-08 08:40:58 -07:00
Matt Cooley
251248ee7d
Add release appxmanifest (#1682)
Currently, the copy of Package.appxmanifest in this repo is overwritten with a copy from an internal repo during release builds. This change adds the release version of Package.appxmanifest to this repo, to make it easier to maintain and keep it in sync with the copy used during development.
2021-09-08 08:40:05 -07:00
Tian L
46497be75c
Fix for #1666- Back button is not accessible via keyboard when navigating to the about page. (#1679)
* initial changes

* margin

* format

* resolve review comments

* Popup Content Height
2021-09-03 16:10:17 +08:00
Tian L
83e3a46374
associate combox with its label 'Thickness' (#1663) 2021-08-30 10:30:10 +08:00
Ivan Panchenko
d566f37fc1
Fix mistakes (#1643) 2021-08-26 23:45:47 -07:00
Tian L
10ae9430a0
Simple fix for the omitted multiplication sign before a left parenthesis (#1661)
* simple fix for the omitted multiplication sign

* accepts unary-op-code
2021-08-26 10:58:36 +08:00
Kenny Guo
8797e37e73
Update WinUI to build 2.6.2 (#1660) 2021-08-23 13:57:22 +08:00
hanzhang54
ba3cee4366
Update localized strings 2021-08-20 (#1657) 2021-08-20 15:53:20 +08:00
hanzhang54
ce014908e2
Fix the result in wrong number base while leaving and switching back … (#1654)
* Fix the result in wrong number base while leaving and switching back to Programmer

* Rename ResetDisplay() to ResetRadix()

* Update related unit test

* Fixed the decimal number with point in programmer memory
2021-08-19 15:44:48 +08:00
Tian L
9ee446027b
reverts back the content that was deleted wrong. (#1641) 2021-08-10 10:57:08 +08:00
Tian L
850c5794bd
fixes up the name of dps (#1638) 2021-08-10 10:13:26 +08:00
hanzhang54
61985c1b8c
Fix title bar string trimming issue and right-to-left display issue (#1635) 2021-08-09 13:21:05 +08:00
hanzhang54
5179320c44
Fix the inconsistent behavior between narrator and keyboard focus (#1633) 2021-08-04 13:09:01 +08:00
oneonezhang
5d7a7a0468
Fix a UI test (#1631)
Co-authored-by: Yiyi Zhang <Yiyi.Zhang@microsoft.com>
2021-08-03 19:30:28 +08:00
oneonezhang
d54403c578
add automation name for history and memory list item (#1628)
* add automation name for history and memory list item

* fix UI tests

Co-authored-by: Yiyi Zhang <Yiyi.Zhang@microsoft.com>
2021-08-03 12:29:35 +08:00
Kenny Guo
8ebeaa6356
Improve narrator messages of Settings page and fix some styles (#1623)
* Improve narrator screen reader messages of Settings page

* Fix hyperlink styles in Settings page

* Fix hover background of navigation buttons in calendar view
2021-07-30 16:30:55 +08:00
Kenny Guo
2f05d7ebbc
Add accelerator for back button in titlebar (#1626)
Listen to the system back request to back to main page.
2021-07-30 15:49:22 +08:00
hanzhang54
a2b7dfa5a6
Update focus style (#1622)
* Update focus style

* Update style name
2021-07-29 17:42:10 +08:00
hanzhang54
e06355c9aa
Update to WinUI 2.6 (#1618)
* Update to WinUI 2.6

Co-authored-by: Han Zhang <zhangh@microsoft.com>
Co-authored-by: Kenny Guo <kennyguo@microsoft.com>

**Description of the changes:**
1. Update to WinUI 2.6 styles and controls #1606.
2. Add Mica Material #1611.
3. Add Settings page #596.
4. Fix Ctrl+E shortcuts in AoT mode #1590.

**How changes were validated:**
Passed build, UT/UI test and manually tested.

* Fixed the display issue in AOT mode (#1615)

* Fixed the display issue in AOT mode

* Get the OpenPaneLength from the resource

* Fix CalendarView style in DateCalculation of dark mode (#1616)

* Fix a style problem of Date Calculator, and clean some unused codes

* Remove some unused codes

* Disable Mica before close the window to resolve a crash (#1619)

* Bump internal package build number (#1621)
2021-07-27 17:35:16 +08:00
Huy Duong
830115633c
fixed titlebar (#1613)
Fixes titlebar text high contrast issue.
2021-07-20 18:04:34 -07:00
Tian L
fdae1000fc
Hello C# - Migrating the codebase from C++/CX to C# (Phase 1) (#1598)
* Hello C# - Going to an official feature branch (#1544)

* change CalcViewModel into a WindowsRuntimeComponent project (#5)

* change CalcViewModel into a WindowsRuntimeComponent project

* remove the old UI codebase (#6)

* initially migrated C# codebase by tian (#7)

* initial migrated C# codebase by tian

* format the codebase

* resolve comments

* undo: modifications on UI test project

* Remove the blocks that have more than 1 empty line.

* Register DP using keyword 'nameof'

* C# Migration: Initially migrated C# codebase by Han (#8)

* C# Migration: Initially migrated C# codebase by Han

* Resolved comments and misssing asset

* Added three files to Calculator project

* Added TODO comment and updated Object

* NavCategory: temporary resolution of the hang issue (#9)

* Updated CalcViewModel and missing files (#10)

* Updated CalcViewModel and WinMeta

* Added Calculator.rc

* Resolved comment for InitializeLocalizationSettings

* add: views/unitconverter.xaml (#11)

* add: views/unitconverter.xaml

* format the code

* remove the extra empty line

* add an empty line

* check null before invoking event handlers (#12)

* fix problems of the migration of OBSERVABLE_PROPERTY_RW (#13)

* fixes crash in MathRichEditBox.ctor() (#14)

* fixes crash in MathRichEditBox.ctor()

* typo

* Update azure-pipelines.ci.yaml for Azure Pipelines

* Added a link copy of CalcViewModel to temporarily pass Unit Tests (#16)

* Updated CalcViewModelCopyForUT configuration (#17)

* changes output path of the UI project to align with other projects (#15)

* fixes EETypeLoadException issue: export class DelegateCommand (#18)

* fixes EETypeLoadException issue: export class DelegateCommand

* weak-reference in C++/CX

* WeakRef in C# codebase

* UTF-8-BOM

* spaces in macro

* resolve some comments from the offline review

* format

* rename file

* fixes the memory list issue (#20)

* fixes a wrongly migrated property

* UTF-8-BOM

* fixes up the crash of type casting (#21)

* Update localized strings 2021-01-04 (#1458) (#23)

(cherry picked from commit cdcb95656d)

Co-authored-by: Matt Cooley <macool@microsoft.com>

* Fixup tests (#1429) (#24)

- Removed unneeded "ToString" calls
- Fixed typos
- Renamed "fEButtonState" to "FEButtonState"

(cherry picked from commit 66ad328d00)

Co-authored-by: N <71219152+PokeCodec@users.noreply.github.com>

* Update graph internal engine verseion (#1466) (#25)

(cherry picked from commit 0048dcb500)

Co-authored-by: Quentin Al-Timimi <27322516+quentin987@users.noreply.github.com>

* Turn off DFS file shares in internal build system (#1470) (#26)

(cherry picked from commit 885fa23a89)

Co-authored-by: Matt Cooley <macool@microsoft.com>

* Improve clarity of math expressions in history for Standard Calculator (feature #138) (#1453) (#27)

* Implemented feature & added unit tests

* Fixed more unit/ui tests

* Refactored tests

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp

(cherry picked from commit 565e3e2714)

Co-authored-by: Wei (Waley) Zhang <waley.zhang@microsoft.com>

* Adds unit-test cases for NarratorAnnouncement after fixing issue #1386 (#1469) (#28)

* fix bug: No confirmation is announced by the narrator after activating 'Remove equation' button #1386

* Unit Test: Add NarratorAnnouncementUnitTests

Co-authored-by: tain <tankle_@hotmail.com>
(cherry picked from commit 9d8e2ad18c)

Co-authored-by: Tian L <60599517+MSFT-Tilia@users.noreply.github.com>

* Move localization pipeline sync schedule to the YAML file (#1478) (#30)

(cherry picked from commit 007eccd940)

Co-authored-by: Matt Cooley <macool@microsoft.com>

* remove the strong reference carried from delegate (#32)

* Remove the finalizer of ControlSizeTrigger (#31)

* Normalize the namespace of CalcViewModel (#33)

* ViewMode: arrange namespaces

* UI build pass

* run release

* UT build pass

* pass build

* resolve comment: make the diff results cleaner

* resolve comment: make the diff results cleaner (2)

* resolve comment: make the diff results cleaner (3)

* resolve comment: move impl into a namespace

* update: spaces

* update: CalculatorButtonUser.h

* UTF-8 to UTF-8-BOM

* remove ViewState.h/.cpp from CalcViewModel path

* revert changes for NavCategory.cpp

* remove extra space

* remove UCM

* remove BOM

* Fixed a graphing calculator "permissions" bug caused by PR #1426 (#1471) (#34)

- The PR #1426 can cause a crash when no users are returned via `User::FindAllAsync(UserType::LocalUser)` when subsequently trying to access the first user. The existing code also does not guarantee that the returned user is the currently active user.
- This fix retrieves the user that opened the app and passes this user into a function to check if this user has the proper permissions to access the graphing mode. This makes sense since the active user is indistinguishable (at least from the app's perspective) to the user who opened the app. This user's permissions are then propagated downwards to properly set up the navigation menu of the app.
- Implementation detail worth pointing out: `s_categoryManifest` is what is used to populate the navigation menu of the app, but this variable is static by design, so a separate function was written to override the appropriate `isEnabled` value in `s_categoryManifest`. This function is called by `onLaunched`.

- Manual testing

Co-authored-by: Wei (Waley) Zhang <waley.zhang@microsoft.com>

* fixes up a bug (#35)

* fix csproj (#37)

Co-authored-by: hanzhang54 <zhangh@microsoft.com>
Co-authored-by: Matt Cooley <macool@microsoft.com>
Co-authored-by: N <71219152+PokeCodec@users.noreply.github.com>
Co-authored-by: Quentin Al-Timimi <27322516+quentin987@users.noreply.github.com>
Co-authored-by: Wei (Waley) Zhang <waley.zhang@microsoft.com>
Co-authored-by: Tian L <60599517+MSFT-Tilia@users.noreply.github.com>

* **BYPASS_SECRET_SCANNING** (#1546)

* Fixes a bug about the UI of expression tokens (#1547)

* fix

* [FeatureBranch] Fixes x86/ARM/ARM64 builds for the CI-Pipeline (#1550)

* **BYPASS_SECRET_SCANNING**

* fix

* fixes x86/ARM/ARM64 builds for CI-Pipeline

* Add headers missing for compilation with GCC (#1468) (#1551)

Things that required such update included:
* `wstringstream`
* `setprecision`
* `SCODE_CODE`, `E_BOUNDS`
* Various SAL macros

Co-authored-by: Michał Janiszewski <janisozaur@users.noreply.github.com>

* Update nuget.config file (#1486) (#1552)

Co-authored-by: Matt Cooley <macool@microsoft.com>

* Fixes up some simple miscellaneous TODO items (#1556)

* #DEBUG is a known C# preprocessor directive

* So far, we haven't observed the problem described in the comment from C# async

* fixes misc TODO items

* resolve some warnings (#1564)

* Add internal CI pipeline (#1553) (#1565)

* Add CI-internal pipeline

* No ARM64, to match release

Co-authored-by: Matt Cooley <macool@microsoft.com>

* Temporarily disable PGO NuGet package (#1510) (#1566)

Co-authored-by: Matt Cooley <macool@microsoft.com>

* [C# Calc]Removes WinMeta.cs (#1567)

* remove WinMeta.cs

* undo a trivial change

* UTF-8 BOM

* [C# Calc] Reverts some changes for Currency constants (#1570)

* Update2108release - experimental (#1572)

* adjusts Calculator.csproj (#1571)

* fixes BinSkim problems (#1573)

* fixes an issue around line style (#1575)

* fixes the missed NULLs (#1576) (#1578)

* Fix the Missing Part in Unit Converter Constructor (#1579)

* fixes: calculator doesn't remember its previous mode (#1580)

* Fixes: GraphingNumber doesn't work correctly (#1585)

* fixes: GraphingNumber doesn't work correctly

* Avoid crashing

* fixes binding (#1586)

* resolve TODO items (#1589)

* Improving keyboard support in VariableValueSlider (#1559) (#1595)

Co-authored-by: Dave Grochocki <grochocki@users.noreply.github.com>

* [C# Calc] Fixes: Keep the value away from getting rounded in Graphing Mode (#1596)

* keep the value away from getting rounded

* set the display precision to 6 to align with C++ impl

* fixes the button-light-up time (#1597)

* fixes up merging flaws

* Update2108release

* fixes (#1599)

* keep master for ci pipeline

* remove the Resources filter from CalcViewModel project

* removes `that` since `this` can be captured automatically

* AppxBundlePlatforms

* StampAssemblyInfo

* removes PreferredToolArchitecture

* Change the arg AppVersion into Version

* Change the arg AppVersion into Version

* from Calculator.rc to AssemblyInfo.cs

* Adds assembly-info

Co-authored-by: hanzhang54 <zhangh@microsoft.com>
Co-authored-by: Matt Cooley <macool@microsoft.com>
Co-authored-by: N <71219152+PokeCodec@users.noreply.github.com>
Co-authored-by: Quentin Al-Timimi <27322516+quentin987@users.noreply.github.com>
Co-authored-by: Wei (Waley) Zhang <waley.zhang@microsoft.com>
Co-authored-by: Tian L <60599517+MSFT-Tilia@users.noreply.github.com>
Co-authored-by: Michał Janiszewski <janisozaur@users.noreply.github.com>
Co-authored-by: Dave Grochocki <grochocki@users.noreply.github.com>
2021-07-15 17:12:38 +08:00
Tian L
d5044b1292
fixes the missed NULLs (#1576) 2021-06-10 14:10:53 +08:00
Dave Grochocki
3cc3eaf4e0
Improving keyboard support in VariableValueSlider (#1559) 2021-06-03 03:23:45 -07:00
Michał Janiszewski
f30e9494ce
Clang-format most of the sources (#1467) 2021-05-10 10:18:39 -07:00
Matt Cooley
f7d0118064
Update localized strings 2021-05-05 (#1539) 2021-05-10 10:14:47 -07:00
achmurali
ea61391a62
Disabled focus for 2nd button (#1523)
Co-authored-by: achmurali <achmurali@github.com>
2021-04-20 12:08:35 -07:00
Matt Cooley
ce4f3d5943
Update localized strings 2021-04-07 (#1521) 2021-04-20 10:38:06 -07:00
Matt Cooley
947f099455
Update localized strings 2021-03-08 (#1511) 2021-03-08 13:40:07 -08:00