5cfbd72fa8
* PowerRename new UI * Add scrollviewer * Don't deploy PowerRenameUI_new * Visual updates * Visual updates * Updates * Update Resources.resw * Added docs button * Update MainWindow.xaml * Wire Docs button * RegEx -> regular expressions * Update Show only renamed list on search/replace text changed * Update Show only renamed list on search/replace text changed - proper fix Set searchTerm to NULL when cleared - fix Show only renamed files on clear searchTerm * Files/folders input error handling * Fix renaming with keeping UI window opened After renaming folder, all of it's children need path update. Without path update, further renaming of children items would fail. * Update only children, not all items with greater depth * Fix dictionary false positives * Remove .NET dep * Rename PowerRenameUI_new to PowerRenameUILib Rename executable PowerRenameUIHost to PowerRename Co-authored-by: Laute <Niels.Laute@philips.com>
50 lines
1.2 KiB
C++
50 lines
1.2 KiB
C++
#include "pch.h"
|
|
#include "PatternSnippet.h"
|
|
#include "PatternSnippet.g.cpp"
|
|
|
|
namespace winrt::PowerRenameUILib::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, Windows::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, Windows::UI::Xaml::Data::PropertyChangedEventArgs{ L"Description" });
|
|
}
|
|
}
|
|
|
|
winrt::event_token PatternSnippet::PropertyChanged(winrt::Windows::UI::Xaml::Data::PropertyChangedEventHandler const& handler)
|
|
{
|
|
return m_propertyChanged.add(handler);
|
|
}
|
|
|
|
void PatternSnippet::PropertyChanged(winrt::event_token const& token) noexcept
|
|
{
|
|
m_propertyChanged.remove(token);
|
|
}
|
|
}
|