mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
[PowerRename] Fluent UX (#13678)
* 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>
This commit is contained in:
48
src/modules/powerrename/PowerRenameUILib/ExplorerItem.h
Normal file
48
src/modules/powerrename/PowerRenameUILib/ExplorerItem.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#pragma once
|
||||
#include "ExplorerItem.g.h"
|
||||
|
||||
namespace winrt::PowerRenameUILib::implementation
|
||||
{
|
||||
struct ExplorerItem : ExplorerItemT<ExplorerItem>
|
||||
{
|
||||
enum class ExplorerItemType
|
||||
{
|
||||
Folder = 0,
|
||||
File = 1
|
||||
};
|
||||
|
||||
ExplorerItem() = delete;
|
||||
|
||||
ExplorerItem(int32_t id, hstring const& original, hstring const& renamed, int32_t type, bool checked);
|
||||
int32_t Id();
|
||||
hstring IdStr();
|
||||
hstring Original();
|
||||
void Original(hstring const& value);
|
||||
hstring Renamed();
|
||||
void Renamed(hstring const& value);
|
||||
int32_t Type();
|
||||
void Type(int32_t value);
|
||||
bool Checked();
|
||||
void Checked(bool value);
|
||||
Windows::Foundation::Collections::IObservableVector<PowerRenameUILib::ExplorerItem> Children();
|
||||
void Children(Windows::Foundation::Collections::IObservableVector<PowerRenameUILib::ExplorerItem> const& value);
|
||||
winrt::event_token PropertyChanged(Windows::UI::Xaml::Data::PropertyChangedEventHandler const& handler);
|
||||
void PropertyChanged(winrt::event_token const& token) noexcept;
|
||||
|
||||
private:
|
||||
int32_t m_id;
|
||||
hstring m_idStr;
|
||||
winrt::hstring m_original;
|
||||
winrt::hstring m_renamed;
|
||||
winrt::Windows::Foundation::Collections::IObservableVector<PowerRenameUILib::ExplorerItem> m_children;
|
||||
int32_t m_type;
|
||||
bool m_checked;
|
||||
winrt::event<Windows::UI::Xaml::Data::PropertyChangedEventHandler> m_propertyChanged;
|
||||
};
|
||||
}
|
||||
namespace winrt::PowerRenameUILib::factory_implementation
|
||||
{
|
||||
struct ExplorerItem : ExplorerItemT<ExplorerItem, implementation::ExplorerItem>
|
||||
{
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user