PowerToys/src/modules/powerrename/PowerRenameUILib/PatternSnippet.cpp
Stefan Markovic 90ecd5e10f
[PowerRename] Move to WinAppSDK WinUI3 Unpackaged & ARM64 Support (#18171)
* Migrate PowerRename to Unpackaged WinUI3

* [ARM64] PowerRename (#18002)

* Migrate PowerRename to Unpackaged WinUI3

* Removed Project Config and update PlatformToolset to v143

* Updated solution config

* Migrate PowerRename to Unpackaged WinUI3

* Fixed configs changed from ARM64 build

* Left one project out of fix

Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>

* Minor fixes

* Remove PowerRenameUILib from signing list - doesn't exist anymore

* Remove PowerRenameUILib from move_uwp_resources.ps1

* Bring back old dir name to see if localization is preserved
Remove move_uwp_resources.ps1 - not needed anymore

* Remove UWP localization docs part

* Fix minor UI quirk

Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>
2022-05-11 16:38:12 +02:00

50 lines
1.3 KiB
C++

#include "pch.h"
#include "PatternSnippet.h"
#include "PatternSnippet.g.cpp"
namespace winrt::PowerRenameUI::implementation
{
PatternSnippet::PatternSnippet(hstring const& code, hstring const& description) :
m_code{ code }, m_description{ description }
{
}
hstring PatternSnippet::Code()
{
return m_code;
}
void PatternSnippet::Code(hstring const& value)
{
if (m_code != value)
{
m_code = value;
m_propertyChanged(*this, Microsoft::UI::Xaml::Data::PropertyChangedEventArgs{ L"Code" });
}
}
hstring PatternSnippet::Description()
{
return m_description;
}
void PatternSnippet::Description(hstring const& value)
{
if (m_description != value)
{
m_description = value;
m_propertyChanged(*this, Microsoft::UI::Xaml::Data::PropertyChangedEventArgs{ L"Description" });
}
}
winrt::event_token PatternSnippet::PropertyChanged(winrt::Microsoft::UI::Xaml::Data::PropertyChangedEventHandler const& handler)
{
return m_propertyChanged.add(handler);
}
void PatternSnippet::PropertyChanged(winrt::event_token const& token) noexcept
{
m_propertyChanged.remove(token);
}
}