mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-14 02:26:50 -07:00
This reverts commit 93f1f784bb
.
This commit is contained in:
parent
93f1f784bb
commit
049d3f4c6c
35 changed files with 533 additions and 509 deletions
|
@ -40,6 +40,8 @@ using namespace Windows::UI::Xaml::Media;
|
|||
using namespace Windows::UI::Xaml::Navigation;
|
||||
using namespace Windows::UI::ViewManagement;
|
||||
|
||||
// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
|
||||
|
||||
// Calculate number of 100-nanosecond intervals in 500 milliseconds.
|
||||
// There are 10,000 intervals in 1 ms.
|
||||
static const long long DURATION_500_MS = 10000 * 500;
|
||||
|
@ -64,14 +66,14 @@ UnitConverter::UnitConverter()
|
|||
m_isAnimationEnabled = userSettings->AnimationsEnabled;
|
||||
|
||||
auto resLoader = AppResourceProvider::GetInstance();
|
||||
m_chargesMayApplyText = resLoader->GetResourceString(L"DataChargesMayApply");
|
||||
m_failedToRefreshText = resLoader->GetResourceString(L"FailedToRefresh");
|
||||
m_chargesMayApplyText = resLoader.GetResourceString(L"DataChargesMayApply");
|
||||
m_failedToRefreshText = resLoader.GetResourceString(L"FailedToRefresh");
|
||||
|
||||
InitializeOfflineStatusTextBlock();
|
||||
|
||||
m_resultsFlyout = static_cast<MenuFlyout ^>(Resources->Lookup(L"CalculationResultContextMenu"));
|
||||
CopyMenuItem->Text = resLoader->GetResourceString(L"copyMenuItem");
|
||||
PasteMenuItem->Text = resLoader->GetResourceString(L"pasteMenuItem");
|
||||
CopyMenuItem->Text = resLoader.GetResourceString(L"copyMenuItem");
|
||||
PasteMenuItem->Text = resLoader.GetResourceString(L"pasteMenuItem");
|
||||
}
|
||||
|
||||
void UnitConverter::OnPropertyChanged(_In_ Object ^ sender, _In_ PropertyChangedEventArgs ^ e)
|
||||
|
@ -163,7 +165,7 @@ void UnitConverter::SetFailedToRefreshStatus()
|
|||
void UnitConverter::InitializeOfflineStatusTextBlock()
|
||||
{
|
||||
auto resProvider = AppResourceProvider::GetInstance();
|
||||
std::wstring offlineStatusHyperlinkText = resProvider->GetResourceString(L"OfflineStatusHyperlinkText")->Data();
|
||||
std::wstring offlineStatusHyperlinkText = static_cast<String ^>(resProvider.GetResourceString(L"OfflineStatusHyperlinkText"))->Data();
|
||||
|
||||
// The resource string has the 'NetworkSettings' hyperlink wrapped with '%HL%'.
|
||||
// Break the string and assign pieces appropriately.
|
||||
|
@ -243,9 +245,9 @@ void UnitConverter::OnCopyMenuItemClicked(_In_ Object ^ sender, _In_ RoutedEvent
|
|||
|
||||
void UnitConverter::OnPasteMenuItemClicked(_In_ Object ^ sender, _In_ RoutedEventArgs ^ e)
|
||||
{
|
||||
auto that(this);
|
||||
create_task(CopyPasteManager::GetStringToPaste(Model->Mode, CategoryGroupType::Converter, -1, BitLength::BitLengthUnknown))
|
||||
.then([that](String ^ pastedString) { that->Model->OnPaste(pastedString); });
|
||||
CopyPasteManager::GetStringToPaste(Model->Mode, CategoryGroupType::Converter).then([this](String ^ pastedString) {
|
||||
Model->OnPaste(pastedString);
|
||||
});
|
||||
}
|
||||
|
||||
void UnitConverter::AnimateConverter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue