diff --git a/src/Calculator.sln b/src/Calculator.sln
index 09fc81fd..bd6ac391 100644
--- a/src/Calculator.sln
+++ b/src/Calculator.sln
@@ -9,11 +9,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
nuget.config = nuget.config
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Calculator", "Calculator\Calculator.vcxproj", "{9447424A-0E05-4911-BEB8-E0354405F39A}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CalcManager", "CalcManager\CalcManager.vcxproj", "{311E866D-8B93-4609-A691-265941FEE101}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CalcViewModel", "CalcViewModel\CalcViewModel.vcxproj", "{90E9761D-9262-4773-942D-CAEAE75D7140}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CalcViewModel", "CalcViewModel\CalcViewModel.vcxproj", "{812D1A7B-B8AC-49E4-8E6D-AF5D59500D56}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CalculatorUnitTests", "CalculatorUnitTests\CalculatorUnitTests.vcxproj", "{D3BAED2C-4B07-4E1D-8807-9D6499450349}"
EndProject
@@ -39,30 +37,6 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Debug|ARM.ActiveCfg = Debug|ARM
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Debug|ARM.Build.0 = Debug|ARM
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Debug|ARM.Deploy.0 = Debug|ARM
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Debug|ARM64.ActiveCfg = Debug|ARM64
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Debug|ARM64.Build.0 = Debug|ARM64
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Debug|ARM64.Deploy.0 = Debug|ARM64
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Debug|x64.ActiveCfg = Debug|x64
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Debug|x64.Build.0 = Debug|x64
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Debug|x64.Deploy.0 = Debug|x64
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Debug|x86.ActiveCfg = Debug|Win32
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Debug|x86.Build.0 = Debug|Win32
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Debug|x86.Deploy.0 = Debug|Win32
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Release|ARM.ActiveCfg = Release|ARM
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Release|ARM.Build.0 = Release|ARM
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Release|ARM.Deploy.0 = Release|ARM
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Release|ARM64.ActiveCfg = Release|ARM64
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Release|ARM64.Build.0 = Release|ARM64
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Release|ARM64.Deploy.0 = Release|ARM64
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Release|x64.ActiveCfg = Release|x64
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Release|x64.Build.0 = Release|x64
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Release|x64.Deploy.0 = Release|x64
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Release|x86.ActiveCfg = Release|Win32
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Release|x86.Build.0 = Release|Win32
- {9447424A-0E05-4911-BEB8-E0354405F39A}.Release|x86.Deploy.0 = Release|Win32
{311E866D-8B93-4609-A691-265941FEE101}.Debug|ARM.ActiveCfg = Debug|ARM
{311E866D-8B93-4609-A691-265941FEE101}.Debug|ARM.Build.0 = Debug|ARM
{311E866D-8B93-4609-A691-265941FEE101}.Debug|ARM64.ActiveCfg = Debug|ARM64
@@ -79,22 +53,22 @@ Global
{311E866D-8B93-4609-A691-265941FEE101}.Release|x64.Build.0 = Release|x64
{311E866D-8B93-4609-A691-265941FEE101}.Release|x86.ActiveCfg = Release|Win32
{311E866D-8B93-4609-A691-265941FEE101}.Release|x86.Build.0 = Release|Win32
- {90E9761D-9262-4773-942D-CAEAE75D7140}.Debug|ARM.ActiveCfg = Debug|ARM
- {90E9761D-9262-4773-942D-CAEAE75D7140}.Debug|ARM.Build.0 = Debug|ARM
- {90E9761D-9262-4773-942D-CAEAE75D7140}.Debug|ARM64.ActiveCfg = Debug|ARM64
- {90E9761D-9262-4773-942D-CAEAE75D7140}.Debug|ARM64.Build.0 = Debug|ARM64
- {90E9761D-9262-4773-942D-CAEAE75D7140}.Debug|x64.ActiveCfg = Debug|x64
- {90E9761D-9262-4773-942D-CAEAE75D7140}.Debug|x64.Build.0 = Debug|x64
- {90E9761D-9262-4773-942D-CAEAE75D7140}.Debug|x86.ActiveCfg = Debug|Win32
- {90E9761D-9262-4773-942D-CAEAE75D7140}.Debug|x86.Build.0 = Debug|Win32
- {90E9761D-9262-4773-942D-CAEAE75D7140}.Release|ARM.ActiveCfg = Release|ARM
- {90E9761D-9262-4773-942D-CAEAE75D7140}.Release|ARM.Build.0 = Release|ARM
- {90E9761D-9262-4773-942D-CAEAE75D7140}.Release|ARM64.ActiveCfg = Release|ARM64
- {90E9761D-9262-4773-942D-CAEAE75D7140}.Release|ARM64.Build.0 = Release|ARM64
- {90E9761D-9262-4773-942D-CAEAE75D7140}.Release|x64.ActiveCfg = Release|x64
- {90E9761D-9262-4773-942D-CAEAE75D7140}.Release|x64.Build.0 = Release|x64
- {90E9761D-9262-4773-942D-CAEAE75D7140}.Release|x86.ActiveCfg = Release|Win32
- {90E9761D-9262-4773-942D-CAEAE75D7140}.Release|x86.Build.0 = Release|Win32
+ {812D1A7B-B8AC-49E4-8E6D-AF5D59500D56}.Debug|ARM.ActiveCfg = Debug|ARM
+ {812D1A7B-B8AC-49E4-8E6D-AF5D59500D56}.Debug|ARM.Build.0 = Debug|ARM
+ {812D1A7B-B8AC-49E4-8E6D-AF5D59500D56}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {812D1A7B-B8AC-49E4-8E6D-AF5D59500D56}.Debug|ARM64.Build.0 = Debug|ARM64
+ {812D1A7B-B8AC-49E4-8E6D-AF5D59500D56}.Debug|x64.ActiveCfg = Debug|x64
+ {812D1A7B-B8AC-49E4-8E6D-AF5D59500D56}.Debug|x64.Build.0 = Debug|x64
+ {812D1A7B-B8AC-49E4-8E6D-AF5D59500D56}.Debug|x86.ActiveCfg = Debug|Win32
+ {812D1A7B-B8AC-49E4-8E6D-AF5D59500D56}.Debug|x86.Build.0 = Debug|Win32
+ {812D1A7B-B8AC-49E4-8E6D-AF5D59500D56}.Release|ARM.ActiveCfg = Release|ARM
+ {812D1A7B-B8AC-49E4-8E6D-AF5D59500D56}.Release|ARM.Build.0 = Release|ARM
+ {812D1A7B-B8AC-49E4-8E6D-AF5D59500D56}.Release|ARM64.ActiveCfg = Release|ARM64
+ {812D1A7B-B8AC-49E4-8E6D-AF5D59500D56}.Release|ARM64.Build.0 = Release|ARM64
+ {812D1A7B-B8AC-49E4-8E6D-AF5D59500D56}.Release|x64.ActiveCfg = Release|x64
+ {812D1A7B-B8AC-49E4-8E6D-AF5D59500D56}.Release|x64.Build.0 = Release|x64
+ {812D1A7B-B8AC-49E4-8E6D-AF5D59500D56}.Release|x86.ActiveCfg = Release|Win32
+ {812D1A7B-B8AC-49E4-8E6D-AF5D59500D56}.Release|x86.Build.0 = Release|Win32
{D3BAED2C-4B07-4E1D-8807-9D6499450349}.Debug|ARM.ActiveCfg = Debug|ARM
{D3BAED2C-4B07-4E1D-8807-9D6499450349}.Debug|ARM64.ActiveCfg = Debug|ARM64
{D3BAED2C-4B07-4E1D-8807-9D6499450349}.Debug|x64.ActiveCfg = Debug|x64
diff --git a/src/Calculator/AboutFlyout.xaml b/src/Calculator/AboutFlyout.xaml
deleted file mode 100644
index b83dfd83..00000000
--- a/src/Calculator/AboutFlyout.xaml
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Calculator/AboutFlyout.xaml.cpp b/src/Calculator/AboutFlyout.xaml.cpp
deleted file mode 100644
index 9a84a752..00000000
--- a/src/Calculator/AboutFlyout.xaml.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-#include "pch.h"
-#include "AboutFlyout.xaml.h"
-#include "CalcViewModel/Common/AppResourceProvider.h"
-#include "CalcViewModel/Common/LocalizationService.h"
-#include "CalcViewModel/Common/LocalizationStringUtil.h"
-#include "CalcViewModel/Common/TraceLogger.h"
-
-using namespace std;
-using namespace CalculatorApp;
-using namespace CalculatorApp::Common;
-using namespace Platform;
-using namespace Windows::ApplicationModel;
-using namespace Windows::Foundation;
-using namespace Windows::System;
-using namespace Windows::UI::Xaml;
-using namespace Windows::UI::Xaml::Controls;
-using namespace Windows::UI::Xaml::Controls::Primitives;
-using namespace Windows::UI::Xaml::Data;
-
-#ifndef BUILD_YEAR
-#define BUILD_YEAR 2020
-#endif
-
-AboutFlyout::AboutFlyout()
-{
- auto locService = LocalizationService::GetInstance();
- auto resourceLoader = AppResourceProvider::GetInstance();
-
- InitializeComponent();
-
- Language = locService->GetLanguage();
-
- this->SetVersionString();
-
- Header->Text = resourceLoader->GetResourceString("AboutButton/Content");
-
- auto copyrightText =
- LocalizationStringUtil::GetLocalizedString(resourceLoader->GetResourceString("AboutControlCopyright"), StringReference(to_wstring(BUILD_YEAR).c_str()));
- AboutControlCopyrightRun->Text = copyrightText;
-
- InitializeContributeTextBlock();
-}
-
-void AboutFlyout::FeedbackButton_Click(_In_ Object ^ sender, _In_ RoutedEventArgs ^ e)
-{
- PackageVersion version = Package::Current->Id->Version;
- String ^ versionNumber = ref new String(L"Version ");
- versionNumber = versionNumber + version.Major + "." + version.Minor + "." + version.Build + "." + version.Revision;
- Launcher::LaunchUriAsync(ref new Uri("windows-feedback:?contextid=130&metadata=%7B%22Metadata%22:[%7B%22AppBuild%22:%22" + versionNumber + "%22%7D]%7D"));
-}
-
-void AboutFlyout::SetVersionString()
-{
- PackageVersion version = Package::Current->Id->Version;
- String ^ appName = AppResourceProvider::GetInstance()->GetResourceString(L"AppName");
- AboutFlyoutVersion->Text = appName + L" " + version.Major + L"." + version.Minor + L"." + version.Build + L"." + version.Revision;
-}
-
-void AboutFlyout::SetDefaultFocus()
-{
- AboutFlyoutEULA->Focus(::FocusState::Programmatic);
-}
-
-void AboutFlyout::InitializeContributeTextBlock()
-{
- auto resProvider = AppResourceProvider::GetInstance();
- std::wstring contributeHyperlinkText = resProvider->GetResourceString(L"AboutFlyoutContribute")->Data();
-
- // The resource string has the 'GitHub' hyperlink wrapped with '%HL%'.
- // Break the string and assign pieces appropriately.
- static const std::wstring delimiter{ L"%HL%" };
- static const size_t delimiterLength{ delimiter.length() };
-
- // Find the delimiters.
- size_t firstSplitPosition = contributeHyperlinkText.find(delimiter, 0);
- assert(firstSplitPosition != std::wstring::npos);
- size_t secondSplitPosition = contributeHyperlinkText.find(delimiter, firstSplitPosition + 1);
- assert(secondSplitPosition != std::wstring::npos);
- size_t hyperlinkTextLength = secondSplitPosition - (firstSplitPosition + delimiterLength);
-
- // Assign pieces.
- auto contributeTextBeforeHyperlink = ref new String(contributeHyperlinkText.substr(0, firstSplitPosition).c_str());
- auto contributeTextLink = ref new String(contributeHyperlinkText.substr(firstSplitPosition + delimiterLength, hyperlinkTextLength).c_str());
- auto contributeTextAfterHyperlink = ref new String(contributeHyperlinkText.substr(secondSplitPosition + delimiterLength).c_str());
-
- ContributeRunBeforeLink->Text = contributeTextBeforeHyperlink;
- ContributeRunLink->Text = contributeTextLink;
- ContributeRunAfterLink->Text = contributeTextAfterHyperlink;
-}
diff --git a/src/Calculator/AboutFlyout.xaml.h b/src/Calculator/AboutFlyout.xaml.h
deleted file mode 100644
index f4e47a36..00000000
--- a/src/Calculator/AboutFlyout.xaml.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-#pragma once
-
-#include "AboutFlyout.g.h"
-
-namespace CalculatorApp
-{
-public
- ref class AboutFlyout sealed
- {
- public:
- AboutFlyout();
-
- void SetDefaultFocus();
-
- private:
- void FeedbackButton_Click(_In_ Platform::Object ^ sender, _In_ Windows::UI::Xaml::RoutedEventArgs ^ e);
- void SetVersionString();
- void InitializeContributeTextBlock();
- };
-} /* namespace CalculatorApp */
diff --git a/src/Calculator/App.xaml b/src/Calculator/App.xaml
deleted file mode 100644
index 4a0cca57..00000000
--- a/src/Calculator/App.xaml
+++ /dev/null
@@ -1,1778 +0,0 @@
-
-
-
-
-
-
-
-
-
- 0,0,0,0
- 0
- #FF000000
- #FF2B2B2B
- #FF858585
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Dark
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0,0,0,0
- 0
- #FFF2F2F2
- #FFE0E0E0
- #FF858585
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Light
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0,1,0,0
- 2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Dark
-
-
-
-
-
-
-
-
-
- 500
- 320
-
- ms-appx:///Assets/CalcMDL2.ttf#Calculator MDL2 Assets
-
- 256
- 0,1,0,0
- 15
- SemiBold
-
- 64
- 24
- 24
- 16
-
- 64
- 16
- 20
- 10
-
- 38
- 12
- 16
- 8
-
- 12
- 15
- 24
-
-
- 40
- 40
-
- 34
- 38
- 48
- 24
-
- 20
- 22
- 15
- 12
-
- 14
- 16
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Calculator/App.xaml.cpp b/src/Calculator/App.xaml.cpp
deleted file mode 100644
index b8f7702d..00000000
--- a/src/Calculator/App.xaml.cpp
+++ /dev/null
@@ -1,442 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-// App.xaml.cpp
-// Implementation of the App class.
-//
-
-#include "pch.h"
-#include "App.xaml.h"
-#include "CalcViewModel/Common/TraceLogger.h"
-#include "CalcViewModel/Common/Automation/NarratorNotifier.h"
-#include "CalcViewModel/Common/AppResourceProvider.h"
-#include "CalcViewModel/Common/LocalizationSettings.h"
-#include "Views/MainPage.xaml.h"
-
-using namespace CalculatorApp;
-using namespace CalculatorApp::Common;
-using namespace CalculatorApp::Common::Automation;
-
-using namespace Concurrency;
-using namespace Microsoft::WRL;
-using namespace Platform;
-using namespace Windows::ApplicationModel;
-using namespace Windows::ApplicationModel::Activation;
-using namespace Windows::ApplicationModel::Core;
-using namespace Windows::ApplicationModel::Resources;
-using namespace Windows::Foundation;
-using namespace Windows::Foundation::Collections;
-using namespace Windows::Storage;
-using namespace Windows::System;
-using namespace Windows::UI::Core;
-using namespace Windows::UI::Popups;
-using namespace Windows::UI::StartScreen;
-using namespace Windows::UI::ViewManagement;
-using namespace Windows::UI::Xaml;
-using namespace Windows::UI::Xaml::Controls;
-using namespace Windows::UI::Xaml::Controls::Primitives;
-using namespace Windows::UI::Xaml::Data;
-using namespace Windows::UI::Xaml::Input;
-using namespace Windows::UI::Xaml::Interop;
-using namespace Windows::UI::Xaml::Media;
-using namespace Windows::UI::Xaml::Media::Animation;
-using namespace Windows::UI::Xaml::Navigation;
-using namespace Windows::ApplicationModel::Activation;
-
-namespace CalculatorApp
-{
- namespace ApplicationResourceKeys
- {
- StringReference AppMinWindowHeight(L"AppMinWindowHeight");
- StringReference AppMinWindowWidth(L"AppMinWindowWidth");
- }
-}
-
-///
-/// Initializes the singleton application object. This is the first line of authored code
-/// executed, and as such is the logical equivalent of main() or WinMain().
-///
-App::App()
-{
- InitializeComponent();
-
- m_preLaunched = false;
-
- RegisterDependencyProperties();
-
- // TODO: MSFT 14645325: Set this directly from XAML.
- // Currently this is bugged so the property is only respected from code-behind.
- this->HighContrastAdjustment = ApplicationHighContrastAdjustment::None;
-
- this->Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
-
-#if _DEBUG
- this->DebugSettings->IsBindingTracingEnabled = true;
- this->DebugSettings->BindingFailed += ref new BindingFailedEventHandler([](_In_ Object ^ /*sender*/, _In_ BindingFailedEventArgs ^ e) {
- if (IsDebuggerPresent())
- {
- ::Platform::String ^ errorMessage = e->Message;
- __debugbreak();
- }
- });
-#endif
-}
-
-void App::AddWindowToMap(_In_ WindowFrameService ^ frameService)
-{
- reader_writer_lock::scoped_lock lock(m_windowsMapLock);
- m_secondaryWindows[frameService->GetViewId()] = frameService;
- TraceLogger::GetInstance()->UpdateWindowCount(m_secondaryWindows.size());
-}
-
-WindowFrameService ^ App::GetWindowFromMap(int viewId)
-{
- reader_writer_lock::scoped_lock_read lock(m_windowsMapLock);
- auto windowMapEntry = m_secondaryWindows.find(viewId);
- if (windowMapEntry != m_secondaryWindows.end())
- {
- return windowMapEntry->second;
- }
- return nullptr;
-}
-
-void App::RemoveWindowFromMap(int viewId)
-{
- reader_writer_lock::scoped_lock lock(m_windowsMapLock);
- auto iter = m_secondaryWindows.find(viewId);
- assert(iter != m_secondaryWindows.end() && "Window does not exist in the list");
- m_secondaryWindows.erase(viewId);
-}
-
-void App::RemoveWindow(_In_ WindowFrameService ^ frameService)
-{
- // Shell does not allow killing the main window.
- if (m_mainViewId != frameService->GetViewId())
- {
- HandleViewReleaseAndRemoveWindowFromMap(frameService);
- }
-}
-
-task App::HandleViewReleaseAndRemoveWindowFromMap(_In_ WindowFrameService ^ frameService)
-{
- WeakReference weak(this);
-
- // Unregister the event handler of the Main Page
- auto frame = safe_cast(Window::Current->Content);
- auto mainPage = safe_cast(frame->Content);
- mainPage->UnregisterEventHandlers();
-
- return frameService->HandleViewRelease().then(
- [weak, frameService]() {
- auto that = weak.Resolve();
- that->RemoveWindowFromMap(frameService->GetViewId());
- },
- task_continuation_context::use_arbitrary());
-}
-
-#pragma optimize("", off) // Turn off optimizations to work around coroutine optimization bug
-task App::SetupJumpList()
-{
- try
- {
- auto calculatorOptions = NavCategoryGroup::CreateCalculatorCategory();
-
- auto jumpList = co_await JumpList::LoadCurrentAsync();
- jumpList->SystemGroupKind = JumpListSystemGroupKind::None;
- jumpList->Items->Clear();
-
- for (NavCategory ^ option : calculatorOptions->Categories)
- {
- if (!option->IsEnabled)
- {
- continue;
- }
- ViewMode mode = option->Mode;
- auto item = JumpListItem::CreateWithArguments(((int)mode).ToString(), L"ms-resource:///Resources/" + NavCategory::GetNameResourceKey(mode));
- item->Description = L"ms-resource:///Resources/" + NavCategory::GetNameResourceKey(mode);
- item->Logo = ref new Uri("ms-appx:///Assets/" + mode.ToString() + ".png");
-
- jumpList->Items->Append(item);
- }
-
- co_await jumpList->SaveAsync();
- }
- catch (...)
- {
- }
-};
-#pragma optimize("", on)
-
-void App::RemoveSecondaryWindow(_In_ WindowFrameService ^ frameService)
-{
- // Shell does not allow killing the main window.
- if (m_mainViewId != frameService->GetViewId())
- {
- RemoveWindowFromMap(frameService->GetViewId());
- }
-}
-
-Frame ^ App::CreateFrame()
-{
- auto frame = ref new Frame();
- frame->FlowDirection = LocalizationService::GetInstance()->GetFlowDirection();
-
- return frame;
-}
-
-///
-/// Invoked when the application is launched normally by the end user. Other entry points
-/// will be used when the application is launched to open a specific file, to display
-/// search results, and so forth.
-///
-/// Details about the launch request and process.
-void App::OnLaunched(LaunchActivatedEventArgs ^ args)
-{
- if (args->PrelaunchActivated)
- {
- // If the app got pre-launch activated, then save that state in a flag
- m_preLaunched = true;
- }
- OnAppLaunch(args, args->Arguments);
-}
-
-void App::OnAppLaunch(IActivatedEventArgs ^ args, String ^ argument)
-{
-
- // Uncomment the following lines to display frame-rate and per-frame CPU usage info.
- //#if _DEBUG
- // if (IsDebuggerPresent())
- // {
- // DebugSettings->EnableFrameRateCounter = true;
- // }
- //#endif
-
- args->SplashScreen->Dismissed += ref new TypedEventHandler(this, &App::DismissedEventHandler);
-
- auto rootFrame = dynamic_cast(Window::Current->Content);
- WeakReference weak(this);
-
- float minWindowWidth = static_cast(static_cast(this->Resources->Lookup(ApplicationResourceKeys::AppMinWindowWidth)));
- float minWindowHeight = static_cast(static_cast(this->Resources->Lookup(ApplicationResourceKeys::AppMinWindowHeight)));
- Size minWindowSize = SizeHelper::FromDimensions(minWindowWidth, minWindowHeight);
-
- ApplicationView ^ appView = ApplicationView::GetForCurrentView();
- ApplicationDataContainer ^ localSettings = ApplicationData::Current->LocalSettings;
- // For very first launch, set the size of the calc as size of the default standard mode
- if (!localSettings->Values->HasKey(L"VeryFirstLaunch"))
- {
- localSettings->Values->Insert(ref new String(L"VeryFirstLaunch"), false);
- appView->SetPreferredMinSize(minWindowSize);
- appView->TryResizeView(minWindowSize);
- }
- else
- {
- appView->PreferredLaunchWindowingMode = ApplicationViewWindowingMode::Auto;
- }
-
- // Do not repeat app initialization when the Window already has content,
- // just ensure that the window is active
- if (rootFrame == nullptr)
- {
- if (!Windows::Foundation::Metadata::ApiInformation::IsTypePresent("Windows.Phone.UI.Input.HardwareButtons")) // PC Family
- {
- // Disable the system view activation policy during the first launch of the app
- // only for PC family devices and not for phone family devices
- try
- {
- ApplicationViewSwitcher::DisableSystemViewActivationPolicy();
- }
- catch (Exception ^ e)
- {
- // Log that DisableSystemViewActionPolicy didn't work
- }
- }
-
- // Create a Frame to act as the navigation context
- rootFrame = App::CreateFrame();
-
- // When the navigation stack isn't restored navigate to the first page,
- // configuring the new page by passing required information as a navigation
- // parameter
- if (!rootFrame->Navigate(MainPage::typeid, argument))
- {
- // We couldn't navigate to the main page, kill the app so we have a good
- // stack to debug
- throw std::bad_exception();
- }
-
- SetMinWindowSizeAndActivate(rootFrame, minWindowSize);
- m_mainViewId = ApplicationView::GetForCurrentView()->Id;
- AddWindowToMap(WindowFrameService::CreateNewWindowFrameService(rootFrame, false, weak));
- }
- else
- {
- // For first launch, LaunchStart is logged in constructor, this is for subsequent launches.
-
- // !Phone check is required because even in continuum mode user interaction mode is Mouse not Touch
- if ((UIViewSettings::GetForCurrentView()->UserInteractionMode == UserInteractionMode::Mouse)
- && (!Windows::Foundation::Metadata::ApiInformation::IsTypePresent("Windows.Phone.UI.Input.HardwareButtons")))
- {
- // If the pre-launch hasn't happened then allow for the new window/view creation
- if (!m_preLaunched)
- {
- auto newCoreAppView = CoreApplication::CreateNewView();
- newCoreAppView->Dispatcher->RunAsync(
- CoreDispatcherPriority::Normal, ref new DispatchedHandler([args, argument, minWindowSize, weak]() {
- auto that = weak.Resolve();
- if (that != nullptr)
- {
- auto rootFrame = App::CreateFrame();
- SetMinWindowSizeAndActivate(rootFrame, minWindowSize);
-
- if (!rootFrame->Navigate(MainPage::typeid, argument))
- {
- // We couldn't navigate to the main page, kill the app so we have a good
- // stack to debug
- throw std::bad_exception();
- }
-
- auto frameService = WindowFrameService::CreateNewWindowFrameService(rootFrame, true, weak);
- that->AddWindowToMap(frameService);
-
- auto dispatcher = CoreWindow::GetForCurrentThread()->Dispatcher;
- auto safeFrameServiceCreation = std::make_shared(frameService, that);
- int newWindowId = ApplicationView::GetApplicationViewIdForWindow(CoreWindow::GetForCurrentThread());
-
- ActivationViewSwitcher ^ activationViewSwitcher;
- auto activateEventArgs = dynamic_cast(args);
- if (activateEventArgs != nullptr)
- {
- activationViewSwitcher = activateEventArgs->ViewSwitcher;
- }
-
- if (activationViewSwitcher != nullptr)
- {
- activationViewSwitcher->ShowAsStandaloneAsync(newWindowId, ViewSizePreference::Default);
- safeFrameServiceCreation->SetOperationSuccess(true);
- }
- else
- {
- auto activatedEventArgs = dynamic_cast(args);
- if ((activatedEventArgs != nullptr) && (activatedEventArgs->CurrentlyShownApplicationViewId != 0))
- {
- create_task(ApplicationViewSwitcher::TryShowAsStandaloneAsync(
- frameService->GetViewId(),
- ViewSizePreference::Default,
- activatedEventArgs->CurrentlyShownApplicationViewId,
- ViewSizePreference::Default))
- .then(
- [safeFrameServiceCreation](bool viewShown) {
- // SafeFrameServiceCreation is used to automatically remove the frame
- // from the list of frames if something goes bad.
- safeFrameServiceCreation->SetOperationSuccess(viewShown);
- },
- task_continuation_context::use_current());
- }
- }
- }
- }));
- }
- else
- {
- ActivationViewSwitcher ^ activationViewSwitcher;
- auto activateEventArgs = dynamic_cast(args);
- if (activateEventArgs != nullptr)
- {
- activationViewSwitcher = activateEventArgs->ViewSwitcher;
- }
-
- if (activationViewSwitcher != nullptr)
- {
- activationViewSwitcher->ShowAsStandaloneAsync(
- ApplicationView::GetApplicationViewIdForWindow(CoreWindow::GetForCurrentThread()), ViewSizePreference::Default);
- }
- else
- {
- TraceLogger::GetInstance()->LogError(ViewMode::None, L"App::OnAppLaunch", L"Null_ActivationViewSwitcher");
- }
- }
- // Set the preLaunched flag to false
- m_preLaunched = false;
- }
- else // for touch devices
- {
- if (rootFrame->Content == nullptr)
- {
- // When the navigation stack isn't restored navigate to the first page,
- // configuring the new page by passing required information as a navigation
- // parameter
- if (!rootFrame->Navigate(MainPage::typeid, argument))
- {
- // We couldn't navigate to the main page,
- // kill the app so we have a good stack to debug
- throw std::bad_exception();
- }
- }
- if (ApplicationView::GetForCurrentView()->ViewMode != ApplicationViewMode::CompactOverlay)
- {
- if (!Windows::Foundation::Metadata::ApiInformation::IsTypePresent("Windows.Phone.UI.Input.HardwareButtons"))
- {
- // for tablet mode: since system view activation policy is disabled so do ShowAsStandaloneAsync if activationViewSwitcher exists in
- // activationArgs
- ActivationViewSwitcher ^ activationViewSwitcher;
- auto activateEventArgs = dynamic_cast(args);
- if (activateEventArgs != nullptr)
- {
- activationViewSwitcher = activateEventArgs->ViewSwitcher;
- }
- if (activationViewSwitcher != nullptr)
- {
- auto viewId = safe_cast(args)->CurrentlyShownApplicationViewId;
- if (viewId != 0)
- {
- activationViewSwitcher->ShowAsStandaloneAsync(viewId);
- }
- }
- }
- // Ensure the current window is active
- Window::Current->Activate();
- }
- }
- }
-}
-
-void App::SetMinWindowSizeAndActivate(Frame ^ rootFrame, Size minWindowSize)
-{
- // SetPreferredMinSize should always be called before Window::Activate
- ApplicationView ^ appView = ApplicationView::GetForCurrentView();
- appView->SetPreferredMinSize(minWindowSize);
-
- // Place the frame in the current Window
- Window::Current->Content = rootFrame;
- Window::Current->Activate();
-}
-
-void App::RegisterDependencyProperties()
-{
- NarratorNotifier::RegisterDependencyProperties();
-}
-
-void App::OnActivated(IActivatedEventArgs ^ args)
-{
- if (args->Kind == ActivationKind::Protocol)
- {
- // We currently don't pass the uri as an argument,
- // and handle any protocol launch as a normal app launch.
- OnAppLaunch(args, nullptr);
- }
-}
-
-void CalculatorApp::App::OnSuspending(Object ^ sender, SuspendingEventArgs ^ args)
-{
- TraceLogger::GetInstance()->LogButtonUsage();
-}
-
-void App::DismissedEventHandler(SplashScreen ^ sender, Object ^ e)
-{
- SetupJumpList();
-}
-
-
-
diff --git a/src/Calculator/App.xaml.h b/src/Calculator/App.xaml.h
deleted file mode 100644
index f11ebef6..00000000
--- a/src/Calculator/App.xaml.h
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-// App.xaml.h
-// Declaration of the App class.
-//
-
-#pragma once
-
-#include "App.g.h"
-#include "WindowFrameService.h"
-
-namespace CalculatorApp
-{
- namespace ApplicationResourceKeys
- {
- extern Platform::StringReference AppMinWindowHeight;
- extern Platform::StringReference AppMinWindowWidth;
- }
-
- ///
- /// Provides application-specific behavior to supplement the default Application class.
- ///
- ref class App sealed
- {
- public:
- App();
- virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs ^ args) override;
- virtual void OnActivated(Windows::ApplicationModel::Activation::IActivatedEventArgs ^ args) override;
-
- internal:
- void RemoveWindow(_In_ WindowFrameService ^ frameService);
- void RemoveSecondaryWindow(_In_ WindowFrameService ^ frameService);
-
- private:
- static Windows::UI::Xaml::Controls::Frame ^ CreateFrame();
- static void SetMinWindowSizeAndActivate(Windows::UI::Xaml::Controls::Frame ^ rootFrame, Windows::Foundation::Size minWindowSize);
-
- void OnAppLaunch(Windows::ApplicationModel::Activation::IActivatedEventArgs ^ args, Platform::String ^ argument);
- void DismissedEventHandler(Windows::ApplicationModel::Activation::SplashScreen ^ sender, Platform::Object ^ e);
- void RegisterDependencyProperties();
- void OnSuspending(Platform::Object ^ sender, Windows::ApplicationModel::SuspendingEventArgs ^ args);
-
-
- class SafeFrameWindowCreation final
- {
- public:
- SafeFrameWindowCreation(_In_ WindowFrameService ^ frameService, App ^ parent)
- : m_frameService(frameService)
- , m_frameOpenedInWindow(false)
- , m_parent(parent)
- {
- }
-
- void SetOperationSuccess(bool success)
- {
- m_frameOpenedInWindow = success;
- }
-
- ~SafeFrameWindowCreation()
- {
- if (!m_frameOpenedInWindow)
- {
- // Close the window as the navigation to the window didn't succeed
- // and this is not visible to the user.
- m_parent->RemoveWindowFromMap(m_frameService->GetViewId());
- }
- }
-
- private:
- WindowFrameService ^ m_frameService;
- bool m_frameOpenedInWindow;
- App ^ m_parent;
- };
-
- private:
- concurrency::reader_writer_lock m_windowsMapLock;
- std::unordered_map m_secondaryWindows;
-
- concurrency::task SetupJumpList();
- concurrency::task HandleViewReleaseAndRemoveWindowFromMap(_In_ WindowFrameService ^ frameService);
- void AddWindowToMap(_In_ WindowFrameService ^ frameService);
- WindowFrameService ^ GetWindowFromMap(int viewId);
- void RemoveWindowFromMap(int viewId);
- int m_mainViewId;
- bool m_preLaunched;
-
- Windows::UI::Xaml::Controls::Primitives::Popup ^ m_aboutPopup;
- };
-}
diff --git a/src/Calculator/Calculator.rc b/src/Calculator/Calculator.rc
deleted file mode 100644
index 39e80483..00000000
--- a/src/Calculator/Calculator.rc
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-#define APP_FILE_NAME "Calculator"
-#define APP_FILE_IS_EXE
-#define APP_PRODUCT_NAME "Microsoft Calculator"
-#define APP_COMPANY_NAME "Microsoft Corporation"
-#define APP_COPYRIGHT "\251 Microsoft Corporation. All rights reserved."
-
-#include "../build/appversion.rc"
diff --git a/src/Calculator/Calculator.vcxproj b/src/Calculator/Calculator.vcxproj
deleted file mode 100644
index a96a7464..00000000
--- a/src/Calculator/Calculator.vcxproj
+++ /dev/null
@@ -1,973 +0,0 @@
-
-
-
-
- {9447424a-0e05-4911-beb8-e0354405f39a}
- CalculatorApp
- en-US
- 15.0
- true
- Windows Store
- 10.0.18362.0
- 10.0.17134.0
-
- false
- false
- 10.0
- black
- Always
- WindowsDev_TemporaryKey.pfx
- True
- False
-
-
-
-
- x64
-
-
-
- Debug
- ARM
-
-
- Debug
- ARM64
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- ARM
-
-
- Release
- ARM64
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- Application
- true
- v142
-
-
- Application
- true
- v142
-
-
- Application
- true
- v142
-
-
- Application
- true
- v142
-
-
- Application
- false
- true
- v142
-
-
- Application
- false
- true
- v142
-
-
- Application
- false
- true
- v142
-
-
- Application
- false
- true
- v142
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /bigobj /await /std:c++17 /utf-8 %(AdditionalOptions)
- 4453;28204
- $(SolutionDir)..\src\;%(AdditionalIncludeDirectories)
- Level4
- true
-
-
-
-
- /bigobj /await /std:c++17 /utf-8 %(AdditionalOptions)
- 4453;28204
- $(SolutionDir)..\src\;%(AdditionalIncludeDirectories)
- Level4
- true
-
-
-
-
- /bigobj /await /std:c++17 /utf-8 %(AdditionalOptions)
- 4453;28204
- $(SolutionDir)..\src\;%(AdditionalIncludeDirectories)
- Level4
- true
-
-
- WindowsApp.lib;$(VC_ReferencesPath_VC_ARM)\pgort.lib;%(AdditionalDependencies)
-
-
-
-
- /bigobj /await /std:c++17 /utf-8 %(AdditionalOptions)
- 4453;28204
- $(SolutionDir)..\src\;%(AdditionalIncludeDirectories)
- Level4
- true
-
-
- WindowsApp.lib;$(VC_ReferencesPath_VC_ARM)\pgort.lib;%(AdditionalDependencies)
-
-
-
-
- /bigobj /await /std:c++17 /utf-8 %(AdditionalOptions)
- 4453;28204
- $(SolutionDir)..\src\;%(AdditionalIncludeDirectories)
- Level4
- true
-
-
-
-
- /bigobj /await /std:c++17 /utf-8 %(AdditionalOptions)
- 4453;28204
- $(SolutionDir)..\src\;%(AdditionalIncludeDirectories)
- Level4
- true
-
-
- WindowsApp.lib;$(VC_ReferencesPath_VC_x86)\pgort.lib;%(AdditionalDependencies)
-
-
-
-
- /bigobj /await /std:c++17 /utf-8 %(AdditionalOptions)
- 4453;28204
- $(SolutionDir)..\src\;%(AdditionalIncludeDirectories)
- Level4
- true
-
-
-
-
- /bigobj /await /std:c++17 /utf-8 %(AdditionalOptions)
- 4453;28204
- $(SolutionDir)..\src\;%(AdditionalIncludeDirectories)
- Level4
- true
-
-
- WindowsApp.lib;$(VC_ReferencesPath_VC_x64)\pgort.lib;%(AdditionalDependencies)
-
-
-
-
- /DSEND_DIAGNOSTICS /DIS_STORE_BUILD %(AdditionalOptions)
-
-
-
- 0.0.0.0
-
-
- true
-
-
-
-
-
-
- AboutFlyout.xaml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- App.xaml
-
-
- EquationStylePanelControl.xaml
-
-
-
-
- Views\Calculator.xaml
-
-
- Views\CalculatorProgrammerBitFlipPanel.xaml
-
-
- Views\CalculatorProgrammerDisplayPanel.xaml
-
-
- Views\CalculatorProgrammerOperators.xaml
-
-
- Views\CalculatorProgrammerRadixOperators.xaml
-
-
- Views\CalculatorScientificAngleButtons.xaml
-
-
- Views\CalculatorScientificOperators.xaml
-
-
- Views\CalculatorStandardOperators.xaml
-
-
- Views\GraphingCalculator\EquationInputArea.xaml
-
-
- Views\GraphingCalculator\GraphingCalculator.xaml
-
-
- Views\GraphingCalculator\GraphingSettings.xaml
-
-
- Views\GraphingCalculator\KeyGraphFeaturesPanel.xaml
-
-
- Views\GraphingCalculator\GraphingNumPad.xaml
-
-
- Views\HistoryList.xaml
-
-
- Views\MainPage.xaml
-
-
- Views\Memory.xaml
-
-
- Views\MemoryListItem.xaml
-
-
- Views\NumberPad.xaml
-
-
- Views\OperatorsPanel.xaml
-
-
-
-
- Views\SupplementaryResults.xaml
-
-
- Views\DateCalculator.xaml
-
-
- Views\TitleBar.xaml
-
-
- Views\UnitConverter.xaml
-
-
-
-
-
- Designer
-
-
-
- Designer
-
-
- Designer
-
-
- Designer
-
-
-
-
- Designer
-
-
-
- Designer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Designer
-
-
- Designer
-
-
-
-
-
- AboutFlyout.xaml
-
-
- App.xaml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Create
- Create
- Create
- Create
- Create
- Create
- Create
- Create
-
-
- EquationStylePanelControl.xaml
-
-
-
-
- Views\Calculator.xaml
-
-
- Views\CalculatorProgrammerBitFlipPanel.xaml
-
-
- Views\CalculatorProgrammerDisplayPanel.xaml
-
-
- Views\CalculatorProgrammerOperators.xaml
-
-
- Views\CalculatorProgrammerRadixOperators.xaml
-
-
- Views\CalculatorScientificAngleButtons.xaml
-
-
- Views\CalculatorScientificOperators.xaml
-
-
- Views\CalculatorStandardOperators.xaml
-
-
- Views\GraphingCalculator\EquationInputArea.xaml
-
-
- Views\GraphingCalculator\GraphingCalculator.xaml
-
-
- Views\GraphingCalculator\GraphingSettings.xaml
-
-
- Views\GraphingCalculator\KeyGraphFeaturesPanel.xaml
-
-
- Views\GraphingCalculator\GraphingNumPad.xaml
-
-
- Views\HistoryList.xaml
-
-
- Views\MainPage.xaml
-
-
- Views\Memory.xaml
-
-
- Views\MemoryListItem.xaml
-
-
- Views\NumberPad.xaml
-
-
- Views\OperatorsPanel.xaml
-
-
-
-
- Views\SupplementaryResults.xaml
-
-
- Views\DateCalculator.xaml
-
-
- Views\TitleBar.xaml
-
-
- Views\UnitConverter.xaml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Designer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
-
-
-
-
- {90e9761d-9262-4773-942d-caeae75d7140}
-
-
- {e727a92b-f149-492c-8117-c039a298719b}
-
-
-
-
-
-
- <_IntermediateFrameworkSdkReference Include="@(AppxPackageRegistration)" Condition="'@(AppxPackageRegistration)' != ''
AND ('$(Configuration)' == '%(AppxPackageRegistration.Configuration)' OR '%(AppxPackageRegistration.Configuration)' == '')
AND ('$(PlatformTarget)' == '%(AppxPackageRegistration.Architecture)' OR '%(AppxPackageRegistration.Configuration)' == '')">
- %(AppxPackageRegistration.Name)
- %(AppxPackageRegistration.Filename)
- %(AppxPackageRegistration.Configuration)
- %(AppxPackageRegistration.Architecture)
- %(AppxPackageRegistration.Identity)
-
-
- Name = %(_IntermediateFrameworkSdkReference.SDKName), MinVersion = %(_IntermediateFrameworkSdkReference.Version), Publisher = %(_IntermediateFrameworkSdkReference.Publisher)
-
-
-
-
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see https://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Calculator/Calculator.vcxproj.filters b/src/Calculator/Calculator.vcxproj.filters
deleted file mode 100644
index 790f6623..00000000
--- a/src/Calculator/Calculator.vcxproj.filters
+++ /dev/null
@@ -1,1569 +0,0 @@
-
-
-
-
- 9447424a-0e05-4911-beb8-e0354405f39a
-
-
- c853ff75-910d-48f0-ac19-d5fd57622aba
- bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png
-
-
- {21d65f04-31c9-4c70-8511-1c65b894ac8b}
-
-
- {5a666ef7-54fb-46cc-9588-5cbcfaed3465}
-
-
- {f9b88d9e-918b-49ac-869b-a1a380ec3201}
-
-
- {6c2951d4-aa9a-44ce-88c5-28fe11b4e7f7}
-
-
- {7794e615-088b-412c-88bf-f045788ca81f}
-
-
- {72128df8-67df-4d34-934d-14896720e153}
-
-
- {9dd1aaa8-31a9-43b3-b224-77293910f109}
-
-
- {4fc9f4fc-51a7-4348-881b-efe9b32cd0bc}
-
-
- {c883c196-cbc3-437f-8dbd-92f3009479c1}
-
-
- {399ad3d6-a676-45a5-ad0e-8bf796ecfea8}
-
-
- {ad7f2c92-59aa-4720-96af-fccfa1530b25}
-
-
- {b5e4250c-03cf-4cef-ae64-67205e3cdca7}
-
-
- {7ca47758-c39c-40f9-8cbb-7fc2fb627c9e}
-
-
- {65e8bdb6-ca86-43b8-a335-ee406bffe79b}
-
-
- {f47b0870-721f-4646-8b9f-2e55613bcbcc}
-
-
- {9ba8ec65-5ba8-4499-add4-b085710f5ef4}
-
-
- {55225802-0eb4-4d30-91ba-025ac695c7b2}
-
-
- {582f1542-e30b-461d-bf1e-33af9cbd2241}
-
-
- {1fa74901-4f66-4eb1-8d17-fa46debcf314}
-
-
- {2a4bc64b-d709-46a1-9913-006dbf545ff3}
-
-
- {05ba3255-5c3f-4a1f-a8a2-8984cd7826f0}
-
-
- {dc6243aa-fe4d-46e3-9c31-f8461e7bb007}
-
-
- {5dc497d8-4b4d-4851-a721-e37585fcb4ed}
-
-
- {8945e63d-27c4-4407-81bb-993f78b583d8}
-
-
- {a3c3e799-4fff-4795-9ef7-ee2237c4c190}
-
-
- {41958465-ab1b-4450-a688-c2a49a476ad3}
-
-
- {3cb02368-06c6-46b2-a2b3-be916140f2df}
-
-
- {f9dede5d-08b1-4c18-8967-2bf6e0eab10a}
-
-
- {a1cd3ced-b21b-47a1-9dad-5f9a3bcb0653}
-
-
- {99bbda66-7ed8-48e4-bc8b-9285d9c22fb0}
-
-
- {7d443f1c-4e49-4379-bd5c-dd156a73bbb7}
-
-
- {7353aa9e-8f6d-4b11-885b-cb41e8deeb55}
-
-
- {7737b4aa-a25f-464d-8f41-4c7420363963}
-
-
- {a4f2f71c-0707-44df-a8d7-8bf085fc4ace}
-
-
- {16a3847d-fcd8-48ec-af99-0eba690b3389}
-
-
- {decf69bc-1143-4e7e-bf8c-a78201f541c0}
-
-
- {c511e187-9ffa-40ec-8d8b-7d89048ed33e}
-
-
- {9d8d84e4-347a-40d6-bea7-82919c544cdc}
-
-
- {50aa51a9-ac6a-4f46-9920-4fcbb34cab31}
-
-
- {35d8beb6-382f-4e05-a3f0-e21555076168}
-
-
- {cfd9f17a-dcf5-4ab7-9a4d-f66b0a89a21b}
-
-
- {1c96ea43-c29b-4d91-905f-9a80fe3a8ce3}
-
-
- {be692687-c3d8-4ebf-9200-2325a2a7f5c1}
-
-
- {6edbff29-bb0a-4a31-9d21-ac4904cf15db}
-
-
- {38c626d1-54b4-4162-9650-755fb95da2e7}
-
-
- {7caf3ffa-9430-49d4-86da-ef6fd3b952ec}
-
-
- {ea5e3c91-ae7b-4984-8f67-a287dc4e985d}
-
-
- {b8904687-7060-450e-8ac6-22b409acb0ff}
-
-
- {bde6a2ee-9103-45ad-a03c-840405419d96}
-
-
- {2ecb3b06-467c-4872-9df9-910752d5a0e5}
-
-
- {75c19928-73ca-4451-ac27-7c87df9f5add}
-
-
- {6623c7a9-1632-4776-bd26-e924d8bdc032}
-
-
- {392e6638-a46c-463f-a76c-d80ea6dafb76}
-
-
- {f5b473d1-ff89-4278-bc40-f842a5f25b31}
-
-
- {90ffae6c-249f-40bb-b817-857136971b44}
-
-
- {cada420a-1c49-4446-972e-b3e099773c53}
-
-
- {f829702a-28db-47eb-95ca-c424ec052101}
-
-
- {1b77ab20-2528-42c9-931b-4de4d6b872fb}
-
-
- {c3930ca9-93d7-401c-898f-523590a400c9}
-
-
- {aa0bf861-fe20-4cad-b78b-cf037bcb1f2c}
-
-
- {d429fed0-d5d8-49a3-a7c8-2f7c45cf789f}
-
-
- {d81d9186-d538-4a6e-95aa-1c84bbd0c2a4}
-
-
- {8647b869-c857-4e75-97ab-726cf7e041c5}
-
-
- {d443fa37-c49e-47d2-9697-928617752438}
-
-
- {c83b2fa0-f69b-40e7-90e2-1a9c02ed2681}
-
-
- {2075e31f-992a-4ec5-8671-2c4e244f1285}
-
-
- {d9d114cf-2268-4954-93f8-97a9dad6bdd4}
-
-
- {3cb2e2cf-48be-4c9c-96b8-0c843c73e0fa}
-
-
- {fb46a60d-1f3a-4818-aefd-cba41e514245}
-
-
- {0120c344-0bc0-4a1d-b82c-df7945f46189}
-
-
- {e23e2a6e-491b-4200-9bf7-d355a1ee695b}
-
-
- {b491a249-26b8-4814-9f50-2c3a57018c56}
-
-
-
-
-
-
-
-
-
- Controls
-
-
- Controls
-
-
- Controls
-
-
- Converters
-
-
- Converters
-
-
- Converters
-
-
- Converters
-
-
- Converters
-
-
- Converters
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Controls
-
-
-
-
- Controls
-
-
-
-
- Controls
-
-
- Controls
-
-
- Views\StateTriggers
-
-
-
-
- Controls
-
-
- Common
-
-
- Controls
-
-
-
- Views\StateTriggers
-
-
- Controls
-
-
- Controls
-
-
-
-
- Controls
-
-
-
- Views\GraphingCalculator
-
-
-
- Utils
-
-
- Common
-
-
-
-
-
-
-
-
- Common
-
-
- Controls
-
-
- Controls
-
-
- Controls
-
-
- Converters
-
-
- Converters
-
-
- Converters
-
-
- Converters
-
-
- Converters
-
-
- Converters
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Controls
-
-
-
-
- Controls
-
-
-
-
- Controls
-
-
- Controls
-
-
- Views\StateTriggers
-
-
-
-
- Controls
-
-
- Common
-
-
- Controls
-
-
- Views\StateTriggers
-
-
-
- Controls
-
-
- Controls
-
-
-
-
- Controls
-
-
-
- Views\GraphingCalculator
-
-
-
- Utils
-
-
- Common
-
-
- Common
-
-
-
-
-
-
-
-
-
-
-
-
-
- Views
-
-
- Views
-
-
- Views
-
-
- Views
-
-
- Views
-
-
- Views
-
-
- Views
-
-
- Views
-
-
- Views
-
-
- Views
-
-
- Views
-
-
- Views
-
-
- Views
-
-
-
- Views
-
-
- Views
-
-
- Views
-
-
- Views
-
-
- Views
-
-
- Views\GraphingCalculator
-
-
- Views\GraphingCalculator
-
-
- Views
-
-
- Views\GraphingCalculator
-
-
- Views\GraphingCalculator
-
-
- Views\GraphingCalculator
-
-
-
- Views\StateTriggers
-
-
-
-
- Resources\en-US
-
-
- Resources\en-US
-
-
- Resources\az-Latn-az
-
-
- Resources\af-za
-
-
- Resources\uk-ua
-
-
- Resources\ar-sa
-
-
- Resources\vi-vn
-
-
- Resources\am-et
-
-
- Resources\tr-tr
-
-
- Resources\zh-tw
-
-
- Resources\bg-bg
-
-
- Resources\ca-es
-
-
- Resources\cs-cz
-
-
- Resources\da-dk
-
-
- Resources\zh-cn
-
-
- Resources\ta-in
-
-
- Resources\sv-se
-
-
- Resources\te-in
-
-
- Resources\th-th
-
-
- Resources\et-ee
-
-
- Resources\es-mx
-
-
- Resources\sk-sk
-
-
- Resources\el-gr
-
-
- Resources\en-gb
-
-
- Resources\de-de
-
-
- Resources\sr-latn-rs
-
-
- Resources\es-es
-
-
- Resources\sq-al
-
-
- Resources\fil-ph
-
-
- Resources\ru-ru
-
-
- Resources\fr-ca
-
-
- Resources\sl-sI
-
-
- Resources\nl-nl
-
-
- Resources\nb-no
-
-
- Resources\eu-es
-
-
- Resources\fa-ir
-
-
- Resources\fi-fi
-
-
- Resources\ro-ro
-
-
- Resources\he-il
-
-
- Resources\fr-fr
-
-
- Resources\gl-es
-
-
- Resources\pl-pl
-
-
- Resources\pt-pt
-
-
- Resources\hi-in
-
-
- Resources\pt-br
-
-
- Resources\lt-lt
-
-
- Resources\ms-my
-
-
- Resources\it-it
-
-
- Resources\mk-mk
-
-
- Resources\lv-lv
-
-
- Resources\ja-jp
-
-
- Resources\id-id
-
-
- Resources\ml-in
-
-
- Resources\hr-hr
-
-
- Resources\kn-in
-
-
- Resources\hu-hu
-
-
- Resources\is-is
-
-
- Resources\ko-kr
-
-
- Resources\lo-la
-
-
- Resources\km-kh
-
-
- Resources\kk-kz
-
-
- Resources\es-mx
-
-
- Resources\fr-ca
-
-
- Resources\is-is
-
-
- Resources\km-kh
-
-
- Resources\id-id
-
-
- Resources\it-it
-
-
- Resources\ms-my
-
-
- Resources\hr-hr
-
-
- Resources\mk-mk
-
-
- Resources\ml-in
-
-
- Resources\lv-lv
-
-
- Resources\fr-fr
-
-
- Resources\hi-in
-
-
- Resources\lt-lt
-
-
- Resources\hu-hu
-
-
- Resources\he-il
-
-
- Resources\pt-pt
-
-
- Resources\gl-es
-
-
- Resources\pt-br
-
-
- Resources\eu-es
-
-
- Resources\fa-ir
-
-
- Resources\nb-no
-
-
- Resources\pl-pl
-
-
- Resources\nl-nl
-
-
- Resources\et-ee
-
-
- Resources\sq-al
-
-
- Resources\ro-ro
-
-
- Resources\ru-ru
-
-
- Resources\lo-la
-
-
- Resources\fil-ph
-
-
- Resources\sk-sk
-
-
- Resources\fi-fi
-
-
- Resources\de-de
-
-
- Resources\sr-latn-rs
-
-
- Resources\en-gb
-
-
- Resources\te-in
-
-
- Resources\kn-in
-
-
- Resources\th-th
-
-
- Resources\ta-in
-
-
- Resources\es-es
-
-
- Resources\sv-se
-
-
- Resources\el-gr
-
-
- Resources\uk-ua
-
-
- Resources\zh-cn
-
-
- Resources\vi-vn
-
-
- Resources\tr-tr
-
-
- Resources\sl-sI
-
-
- Resources\zh-tw
-
-
- Resources\cs-cz
-
-
- Resources\da-dk
-
-
- Resources\bg-bg
-
-
- Resources\ca-es
-
-
- Resources\az-Latn-az
-
-
- Resources\af-za
-
-
- Resources\ar-sa
-
-
- Resources\kk-kz
-
-
- Resources\am-et
-
-
- Resources\ja-jp
-
-
- Resources\ko-kr
-
-
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
-
-
- Assets
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Calculator/Common/AlwaysSelectedCollectionView.h b/src/Calculator/Common/AlwaysSelectedCollectionView.h
deleted file mode 100644
index 35d40095..00000000
--- a/src/Calculator/Common/AlwaysSelectedCollectionView.h
+++ /dev/null
@@ -1,293 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-#pragma once
-
-namespace CalculatorApp
-{
- namespace Common
- {
- ref class AlwaysSelectedCollectionView sealed : public Windows::UI::Xaml::DependencyObject, public Windows::UI::Xaml::Data::ICollectionView
- {
- internal : AlwaysSelectedCollectionView(Windows::UI::Xaml::Interop::IBindableVector ^ source)
- : m_currentPosition(-1)
- {
- m_source = source;
-
- Windows::UI::Xaml::Interop::IBindableObservableVector ^ observable =
- dynamic_cast(source);
- if (observable)
- {
- observable->VectorChanged += ref new Windows::UI::Xaml::Interop::BindableVectorChangedEventHandler(
- this, &AlwaysSelectedCollectionView::OnSourceBindableVectorChanged);
- }
- }
-
- private:
- // ICollectionView
- // Not implemented methods
- virtual Windows::Foundation::IAsyncOperation<
- Windows::UI::Xaml::Data::LoadMoreItemsResult> ^ LoadMoreItemsAsync(unsigned int) = Windows::UI::Xaml::Data::ICollectionView::LoadMoreItemsAsync
- {
- throw ref new Platform::NotImplementedException();
- }
- virtual bool MoveCurrentToFirst() = Windows::UI::Xaml::Data::ICollectionView::MoveCurrentToFirst
- {
- throw ref new Platform::NotImplementedException();
- }
- virtual bool MoveCurrentToLast() = Windows::UI::Xaml::Data::ICollectionView::MoveCurrentToLast
- {
- throw ref new Platform::NotImplementedException();
- }
- virtual bool MoveCurrentToNext() = Windows::UI::Xaml::Data::ICollectionView::MoveCurrentToNext
- {
- throw ref new Platform::NotImplementedException();
- }
- virtual bool MoveCurrentToPrevious() = Windows::UI::Xaml::Data::ICollectionView::MoveCurrentToPrevious
- {
- throw ref new Platform::NotImplementedException();
- }
- property Windows::Foundation::Collections::IObservableVector ^ CollectionGroups {
- virtual Windows::Foundation::Collections::IObservableVector<
- Platform::Object ^> ^ get() = Windows::UI::Xaml::Data::ICollectionView::CollectionGroups::get
- {
- return ref new Platform::Collections::Vector();
- }
- } property bool HasMoreItems
- {
- virtual bool get() = Windows::UI::Xaml::Data::ICollectionView::HasMoreItems::get
- {
- return false;
- }
- }
-
- // Implementented methods
- virtual bool MoveCurrentTo(Platform::Object ^ item) = Windows::UI::Xaml::Data::ICollectionView::MoveCurrentTo
- {
- if (item)
- {
- unsigned int newCurrentPosition = 0;
- bool result = m_source->IndexOf(item, &newCurrentPosition);
- if (result)
- {
- m_currentPosition = newCurrentPosition;
- m_currentChanged(this, nullptr);
- return true;
- }
- }
-
- // The item is not in the collection
- // We're going to schedule a call back later so we
- // restore the selection to the way we wanted it to begin with
- if (m_currentPosition >= 0 && m_currentPosition < static_cast(m_source->Size))
- {
- this->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new Windows::UI::Core::DispatchedHandler([this]() {
- m_currentChanged(this, nullptr);
- }));
- }
- return false;
- }
-
- virtual bool MoveCurrentToPosition(int index) = Windows::UI::Xaml::Data::ICollectionView::MoveCurrentToPosition
- {
- if (index < 0 || index >= static_cast(m_source->Size))
- {
- return false;
- }
-
- m_currentPosition = index;
- m_currentChanged(this, nullptr);
- return true;
- }
-
- property Platform::Object^ CurrentItem
- {
- virtual Platform::Object^ get() = Windows::UI::Xaml::Data::ICollectionView::CurrentItem::get
- {
- if (m_currentPosition >= 0 && m_currentPosition < static_cast(m_source->Size))
- {
- return m_source->GetAt(m_currentPosition);
- }
- return nullptr;
- }
- }
-
- property int CurrentPosition
- {
- virtual int get() = Windows::UI::Xaml::Data::ICollectionView::CurrentPosition::get
- {
- return m_currentPosition;
- }
- }
-
- property bool IsCurrentAfterLast
- {
- virtual bool get() = Windows::UI::Xaml::Data::ICollectionView::IsCurrentAfterLast::get
- {
- return m_currentPosition >= static_cast(m_source->Size);
- }
- }
-
- property bool IsCurrentBeforeFirst
- {
- virtual bool get() = Windows::UI::Xaml::Data::ICollectionView::IsCurrentBeforeFirst::get
- {
- return m_currentPosition < 0;
- }
- }
-
- event Windows::Foundation::EventHandler^ CurrentChanged
- {
- virtual Windows::Foundation::EventRegistrationToken add(Windows::Foundation::EventHandler^ handler) = Windows::UI::Xaml::Data::ICollectionView::CurrentChanged::add
- {
- return m_currentChanged += handler;
- }
- virtual void remove(Windows::Foundation::EventRegistrationToken token) = Windows::UI::Xaml::Data::ICollectionView::CurrentChanged::remove
- {
- m_currentChanged -= token;
- }
- }
- event Windows::UI::Xaml::Data::CurrentChangingEventHandler^ CurrentChanging
- {
- virtual Windows::Foundation::EventRegistrationToken add(Windows::UI::Xaml::Data::CurrentChangingEventHandler^ handler) = Windows::UI::Xaml::Data::ICollectionView::CurrentChanging::add
- {
- return m_currentChanging += handler;
- }
- virtual void remove(Windows::Foundation::EventRegistrationToken token) = Windows::UI::Xaml::Data::ICollectionView::CurrentChanging::remove
- {
- m_currentChanging -= token;
- }
- }
-
- // IVector