mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-13 01:56:50 -07:00
Hello GitHub
This commit is contained in:
parent
456fe5e355
commit
c13b8a099e
822 changed files with 276650 additions and 75 deletions
33
src/CalcViewModel/Common/AppResourceProvider.cpp
Normal file
33
src/CalcViewModel/Common/AppResourceProvider.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "pch.h"
|
||||
#include "AppResourceProvider.h"
|
||||
|
||||
using namespace Platform;
|
||||
using namespace Windows::ApplicationModel::Resources;
|
||||
using namespace CalculatorApp;
|
||||
|
||||
AppResourceProvider::AppResourceProvider()
|
||||
{
|
||||
m_stringResLoader = ResourceLoader::GetForViewIndependentUse();
|
||||
m_cEngineStringResLoader = ResourceLoader::GetForViewIndependentUse(L"CEngineStrings");
|
||||
}
|
||||
|
||||
AppResourceProvider & AppResourceProvider::GetInstance()
|
||||
{
|
||||
static AppResourceProvider s_instance;
|
||||
return s_instance;
|
||||
}
|
||||
|
||||
String^ AppResourceProvider::GetResourceString(_In_ String^ key)
|
||||
{
|
||||
return m_stringResLoader->GetString(key);
|
||||
}
|
||||
|
||||
String^ AppResourceProvider::GetCEngineString(_In_ String^ key)
|
||||
{
|
||||
return m_cEngineStringResLoader->GetString(key);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue