Skip to content

Commit

Permalink
Hello C# - Going to an official feature branch (microsoft#1544)
Browse files Browse the repository at this point in the history
* 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 (microsoft#1458) (#23)

(cherry picked from commit cdcb956)

Co-authored-by: Matt Cooley <[email protected]>

* Fixup tests (#1429) (#24)

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

(cherry picked from commit 66ad328)

Co-authored-by: N <[email protected]>

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

(cherry picked from commit 0048dcb)

Co-authored-by: Quentin Al-Timimi <[email protected]>

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

(cherry picked from commit 885fa23)

Co-authored-by: Matt Cooley <[email protected]>

* Improve clarity of math expressions in history for Standard Calculator (feature microsoft#138) (microsoft#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 565e3e2)

Co-authored-by: Wei (Waley) Zhang <[email protected]>

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

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

* Unit Test: Add NarratorAnnouncementUnitTests

Co-authored-by: tain <[email protected]>
(cherry picked from commit 9d8e2ad)

Co-authored-by: Tian L <[email protected]>

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

(cherry picked from commit 007eccd)

Co-authored-by: Matt Cooley <[email protected]>

* 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 microsoft#1426 (microsoft#1471) (#34)

- The PR microsoft#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 <[email protected]>

* fixes up a bug (#35)

* fix csproj (#37)

Co-authored-by: hanzhang54 <[email protected]>
Co-authored-by: Matt Cooley <[email protected]>
Co-authored-by: N <[email protected]>
Co-authored-by: Quentin Al-Timimi <[email protected]>
Co-authored-by: Wei (Waley) Zhang <[email protected]>
Co-authored-by: Tian L <[email protected]>
  • Loading branch information
7 people authored May 25, 2021
1 parent b7ca0eb commit 9f68aaf
Show file tree
Hide file tree
Showing 388 changed files with 19,367 additions and 20,700 deletions.
4 changes: 2 additions & 2 deletions build/pipelines/azure-pipelines.ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#

trigger:
- master
- reviewed/*
- release/*
- feature/*
pr:
- master
- reviewed/*
- release/*
- feature/*

Expand Down
7 changes: 7 additions & 0 deletions build/pipelines/azure-pipelines.loc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@

# Expects a variable called LocServiceKey to contain the OAuth client secret for Touchdown.

schedules:
- cron: "0 5 * * *"
displayName: Daily sync
branches:
include:
- master

trigger: none
pr: none

Expand Down
2 changes: 1 addition & 1 deletion build/pipelines/templates/build-app-internal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
downloadDirectory: $(Build.SourcesDirectory)
vstsFeed: WindowsInboxApps
vstsFeedPackage: calculator-internals
vstsPackageVersion: 0.0.53
vstsPackageVersion: 0.0.54

- template: ./build-single-architecture.yaml
parameters:
Expand Down
3 changes: 2 additions & 1 deletion build/pipelines/templates/prepare-release-internalonly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
inputs:
productName: Calculator
disableWorkspace: true
useDfs: false
env:
XES_DISABLEPROV: true

Expand Down Expand Up @@ -80,7 +81,7 @@ jobs:
downloadDirectory: $(Build.SourcesDirectory)
vstsFeed: WindowsInboxApps
vstsFeedPackage: calculator-internals
vstsPackageVersion: 0.0.53
vstsPackageVersion: 0.0.54

- powershell: |
# Just modify this line to indicate where your en-us PDP file is. Leave the other lines alone.
Expand Down
7 changes: 7 additions & 0 deletions src/CalcManager/CEngine/scicomm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ void CCalcEngine::ProcessCommandWorker(OpCode wParam)
if (!m_bError)
{
DisplayNum();
if (!m_fPrecedence)
{

wstring groupedString = GroupDigitsPerRadix(m_numberString, m_radix);
m_HistoryCollector.CompleteEquation(groupedString);
m_HistoryCollector.AddOpndToHistory(m_numberString, m_currentVal);
}
}

if ((m_precedenceOpCount != 0) && (m_nPrecOp[m_precedenceOpCount - 1]))
Expand Down
4 changes: 2 additions & 2 deletions src/CalcViewModel/ApplicationViewModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include "DataLoaders/UnitConverterDataLoader.h"

using namespace CalculatorApp;
using namespace CalculatorApp::Common;
using namespace CalculatorApp::DataLoaders;
using namespace CalculatorApp::ViewModel::Common;
using namespace CalculatorApp::ViewModel::DataLoaders;
using namespace CalculatorApp::ViewModel;
using namespace CalculationManager;
using namespace Platform;
Expand Down
22 changes: 11 additions & 11 deletions src/CalcViewModel/ApplicationViewModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ namespace CalculatorApp
public:
ApplicationViewModel();

void Initialize(CalculatorApp::Common::ViewMode mode); // Use for first init, use deserialize for rehydration
void Initialize(CalculatorApp::ViewModel::Common::ViewMode mode); // Use for first init, use deserialize for rehydration

OBSERVABLE_OBJECT();
OBSERVABLE_PROPERTY_RW(StandardCalculatorViewModel ^, CalculatorViewModel);
OBSERVABLE_PROPERTY_RW(DateCalculatorViewModel ^, DateCalcViewModel);
OBSERVABLE_PROPERTY_RW(GraphingCalculatorViewModel ^, GraphingCalcViewModel);
OBSERVABLE_PROPERTY_RW(UnitConverterViewModel ^, ConverterViewModel);
OBSERVABLE_PROPERTY_RW(CalculatorApp::Common::ViewMode, PreviousMode);
OBSERVABLE_PROPERTY_RW(CalculatorApp::ViewModel::Common::ViewMode, PreviousMode);
OBSERVABLE_PROPERTY_R(bool, IsAlwaysOnTop);
OBSERVABLE_NAMED_PROPERTY_RW(Platform::String ^, CategoryName);

Expand All @@ -34,14 +34,14 @@ namespace CalculatorApp
COMMAND_FOR_METHOD(CopyCommand, ApplicationViewModel::OnCopyCommand);
COMMAND_FOR_METHOD(PasteCommand, ApplicationViewModel::OnPasteCommand);

property CalculatorApp::Common::ViewMode Mode
property CalculatorApp::ViewModel::Common::ViewMode Mode
{
CalculatorApp::Common::ViewMode get()
CalculatorApp::ViewModel::Common::ViewMode get()
{
return m_mode;
}

void set(CalculatorApp::Common::ViewMode value);
void set(CalculatorApp::ViewModel::Common::ViewMode value);
}
static property Platform::String^ ModePropertyName
{
Expand All @@ -51,21 +51,21 @@ namespace CalculatorApp
}
}

property Windows::Foundation::Collections::IObservableVector<CalculatorApp::Common::NavCategoryGroup^>^ Categories
property Windows::Foundation::Collections::IObservableVector<CalculatorApp::ViewModel::Common::NavCategoryGroup^>^ Categories
{
Windows::Foundation::Collections::IObservableVector<CalculatorApp::Common::NavCategoryGroup^>^ get()
Windows::Foundation::Collections::IObservableVector<CalculatorApp::ViewModel::Common::NavCategoryGroup^>^ get()
{
return m_categories;
}

void set(Windows::Foundation::Collections::IObservableVector<CalculatorApp::Common::NavCategoryGroup^>^ value);
void set(Windows::Foundation::Collections::IObservableVector<CalculatorApp::ViewModel::Common::NavCategoryGroup^>^ value);
}

property Windows::UI::Xaml::Visibility ClearMemoryVisibility
{
Windows::UI::Xaml::Visibility get()
{
return CalculatorApp::Common::NavCategory::IsCalculatorViewMode(Mode) ? Windows::UI::Xaml::Visibility::Visible
return CalculatorApp::ViewModel::Common::NavCategory::IsCalculatorViewMode(Mode) ? Windows::UI::Xaml::Visibility::Visible
: Windows::UI::Xaml::Visibility::Collapsed;
}
}
Expand Down Expand Up @@ -106,8 +106,8 @@ namespace CalculatorApp

void SetMenuCategories();

CalculatorApp::Common::ViewMode m_mode;
Windows::Foundation::Collections::IObservableVector<CalculatorApp::Common::NavCategoryGroup ^> ^ m_categories;
CalculatorApp::ViewModel::Common::ViewMode m_mode;
Windows::Foundation::Collections::IObservableVector<CalculatorApp::ViewModel::Common::NavCategoryGroup ^> ^ m_categories;
Concurrency::task<void> HandleToggleAlwaysOnTop(float width, float height);
void SetDisplayNormalAlwaysOnTopOption();
};
Expand Down
Loading

0 comments on commit 9f68aaf

Please sign in to comment.