From e06355c9aaa349ff337557d2a83c1789a7d7b3d6 Mon Sep 17 00:00:00 2001 From: hanzhang54 Date: Tue, 27 Jul 2021 17:35:16 +0800 Subject: [PATCH] Update to WinUI 2.6 (#1618) * Update to WinUI 2.6 Co-authored-by: Han Zhang Co-authored-by: Kenny Guo **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) --- .../azure-pipelines.ci-internal.yaml | 5 + build/pipelines/azure-pipelines.release.yaml | 24 +- .../templates/build-app-internal.yaml | 6 +- .../prepare-release-internalonly.yaml | 2 +- src/Calculator/AboutFlyout.xaml | 95 - src/Calculator/App.xaml | 1695 +++++++++++------ src/Calculator/App.xaml.cs | 11 +- src/Calculator/Assets/CalcMDL2.ttf | Bin 27180 -> 0 bytes src/Calculator/Assets/CalculatorIcons.ttf | Bin 0 -> 30588 bytes src/Calculator/Calculator.csproj | 25 +- .../Common/KeyboardShortcuManager.cs | 90 +- src/Calculator/Controls/CalculatorButton.cs | 20 + src/Calculator/Package.appxmanifest | 4 +- src/Calculator/Resources/en-US/Resources.resw | 40 +- src/Calculator/Utils/ThemeHelper.cs | 88 + src/Calculator/Views/Calculator.xaml | 248 ++- .../CalculatorProgrammerBitFlipPanel.xaml | 161 +- .../Views/CalculatorProgrammerOperators.xaml | 30 +- .../CalculatorScientificAngleButtons.xaml | 24 +- .../Views/CalculatorScientificOperators.xaml | 88 +- src/Calculator/Views/DateCalculator.xaml | 1297 +++++++++---- .../GraphingCalculator/EquationInputArea.xaml | 524 +++-- .../EquationStylePanelControl.xaml | 8 +- .../EquationStylePanelControl.xaml.cs | 0 .../GraphingCalculator.xaml | 185 +- .../GraphingCalculator/GraphingSettings.xaml | 39 +- .../KeyGraphFeaturesPanel.xaml | 16 +- .../KeyGraphFeaturesTemplateSelector.cs | 0 src/Calculator/Views/HistoryList.xaml | 20 +- src/Calculator/Views/MainPage.xaml | 163 +- src/Calculator/Views/MainPage.xaml.cs | 130 +- src/Calculator/Views/Memory.xaml | 15 +- src/Calculator/Views/MemoryListItem.xaml | 12 +- src/Calculator/Views/Settings.xaml | 223 +++ .../Settings.xaml.cs} | 72 +- .../Views/SupplementaryResults.xaml | 6 +- src/Calculator/Views/TitleBar.xaml | 75 +- src/Calculator/Views/TitleBar.xaml.cs | 127 +- src/Calculator/Views/UnitConverter.xaml | 107 +- 39 files changed, 3779 insertions(+), 1896 deletions(-) delete mode 100644 src/Calculator/AboutFlyout.xaml delete mode 100644 src/Calculator/Assets/CalcMDL2.ttf create mode 100644 src/Calculator/Assets/CalculatorIcons.ttf create mode 100644 src/Calculator/Utils/ThemeHelper.cs rename src/Calculator/{ => Views/GraphingCalculator}/EquationStylePanelControl.xaml (95%) rename src/Calculator/{ => Views/GraphingCalculator}/EquationStylePanelControl.xaml.cs (100%) rename src/Calculator/{ => Views/GraphingCalculator}/KeyGraphFeaturesTemplateSelector.cs (100%) create mode 100644 src/Calculator/Views/Settings.xaml rename src/Calculator/{AboutFlyout.xaml.cs => Views/Settings.xaml.cs} (55%) diff --git a/build/pipelines/azure-pipelines.ci-internal.yaml b/build/pipelines/azure-pipelines.ci-internal.yaml index 6014b53b4..b4e857c76 100644 --- a/build/pipelines/azure-pipelines.ci-internal.yaml +++ b/build/pipelines/azure-pipelines.ci-internal.yaml @@ -30,6 +30,11 @@ jobs: platform: x64 runsettingsFileName: CalculatorUITests.release.runsettings +- template: ./templates/run-ui-tests.yaml + parameters: + platform: x86 + runsettingsFileName: CalculatorUITests.release.runsettings + - template: ./templates/run-unit-tests.yaml parameters: platform: x64 diff --git a/build/pipelines/azure-pipelines.release.yaml b/build/pipelines/azure-pipelines.release.yaml index 6e049ddd6..05eec0b37 100644 --- a/build/pipelines/azure-pipelines.release.yaml +++ b/build/pipelines/azure-pipelines.release.yaml @@ -4,20 +4,13 @@ # Store and the Windows image. This pipeline relies on Microsoft-internal resources to run. # -schedules: -- cron: "0 7 * * *" - displayName: Daily midnight build - branches: - include: - - master - trigger: none pr: none variables: versionMajor: 10 - versionMinor: 2108 - versionBuild: $[counter('10.2108.*', 0)] + versionMinor: 2109 + versionBuild: $[counter('10.2109.*', 0)] versionPatch: 0 name: '$(versionMajor).$(versionMinor).$(versionBuild).$(versionPatch)' @@ -26,27 +19,20 @@ jobs: - template: ./templates/build-app-internal.yaml parameters: platform: x64 + isPublicRelease: true - template: ./templates/build-app-internal.yaml parameters: platform: x86 + isPublicRelease: true condition: not(eq(variables['Build.Reason'], 'PullRequest')) - template: ./templates/build-app-internal.yaml parameters: platform: ARM + isPublicRelease: true condition: not(eq(variables['Build.Reason'], 'PullRequest')) -- template: ./templates/run-ui-tests.yaml - parameters: - platform: x64 - runsettingsFileName: CalculatorUITests.release.runsettings - -- template: ./templates/run-ui-tests.yaml - parameters: - platform: x86 - runsettingsFileName: CalculatorUITests.release.runsettings - - template: ./templates/run-unit-tests.yaml parameters: platform: x64 diff --git a/build/pipelines/templates/build-app-internal.yaml b/build/pipelines/templates/build-app-internal.yaml index 69b5262e8..f09e2cdb5 100644 --- a/build/pipelines/templates/build-app-internal.yaml +++ b/build/pipelines/templates/build-app-internal.yaml @@ -6,6 +6,7 @@ parameters: platform: '' condition: '' + isPublicRelease: false jobs: - job: Build${{ parameters.platform }} @@ -27,7 +28,10 @@ jobs: downloadDirectory: $(Build.SourcesDirectory) vstsFeed: WindowsInboxApps vstsFeedPackage: calculator-internals - vstsPackageVersion: 0.0.54 + ${{ if eq(parameters.isPublicRelease, true) }}: + vstsPackageVersion: 0.0.66 + ${{ if eq(parameters.isPublicRelease, false) }}: + vstsPackageVersion: 0.0.65 - template: ./build-single-architecture.yaml parameters: diff --git a/build/pipelines/templates/prepare-release-internalonly.yaml b/build/pipelines/templates/prepare-release-internalonly.yaml index cd383dcd1..d55514080 100644 --- a/build/pipelines/templates/prepare-release-internalonly.yaml +++ b/build/pipelines/templates/prepare-release-internalonly.yaml @@ -81,7 +81,7 @@ jobs: downloadDirectory: $(Build.SourcesDirectory) vstsFeed: WindowsInboxApps vstsFeedPackage: calculator-internals - vstsPackageVersion: 0.0.54 + vstsPackageVersion: 0.0.66 - powershell: | # Just modify this line to indicate where your en-us PDP file is. Leave the other lines alone. diff --git a/src/Calculator/AboutFlyout.xaml b/src/Calculator/AboutFlyout.xaml deleted file mode 100644 index e9b16a611..000000000 --- a/src/Calculator/AboutFlyout.xaml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -