mirror of
https://github.com/Microsoft/calculator.git
synced 2025-07-30 11:38:26 -07:00
Revert dual screen (#1134)
This commit is contained in:
parent
ded99f87b4
commit
b0565f90f0
26 changed files with 1237 additions and 2377 deletions
|
@ -334,7 +334,6 @@
|
|||
<ClInclude Include="StandardCalculatorViewModel.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
<ClInclude Include="UnitConverterViewModel.h" />
|
||||
<ClInclude Include="Utils\DeviceFamilyHelper.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ApplicationViewModel.cpp" />
|
||||
|
@ -375,7 +374,6 @@
|
|||
</ClCompile>
|
||||
<ClCompile Include="StandardCalculatorViewModel.cpp" />
|
||||
<ClCompile Include="UnitConverterViewModel.cpp" />
|
||||
<ClCompile Include="Utils\DeviceFamilyHelper.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CalcManager\CalcManager.vcxproj">
|
||||
|
|
|
@ -13,9 +13,6 @@
|
|||
<Filter Include="GraphingCalculator">
|
||||
<UniqueIdentifier>{cf7dca32-9727-4f98-83c3-1c0ca7dd1e0c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Utils">
|
||||
<UniqueIdentifier>{68bb415f-fcb1-4759-b0a7-c5caf9d72396}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="pch.cpp" />
|
||||
|
@ -89,9 +86,6 @@
|
|||
<ClCompile Include="GraphingCalculator\GraphingSettingsViewModel.cpp">
|
||||
<Filter>GraphingCalculator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Utils\DeviceFamilyHelper.cpp">
|
||||
<Filter>Utils</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="pch.h" />
|
||||
|
@ -205,9 +199,6 @@
|
|||
<ClInclude Include="Common\DelegateCommand.h">
|
||||
<Filter>Common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Utils\DeviceFamilyHelper.h">
|
||||
<Filter>Utils</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="DataLoaders\DefaultFromToCurrency.json">
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#include "pch.h"
|
||||
#include "DeviceFamilyHelper.h"
|
||||
|
||||
using namespace CalculatorApp::ViewModel::Utils;
|
||||
using namespace Windows::System::Profile;
|
||||
|
||||
bool DeviceFamilyHelper::m_isInit{ false };
|
||||
DeviceFamily DeviceFamilyHelper::m_deviceFamily{ DeviceFamily::Unknown };
|
||||
|
||||
DeviceFamily DeviceFamilyHelper::GetDeviceFamily()
|
||||
{
|
||||
if (!m_isInit)
|
||||
{
|
||||
InitDeviceFamily();
|
||||
m_isInit = true;
|
||||
}
|
||||
return m_deviceFamily;
|
||||
}
|
||||
|
||||
void DeviceFamilyHelper::InitDeviceFamily()
|
||||
{
|
||||
auto deviceFamily = AnalyticsInfo::VersionInfo->DeviceFamily;
|
||||
if (deviceFamily == L"Windows.Desktop")
|
||||
{
|
||||
m_deviceFamily = DeviceFamily::Desktop;
|
||||
}
|
||||
else if (deviceFamily == L"Windows.Core")
|
||||
{
|
||||
m_deviceFamily = DeviceFamily::WindowsCore;
|
||||
}
|
||||
else if (deviceFamily == L"Windows.Xbox")
|
||||
{
|
||||
m_deviceFamily = DeviceFamily::Xbox;
|
||||
}
|
||||
else if (deviceFamily == L"Windows.Team")
|
||||
{
|
||||
m_deviceFamily = DeviceFamily::SurfaceHub;
|
||||
}
|
||||
else if (deviceFamily == L"Windows.Holographic")
|
||||
{
|
||||
m_deviceFamily = DeviceFamily::HoloLens;
|
||||
}
|
||||
else if (deviceFamily == L"Windows.Mobile")
|
||||
{
|
||||
m_deviceFamily = DeviceFamily::Mobile;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_deviceFamily = DeviceFamily::Unknown;
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace CalculatorApp::ViewModel::Utils
|
||||
{
|
||||
public enum class DeviceFamily
|
||||
{
|
||||
Unknown,
|
||||
Desktop,
|
||||
Mobile,
|
||||
Xbox,
|
||||
SurfaceHub,
|
||||
HoloLens,
|
||||
WindowsCore,
|
||||
};
|
||||
|
||||
public ref class DeviceFamilyHelper sealed
|
||||
{
|
||||
private:
|
||||
DeviceFamilyHelper() {}
|
||||
public:
|
||||
static DeviceFamily GetDeviceFamily();
|
||||
private:
|
||||
static void InitDeviceFamily();
|
||||
private:
|
||||
static bool m_isInit;
|
||||
static DeviceFamily m_deviceFamily;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue