Merge remote-tracking branch 'upstream/master' into ClipboardImprovement

This commit is contained in:
Rudy Huyn 2019-03-07 22:14:59 -08:00
commit 9c47642515
120 changed files with 389 additions and 404 deletions

View file

@ -1,4 +1,4 @@
## IDE-independent coding style via EditorConfig: http://editorconfig.org/ ## IDE-independent coding style via EditorConfig: https://editorconfig.org/
root = true root = true

View file

@ -41,7 +41,7 @@ To learn how to build the code and run tests, follow the instructions in the [RE
### Style guidelines ### Style guidelines
The code in this project uses several different coding styles, depending on the age and history of The code in this project uses several different coding styles, depending on the age and history of
the code. Please attempt to match the style of surrounding code as much as possible. In new the code. Please attempt to match the style of surrounding code as much as possible. In new
components, prefer the patterns described in the [C++ core guidelines](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines) components, prefer the patterns described in the [C++ core guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines)
and the [modern C++/WinRT language projections](https://docs.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/). and the [modern C++/WinRT language projections](https://docs.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/).
### Testing ### Testing

View file

@ -2,7 +2,7 @@ THIRD PARTY SOFTWARE NOTICES AND INFORMATION
Do Not Translate or Localize Do Not Translate or Localize
This software incorporates material from third parties. Microsoft makes certain This software incorporates material from third parties. Microsoft makes certain
open source code available at http://3rdpartysource.microsoft.com, or you may open source code available at https://3rdpartysource.microsoft.com, or you may
send a check or money order for US $5.00, including the product name, the open send a check or money order for US $5.00, including the product name, the open
source component name, and version number, to: source component name, and version number, to:

View file

@ -46,7 +46,7 @@ For information regarding Windows Calculator plans and release schedule, please
## Data / Telemetry ## Data / Telemetry
This project collects usage data and sends it to Microsoft to help improve our products and services. This project collects usage data and sends it to Microsoft to help improve our products and services.
Read our [privacy statement](http://go.microsoft.com/fwlink/?LinkId=521839) to learn more. Read our [privacy statement](https://go.microsoft.com/fwlink/?LinkId=521839) to learn more.
Telemetry is disabled in development builds by default, and can be enabled with the `SEND_TELEMETRY` Telemetry is disabled in development builds by default, and can be enabled with the `SEND_TELEMETRY`
build flag. build flag.

View file

@ -87,7 +87,7 @@ The ViewModel layer is contained in the [CalcViewModel][CalcViewModel folder] pr
data for the UI to bind against and act as the intermediary separating pure business logic from UI components that data for the UI to bind against and act as the intermediary separating pure business logic from UI components that
should not care about the model's implementation. Just as the View layer consists of a hierarchy of XAML files, the should not care about the model's implementation. Just as the View layer consists of a hierarchy of XAML files, the
ViewModel consists of a hierarchy of ViewModel files. The relationship between XAML and ViewModel files is often 1:1. ViewModel consists of a hierarchy of ViewModel files. The relationship between XAML and ViewModel files is often 1:1.
Here are the noteable ViewModel files to start exploring with: Here are the notable ViewModel files to start exploring with:
* [ApplicationViewModel.h][ApplicationViewModel.h]: The ViewModel for [MainPage.xaml][MainPage.xaml]. This ViewModel * [ApplicationViewModel.h][ApplicationViewModel.h]: The ViewModel for [MainPage.xaml][MainPage.xaml]. This ViewModel
is the root of the other mode-specific ViewModels. The application changes between modes by updating the `Mode` property is the root of the other mode-specific ViewModels. The application changes between modes by updating the `Mode` property

View file

@ -11,7 +11,7 @@ These manual tests are run before every release of the Calculator app.
Steps: Steps:
1. From the Standard Calculator page, input “3”, “+”, “3”, “Enter” on the keyboard 1. From the Standard Calculator page, input “3”, “+”, “3”, “Enter” on the keyboard
Expected: “6” shows up in the display Expected: “6” shows up in the display
2. Input “4”, “-, “2”, “=” using the in-app buttons 2. Input “4”, “-, “2”, “=” using the in-app buttons
*Expected: “2” shows up in the display* *Expected: “2” shows up in the display*
**Test 2** **Test 2**
@ -31,7 +31,7 @@ Steps:
**Test 2** **Test 2**
Steps: Steps:
1. Input “5”, “n!, “=” using the in-app buttons 1. Input “5”, “n!, “=” using the in-app buttons
*Expected: “120” shows up in the display* *Expected: “120” shows up in the display*
### Math in Programmer Calculator ### Math in Programmer Calculator
@ -124,7 +124,7 @@ Steps:
m. “( )" Parenthesis m. “( )" Parenthesis
**All Calulators Test: Verify memory functions** **All Calculators Test: Verify memory functions**
Steps: Steps:
1. Launch the "Calculator" app. 1. Launch the "Calculator" app.
2. Navigate to "Standard" Calculator. 2. Navigate to "Standard" Calculator.

View file

@ -131,7 +131,7 @@ new features, the Microsoft team considers at least these items:
- [ ] Microsoft must plan to keep these dependencies secure and functional for the lifetime of - [ ] Microsoft must plan to keep these dependencies secure and functional for the lifetime of
the app (which might be several years). the app (which might be several years).
- [ ] The app should be fully functional if some network requests are slow or fail. Tools like - [ ] The app should be fully functional if some network requests are slow or fail. Tools like
[Fiddler](http://docs.telerik.com/fiddler/knowledgebase/fiddlerscript/perftesting) [Fiddler](https://docs.telerik.com/fiddler/knowledgebase/fiddlerscript/perftesting)
can be used to simulate slow or failed requests. can be used to simulate slow or failed requests.
## Step 4: Final product review and merge to master ## Step 4: Final product review and merge to master

View file

@ -20,7 +20,7 @@ namespace Calculator.UIAutomationLibrary
{ {
public const string CoreWindowClassName = "Windows.UI.Core.CoreWindow"; public const string CoreWindowClassName = "Windows.UI.Core.CoreWindow";
// This doesn't actually work right now becaue popup will disappear // This doesn't actually work right now because popup will disappear
// Bug 13713223: ContentDialog/Popup does not show up in the UIA tree when Windows.Current.Content has an AutomationName set. // Bug 13713223: ContentDialog/Popup does not show up in the UIA tree when Windows.Current.Content has an AutomationName set.
// public static readonly UICondition TopLevelWindowUICondition = UICondition.CreateFromId(Constants.TopLevelWindowAutomationId); // public static readonly UICondition TopLevelWindowUICondition = UICondition.CreateFromId(Constants.TopLevelWindowAutomationId);
public static readonly UICondition CoreWindowUICondition = UICondition.CreateFromClassName(CoreWindowClassName) public static readonly UICondition CoreWindowUICondition = UICondition.CreateFromClassName(CoreWindowClassName)

View file

@ -36,6 +36,6 @@ namespace Calculator.UIAutomationLibrary
/// <summary> /// <summary>
/// These are uses with the DataSource test property to specify iteration info. /// These are uses with the DataSource test property to specify iteration info.
/// </summary> /// </summary>
public const string AppLifecycleInterationsSource = "Table:" + ConfigDirectory + "AppLifecycle.Iterations.xml#PerformanceConfigurations"; public const string AppLifecycleIterationsSource = "Table:" + ConfigDirectory + "AppLifecycle.Iterations.xml#PerformanceConfigurations";
} }
} }

View file

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!-- <!--
This file defines a table of preformance configuration for use with This file defines a table of performance configuration for use with
TAEF Table Based Data-driven Testing. TAEF Table Based Data-driven Testing.
This table specifies we will run the test three times (each iteration has a This table specifies we will run the test three times (each iteration has a

View file

@ -64,7 +64,7 @@
<Buffers Value="15" /> <Buffers Value="15" />
</EventCollector> </EventCollector>
<EventCollector Id="EC_Responsiveness.HighCost.Verbose" Name="User Session Logger Higcost Verbose"> <EventCollector Id="EC_Responsiveness.HighCost.Verbose" Name="User Session Logger HighCost Verbose">
<BufferSize Value="1024" /> <BufferSize Value="1024" />
<Buffers Value="3" PercentageOfTotalMemory="true" MaximumBufferSpace="60" /> <Buffers Value="3" PercentageOfTotalMemory="true" MaximumBufferSpace="60" />
</EventCollector> </EventCollector>

View file

@ -34,7 +34,7 @@ namespace Calculator.PerfTests
/// The test launches the application, suspend and resumes it and then terminates the app. /// The test launches the application, suspend and resumes it and then terminates the app.
/// ///
/// A TAEF data source is used to specify the Windows Performance Recorder profile and /// A TAEF data source is used to specify the Windows Performance Recorder profile and
/// regions of interest file to use and defines threee different configurations to execute this test with. /// regions of interest file to use and defines three different configurations to execute this test with.
/// Cold: The initial run to get dlls loaded into memory and to execute any first-run app logic. /// Cold: The initial run to get dlls loaded into memory and to execute any first-run app logic.
/// Warm: The run that will produce consistent results and that would be used for measures. /// Warm: The run that will produce consistent results and that would be used for measures.
/// Memory: A run that is focused on collecting more info on allocations. /// Memory: A run that is focused on collecting more info on allocations.
@ -42,7 +42,7 @@ namespace Calculator.PerfTests
[TestMethod] [TestMethod]
[TestProperty("RunAs", "User")] [TestProperty("RunAs", "User")]
[TestProperty("Category", "Performance")] [TestProperty("Category", "Performance")]
[TestProperty(WinperfConstants.DataSource, PerfConstants.AppLifecycleInterationsSource)] [TestProperty(WinperfConstants.DataSource, PerfConstants.AppLifecycleIterationsSource)]
public void AppLifecycleTest() public void AppLifecycleTest()
{ {
AppLifecycle.Run(Constants.PackageAppUserModelId); AppLifecycle.Run(Constants.PackageAppUserModelId);

View file

@ -4,7 +4,7 @@
<add key="disableSourceControlIntegration" value="true" /> <add key="disableSourceControlIntegration" value="true" />
</solution> </solution>
<packageSources> <packageSources>
<add key="NuGet official package source" value="https://nuget.org/api/v2/" /> <add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
<add key="MitaLite" value="https://microsoft.pkgs.visualstudio.com/DefaultCollection/_packaging/MitaLite/nuget/v3/index.json" /> <add key="MitaLite" value="https://microsoft.pkgs.visualstudio.com/DefaultCollection/_packaging/MitaLite/nuget/v3/index.json" />
<add key="Taef" value="https://microsoft.pkgs.visualstudio.com/DefaultCollection/_packaging/Taef/nuget/v3/index.json" /> <add key="Taef" value="https://microsoft.pkgs.visualstudio.com/DefaultCollection/_packaging/Taef/nuget/v3/index.json" />
<add key="Test.Net" value="https://microsoft.pkgs.visualstudio.com/DefaultCollection/_packaging/Test.Net/nuget/v3/index.json" /> <add key="Test.Net" value="https://microsoft.pkgs.visualstudio.com/DefaultCollection/_packaging/Test.Net/nuget/v3/index.json" />

View file

@ -35,8 +35,8 @@ void CHistoryCollector::ReinitHistory()
CHistoryCollector::CHistoryCollector(ICalcDisplay *pCalcDisplay, std::shared_ptr<IHistoryDisplay> pHistoryDisplay, wchar_t decimalSymbol) : CHistoryCollector::CHistoryCollector(ICalcDisplay *pCalcDisplay, std::shared_ptr<IHistoryDisplay> pHistoryDisplay, wchar_t decimalSymbol) :
m_pHistoryDisplay(pHistoryDisplay), m_pHistoryDisplay(pHistoryDisplay),
m_pCalcDisplay(pCalcDisplay), m_pCalcDisplay(pCalcDisplay),
m_decimalSymbol(decimalSymbol), m_iCurLineHistStart(-1),
m_iCurLineHistStart(-1) m_decimalSymbol(decimalSymbol)
{ {
ReinitHistory(); ReinitHistory();
} }
@ -136,7 +136,7 @@ void CHistoryCollector::ChangeLastBinOp(int nOpCode, bool fPrecInvToHigher)
TruncateEquationSzFromIch(m_lastBinOpStartIndex); TruncateEquationSzFromIch(m_lastBinOpStartIndex);
if (fPrecInvToHigher) if (fPrecInvToHigher)
{ {
EnclosePrecInvertionBrackets(); EnclosePrecInversionBrackets();
} }
AddBinOpToHistory(nOpCode); AddBinOpToHistory(nOpCode);
} }
@ -161,7 +161,7 @@ void CHistoryCollector::PopLastOpndStart()
void CHistoryCollector::AddOpenBraceToHistory() void CHistoryCollector::AddOpenBraceToHistory()
{ {
int iCommandEnd = AddCommand(std::make_shared<CParentheses>(IDC_OPENP)); AddCommand(std::make_shared<CParentheses>(IDC_OPENP));
int ichOpndStart = IchAddSzToEquationSz(CCalcEngine::OpCodeToString(IDC_OPENP), -1); int ichOpndStart = IchAddSzToEquationSz(CCalcEngine::OpCodeToString(IDC_OPENP), -1);
PushLastOpndStart(ichOpndStart); PushLastOpndStart(ichOpndStart);
@ -171,7 +171,7 @@ void CHistoryCollector::AddOpenBraceToHistory()
void CHistoryCollector::AddCloseBraceToHistory() void CHistoryCollector::AddCloseBraceToHistory()
{ {
int iCommandEnd = AddCommand(std::make_shared<CParentheses>(IDC_CLOSEP)); AddCommand(std::make_shared<CParentheses>(IDC_CLOSEP));
IchAddSzToEquationSz(CCalcEngine::OpCodeToString(IDC_CLOSEP), -1); IchAddSzToEquationSz(CCalcEngine::OpCodeToString(IDC_CLOSEP), -1);
SetExpressionDisplay(); SetExpressionDisplay();
PopLastOpndStart(); PopLastOpndStart();
@ -180,7 +180,7 @@ void CHistoryCollector::AddCloseBraceToHistory()
m_bLastOpndBrace = true; m_bLastOpndBrace = true;
} }
void CHistoryCollector::EnclosePrecInvertionBrackets() void CHistoryCollector::EnclosePrecInversionBrackets()
{ {
// Top of the Opnd starts index or 0 is nothing is in top // Top of the Opnd starts index or 0 is nothing is in top
int ichStart = (m_curOperandIndex > 0) ? m_operandIndices[m_curOperandIndex - 1] : 0; int ichStart = (m_curOperandIndex > 0) ? m_operandIndices[m_curOperandIndex - 1] : 0;
@ -401,9 +401,9 @@ int CHistoryCollector::AddCommand(_In_ const std::shared_ptr<IExpressionCommand>
throw(CALC_E_OUTOFMEMORY); throw(CALC_E_OUTOFMEMORY);
} }
unsigned int nCommmands = 0; unsigned int nCommands = 0;
m_spCommands->GetSize(&nCommmands); m_spCommands->GetSize(&nCommands);
return nCommmands - 1; return nCommands - 1;
} }
//To Update the operands in the Expression according to the current Radix //To Update the operands in the Expression according to the current Radix
@ -450,20 +450,16 @@ std::shared_ptr<CalculatorVector<int>> CHistoryCollector::GetOperandCommandsFrom
std::shared_ptr<CalculatorVector<int>> commands = std::make_shared<CalculatorVector<int>>(); std::shared_ptr<CalculatorVector<int>> commands = std::make_shared<CalculatorVector<int>>();
// Check for negate // Check for negate
bool fNegative = (numStr[0] == L'-'); bool fNegative = (numStr[0] == L'-');
bool fSciFmt = false;
bool fDecimal = false;
for (size_t i = (fNegative ? 1 : 0); i < numStr.length(); i++) for (size_t i = (fNegative ? 1 : 0); i < numStr.length(); i++)
{ {
if (numStr[i] == m_decimalSymbol) if (numStr[i] == m_decimalSymbol)
{ {
IFT(commands->Append(IDC_PNT)); IFT(commands->Append(IDC_PNT));
fDecimal = true;
} }
else if (numStr[i] == L'e') else if (numStr[i] == L'e')
{ {
IFT(commands->Append(IDC_EXP)); IFT(commands->Append(IDC_EXP));
fSciFmt = true;
} }
else if (numStr[i] == L'-') else if (numStr[i] == L'-')
{ {

View file

@ -55,41 +55,41 @@ void CCalcEngine::InitialOneTimeOnlySetup(CalculationManager::IResourceProvider&
// //
////////////////////////////////////////////////// //////////////////////////////////////////////////
CCalcEngine::CCalcEngine(bool fPrecedence, bool fIntegerMode, CalculationManager::IResourceProvider* const pResourceProvider, __in_opt ICalcDisplay *pCalcDisplay, __in_opt shared_ptr<IHistoryDisplay> pHistoryDisplay) : CCalcEngine::CCalcEngine(bool fPrecedence, bool fIntegerMode, CalculationManager::IResourceProvider* const pResourceProvider, __in_opt ICalcDisplay *pCalcDisplay, __in_opt shared_ptr<IHistoryDisplay> pHistoryDisplay) :
m_HistoryCollector(pCalcDisplay, pHistoryDisplay, DEFAULT_DEC_SEPARATOR),
m_resourceProvider(pResourceProvider),
m_bSetCalcState(false),
m_fPrecedence(fPrecedence), m_fPrecedence(fPrecedence),
m_fIntegerMode(fIntegerMode), m_fIntegerMode(fIntegerMode),
m_pCalcDisplay(pCalcDisplay), m_pCalcDisplay(pCalcDisplay),
m_input(DEFAULT_DEC_SEPARATOR), m_resourceProvider(pResourceProvider),
m_nOpCode(0), m_nOpCode(0),
m_nPrevOpCode(0), m_nPrevOpCode(0),
m_openParenCount(0),
m_precedenceOpCount(0),
m_nTempCom(0),
m_nLastCom(0),
m_parenVals{},
m_precedenceVals{},
m_bChangeOp(false), m_bChangeOp(false),
m_bRecord(false), m_bRecord(false),
m_bSetCalcState(false),
m_input(DEFAULT_DEC_SEPARATOR),
m_nFE(FMT_FLOAT),
m_memoryValue{ make_unique<Rational>() },
m_holdVal{},
m_currentVal{},
m_lastVal{},
m_parenVals{},
m_precedenceVals{},
m_bError(false), m_bError(false),
m_bInv(false), m_bInv(false),
m_nFE(FMT_FLOAT),
m_bNoPrevEqu(true), m_bNoPrevEqu(true),
m_numwidth(QWORD_WIDTH),
m_angletype(ANGLE_DEG),
m_radix(DEFAULT_RADIX), m_radix(DEFAULT_RADIX),
m_precision(DEFAULT_PRECISION), m_precision(DEFAULT_PRECISION),
m_cIntDigitsSav(DEFAULT_MAX_DIGITS), m_cIntDigitsSav(DEFAULT_MAX_DIGITS),
m_decGrouping(), m_decGrouping(),
m_groupSeparator(DEFAULT_GRP_SEPARATOR),
m_numberString(DEFAULT_NUMBER_STR), m_numberString(DEFAULT_NUMBER_STR),
m_nTempCom(0),
m_openParenCount(0),
m_nOp(), m_nOp(),
m_nPrecOp(), m_nPrecOp(),
m_memoryValue{ make_unique<Rational>() }, m_precedenceOpCount(0),
m_holdVal{}, m_nLastCom(0),
m_currentVal{}, m_angletype(ANGLE_DEG),
m_lastVal{} m_numwidth(QWORD_WIDTH),
m_HistoryCollector(pCalcDisplay, pHistoryDisplay, DEFAULT_DEC_SEPARATOR),
m_groupSeparator(DEFAULT_GRP_SEPARATOR)
{ {
InitChopNumbers(); InitChopNumbers();

View file

@ -271,7 +271,7 @@ void CCalcEngine::ProcessCommandWorker(WPARAM wParam)
// 1 + (2 Or 3) // 1 + (2 Or 3)
if (ni <= nx) if (ni <= nx)
{ {
m_HistoryCollector.EnclosePrecInvertionBrackets(); m_HistoryCollector.EnclosePrecInversionBrackets();
} }
m_HistoryCollector.PopLastOpndStart(); m_HistoryCollector.PopLastOpndStart();
goto DoPrecedenceCheckAgain; goto DoPrecedenceCheckAgain;
@ -507,7 +507,7 @@ void CCalcEngine::ProcessCommandWorker(WPARAM wParam)
nx = NPrecedenceOfOp(m_nOpCode); nx = NPrecedenceOfOp(m_nOpCode);
if (ni <= nx) if (ni <= nx)
{ {
m_HistoryCollector.EnclosePrecInvertionBrackets(); m_HistoryCollector.EnclosePrecInversionBrackets();
} }
m_HistoryCollector.PopLastOpndStart(); m_HistoryCollector.PopLastOpndStart();
@ -600,7 +600,7 @@ void CCalcEngine::ProcessCommandWorker(WPARAM wParam)
nx = NPrecedenceOfOp(m_nOpCode); nx = NPrecedenceOfOp(m_nOpCode);
if (ni <= nx) if (ni <= nx)
{ {
m_HistoryCollector.EnclosePrecInvertionBrackets(); m_HistoryCollector.EnclosePrecInversionBrackets();
} }
m_HistoryCollector.PopLastOpndStart(); m_HistoryCollector.PopLastOpndStart();

View file

@ -173,6 +173,7 @@ CalcEngine::Rational CCalcEngine::SciCalcFunctions(CalcEngine::Rational const& r
// the degrees functionality was achieved as 'Inv' of 'dms' operation, // the degrees functionality was achieved as 'Inv' of 'dms' operation,
// so setting the IDC_INV command first and then performing 'dms' operation as global variables m_bInv, m_bRecord // so setting the IDC_INV command first and then performing 'dms' operation as global variables m_bInv, m_bRecord
// are set properly through ProcessCommand(IDC_INV) // are set properly through ProcessCommand(IDC_INV)
[[fallthrough]];
case IDC_DMS: case IDC_DMS:
{ {
if (!m_fIntegerMode) if (!m_fIntegerMode)

View file

@ -2,7 +2,7 @@
// Licensed under the MIT License. // Licensed under the MIT License.
#include "pch.h" #include "pch.h"
#include "Header Files\CalcEngine.h" #include "Header Files/CalcEngine.h"
#include "CalculatorManager.h" #include "CalculatorManager.h"
#include "CalculatorResource.h" #include "CalculatorResource.h"
@ -98,7 +98,7 @@ namespace CalculationManager
} }
/// <summary> /// <summary>
/// Callback from the CalculatorControll /// Callback from the CalculatorControl
/// Passed in string representations of memorized numbers get passed to the client /// Passed in string representations of memorized numbers get passed to the client
/// </summary> /// </summary>
/// <param name="memorizedNumber">vector containing wstring values of memorized numbers</param> /// <param name="memorizedNumber">vector containing wstring values of memorized numbers</param>
@ -429,7 +429,7 @@ namespace CalculationManager
*commandItr <= MEMORY_COMMAND_TO_UNSIGNED_CHAR(MemoryCommand::MemorizedNumberClearAll)) *commandItr <= MEMORY_COMMAND_TO_UNSIGNED_CHAR(MemoryCommand::MemorizedNumberClearAll))
{ {
//MemoryCommands(which have values above 255) are pushed on m_savedCommands upon casting to unsigned char. //MemoryCommands(which have values above 255) are pushed on m_savedCommands upon casting to unsigned char.
//SerializeCommands uses m_savedCommands, which is then used in DeSerializeCommnds. //SerializeCommands uses m_savedCommands, which is then used in DeSerializeCommands.
//Hence, a simple cast to MemoryCommand is not sufficient. //Hence, a simple cast to MemoryCommand is not sufficient.
MemoryCommand memoryCommand = static_cast<MemoryCommand>(*commandItr + UCHAR_MAX + 1); MemoryCommand memoryCommand = static_cast<MemoryCommand>(*commandItr + UCHAR_MAX + 1);
unsigned int indexOfMemory = 0; unsigned int indexOfMemory = 0;
@ -505,7 +505,7 @@ namespace CalculationManager
/// Recall the memorized number. /// Recall the memorized number.
/// The memorized number gets loaded to the primary display /// The memorized number gets loaded to the primary display
/// </summary> /// </summary>
/// <param name="indexOfMemeory">Index of the target memory</param> /// <param name="indexOfMemory">Index of the target memory</param>
void CalculatorManager::MemorizedNumberLoad(_In_ unsigned int indexOfMemory) void CalculatorManager::MemorizedNumberLoad(_In_ unsigned int indexOfMemory)
{ {
SaveMemoryCommand(MemoryCommand::MemorizedNumberLoad, indexOfMemory); SaveMemoryCommand(MemoryCommand::MemorizedNumberLoad, indexOfMemory);
@ -521,7 +521,7 @@ namespace CalculationManager
/// It adds primary display value to the selected memory /// It adds primary display value to the selected memory
/// Notify the client with new the new memorize value vector /// Notify the client with new the new memorize value vector
/// </summary> /// </summary>
/// <param name="indexOfMemeory">Index of the target memory</param> /// <param name="indexOfMemory">Index of the target memory</param>
void CalculatorManager::MemorizedNumberAdd(_In_ unsigned int indexOfMemory) void CalculatorManager::MemorizedNumberAdd(_In_ unsigned int indexOfMemory)
{ {
SaveMemoryCommand(MemoryCommand::MemorizedNumberAdd, indexOfMemory); SaveMemoryCommand(MemoryCommand::MemorizedNumberAdd, indexOfMemory);
@ -559,7 +559,7 @@ namespace CalculationManager
/// It adds primary display value to the selected memory /// It adds primary display value to the selected memory
/// Notify the client with new the new memorize value vector /// Notify the client with new the new memorize value vector
/// </summary> /// </summary>
/// <param name="indexOfMemeory">Index of the target memory</param> /// <param name="indexOfMemory">Index of the target memory</param>
void CalculatorManager::MemorizedNumberSubtract(_In_ unsigned int indexOfMemory) void CalculatorManager::MemorizedNumberSubtract(_In_ unsigned int indexOfMemory)
{ {
SaveMemoryCommand(MemoryCommand::MemorizedNumberSubtract, indexOfMemory); SaveMemoryCommand(MemoryCommand::MemorizedNumberSubtract, indexOfMemory);
@ -603,7 +603,7 @@ namespace CalculationManager
/// Helper function that selects a memory from the vector and set it to CCalcEngine /// Helper function that selects a memory from the vector and set it to CCalcEngine
/// Saved RAT number needs to be copied and passed in, as CCalcEngine destroyed the passed in RAT /// Saved RAT number needs to be copied and passed in, as CCalcEngine destroyed the passed in RAT
/// </summary> /// </summary>
/// <param name="indexOfMemeory">Index of the target memory</param> /// <param name="indexOfMemory">Index of the target memory</param>
void CalculatorManager::MemorizedNumberSelect(_In_ unsigned int indexOfMemory) void CalculatorManager::MemorizedNumberSelect(_In_ unsigned int indexOfMemory)
{ {
if (!(m_currentCalculatorEngine->FInErrorState())) if (!(m_currentCalculatorEngine->FInErrorState()))
@ -617,7 +617,7 @@ namespace CalculationManager
/// Helper function that needs to be executed when memory is modified /// Helper function that needs to be executed when memory is modified
/// When memory is modified, destroy the old RAT and put the new RAT in vector /// When memory is modified, destroy the old RAT and put the new RAT in vector
/// </summary> /// </summary>
/// <param name="indexOfMemeory">Index of the target memory</param> /// <param name="indexOfMemory">Index of the target memory</param>
void CalculatorManager::MemorizedNumberChanged(_In_ unsigned int indexOfMemory) void CalculatorManager::MemorizedNumberChanged(_In_ unsigned int indexOfMemory)
{ {
if (!(m_currentCalculatorEngine->FInErrorState())) if (!(m_currentCalculatorEngine->FInErrorState()))

View file

@ -15,7 +15,7 @@ namespace CalculationManager
// and the ids to define them with can be seen in EngineStrings.h // and the ids to define them with can be seen in EngineStrings.h
// with SIDS prefix. Additionally it must provide values for string // with SIDS prefix. Additionally it must provide values for string
// ids "sDecimal", "sThousand" and "sGrouping". See // ids "sDecimal", "sThousand" and "sGrouping". See
// http://technet.microsoft.com/en-us/library/cc782655(v=ws.10).aspx // https://technet.microsoft.com/en-us/library/cc782655(v=ws.10).aspx
// for what these values refer to. // for what these values refer to.
virtual std::wstring GetCEngineString(const std::wstring& id) = 0; virtual std::wstring GetCEngineString(const std::wstring& id) = 0;
}; };

View file

@ -14,7 +14,7 @@ public:
{ {
*item = m_vector.at(index); *item = m_vector.at(index);
} }
catch (std::out_of_range /*ex*/) catch (const std::out_of_range& /*ex*/)
{ {
hr = E_BOUNDS; hr = E_BOUNDS;
} }
@ -34,7 +34,7 @@ public:
{ {
m_vector[index] = item; m_vector[index] = item;
} }
catch (std::out_of_range /*ex*/) catch (const std::out_of_range& /*ex*/)
{ {
hr = E_BOUNDS; hr = E_BOUNDS;
} }
@ -63,7 +63,7 @@ public:
auto iter = m_vector.begin() + index; auto iter = m_vector.begin() + index;
m_vector.insert(iter, item); m_vector.insert(iter, item);
} }
catch (std::bad_alloc /*ex*/) catch (const std::bad_alloc& /*ex*/)
{ {
hr = E_OUTOFMEMORY; hr = E_OUTOFMEMORY;
} }
@ -92,7 +92,7 @@ public:
{ {
m_vector.push_back(item); m_vector.push_back(item);
} }
catch (std::bad_alloc /*ex*/) catch (const std::bad_alloc& /*ex*/)
{ {
hr = E_OUTOFMEMORY; hr = E_OUTOFMEMORY;
} }

View file

@ -2,7 +2,7 @@
// Licensed under the MIT License. // Licensed under the MIT License.
#include "pch.h" #include "pch.h"
#include "Header Files\CCommand.h" #include "Header Files/CCommand.h"
#include "CalculatorVector.h" #include "CalculatorVector.h"
#include "ExpressionCommand.h" #include "ExpressionCommand.h"

View file

@ -14,8 +14,8 @@ namespace CalcEngine
{ {
public: public:
CalcNumSec() : CalcNumSec() :
m_isNegative(false), value(),
value() m_isNegative(false)
{} {}
void Clear(); void Clear();
@ -37,12 +37,12 @@ namespace CalcEngine
{} {}
CalcInput(wchar_t decSymbol) : CalcInput(wchar_t decSymbol) :
m_base(),
m_exponent(),
m_hasExponent(false), m_hasExponent(false),
m_hasDecimal(false), m_hasDecimal(false),
m_decPtIndex(0), m_decPtIndex(0),
m_decSymbol(decSymbol) m_decSymbol(decSymbol),
m_base(),
m_exponent()
{} {}
void Clear(); void Clear();

View file

@ -26,7 +26,7 @@ public:
void AddCloseBraceToHistory(); void AddCloseBraceToHistory();
void PushLastOpndStart(int ichOpndStart = -1); void PushLastOpndStart(int ichOpndStart = -1);
void PopLastOpndStart(); void PopLastOpndStart();
void EnclosePrecInvertionBrackets(); void EnclosePrecInversionBrackets();
bool FOpndAddedToHistory(); bool FOpndAddedToHistory();
void CompleteHistoryLine(std::wstring_view numStr); void CompleteHistoryLine(std::wstring_view numStr);
void ClearHistoryLine(std::wstring_view errStr); void ClearHistoryLine(std::wstring_view errStr);

View file

@ -235,7 +235,7 @@ void log10rat( PRAT *px, int32_t precision)
} }
// //
// return if the given x is even number. The assumption here is its numerator is 1 and we are testing the numerator is // return if the given x is even number. The assumption here is its denominator is 1 and we are testing the numerator is
// even or not // even or not
bool IsEven(PRAT x, uint32_t radix, int32_t precision) bool IsEven(PRAT x, uint32_t radix, int32_t precision)
{ {

View file

@ -183,7 +183,7 @@ void divrat( PRAT *pa, PRAT b, int32_t precision)
// RETURN: None, changes first pointer. // RETURN: None, changes first pointer.
// //
// DESCRIPTION: Does the rational equivalent of *pa += b. // DESCRIPTION: Does the rational equivalent of *pa += b.
// Assumes base is internal througought. // Assumes base is internal throughout.
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -204,7 +204,7 @@ void subrat( PRAT *pa, PRAT b, int32_t precision)
// RETURN: None, changes first pointer. // RETURN: None, changes first pointer.
// //
// DESCRIPTION: Does the rational equivalent of *pa += b. // DESCRIPTION: Does the rational equivalent of *pa += b.
// Assumes base is internal througought. // Assumes base is internal throughout.
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View file

@ -903,7 +903,7 @@ shared_ptr<IConverterDataLoader> UnitConverter::GetDataLoaderForCategory(const C
} }
/// <summary> /// <summary>
/// Sets the intial values for m_fromType and m_toType. /// Sets the initial values for m_fromType and m_toType.
/// This is an internal helper method as opposed to SetCurrentUnits /// This is an internal helper method as opposed to SetCurrentUnits
/// which is for external use by clients. /// which is for external use by clients.
/// If we fail to set units, we will fallback to the EMPTY_UNIT. /// If we fail to set units, we will fallback to the EMPTY_UNIT.

View file

@ -3,13 +3,13 @@
#include "pch.h" #include "pch.h"
#include "ApplicationViewModel.h" #include "ApplicationViewModel.h"
#include "Common\TraceLogger.h" #include "Common/TraceLogger.h"
#include "Common\AppResourceProvider.h" #include "Common/AppResourceProvider.h"
#include "StandardCalculatorViewModel.h" #include "StandardCalculatorViewModel.h"
#include "DateCalculatorViewModel.h" #include "DateCalculatorViewModel.h"
#include "DataLoaders\CurrencyHttpClient.h" #include "DataLoaders/CurrencyHttpClient.h"
#include "DataLoaders\CurrencyDataLoader.h" #include "DataLoaders/CurrencyDataLoader.h"
#include "DataLoaders\UnitConverterDataLoader.h" #include "DataLoaders/UnitConverterDataLoader.h"
using namespace CalculatorApp; using namespace CalculatorApp;
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;

View file

@ -402,7 +402,7 @@
</ImportGroup> </ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>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}.</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\..\packages\Microsoft.UI.Xaml.2.0.181018003.1\build\native\Microsoft.UI.Xaml.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.UI.Xaml.2.0.181018003.1\build\native\Microsoft.UI.Xaml.targets'))" /> <Error Condition="!Exists('..\..\packages\Microsoft.UI.Xaml.2.0.181018003.1\build\native\Microsoft.UI.Xaml.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.UI.Xaml.2.0.181018003.1\build\native\Microsoft.UI.Xaml.targets'))" />
</Target> </Target>

View file

@ -275,7 +275,7 @@ namespace CalculatorApp { namespace Common
return Windows::UI::Xaml::DependencyProperty::UnsetValue; // Can't convert return Windows::UI::Xaml::DependencyProperty::UnsetValue; // Can't convert
} }
virtual Platform::Object^ ConverBack( virtual Platform::Object^ ConvertBack(
Platform::Object^ /*value*/, Platform::Object^ /*value*/,
Windows::UI::Xaml::Interop::TypeName /*targetType*/, Windows::UI::Xaml::Interop::TypeName /*targetType*/,
Platform::Object^ /*parameter*/, Platform::Object^ /*parameter*/,

View file

@ -12,7 +12,7 @@
namespace CalculatorApp::Common::Automation namespace CalculatorApp::Common::Automation
{ {
// This class exists so that the app can run on RS2 and use LiveRegions // This class exists so that the app can run on RS2 and use LiveRegions
// to host notifiactions on those builds. // to host notifications on those builds.
// When the app switches to min version RS3, this class can be removed // When the app switches to min version RS3, this class can be removed
// and the app will switch to using the Notification API. // and the app will switch to using the Notification API.
// TODO - MSFT 12735088 // TODO - MSFT 12735088

View file

@ -3,8 +3,8 @@
#include "pch.h" #include "pch.h"
#include "CopyPasteManager.h" #include "CopyPasteManager.h"
#include "Common\TraceLogger.h" #include "Common/TraceLogger.h"
#include "Common\LocalizationSettings.h" #include "Common/LocalizationSettings.h"
using namespace std; using namespace std;
using namespace concurrency; using namespace concurrency;

View file

@ -3,7 +3,7 @@
#pragma once #pragma once
#include "CalcManager\CalculatorResource.h" #include "CalcManager/CalculatorResource.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -2,7 +2,7 @@
// Licensed under the MIT License. // Licensed under the MIT License.
#include "pch.h" #include "pch.h"
#include "Common\ExpressionCommandSerializer.h" #include "Common/ExpressionCommandSerializer.h"
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;
using namespace Windows::Storage::Streams; using namespace Windows::Storage::Streams;

View file

@ -441,8 +441,8 @@ void KeyboardShortcutManager::OnVirtualKeyControlInverseChordPropertyChanged(
} }
} }
// In the three event handlers bellow we will not mark the event as handled // In the three event handlers below we will not mark the event as handled
// because this is a sumplemental operation and we don't want to interfere with // because this is a supplemental operation and we don't want to interfere with
// the normal keyboard handling. // the normal keyboard handling.
void KeyboardShortcutManager::OnCharacterReceivedHandler(CoreWindow^ sender, CharacterReceivedEventArgs^ args) void KeyboardShortcutManager::OnCharacterReceivedHandler(CoreWindow^ sender, CharacterReceivedEventArgs^ args)
{ {

View file

@ -4,7 +4,7 @@
#include "pch.h" #include "pch.h"
#include "NavCategory.h" #include "NavCategory.h"
#include "AppResourceProvider.h" #include "AppResourceProvider.h"
#include "Common\LocalizationStringUtil.h" #include "Common/LocalizationStringUtil.h"
using namespace CalculatorApp; using namespace CalculatorApp;
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;
@ -199,7 +199,7 @@ CategoryGroupType NavCategory::GetGroupType(ViewMode mode)
: CategoryGroupType::None; : CategoryGroupType::None;
} }
// GetIndex is 0-based, GetPostion is 1-based // GetIndex is 0-based, GetPosition is 1-based
int NavCategory::GetIndex(ViewMode mode) int NavCategory::GetIndex(ViewMode mode)
{ {
int position = NavCategory::GetPosition(mode); int position = NavCategory::GetPosition(mode);
@ -228,7 +228,7 @@ int NavCategory::GetFlatIndex(ViewMode mode)
: -1; : -1;
} }
// GetIndex is 0-based, GetPostion is 1-based // GetIndex is 0-based, GetPosition is 1-based
int NavCategory::GetIndexInGroup(ViewMode mode, CategoryGroupType type) int NavCategory::GetIndexInGroup(ViewMode mode, CategoryGroupType type)
{ {
int index = -1; int index = -1;
@ -249,7 +249,7 @@ int NavCategory::GetIndexInGroup(ViewMode mode, CategoryGroupType type)
: -1; : -1;
} }
// GetIndex is 0-based, GetPostion is 1-based // GetIndex is 0-based, GetPosition is 1-based
int NavCategory::GetPosition(ViewMode mode) int NavCategory::GetPosition(ViewMode mode)
{ {
int position = 0; int position = 0;

View file

@ -170,7 +170,7 @@ namespace CalculatorApp
static Platform::String^ GetNameResourceKey(ViewMode mode); static Platform::String^ GetNameResourceKey(ViewMode mode);
static CategoryGroupType GetGroupType(ViewMode mode); static CategoryGroupType GetGroupType(ViewMode mode);
// GetIndex is 0-based, GetPostion is 1-based // GetIndex is 0-based, GetPosition is 1-based
static int GetIndex(ViewMode mode); static int GetIndex(ViewMode mode);
static int GetFlatIndex(ViewMode mode); static int GetFlatIndex(ViewMode mode);
static int GetIndexInGroup(ViewMode mode, CategoryGroupType type); static int GetIndexInGroup(ViewMode mode, CategoryGroupType type);

View file

@ -7,9 +7,9 @@
#include "pch.h" #include "pch.h"
#include "Utils.h" #include "Utils.h"
#include "Common\AppResourceProvider.h" #include "Common/AppResourceProvider.h"
#include "Common\ExpressionCommandSerializer.h" #include "Common/ExpressionCommandSerializer.h"
#include "Common\ExpressionCommandDeserializer.h" #include "Common/ExpressionCommandDeserializer.h"
#include "ViewState.h" #include "ViewState.h"
using namespace CalculatorApp; using namespace CalculatorApp;

View file

@ -397,7 +397,7 @@ namespace Utils
static void On##name##PropertyChangedImpl(Windows::UI::Xaml::DependencyObject^ sender, Windows::UI::Xaml::DependencyPropertyChangedEventArgs^ args) {\ static void On##name##PropertyChangedImpl(Windows::UI::Xaml::DependencyObject^ sender, Windows::UI::Xaml::DependencyPropertyChangedEventArgs^ args) {\
On##name##PropertyChanged(sender, safe_cast<type>(args->OldValue), safe_cast<type>(args->NewValue)); } public: On##name##PropertyChanged(sender, safe_cast<type>(args->OldValue), safe_cast<type>(args->NewValue)); } public:
// This goes into the cpp to initalize the static variable // This goes into the cpp to initialize the static variable
#define DEPENDENCY_PROPERTY_INITIALIZATION(owner, name)\ #define DEPENDENCY_PROPERTY_INITIALIZATION(owner, name)\
Windows::UI::Xaml::DependencyProperty^ owner::s_##name##Property =\ Windows::UI::Xaml::DependencyProperty^ owner::s_##name##Property =\
owner::Initialize##name##Property(); owner::Initialize##name##Property();

View file

@ -23,7 +23,7 @@ namespace CalculatorApp { namespace Common
return value; return value;
} }
virtual Platform::Object^ ConverBack( virtual Platform::Object^ ConvertBack(
Platform::Object^ value, Platform::Object^ value,
Windows::UI::Xaml::Interop::TypeName /*targetType*/, Windows::UI::Xaml::Interop::TypeName /*targetType*/,
Platform::Object^ /*parameter*/, Platform::Object^ /*parameter*/,
@ -56,7 +56,7 @@ namespace CalculatorApp { namespace Common
return value; return value;
} }
virtual Platform::Object^ ConverBack( virtual Platform::Object^ ConvertBack(
Platform::Object^ value, Platform::Object^ value,
Windows::UI::Xaml::Interop::TypeName /*targetType*/, Windows::UI::Xaml::Interop::TypeName /*targetType*/,
Platform::Object^ /*parameter*/, Platform::Object^ /*parameter*/,

View file

@ -3,11 +3,11 @@
#include "pch.h" #include "pch.h"
#include "CurrencyDataLoader.h" #include "CurrencyDataLoader.h"
#include "Common\AppResourceProvider.h" #include "Common/AppResourceProvider.h"
#include "Common\LocalizationStringUtil.h" #include "Common/LocalizationStringUtil.h"
#include "Common\LocalizationService.h" #include "Common/LocalizationService.h"
#include "Common\LocalizationSettings.h" #include "Common/LocalizationSettings.h"
#include "Common\TraceLogger.h" #include "Common/TraceLogger.h"
#include "UnitConverterDataConstants.h" #include "UnitConverterDataConstants.h"
using namespace CalculatorApp; using namespace CalculatorApp;
@ -588,7 +588,7 @@ bool CurrencyDataLoader::TryParseAllRatiosData(_In_ String^ rawJson, _Inout_ Cur
// //
// There are a few ways we can get the data needed for Currency Converter, including from cache or from web. // There are a few ways we can get the data needed for Currency Converter, including from cache or from web.
// This function accepts the data from any source, and acts as a 'last-steps' for the converter to be ready. // This function accepts the data from any source, and acts as a 'last-steps' for the converter to be ready.
// This includes identifying which units will be selected and building the map of curreny ratios. // This includes identifying which units will be selected and building the map of currency ratios.
#pragma optimize("", off) // Turn off optimizations to work around DevDiv 393321 #pragma optimize("", off) // Turn off optimizations to work around DevDiv 393321
task<void> CurrencyDataLoader::FinalizeUnits(_In_ const vector<UCM::CurrencyStaticData>& staticData, _In_ const CurrencyRatioMap& ratioMap) task<void> CurrencyDataLoader::FinalizeUnits(_In_ const vector<UCM::CurrencyStaticData>& staticData, _In_ const CurrencyRatioMap& ratioMap)
{ {

View file

@ -3,8 +3,8 @@
#pragma once #pragma once
#include "CalcManager\UnitConverter.h" #include "CalcManager/UnitConverter.h"
#include "Common\NetworkManager.h" #include "Common/NetworkManager.h"
#include "ICurrencyHttpClient.h" #include "ICurrencyHttpClient.h"
namespace CalculatorApp namespace CalculatorApp

View file

@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved. // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. // Licensed under the MIT License.
#include "pch.h" #include "pch.h"
#include "Common\AppResourceProvider.h" #include "Common/AppResourceProvider.h"
#include "UnitConverterDataLoader.h" #include "UnitConverterDataLoader.h"
#include "UnitConverterDataConstants.h" #include "UnitConverterDataConstants.h"
#include "CurrencyDataLoader.h" #include "CurrencyDataLoader.h"
@ -156,27 +156,34 @@ void UnitConverterDataLoader::GetCategories(_In_ shared_ptr<vector<UCM::Category
void UnitConverterDataLoader::GetUnits(_In_ unordered_map<ViewMode, vector<OrderedUnit>>& unitMap) void UnitConverterDataLoader::GetUnits(_In_ unordered_map<ViewMode, vector<OrderedUnit>>& unitMap)
{ {
bool USSource, USTarget; // US + Federated States of Micronesia, Marshall Islands, Palau
bool UKSource, UKTarget; bool useUSCustomaryAndFahrenheit = m_currentRegionCode == L"US" ||
bool Source, Target; m_currentRegionCode == L"PW" ||
m_currentRegionCode == L"FM" ||
m_currentRegionCode == L"MH" ||
m_currentRegionCode == L"PW";
USSource = (GetRegion() == L"US") ? true : false; // useUSCustomaryAndFahrenheit + Liberia
USTarget = USSource; // Source: https://en.wikipedia.org/wiki/Metrication
bool useUSCustomary = useUSCustomaryAndFahrenheit || m_currentRegionCode == L"LR";
UKSource = (GetRegion() == L"UK") ? true : false; // Use 'Système International' (International System of Units - Metrics)
UKTarget = UKSource; bool useSI = !useUSCustomary;
Source = (GetRegion() == L"Others") ? true : false; // useUSCustomaryAndFahrenheit + the Bahamas, the Cayman Islands and Liberia
Target = Source; // Source: http://en.wikipedia.org/wiki/Fahrenheit
bool useFahrenheit = useUSCustomaryAndFahrenheit || m_currentRegionCode == "BS" || m_currentRegionCode == "KY" || m_currentRegionCode == "LR";
bool useWattInsteadOfKilowatt = m_currentRegionCode == "GB";
vector<OrderedUnit> areaUnits; vector<OrderedUnit> areaUnits;
areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_Acre, GetLocalizedStringName(L"UnitName_Acre"), GetLocalizedStringName(L"UnitAbbreviation_Acre"), 9 }); areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_Acre, GetLocalizedStringName(L"UnitName_Acre"), GetLocalizedStringName(L"UnitAbbreviation_Acre"), 9 });
areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_Hectare, GetLocalizedStringName(L"UnitName_Hectare"), GetLocalizedStringName(L"UnitAbbreviation_Hectare"), 4 }); areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_Hectare, GetLocalizedStringName(L"UnitName_Hectare"), GetLocalizedStringName(L"UnitAbbreviation_Hectare"), 4 });
areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_SquareCentimeter, GetLocalizedStringName(L"UnitName_SquareCentimeter"), GetLocalizedStringName(L"UnitAbbreviation_SquareCentimeter"), 2 }); areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_SquareCentimeter, GetLocalizedStringName(L"UnitName_SquareCentimeter"), GetLocalizedStringName(L"UnitAbbreviation_SquareCentimeter"), 2 });
areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_SquareFoot, GetLocalizedStringName(L"UnitName_SquareFoot"), GetLocalizedStringName(L"UnitAbbreviation_SquareFoot"), 7, (UKSource || Source), USTarget, false }); areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_SquareFoot, GetLocalizedStringName(L"UnitName_SquareFoot"), GetLocalizedStringName(L"UnitAbbreviation_SquareFoot"), 7, useSI, useUSCustomary, false });
areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_SquareInch, GetLocalizedStringName(L"UnitName_SquareInch"), GetLocalizedStringName(L"UnitAbbreviation_SquareInch"), 6 }); areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_SquareInch, GetLocalizedStringName(L"UnitName_SquareInch"), GetLocalizedStringName(L"UnitAbbreviation_SquareInch"), 6 });
areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_SquareKilometer, GetLocalizedStringName(L"UnitName_SquareKilometer"), GetLocalizedStringName(L"UnitAbbreviation_SquareKilometer"), 5 }); areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_SquareKilometer, GetLocalizedStringName(L"UnitName_SquareKilometer"), GetLocalizedStringName(L"UnitAbbreviation_SquareKilometer"), 5 });
areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_SquareMeter, GetLocalizedStringName(L"UnitName_SquareMeter"), GetLocalizedStringName(L"UnitAbbreviation_SquareMeter"), 3, USSource, (UKTarget || Target), false}); areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_SquareMeter, GetLocalizedStringName(L"UnitName_SquareMeter"), GetLocalizedStringName(L"UnitAbbreviation_SquareMeter"), 3, useUSCustomary, useSI, false});
areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_SquareMile, GetLocalizedStringName(L"UnitName_SquareMile"), GetLocalizedStringName(L"UnitAbbreviation_SquareMile"), 10 }); areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_SquareMile, GetLocalizedStringName(L"UnitName_SquareMile"), GetLocalizedStringName(L"UnitAbbreviation_SquareMile"), 10 });
areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_SquareMillimeter, GetLocalizedStringName(L"UnitName_SquareMillimeter"), GetLocalizedStringName(L"UnitAbbreviation_SquareMillimeter"), 1 }); areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_SquareMillimeter, GetLocalizedStringName(L"UnitName_SquareMillimeter"), GetLocalizedStringName(L"UnitAbbreviation_SquareMillimeter"), 1 });
areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_SquareYard, GetLocalizedStringName(L"UnitName_SquareYard"), GetLocalizedStringName(L"UnitAbbreviation_SquareYard"), 8 }); areaUnits.push_back(OrderedUnit{ UnitConverterUnits::Area_SquareYard, GetLocalizedStringName(L"UnitName_SquareYard"), GetLocalizedStringName(L"UnitAbbreviation_SquareYard"), 8 });
@ -240,9 +247,9 @@ void UnitConverterDataLoader::GetUnits(_In_ unordered_map<ViewMode, vector<Order
unitMap.emplace(ViewMode::Energy, energyUnits); unitMap.emplace(ViewMode::Energy, energyUnits);
vector<OrderedUnit> lengthUnits; vector<OrderedUnit> lengthUnits;
lengthUnits.push_back(OrderedUnit{ UnitConverterUnits::Length_Centimeter, GetLocalizedStringName(L"UnitName_Centimeter"), GetLocalizedStringName(L"UnitAbbreviation_Centimeter"), 4 , USSource, (Target || UKTarget), false}); lengthUnits.push_back(OrderedUnit{ UnitConverterUnits::Length_Centimeter, GetLocalizedStringName(L"UnitName_Centimeter"), GetLocalizedStringName(L"UnitAbbreviation_Centimeter"), 4, useUSCustomary, useSI, false});
lengthUnits.push_back(OrderedUnit{ UnitConverterUnits::Length_Foot, GetLocalizedStringName(L"UnitName_Foot"), GetLocalizedStringName(L"UnitAbbreviation_Foot"), 8 }); lengthUnits.push_back(OrderedUnit{ UnitConverterUnits::Length_Foot, GetLocalizedStringName(L"UnitName_Foot"), GetLocalizedStringName(L"UnitAbbreviation_Foot"), 8 });
lengthUnits.push_back(OrderedUnit{ UnitConverterUnits::Length_Inch, GetLocalizedStringName(L"UnitName_Inch"), GetLocalizedStringName(L"UnitAbbreviation_Inch"), 7 , (Source|| UKSource), USTarget, false }); lengthUnits.push_back(OrderedUnit{ UnitConverterUnits::Length_Inch, GetLocalizedStringName(L"UnitName_Inch"), GetLocalizedStringName(L"UnitAbbreviation_Inch"), 7 , useSI, useUSCustomary, false });
lengthUnits.push_back(OrderedUnit{ UnitConverterUnits::Length_Kilometer, GetLocalizedStringName(L"UnitName_Kilometer"), GetLocalizedStringName(L"UnitAbbreviation_Kilometer"), 6 }); lengthUnits.push_back(OrderedUnit{ UnitConverterUnits::Length_Kilometer, GetLocalizedStringName(L"UnitName_Kilometer"), GetLocalizedStringName(L"UnitAbbreviation_Kilometer"), 6 });
lengthUnits.push_back(OrderedUnit{ UnitConverterUnits::Length_Meter, GetLocalizedStringName(L"UnitName_Meter"), GetLocalizedStringName(L"UnitAbbreviation_Meter"), 5 }); lengthUnits.push_back(OrderedUnit{ UnitConverterUnits::Length_Meter, GetLocalizedStringName(L"UnitName_Meter"), GetLocalizedStringName(L"UnitAbbreviation_Meter"), 5 });
lengthUnits.push_back(OrderedUnit{ UnitConverterUnits::Length_Micron, GetLocalizedStringName(L"UnitName_Micron"), GetLocalizedStringName(L"UnitAbbreviation_Micron"), 2 }); lengthUnits.push_back(OrderedUnit{ UnitConverterUnits::Length_Micron, GetLocalizedStringName(L"UnitName_Micron"), GetLocalizedStringName(L"UnitAbbreviation_Micron"), 2 });
@ -260,16 +267,16 @@ void UnitConverterDataLoader::GetUnits(_In_ unordered_map<ViewMode, vector<Order
powerUnits.push_back(OrderedUnit{ UnitConverterUnits::Power_BritishThermalUnitPerMinute, GetLocalizedStringName(L"UnitName_BTUPerMinute"), GetLocalizedStringName(L"UnitAbbreviation_BTUPerMinute"), 5 }); powerUnits.push_back(OrderedUnit{ UnitConverterUnits::Power_BritishThermalUnitPerMinute, GetLocalizedStringName(L"UnitName_BTUPerMinute"), GetLocalizedStringName(L"UnitAbbreviation_BTUPerMinute"), 5 });
powerUnits.push_back(OrderedUnit{ UnitConverterUnits::Power_FootPoundPerMinute, GetLocalizedStringName(L"UnitName_Foot-PoundPerMinute"), GetLocalizedStringName(L"UnitAbbreviation_Foot-PoundPerMinute"), 4 }); powerUnits.push_back(OrderedUnit{ UnitConverterUnits::Power_FootPoundPerMinute, GetLocalizedStringName(L"UnitName_Foot-PoundPerMinute"), GetLocalizedStringName(L"UnitAbbreviation_Foot-PoundPerMinute"), 4 });
powerUnits.push_back(OrderedUnit{ UnitConverterUnits::Power_Horsepower, GetLocalizedStringName(L"UnitName_Horsepower"), GetLocalizedStringName(L"UnitAbbreviation_Horsepower") , 3 , false, true, false }); powerUnits.push_back(OrderedUnit{ UnitConverterUnits::Power_Horsepower, GetLocalizedStringName(L"UnitName_Horsepower"), GetLocalizedStringName(L"UnitAbbreviation_Horsepower") , 3 , false, true, false });
powerUnits.push_back(OrderedUnit{ UnitConverterUnits::Power_Kilowatt, GetLocalizedStringName(L"UnitName_Kilowatt"), GetLocalizedStringName(L"UnitAbbreviation_Kilowatt"), 2 , (Source|| USSource), false, false}); powerUnits.push_back(OrderedUnit{ UnitConverterUnits::Power_Kilowatt, GetLocalizedStringName(L"UnitName_Kilowatt"), GetLocalizedStringName(L"UnitAbbreviation_Kilowatt"), 2 , !useWattInsteadOfKilowatt});
powerUnits.push_back(OrderedUnit{ UnitConverterUnits::Power_Watt, GetLocalizedStringName(L"UnitName_Watt"), GetLocalizedStringName(L"UnitAbbreviation_Watt"), 1, UKSource }); powerUnits.push_back(OrderedUnit{ UnitConverterUnits::Power_Watt, GetLocalizedStringName(L"UnitName_Watt"), GetLocalizedStringName(L"UnitAbbreviation_Watt"), 1, useWattInsteadOfKilowatt});
powerUnits.push_back(OrderedUnit{ UnitConverterUnits::Power_LightBulb, GetLocalizedStringName(L"UnitName_LightBulb"), GetLocalizedStringName(L"UnitAbbreviation_LightBulb"), 6 ,false, false, true}); powerUnits.push_back(OrderedUnit{ UnitConverterUnits::Power_LightBulb, GetLocalizedStringName(L"UnitName_LightBulb"), GetLocalizedStringName(L"UnitAbbreviation_LightBulb"), 6 ,false, false, true});
powerUnits.push_back(OrderedUnit{ UnitConverterUnits::Power_Horse, GetLocalizedStringName(L"UnitName_Horse"), GetLocalizedStringName(L"UnitAbbreviation_Horse"), 7 ,false, false, true}); powerUnits.push_back(OrderedUnit{ UnitConverterUnits::Power_Horse, GetLocalizedStringName(L"UnitName_Horse"), GetLocalizedStringName(L"UnitAbbreviation_Horse"), 7 ,false, false, true});
powerUnits.push_back(OrderedUnit{ UnitConverterUnits::Power_TrainEngine, GetLocalizedStringName(L"UnitName_TrainEngine"), GetLocalizedStringName(L"UnitAbbreviation_TrainEngine"), 8 ,false, false, true }); powerUnits.push_back(OrderedUnit{ UnitConverterUnits::Power_TrainEngine, GetLocalizedStringName(L"UnitName_TrainEngine"), GetLocalizedStringName(L"UnitAbbreviation_TrainEngine"), 8 ,false, false, true });
unitMap.emplace(ViewMode::Power, powerUnits); unitMap.emplace(ViewMode::Power, powerUnits);
vector<OrderedUnit> tempUnits; vector<OrderedUnit> tempUnits;
tempUnits.push_back(OrderedUnit{ UnitConverterUnits::Temperature_DegreesCelsius, GetLocalizedStringName(L"UnitName_DegreesCelsius"), GetLocalizedStringName(L"UnitAbbreviation_DegreesCelsius"), 1, USSource, (Target || UKTarget), false }); tempUnits.push_back(OrderedUnit{ UnitConverterUnits::Temperature_DegreesCelsius, GetLocalizedStringName(L"UnitName_DegreesCelsius"), GetLocalizedStringName(L"UnitAbbreviation_DegreesCelsius"), 1, useFahrenheit, !useFahrenheit, false });
tempUnits.push_back(OrderedUnit{ UnitConverterUnits::Temperature_DegreesFahrenheit, GetLocalizedStringName(L"UnitName_DegreesFahrenheit"), GetLocalizedStringName(L"UnitAbbreviation_DegreesFahrenheit"), 2 , (Source || UKSource), USTarget, false }); tempUnits.push_back(OrderedUnit{ UnitConverterUnits::Temperature_DegreesFahrenheit, GetLocalizedStringName(L"UnitName_DegreesFahrenheit"), GetLocalizedStringName(L"UnitAbbreviation_DegreesFahrenheit"), 2 , !useFahrenheit, useFahrenheit, false });
tempUnits.push_back(OrderedUnit{ UnitConverterUnits::Temperature_Kelvin, GetLocalizedStringName(L"UnitName_Kelvin"), GetLocalizedStringName(L"UnitAbbreviation_Kelvin"), 3 }); tempUnits.push_back(OrderedUnit{ UnitConverterUnits::Temperature_Kelvin, GetLocalizedStringName(L"UnitName_Kelvin"), GetLocalizedStringName(L"UnitAbbreviation_Kelvin"), 3 });
unitMap.emplace(ViewMode::Temperature, tempUnits); unitMap.emplace(ViewMode::Temperature, tempUnits);
@ -287,11 +294,11 @@ void UnitConverterDataLoader::GetUnits(_In_ unordered_map<ViewMode, vector<Order
vector<OrderedUnit> speedUnits; vector<OrderedUnit> speedUnits;
speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_CentimetersPerSecond, GetLocalizedStringName(L"UnitName_CentimetersPerSecond"), GetLocalizedStringName(L"UnitAbbreviation_CentimetersPerSecond"), 1 }); speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_CentimetersPerSecond, GetLocalizedStringName(L"UnitName_CentimetersPerSecond"), GetLocalizedStringName(L"UnitAbbreviation_CentimetersPerSecond"), 1 });
speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_FeetPerSecond, GetLocalizedStringName(L"UnitName_FeetPerSecond"), GetLocalizedStringName(L"UnitAbbreviation_FeetPerSecond"), 4 }); speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_FeetPerSecond, GetLocalizedStringName(L"UnitName_FeetPerSecond"), GetLocalizedStringName(L"UnitAbbreviation_FeetPerSecond"), 4 });
speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_KilometersPerHour, GetLocalizedStringName(L"UnitName_KilometersPerHour"), GetLocalizedStringName(L"UnitAbbreviation_KilometersPerHour"), 3 ,(USSource || UKSource), Target, false }); speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_KilometersPerHour, GetLocalizedStringName(L"UnitName_KilometersPerHour"), GetLocalizedStringName(L"UnitAbbreviation_KilometersPerHour"), 3 , useUSCustomary, useSI, false });
speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_Knot, GetLocalizedStringName(L"UnitName_Knot"), GetLocalizedStringName(L"UnitAbbreviation_Knot"), 6 }); speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_Knot, GetLocalizedStringName(L"UnitName_Knot"), GetLocalizedStringName(L"UnitAbbreviation_Knot"), 6 });
speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_Mach, GetLocalizedStringName(L"UnitName_Mach"), GetLocalizedStringName(L"UnitAbbreviation_Mach"), 7 }); speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_Mach, GetLocalizedStringName(L"UnitName_Mach"), GetLocalizedStringName(L"UnitAbbreviation_Mach"), 7 });
speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_MetersPerSecond, GetLocalizedStringName(L"UnitName_MetersPerSecond"), GetLocalizedStringName(L"UnitAbbreviation_MetersPerSecond"), 2 }); speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_MetersPerSecond, GetLocalizedStringName(L"UnitName_MetersPerSecond"), GetLocalizedStringName(L"UnitAbbreviation_MetersPerSecond"), 2 });
speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_MilesPerHour, GetLocalizedStringName(L"UnitName_MilesPerHour"), GetLocalizedStringName(L"UnitAbbreviation_MilesPerHour"), 5, Source, (UKTarget || USTarget), false }); speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_MilesPerHour, GetLocalizedStringName(L"UnitName_MilesPerHour"), GetLocalizedStringName(L"UnitAbbreviation_MilesPerHour"), 5, useSI, useUSCustomary, false });
speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_Turtle, GetLocalizedStringName(L"UnitName_Turtle"), GetLocalizedStringName(L"UnitAbbreviation_Turtle"), 8 ,false, false, true }); speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_Turtle, GetLocalizedStringName(L"UnitName_Turtle"), GetLocalizedStringName(L"UnitAbbreviation_Turtle"), 8 ,false, false, true });
speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_Horse, GetLocalizedStringName(L"UnitName_Horse"), GetLocalizedStringName(L"UnitAbbreviation_Horse"),9 , false, false, true }); speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_Horse, GetLocalizedStringName(L"UnitName_Horse"), GetLocalizedStringName(L"UnitAbbreviation_Horse"),9 , false, false, true });
speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_Jet, GetLocalizedStringName(L"UnitName_Jet"), GetLocalizedStringName(L"UnitAbbreviation_Jet"), 10, false, false, true }); speedUnits.push_back(OrderedUnit{ UnitConverterUnits::Speed_Jet, GetLocalizedStringName(L"UnitName_Jet"), GetLocalizedStringName(L"UnitAbbreviation_Jet"), 10, false, false, true });
@ -309,14 +316,14 @@ void UnitConverterDataLoader::GetUnits(_In_ unordered_map<ViewMode, vector<Order
volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_GallonUK, GetLocalizedStringName(L"UnitName_GallonUK"), GetLocalizedStringName(L"UnitAbbreviation_GallonUK"), 20 }); volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_GallonUK, GetLocalizedStringName(L"UnitName_GallonUK"), GetLocalizedStringName(L"UnitAbbreviation_GallonUK"), 20 });
volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_GallonUS, GetLocalizedStringName(L"UnitName_GallonUS"), GetLocalizedStringName(L"UnitAbbreviation_GallonUS"), 11 }); volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_GallonUS, GetLocalizedStringName(L"UnitName_GallonUS"), GetLocalizedStringName(L"UnitAbbreviation_GallonUS"), 11 });
volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_Liter, GetLocalizedStringName(L"UnitName_Liter"), GetLocalizedStringName(L"UnitAbbreviation_Liter"), 3 }); volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_Liter, GetLocalizedStringName(L"UnitName_Liter"), GetLocalizedStringName(L"UnitAbbreviation_Liter"), 3 });
volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_Milliliter, GetLocalizedStringName(L"UnitName_Milliliter"), GetLocalizedStringName(L"UnitAbbreviation_Milliliter"), 1 , USSource, (Target || UKTarget), false}); volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_Milliliter, GetLocalizedStringName(L"UnitName_Milliliter"), GetLocalizedStringName(L"UnitAbbreviation_Milliliter"), 1, useUSCustomary, useSI});
volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_PintUK, GetLocalizedStringName(L"UnitName_PintUK"), GetLocalizedStringName(L"UnitAbbreviation_PintUK"), 18 }); volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_PintUK, GetLocalizedStringName(L"UnitName_PintUK"), GetLocalizedStringName(L"UnitAbbreviation_PintUK"), 18 });
volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_PintUS, GetLocalizedStringName(L"UnitName_PintUS"), GetLocalizedStringName(L"UnitAbbreviation_PintUS"), 9 }); volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_PintUS, GetLocalizedStringName(L"UnitName_PintUS"), GetLocalizedStringName(L"UnitAbbreviation_PintUS"), 9 });
volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_TablespoonUS, GetLocalizedStringName(L"UnitName_TablespoonUS"), GetLocalizedStringName(L"UnitAbbreviation_TablespoonUS"), 6 }); volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_TablespoonUS, GetLocalizedStringName(L"UnitName_TablespoonUS"), GetLocalizedStringName(L"UnitAbbreviation_TablespoonUS"), 6 });
volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_TeaspoonUS, GetLocalizedStringName(L"UnitName_TeaspoonUS"), GetLocalizedStringName(L"UnitAbbreviation_TeaspoonUS"), 5 ,Source, USTarget, false }); volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_TeaspoonUS, GetLocalizedStringName(L"UnitName_TeaspoonUS"), GetLocalizedStringName(L"UnitAbbreviation_TeaspoonUS"), 5, useSI, useUSCustomary && m_currentRegionCode != "GB" });
volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_QuartUK, GetLocalizedStringName(L"UnitName_QuartUK"), GetLocalizedStringName(L"UnitAbbreviation_QuartUK"), 19 }); volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_QuartUK, GetLocalizedStringName(L"UnitName_QuartUK"), GetLocalizedStringName(L"UnitAbbreviation_QuartUK"), 19 });
volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_QuartUS, GetLocalizedStringName(L"UnitName_QuartUS"), GetLocalizedStringName(L"UnitAbbreviation_QuartUS"), 10 }); volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_QuartUS, GetLocalizedStringName(L"UnitName_QuartUS"), GetLocalizedStringName(L"UnitAbbreviation_QuartUS"), 10 });
volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_TeaspoonUK, GetLocalizedStringName(L"UnitName_TeaspoonUK"), GetLocalizedStringName(L"UnitAbbreviation_TeaspoonUK"), 15, UKSource }); volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_TeaspoonUK, GetLocalizedStringName(L"UnitName_TeaspoonUK"), GetLocalizedStringName(L"UnitAbbreviation_TeaspoonUK"), 15, false, useUSCustomary && m_currentRegionCode == "GB"});
volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_TablespoonUK, GetLocalizedStringName(L"UnitName_TablespoonUK"), GetLocalizedStringName(L"UnitAbbreviation_TablespoonUK"), 16 }); volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_TablespoonUK, GetLocalizedStringName(L"UnitName_TablespoonUK"), GetLocalizedStringName(L"UnitAbbreviation_TablespoonUK"), 16 });
volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_CoffeeCup, GetLocalizedStringName(L"UnitName_CoffeeCup"), GetLocalizedStringName(L"UnitAbbreviation_CoffeeCup"), 22 ,false, false, true }); volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_CoffeeCup, GetLocalizedStringName(L"UnitName_CoffeeCup"), GetLocalizedStringName(L"UnitAbbreviation_CoffeeCup"), 22 ,false, false, true });
volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_Bathtub, GetLocalizedStringName(L"UnitName_Bathtub"), GetLocalizedStringName(L"UnitAbbreviation_Bathtub"), 23 ,false, false, true}); volumeUnits.push_back(OrderedUnit{ UnitConverterUnits::Volume_Bathtub, GetLocalizedStringName(L"UnitName_Bathtub"), GetLocalizedStringName(L"UnitAbbreviation_Bathtub"), 23 ,false, false, true});
@ -330,11 +337,11 @@ void UnitConverterDataLoader::GetUnits(_In_ unordered_map<ViewMode, vector<Order
weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Decagram, GetLocalizedStringName(L"UnitName_Decagram"), GetLocalizedStringName(L"UnitAbbreviation_Decagram"), 6 }); weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Decagram, GetLocalizedStringName(L"UnitName_Decagram"), GetLocalizedStringName(L"UnitAbbreviation_Decagram"), 6 });
weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Gram, GetLocalizedStringName(L"UnitName_Gram"), GetLocalizedStringName(L"UnitAbbreviation_Gram"), 5 }); weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Gram, GetLocalizedStringName(L"UnitName_Gram"), GetLocalizedStringName(L"UnitAbbreviation_Gram"), 5 });
weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Hectogram, GetLocalizedStringName(L"UnitName_Hectogram"), GetLocalizedStringName(L"UnitAbbreviation_Hectogram"), 7 }); weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Hectogram, GetLocalizedStringName(L"UnitName_Hectogram"), GetLocalizedStringName(L"UnitAbbreviation_Hectogram"), 7 });
weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Kilogram, GetLocalizedStringName(L"UnitName_Kilogram"), GetLocalizedStringName(L"UnitAbbreviation_Kilogram"), 8 ,(USSource || UKSource), Target, false}); weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Kilogram, GetLocalizedStringName(L"UnitName_Kilogram"), GetLocalizedStringName(L"UnitAbbreviation_Kilogram"), 8 , useUSCustomary, useSI});
weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_LongTon, GetLocalizedStringName(L"UnitName_LongTon"), GetLocalizedStringName(L"UnitAbbreviation_LongTon"), 14 }); weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_LongTon, GetLocalizedStringName(L"UnitName_LongTon"), GetLocalizedStringName(L"UnitAbbreviation_LongTon"), 14 });
weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Milligram, GetLocalizedStringName(L"UnitName_Milligram"), GetLocalizedStringName(L"UnitAbbreviation_Milligram"), 2 }); weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Milligram, GetLocalizedStringName(L"UnitName_Milligram"), GetLocalizedStringName(L"UnitAbbreviation_Milligram"), 2 });
weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Ounce, GetLocalizedStringName(L"UnitName_Ounce"), GetLocalizedStringName(L"UnitAbbreviation_Ounce"), 10 }); weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Ounce, GetLocalizedStringName(L"UnitName_Ounce"), GetLocalizedStringName(L"UnitAbbreviation_Ounce"), 10 });
weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Pound, GetLocalizedStringName(L"UnitName_Pound"), GetLocalizedStringName(L"UnitAbbreviation_Pound"), 11 , Source, (USTarget ||UKTarget), false }); weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Pound, GetLocalizedStringName(L"UnitName_Pound"), GetLocalizedStringName(L"UnitAbbreviation_Pound"), 11 , useSI, useUSCustomary });
weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_ShortTon, GetLocalizedStringName(L"UnitName_ShortTon"), GetLocalizedStringName(L"UnitAbbreviation_ShortTon"), 13 }); weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_ShortTon, GetLocalizedStringName(L"UnitName_ShortTon"), GetLocalizedStringName(L"UnitAbbreviation_ShortTon"), 13 });
weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Stone, GetLocalizedStringName(L"UnitName_Stone"), GetLocalizedStringName(L"UnitAbbreviation_Stone"), 12 }); weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Stone, GetLocalizedStringName(L"UnitName_Stone"), GetLocalizedStringName(L"UnitAbbreviation_Stone"), 12 });
weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Tonne, GetLocalizedStringName(L"UnitName_Tonne"), GetLocalizedStringName(L"UnitAbbreviation_Tonne"), 9 }); weightUnits.push_back(OrderedUnit{ UnitConverterUnits::Weight_Tonne, GetLocalizedStringName(L"UnitName_Tonne"), GetLocalizedStringName(L"UnitAbbreviation_Tonne"), 9 });
@ -469,8 +476,8 @@ void UnitConverterDataLoader::GetConversionData(_In_ unordered_map<ViewMode, uno
{ ViewMode::Volume, UnitConverterUnits::Volume_GallonUS, 3785.411784 }, { ViewMode::Volume, UnitConverterUnits::Volume_GallonUS, 3785.411784 },
{ ViewMode::Volume, UnitConverterUnits::Volume_GallonUK, 4546.09 }, { ViewMode::Volume, UnitConverterUnits::Volume_GallonUK, 4546.09 },
{ ViewMode::Volume, UnitConverterUnits::Volume_Liter, 1000 }, { ViewMode::Volume, UnitConverterUnits::Volume_Liter, 1000 },
{ ViewMode::Volume, UnitConverterUnits::Volume_TeaspoonUS, 4.928922 }, { ViewMode::Volume, UnitConverterUnits::Volume_TeaspoonUS, 4.92892159375 },
{ ViewMode::Volume, UnitConverterUnits::Volume_TablespoonUS, 14.786765 }, { ViewMode::Volume, UnitConverterUnits::Volume_TablespoonUS, 14.78676478125 },
{ ViewMode::Volume, UnitConverterUnits::Volume_CubicCentimeter, 1 }, { ViewMode::Volume, UnitConverterUnits::Volume_CubicCentimeter, 1 },
{ ViewMode::Volume, UnitConverterUnits::Volume_CubicYard, 764554.857984 }, { ViewMode::Volume, UnitConverterUnits::Volume_CubicYard, 764554.857984 },
{ ViewMode::Volume, UnitConverterUnits::Volume_CubicMeter, 1000000 }, { ViewMode::Volume, UnitConverterUnits::Volume_CubicMeter, 1000000 },
@ -548,24 +555,6 @@ void UnitConverterDataLoader::GetConversionData(_In_ unordered_map<ViewMode, uno
return AppResourceProvider::GetInstance().GetResourceString(stringId)->Data(); return AppResourceProvider::GetInstance().GetResourceString(stringId)->Data();
} }
wstring UnitConverterDataLoader::GetRegion()
{
if ((m_currentRegionCode == L"US") ||
(m_currentRegionCode == L"LR") ||
(m_currentRegionCode == L"MM"))
{
return L"US";
}
else if (m_currentRegionCode == L"GB")
{
return L"UK";
}
else
{
return L"Others";
}
}
void UnitConverterDataLoader::GetExplicitConversionData(_In_ unordered_map<int, unordered_map<int, UCM::ConversionData>>& unitToUnitConversionList) void UnitConverterDataLoader::GetExplicitConversionData(_In_ unordered_map<int, unordered_map<int, UCM::ConversionData>>& unitToUnitConversionList)
{ {
/* categoryId, ParentUnitId, UnitId, ratio, offset, offsetfirst*/ /* categoryId, ParentUnitId, UnitId, ratio, offset, offsetfirst*/

View file

@ -3,7 +3,7 @@
#pragma once #pragma once
#include "CalcManager\UnitConverter.h" #include "CalcManager/UnitConverter.h"
#include "Common/NavCategory.h" #include "Common/NavCategory.h"
namespace CalculatorApp namespace CalculatorApp
@ -64,7 +64,6 @@ namespace CalculatorApp
void GetExplicitConversionData(_In_ std::unordered_map<int, std::unordered_map<int, UnitConversionManager::ConversionData>>& unitToUnitConversionList); void GetExplicitConversionData(_In_ std::unordered_map<int, std::unordered_map<int, UnitConversionManager::ConversionData>>& unitToUnitConversionList);
std::wstring GetLocalizedStringName(_In_ Platform::String^ stringId); std::wstring GetLocalizedStringName(_In_ Platform::String^ stringId);
std::wstring GetRegion();
std::shared_ptr<std::vector<UnitConversionManager::Category>> m_categoryList; std::shared_ptr<std::vector<UnitConversionManager::Category>> m_categoryList;
std::shared_ptr<UnitConversionManager::CategoryToUnitVectorMap> m_categoryToUnits; std::shared_ptr<UnitConversionManager::CategoryToUnitVectorMap> m_categoryToUnits;

View file

@ -3,11 +3,11 @@
#include "pch.h" #include "pch.h"
#include "DateCalculatorViewModel.h" #include "DateCalculatorViewModel.h"
#include "Common\TraceLogger.h" #include "Common/TraceLogger.h"
#include "Common\LocalizationStringUtil.h" #include "Common/LocalizationStringUtil.h"
#include "Common\LocalizationService.h" #include "Common/LocalizationService.h"
#include "Common\LocalizationSettings.h" #include "Common/LocalizationSettings.h"
#include "Common\CopyPasteManager.h" #include "Common/CopyPasteManager.h"
using namespace CalculatorApp; using namespace CalculatorApp;
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;
@ -87,7 +87,7 @@ DateCalculatorViewModel::DateCalculatorViewModel() :
} }
/* In the ClipTime function, we used to change timezone to UTC before clipping the time. /* In the ClipTime function, we used to change timezone to UTC before clipping the time.
The comment from the previous delopers said this was done to eliminate the effects of The comment from the previous developers said this was done to eliminate the effects of
Daylight Savings Time. We can't think of a good reason why this change in timezone is Daylight Savings Time. We can't think of a good reason why this change in timezone is
necessary and did find bugs related to the change, therefore, we have removed the necessary and did find bugs related to the change, therefore, we have removed the
change. Just in case, we will see if the clipped time is ever a different day from the change. Just in case, we will see if the clipped time is ever a different day from the

View file

@ -98,7 +98,7 @@ namespace CalculatorApp
void UpdateDisplayResult(); void UpdateDisplayResult();
void UpdateStrDateDiffResultAutomationName(); void UpdateStrDateDiffResultAutomationName();
void UpdateStrDateResultAutomationName(); void UpdateStrDateResultAutomationName();
void InitializeDateOutputFormats(Platform::String^ calendarIdentifer); void InitializeDateOutputFormats(Platform::String^ calendarIdentifier);
Platform::String^ GetDateDiffString() const; Platform::String^ GetDateDiffString() const;
Platform::String^ GetDateDiffStringInDays() const; Platform::String^ GetDateDiffStringInDays() const;
Platform::String^ GetLocalizedNumberString(int value) const; Platform::String^ GetLocalizedNumberString(int value) const;

View file

@ -3,7 +3,7 @@
#include "pch.h" #include "pch.h"
#include "HistoryItemViewModel.h" #include "HistoryItemViewModel.h"
#include "Common\LocalizationService.h" #include "Common/LocalizationService.h"
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;
using namespace CalculatorApp::ViewModel; using namespace CalculatorApp::ViewModel;

View file

@ -3,9 +3,9 @@
#include "pch.h" #include "pch.h"
#include "HistoryViewModel.h" #include "HistoryViewModel.h"
#include "Common\TraceLogger.h" #include "Common/TraceLogger.h"
#include "Common\LocalizationStringUtil.h" #include "Common/LocalizationStringUtil.h"
#include "Common\LocalizationSettings.h" #include "Common/LocalizationSettings.h"
using namespace CalculatorApp; using namespace CalculatorApp;
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;

View file

@ -3,11 +3,11 @@
#include "pch.h" #include "pch.h"
#include "StandardCalculatorViewModel.h" #include "StandardCalculatorViewModel.h"
#include "Common\CalculatorButtonPressedEventArgs.h" #include "Common/CalculatorButtonPressedEventArgs.h"
#include "Common\LocalizationStringUtil.h" #include "Common/LocalizationStringUtil.h"
#include "Common\LocalizationSettings.h" #include "Common/LocalizationSettings.h"
#include "Common\CopyPasteManager.h" #include "Common/CopyPasteManager.h"
#include "Common\TraceLogger.h" #include "Common/TraceLogger.h"
using namespace CalculatorApp; using namespace CalculatorApp;
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;

View file

@ -2,11 +2,11 @@
// Licensed under the MIT License. // Licensed under the MIT License.
#pragma once #pragma once
#include "Common\Automation\NarratorAnnouncement.h" #include "Common/Automation/NarratorAnnouncement.h"
#include "Common\DisplayExpressionToken.h" #include "Common/DisplayExpressionToken.h"
#include "Common\CalculatorDisplay.h" #include "Common/CalculatorDisplay.h"
#include "Common\EngineResourceProvider.h" #include "Common/EngineResourceProvider.h"
#include "Common\CalculatorButtonUser.h" #include "Common/CalculatorButtonUser.h"
#include "HistoryViewModel.h" #include "HistoryViewModel.h"
#include "MemoryItemViewModel.h" #include "MemoryItemViewModel.h"

View file

@ -4,15 +4,15 @@
#include "pch.h" #include "pch.h"
#include "UnitConverterViewModel.h" #include "UnitConverterViewModel.h"
#include "CalcManager/Header Files/EngineStrings.h" #include "CalcManager/Header Files/EngineStrings.h"
#include "Common\CalculatorButtonPressedEventArgs.h" #include "Common/CalculatorButtonPressedEventArgs.h"
#include "Common\CopyPasteManager.h" #include "Common/CopyPasteManager.h"
#include "Common\LocalizationStringUtil.h" #include "Common/LocalizationStringUtil.h"
#include "Common\LocalizationService.h" #include "Common/LocalizationService.h"
#include "Common\LocalizationSettings.h" #include "Common/LocalizationSettings.h"
#include "Common\TraceLogger.h" #include "Common/TraceLogger.h"
#include "DataLoaders\CurrencyHttpClient.h" #include "DataLoaders/CurrencyHttpClient.h"
#include "DataLoaders\CurrencyDataLoader.h" #include "DataLoaders/CurrencyDataLoader.h"
#include "DataLoaders\UnitConverterDataLoader.h" #include "DataLoaders/UnitConverterDataLoader.h"
using namespace CalculatorApp; using namespace CalculatorApp;
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;
@ -674,7 +674,7 @@ void UnitConverterViewModel::Deserialize(Platform::String^ state)
RaisePropertyChanged(nullptr); // Update since all props have been updated. RaisePropertyChanged(nullptr); // Update since all props have been updated.
} }
//Saving User Prefernces of Category and Associated-Units across Sessions. //Saving User Preferences of Category and Associated-Units across Sessions.
void UnitConverterViewModel::SaveUserPreferences() void UnitConverterViewModel::SaveUserPreferences()
{ {
if (UnitsAreValid()) if (UnitsAreValid())
@ -695,7 +695,7 @@ void UnitConverterViewModel::SaveUserPreferences()
} }
} }
//Restoring User Prefernces of Category and Associated-Units. //Restoring User Preferences of Category and Associated-Units.
void UnitConverterViewModel::RestoreUserPreferences() void UnitConverterViewModel::RestoreUserPreferences()
{ {
if (!IsCurrencyCurrentCategory) if (!IsCurrencyCurrentCategory)

View file

@ -74,7 +74,7 @@ namespace CalculatorApp
Platform::String^ get() { return ref new Platform::String(m_original.abbreviation.c_str()); } Platform::String^ get() { return ref new Platform::String(m_original.abbreviation.c_str()); }
} }
// This method is used to return the desired automation name for default unit in UnitConveter combo box. // This method is used to return the desired automation name for default unit in UnitConverter combo box.
Platform::String^ ToString() override Platform::String^ ToString() override
{ {
return AccessibleName; return AccessibleName;
@ -243,7 +243,7 @@ namespace CalculatorApp
Platform::String^ Serialize(); Platform::String^ Serialize();
void Deserialize(Platform::String^ state); void Deserialize(Platform::String^ state);
//Saving And Restoring User Prefernces of Category and Associated-Units across Sessions. //Saving And Restoring User Preferences of Category and Associated-Units across Sessions.
void SaveUserPreferences(); void SaveUserPreferences();
void RestoreUserPreferences(); void RestoreUserPreferences();
@ -333,7 +333,7 @@ namespace CalculatorApp
std::wstring m_valueFromUnlocalized; std::wstring m_valueFromUnlocalized;
std::wstring m_valueToUnlocalized; std::wstring m_valueToUnlocalized;
bool m_relocalizeStringOnSwitch; bool m_relocalizeStringOnSwitch;
// For Saving the User Preferences only if the Unit convertyer ViewModel is initialised for the first time // For Saving the User Preferences only if the Unit converter ViewModel is initialised for the first time
bool m_IsFirstTime; bool m_IsFirstTime;
Platform::String^ m_localizedValueFromFormat; Platform::String^ m_localizedValueFromFormat;

View file

@ -28,12 +28,12 @@
#include <regex> #include <regex>
// C++\WinRT Headers // C++\WinRT Headers
#include "winrt\base.h" #include "winrt/base.h"
#include "winrt\Windows.Foundation.Diagnostics.h" #include "winrt/Windows.Foundation.Diagnostics.h"
#include "winrt\Windows.Globalization.h" #include "winrt/Windows.Globalization.h"
#include "winrt\Windows.Globalization.DateTimeFormatting.h" #include "winrt/Windows.Globalization.DateTimeFormatting.h"
#include "winrt\Windows.System.UserProfile.h" #include "winrt/Windows.System.UserProfile.h"
#include "winrt\Windows.UI.Xaml.h" #include "winrt/Windows.UI.Xaml.h"
// The following namespaces exist as a convenience to resolve // The following namespaces exist as a convenience to resolve
// ambiguity for Windows types in the Windows::UI::Xaml::Automation::Peers // ambiguity for Windows types in the Windows::UI::Xaml::Automation::Peers

View file

@ -844,7 +844,7 @@
</ImportGroup> </ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>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}.</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\..\packages\Microsoft.WindowsCalculator.PGO.1.0.2\build\native\Microsoft.WindowsCalculator.PGO.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.WindowsCalculator.PGO.1.0.2\build\native\Microsoft.WindowsCalculator.PGO.props'))" /> <Error Condition="!Exists('..\..\packages\Microsoft.WindowsCalculator.PGO.1.0.2\build\native\Microsoft.WindowsCalculator.PGO.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.WindowsCalculator.PGO.1.0.2\build\native\Microsoft.WindowsCalculator.PGO.props'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.WindowsCalculator.PGO.1.0.2\build\native\Microsoft.WindowsCalculator.PGO.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.WindowsCalculator.PGO.1.0.2\build\native\Microsoft.WindowsCalculator.PGO.targets'))" /> <Error Condition="!Exists('..\..\packages\Microsoft.WindowsCalculator.PGO.1.0.2\build\native\Microsoft.WindowsCalculator.PGO.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.WindowsCalculator.PGO.1.0.2\build\native\Microsoft.WindowsCalculator.PGO.targets'))" />

View file

@ -275,7 +275,7 @@ namespace CalculatorApp { namespace Common
return Windows::UI::Xaml::DependencyProperty::UnsetValue; // Can't convert return Windows::UI::Xaml::DependencyProperty::UnsetValue; // Can't convert
} }
virtual Platform::Object^ ConverBack( virtual Platform::Object^ ConvertBack(
Platform::Object^ /*value*/, Platform::Object^ /*value*/,
Windows::UI::Xaml::Interop::TypeName /*targetType*/, Windows::UI::Xaml::Interop::TypeName /*targetType*/,
Platform::Object^ /*parameter*/, Platform::Object^ /*parameter*/,

View file

@ -3,7 +3,7 @@
#include "pch.h" #include "pch.h"
#include "AppLifecycleLogger.h" #include "AppLifecycleLogger.h"
#include "CalcViewModel\Common\TraceActivity.h" #include "CalcViewModel/Common/TraceActivity.h"
using namespace std; using namespace std;
using namespace winrt; using namespace winrt;

View file

@ -3,8 +3,8 @@
#include "pch.h" #include "pch.h"
#include "TitleBarHelper.h" #include "TitleBarHelper.h"
#include "Converters\BooleanToVisibilityConverter.h" #include "Converters/BooleanToVisibilityConverter.h"
#include "CalcViewModel\ViewState.h" #include "CalcViewModel/ViewState.h"
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;
using namespace CalculatorApp::Converters; using namespace CalculatorApp::Converters;

View file

@ -3,7 +3,7 @@
#pragma once #pragma once
#include "Common\KeyboardShortcutManager.h" #include "Common/KeyboardShortcutManager.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -4,7 +4,7 @@
#include "pch.h" #include "pch.h"
#include "CalculationResult.h" #include "CalculationResult.h"
#include "CalculationResultAutomationPeer.h" #include "CalculationResultAutomationPeer.h"
#include "CalcViewModel\Common\LocalizationSettings.h" #include "CalcViewModel/Common/LocalizationSettings.h"
using namespace CalculatorApp; using namespace CalculatorApp;
using namespace CalculatorApp::Controls; using namespace CalculatorApp::Controls;

View file

@ -3,7 +3,7 @@
#pragma once #pragma once
#include "Controls\CalculationResult.h" #include "Controls/CalculationResult.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -3,7 +3,7 @@
#include "pch.h" #include "pch.h"
#include "CalculatorButton.h" #include "CalculatorButton.h"
#include "CalcViewModel\Common\CalculatorButtonPressedEventArgs.h" #include "CalcViewModel/Common/CalculatorButtonPressedEventArgs.h"
using namespace CalculatorApp; using namespace CalculatorApp;
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;

View file

@ -2,7 +2,7 @@
// Licensed under the MIT License. // Licensed under the MIT License.
#include "pch.h" #include "pch.h"
#include "Controls\OverflowTextBlock.h" #include "Controls/OverflowTextBlock.h"
#include "OverflowTextBlockAutomationPeer.h" #include "OverflowTextBlockAutomationPeer.h"
using namespace Windows::UI::Xaml::Automation::Peers; using namespace Windows::UI::Xaml::Automation::Peers;

View file

@ -3,7 +3,7 @@
#pragma once #pragma once
#include "Controls\OverflowTextBlock.h" #include "Controls/OverflowTextBlock.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -3,7 +3,7 @@
#include "pch.h" #include "pch.h"
#include "RadixButton.h" #include "RadixButton.h"
#include "CalcViewModel\Common\LocalizationSettings.h" #include "CalcViewModel/Common/LocalizationSettings.h"
using namespace CalculatorApp; using namespace CalculatorApp;
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;

View file

@ -3,7 +3,7 @@
#include "pch.h" #include "pch.h"
#include "SupplementaryItemsControl.h" #include "SupplementaryItemsControl.h"
#include "CalcViewModel\UnitConverterViewModel.h" #include "CalcViewModel/UnitConverterViewModel.h"
using namespace CalculatorApp; using namespace CalculatorApp;
using namespace CalculatorApp::Controls; using namespace CalculatorApp::Controls;

View file

@ -2,8 +2,8 @@
// Licensed under the MIT License. // Licensed under the MIT License.
#include "pch.h" #include "pch.h"
#include "CalcViewModel\Common\AppResourceProvider.h" #include "CalcViewModel/Common/AppResourceProvider.h"
#include "CalcViewModel\Common\LocalizationSettings.h" #include "CalcViewModel/Common/LocalizationSettings.h"
#include "BitFlipAutomationNameConverter.h" #include "BitFlipAutomationNameConverter.h"
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;

View file

@ -3,7 +3,7 @@
#include "pch.h" #include "pch.h"
#include "ExpressionItemContainerStyle.h" #include "ExpressionItemContainerStyle.h"
#include "CalcViewModel\Common\DisplayExpressionToken.h" #include "CalcViewModel/Common/DisplayExpressionToken.h"
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;

View file

@ -3,7 +3,7 @@
#include "pch.h" #include "pch.h"
#include "ExpressionItemTemplateSelector.h" #include "ExpressionItemTemplateSelector.h"
#include "CalcViewModel\Common\DisplayExpressionToken.h" #include "CalcViewModel/Common/DisplayExpressionToken.h"
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;

View file

@ -22,7 +22,7 @@ namespace Numbers
OBSERVABLE_PROPERTY_RW(Platform::String^, SlotValue); OBSERVABLE_PROPERTY_RW(Platform::String^, SlotValue);
}; };
// This class is to be consumbed exclusively by Blend and the VS designer // This class is to be consumed exclusively by Blend and the VS designer
// with this class Blend will be able to populate the controls, the CalculationResults control for example, // with this class Blend will be able to populate the controls, the CalculationResults control for example,
// with the hardcoded strings so whoever is working on the UI can actually see how the app would look like // with the hardcoded strings so whoever is working on the UI can actually see how the app would look like
// with semi-realistic data. // with semi-realistic data.

View file

@ -2601,7 +2601,7 @@
</data> </data>
<data name="xorButton.[using:CalculatorApp.Controls]CalculatorButton.AuditoryFeedback" xml:space="preserve"> <data name="xorButton.[using:CalculatorApp.Controls]CalculatorButton.AuditoryFeedback" xml:space="preserve">
<value>x or</value> <value>x or</value>
<comment>Auditory feedback for Screen Reader users. Users will hear "Display is 7 x or" when the button is pressed. XOR is a mathematical operation on two binary values. Here the feedback is "x or" in order to get the correct pronounciation.</comment> <comment>Auditory feedback for Screen Reader users. Users will hear "Display is 7 x or" when the button is pressed. XOR is a mathematical operation on two binary values. Here the feedback is "x or" in order to get the correct pronunciation.</comment>
</data> </data>
<data name="andButton.[using:CalculatorApp.Controls]CalculatorButton.AuditoryFeedback" xml:space="preserve"> <data name="andButton.[using:CalculatorApp.Controls]CalculatorButton.AuditoryFeedback" xml:space="preserve">
<value>and</value> <value>and</value>

View file

@ -3085,7 +3085,7 @@
</data> </data>
<data name="xorButton.[using:CalculatorApp.Controls]CalculatorButton.AuditoryFeedback" xml:space="preserve"> <data name="xorButton.[using:CalculatorApp.Controls]CalculatorButton.AuditoryFeedback" xml:space="preserve">
<value>x or</value> <value>x or</value>
<comment>Auditory feedback for Screen Reader users. Users will hear "Display is 7 x or" when the button is pressed. XOR is a mathematical operation on two binary values. Here the feedback is "x or" in order to get the correct pronounciation.</comment> <comment>Auditory feedback for Screen Reader users. Users will hear "Display is 7 x or" when the button is pressed. XOR is a mathematical operation on two binary values. Here the feedback is "x or" in order to get the correct pronunciation.</comment>
</data> </data>
<data name="andButton.[using:CalculatorApp.Controls]CalculatorButton.AuditoryFeedback" xml:space="preserve"> <data name="andButton.[using:CalculatorApp.Controls]CalculatorButton.AuditoryFeedback" xml:space="preserve">
<value>and</value> <value>and</value>

View file

@ -3,22 +3,22 @@
#pragma once #pragma once
#include "Views\Calculator.g.h" #include "Views/Calculator.g.h"
#include "Converters\BooleanNegationConverter.h" #include "Converters/BooleanNegationConverter.h"
#include "Converters\ExpressionItemContainerStyle.h" #include "Converters/ExpressionItemContainerStyle.h"
#include "Converters\ExpressionItemTemplateSelector.h" #include "Converters/ExpressionItemTemplateSelector.h"
#include "Converters\VisibilityNegationConverter.h" #include "Converters/VisibilityNegationConverter.h"
#include "CalcViewModel\Common\Automation\NarratorNotifier.h" #include "CalcViewModel/Common/Automation/NarratorNotifier.h"
#include "Controls\CalculatorButton.h" #include "Controls/CalculatorButton.h"
#include "Controls\CalculationResult.h" #include "Controls/CalculationResult.h"
#include "Controls\OverflowTextBlock.h" #include "Controls/OverflowTextBlock.h"
#include "CalcViewModel\HistoryViewModel.h" #include "CalcViewModel/HistoryViewModel.h"
#include "Views\CalculatorProgrammerDisplayPanel.xaml.h" #include "Views/CalculatorProgrammerDisplayPanel.xaml.h"
#include "Views\CalculatorProgrammerOperators.xaml.h" #include "Views/CalculatorProgrammerOperators.xaml.h"
#include "Views\CalculatorScientificAngleButtons.xaml.h" #include "Views/CalculatorScientificAngleButtons.xaml.h"
#include "Views\HistoryList.xaml.h" #include "Views/HistoryList.xaml.h"
#include "Views\Memory.xaml.h" #include "Views/Memory.xaml.h"
#include "Views\OperatorsPanel.xaml.h" #include "Views/OperatorsPanel.xaml.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -23,7 +23,7 @@ using namespace Windows::UI::Xaml::Controls;
using namespace Windows::UI::Xaml::Data; using namespace Windows::UI::Xaml::Data;
using namespace Windows::UI::Xaml::Input; using namespace Windows::UI::Xaml::Input;
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236 // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
CalculatorProgrammerBitFlipPanel::CalculatorProgrammerBitFlipPanel() : CalculatorProgrammerBitFlipPanel::CalculatorProgrammerBitFlipPanel() :
m_updatingCheckedStates(false) m_updatingCheckedStates(false)

View file

@ -8,12 +8,12 @@
#pragma once #pragma once
#include "Views\CalculatorProgrammerBitFlipPanel.g.h" #include "Views/CalculatorProgrammerBitFlipPanel.g.h"
#include "Controls\FlipButtons.h" #include "Controls/FlipButtons.h"
#include "Converters\BitFlipAutomationNameConverter.h" #include "Converters/BitFlipAutomationNameConverter.h"
#include "Converters\BooleanNegationConverter.h" #include "Converters/BooleanNegationConverter.h"
#include "Converters\VisibilityNegationConverter.h" #include "Converters/VisibilityNegationConverter.h"
#include "CalcViewModel\StandardCalculatorViewModel.h" #include "CalcViewModel/StandardCalculatorViewModel.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -3,8 +3,8 @@
#pragma once #pragma once
#include "Views\CalculatorProgrammerDisplayPanel.g.h" #include "Views/CalculatorProgrammerDisplayPanel.g.h"
#include "CalcViewModel\StandardCalculatorViewModel.h" #include "CalcViewModel/StandardCalculatorViewModel.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -3,9 +3,9 @@
#pragma once #pragma once
#include "Views\CalculatorProgrammerOperators.g.h" #include "Views/CalculatorProgrammerOperators.g.h"
#include "Controls\RadixButton.h" #include "Controls/RadixButton.h"
#include "CalcViewModel\StandardCalculatorViewModel.h" #include "CalcViewModel/StandardCalculatorViewModel.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -8,9 +8,9 @@
#include "pch.h" #include "pch.h"
#include "CalculatorProgrammerRadixOperators.xaml.h" #include "CalculatorProgrammerRadixOperators.xaml.h"
#include "Controls\CalculatorButton.h" #include "Controls/CalculatorButton.h"
#include "Converters\BooleanToVisibilityConverter.h" #include "Converters/BooleanToVisibilityConverter.h"
#include "Views\NumberPad.xaml.h" #include "Views/NumberPad.xaml.h"
using namespace CalculatorApp; using namespace CalculatorApp;

View file

@ -3,9 +3,9 @@
#pragma once #pragma once
#include "Views\CalculatorProgrammerRadixOperators.g.h" #include "Views/CalculatorProgrammerRadixOperators.g.h"
#include "Converters\VisibilityNegationConverter.h" #include "Converters/VisibilityNegationConverter.h"
#include "CalcViewModel\StandardCalculatorViewModel.h" #include "CalcViewModel/StandardCalculatorViewModel.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -27,7 +27,7 @@ using namespace Windows::UI::Xaml::Navigation;
using namespace Windows::UI::ViewManagement; using namespace Windows::UI::ViewManagement;
using namespace Windows::UI::Core; using namespace Windows::UI::Core;
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236 // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
CalculatorScientificAngleButtons::CalculatorScientificAngleButtons() : CalculatorScientificAngleButtons::CalculatorScientificAngleButtons() :
m_isErrorVisualState(false) m_isErrorVisualState(false)

View file

@ -8,8 +8,8 @@
#pragma once #pragma once
#include "Views\CalculatorScientificAngleButtons.g.h" #include "Views/CalculatorScientificAngleButtons.g.h"
#include "CalcViewModel\StandardCalculatorViewModel.h" #include "CalcViewModel/StandardCalculatorViewModel.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -8,9 +8,9 @@
#include "pch.h" #include "pch.h"
#include "CalculatorScientificOperators.xaml.h" #include "CalculatorScientificOperators.xaml.h"
#include "CalcViewModel\Common\KeyboardShortcutManager.h" #include "CalcViewModel/Common/KeyboardShortcutManager.h"
#include "Controls\CalculatorButton.h" #include "Controls/CalculatorButton.h"
#include "CalcViewModel\StandardCalculatorViewModel.h" #include "CalcViewModel/StandardCalculatorViewModel.h"
using namespace CalculatorApp; using namespace CalculatorApp;
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;

View file

@ -8,11 +8,11 @@
#pragma once #pragma once
#include "Views\CalculatorScientificOperators.g.h" #include "Views/CalculatorScientificOperators.g.h"
#include "Views\NumberPad.xaml.h" #include "Views/NumberPad.xaml.h"
#include "Converters\BooleanNegationConverter.h" #include "Converters/BooleanNegationConverter.h"
#include "Converters\VisibilityNegationConverter.h" #include "Converters/VisibilityNegationConverter.h"
#include "CalcViewModel\StandardCalculatorViewModel.h" #include "CalcViewModel/StandardCalculatorViewModel.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -22,7 +22,7 @@ using namespace Windows::UI::Xaml::Input;
using namespace Windows::UI::Xaml::Media; using namespace Windows::UI::Xaml::Media;
using namespace Windows::UI::Xaml::Navigation; using namespace Windows::UI::Xaml::Navigation;
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236 // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
CalculatorStandardOperators::CalculatorStandardOperators() : CalculatorStandardOperators::CalculatorStandardOperators() :
m_isErrorVisualState(false) m_isErrorVisualState(false)

View file

@ -8,8 +8,8 @@
#pragma once #pragma once
#include "Views\CalculatorStandardOperators.g.h" #include "Views/CalculatorStandardOperators.g.h"
#include "Views\NumberPad.xaml.h" #include "Views/NumberPad.xaml.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -36,7 +36,7 @@ using namespace Windows::UI::Xaml::Input;
using namespace Windows::UI::Xaml::Media; using namespace Windows::UI::Xaml::Media;
using namespace Windows::UI::Xaml::Navigation; using namespace Windows::UI::Xaml::Navigation;
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236 // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
DateCalculator::DateCalculator() DateCalculator::DateCalculator()
{ {

View file

@ -8,9 +8,9 @@
#pragma once #pragma once
#include "Converters\BooleanNegationConverter.h" #include "Converters/BooleanNegationConverter.h"
#include "Converters\VisibilityNegationConverter.h" #include "Converters/VisibilityNegationConverter.h"
#include "Views\DateCalculator.g.h" #include "Views/DateCalculator.g.h"
// We choose 2550 as the max year because CalendarDatePicker experiences clipping // We choose 2550 as the max year because CalendarDatePicker experiences clipping
// issues just after 2558. We would like 9999 but will need to wait for a platform // issues just after 2558. We would like 9999 but will need to wait for a platform

View file

@ -8,7 +8,7 @@
#include "pch.h" #include "pch.h"
#include "HistoryList.xaml.h" #include "HistoryList.xaml.h"
#include "CalcViewModel\Common\LocalizationService.h" #include "CalcViewModel/Common/LocalizationService.h"
using namespace CalculatorApp; using namespace CalculatorApp;
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;
@ -29,7 +29,7 @@ using namespace Windows::UI::ViewManagement;
namespace MUXC = Microsoft::UI::Xaml::Controls; namespace MUXC = Microsoft::UI::Xaml::Controls;
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=390556 // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=390556
DEPENDENCY_PROPERTY_INITIALIZATION(HistoryList, RowHeight); DEPENDENCY_PROPERTY_INITIALIZATION(HistoryList, RowHeight);

View file

@ -8,11 +8,11 @@
#pragma once #pragma once
#include "Views\HistoryList.g.h" #include "Views/HistoryList.g.h"
#include "Common\TitleBarHelper.h" #include "Common/TitleBarHelper.h"
#include "Converters\ItemSizeToVisibilityConverter.h" #include "Converters/ItemSizeToVisibilityConverter.h"
#include "Converters\VisibilityNegationConverter.h" #include "Converters/VisibilityNegationConverter.h"
#include "CalcViewModel\HistoryViewModel.h" #include "CalcViewModel/HistoryViewModel.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -3,12 +3,12 @@
#pragma once #pragma once
#include "Views\Calculator.xaml.h" #include "Views/Calculator.xaml.h"
#include "Views\MainPage.g.h" #include "Views/MainPage.g.h"
#include "Views\DateCalculator.xaml.h" #include "Views/DateCalculator.xaml.h"
#include "Views\UnitConverter.xaml.h" #include "Views/UnitConverter.xaml.h"
#include "CalcViewModel\ApplicationViewModel.h" #include "CalcViewModel/ApplicationViewModel.h"
#include "Views\TitleBar.xaml.h" #include "Views/TitleBar.xaml.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -8,9 +8,9 @@
#include "pch.h" #include "pch.h"
#include "Memory.xaml.h" #include "Memory.xaml.h"
#include "Controls\CalculatorButton.h" #include "Controls/CalculatorButton.h"
#include "CalcViewModel\StandardCalculatorViewModel.h" #include "CalcViewModel/StandardCalculatorViewModel.h"
#include "CalcViewModel\Common\LocalizationService.h" #include "CalcViewModel/Common/LocalizationService.h"
using namespace CalculatorApp; using namespace CalculatorApp;
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;
@ -31,7 +31,7 @@ using namespace Windows::UI::Xaml::Media;
using namespace Windows::UI::Xaml::Navigation; using namespace Windows::UI::Xaml::Navigation;
using namespace Windows::UI::ViewManagement; using namespace Windows::UI::ViewManagement;
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236 // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
DEPENDENCY_PROPERTY_INITIALIZATION(Memory, RowHeight); DEPENDENCY_PROPERTY_INITIALIZATION(Memory, RowHeight);

View file

@ -8,11 +8,11 @@
#pragma once #pragma once
#include "Views\Memory.g.h" #include "Views/Memory.g.h"
#include "Common\TitleBarHelper.h" #include "Common/TitleBarHelper.h"
#include "Converters\BooleanNegationConverter.h" #include "Converters/BooleanNegationConverter.h"
#include "Converters\VisibilityNegationConverter.h" #include "Converters/VisibilityNegationConverter.h"
#include "CalcViewModel\StandardCalculatorViewModel.h" #include "CalcViewModel/StandardCalculatorViewModel.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -3,7 +3,7 @@
#include "pch.h" #include "pch.h"
#include "MemoryListItem.xaml.h" #include "MemoryListItem.xaml.h"
#include "Controls\CalculatorButton.h" #include "Controls/CalculatorButton.h"
using namespace CalculatorApp; using namespace CalculatorApp;
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;

View file

@ -3,8 +3,8 @@
#pragma once #pragma once
#include "Views\MemoryListItem.g.h" #include "Views/MemoryListItem.g.h"
#include "CalcViewModel\MemoryItemViewModel.h" #include "CalcViewModel/MemoryItemViewModel.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -8,9 +8,9 @@
#include "pch.h" #include "pch.h"
#include "NumberPad.xaml.h" #include "NumberPad.xaml.h"
#include "Controls\CalculatorButton.h" #include "Controls/CalculatorButton.h"
#include "CalcViewModel\StandardCalculatorViewModel.h" #include "CalcViewModel/StandardCalculatorViewModel.h"
#include "CalcViewModel\Common\LocalizationSettings.h" #include "CalcViewModel/Common/LocalizationSettings.h"
using namespace CalculatorApp; using namespace CalculatorApp;
using namespace CalculatorApp::ViewModel; using namespace CalculatorApp::ViewModel;
@ -27,7 +27,7 @@ using namespace Windows::UI::Xaml::Media;
using namespace Windows::UI::Xaml::Navigation; using namespace Windows::UI::Xaml::Navigation;
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236 // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
DEPENDENCY_PROPERTY_INITIALIZATION(NumberPad, ButtonStyle); DEPENDENCY_PROPERTY_INITIALIZATION(NumberPad, ButtonStyle);

View file

@ -8,8 +8,8 @@
#pragma once #pragma once
#include "Views\NumberPad.g.h" #include "Views/NumberPad.g.h"
#include "CalcViewModel\Common\KeyboardShortcutManager.h" #include "CalcViewModel/Common/KeyboardShortcutManager.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -3,11 +3,11 @@
#pragma once #pragma once
#include "Views\OperatorsPanel.g.h" #include "Views/OperatorsPanel.g.h"
#include "Views\CalculatorStandardOperators.xaml.h" #include "Views/CalculatorStandardOperators.xaml.h"
#include "Views\CalculatorScientificOperators.xaml.h" #include "Views/CalculatorScientificOperators.xaml.h"
#include "Views\CalculatorProgrammerBitFlipPanel.xaml.h" #include "Views/CalculatorProgrammerBitFlipPanel.xaml.h"
#include "Views\CalculatorProgrammerRadixOperators.xaml.h" #include "Views/CalculatorProgrammerRadixOperators.xaml.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -25,7 +25,7 @@ using namespace Windows::UI::Xaml::Interop;
using namespace Windows::UI::Xaml::Media; using namespace Windows::UI::Xaml::Media;
using namespace Windows::UI::Xaml::Navigation; using namespace Windows::UI::Xaml::Navigation;
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236 // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
Object^ DelighterUnitToStyleConverter::Convert(Object^ value, TypeName /*targetType*/, Object^ /*parameter*/, String^ /*language*/) Object^ DelighterUnitToStyleConverter::Convert(Object^ value, TypeName /*targetType*/, Object^ /*parameter*/, String^ /*language*/)
{ {
@ -109,7 +109,7 @@ void SupplementaryResults::OnWindowSizeChanged(Platform::Object^ sender, Windows
void SupplementaryResults::OnSupplementaryValuesLayoutUpdated(Platform::Object^ sender, Platform::Object^ e) void SupplementaryResults::OnSupplementaryValuesLayoutUpdated(Platform::Object^ sender, Platform::Object^ e)
{ {
// This means we overflowed and are cutting off, or in a very rare case we fit exactly. Unforunately // This means we overflowed and are cutting off, or in a very rare case we fit exactly. Unfortunately
// the fitting exactly case will still have an item removed, as there is no other way for us to // the fitting exactly case will still have an item removed, as there is no other way for us to
// detect that we need to trim. // detect that we need to trim.
Grid^ parentGrid = dynamic_cast<Grid^>(VisualTreeHelper::GetParent(this)); Grid^ parentGrid = dynamic_cast<Grid^>(VisualTreeHelper::GetParent(this));

View file

@ -8,11 +8,11 @@
#pragma once #pragma once
#include "Views\SupplementaryResults.g.h" #include "Views/SupplementaryResults.g.h"
#include "Controls\SupplementaryItemsControl.h" #include "Controls/SupplementaryItemsControl.h"
#include "Controls\OperandTextBox.h" #include "Controls/OperandTextBox.h"
#include "Controls\OperatorTextBox.h" #include "Controls/OperatorTextBox.h"
#include "CalcViewModel\UnitConverterViewModel.h" #include "CalcViewModel/UnitConverterViewModel.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -3,7 +3,7 @@
#include "pch.h" #include "pch.h"
#include "TitleBar.xaml.h" #include "TitleBar.xaml.h"
#include "CalcViewModel\Common\AppResourceProvider.h" #include "CalcViewModel/Common/AppResourceProvider.h"
using namespace std; using namespace std;
using namespace Platform; using namespace Platform;

View file

@ -3,7 +3,7 @@
#pragma once #pragma once
#include "Views\TitleBar.g.h" #include "Views/TitleBar.g.h"
namespace CalculatorApp namespace CalculatorApp
{ {

View file

@ -6,13 +6,13 @@
#include "pch.h" #include "pch.h"
#include "UnitConverter.xaml.h" #include "UnitConverter.xaml.h"
#include "CalcViewModel\UnitConverterViewModel.h" #include "CalcViewModel/UnitConverterViewModel.h"
#include "Controls\CalculationResult.h" #include "Controls/CalculationResult.h"
#include "Controls\CalculatorButton.h" #include "Controls/CalculatorButton.h"
#include "CalcViewModel\Common\CopyPasteManager.h" #include "CalcViewModel/Common/CopyPasteManager.h"
#include "CalcViewModel\Common\KeyboardShortcutManager.h" #include "CalcViewModel/Common/KeyboardShortcutManager.h"
#include "CalcViewModel\Common\LocalizationService.h" #include "CalcViewModel/Common/LocalizationService.h"
#include "CalcViewModel\Common\LocalizationSettings.h" #include "CalcViewModel/Common/LocalizationSettings.h"
using namespace CalculatorApp; using namespace CalculatorApp;
using namespace CalculatorApp::Common; using namespace CalculatorApp::Common;
@ -38,7 +38,7 @@ using namespace Windows::UI::Xaml::Media;
using namespace Windows::UI::Xaml::Navigation; using namespace Windows::UI::Xaml::Navigation;
using namespace Windows::UI::ViewManagement; using namespace Windows::UI::ViewManagement;
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236 // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
// Calculate number of 100-nanosecond intervals in 500 milliseconds. // Calculate number of 100-nanosecond intervals in 500 milliseconds.
// There are 10,000 intervals in 1 ms. // There are 10,000 intervals in 1 ms.

Some files were not shown because too many files have changed in this diff Show more