2021-10-25 21:40:19 +08:00
|
|
|
#pragma once
|
|
|
|
#include "ExplorerItem.g.h"
|
|
|
|
|
|
|
|
namespace winrt::PowerRenameUILib::implementation
|
|
|
|
{
|
|
|
|
struct ExplorerItem : ExplorerItemT<ExplorerItem>
|
|
|
|
{
|
|
|
|
enum class ExplorerItemType
|
|
|
|
{
|
|
|
|
Folder = 0,
|
|
|
|
File = 1
|
|
|
|
};
|
|
|
|
|
2021-11-17 17:57:22 +08:00
|
|
|
ExplorerItem() = default;
|
2021-10-25 21:40:19 +08:00
|
|
|
|
2021-11-17 17:57:22 +08:00
|
|
|
ExplorerItem(int32_t id, hstring const& original, hstring const& renamed, int32_t type, uint32_t depth, bool checked);
|
2021-10-25 21:40:19 +08:00
|
|
|
int32_t Id();
|
|
|
|
hstring IdStr();
|
|
|
|
hstring Original();
|
|
|
|
void Original(hstring const& value);
|
|
|
|
hstring Renamed();
|
|
|
|
void Renamed(hstring const& value);
|
2021-11-17 17:57:22 +08:00
|
|
|
double Indentation();
|
|
|
|
hstring ImagePath();
|
2021-10-25 21:40:19 +08:00
|
|
|
int32_t Type();
|
|
|
|
void Type(int32_t value);
|
|
|
|
bool Checked();
|
|
|
|
void Checked(bool value);
|
2021-12-02 20:02:12 +08:00
|
|
|
winrt::Windows::UI::Xaml::Visibility Highlight();
|
2021-10-25 21:40:19 +08:00
|
|
|
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;
|
2021-11-17 17:57:22 +08:00
|
|
|
uint32_t m_depth;
|
|
|
|
hstring m_imagePath;
|
2021-10-25 21:40:19 +08:00
|
|
|
winrt::Windows::Foundation::Collections::IObservableVector<PowerRenameUILib::ExplorerItem> m_children;
|
|
|
|
int32_t m_type;
|
|
|
|
bool m_checked;
|
2021-12-02 20:02:12 +08:00
|
|
|
winrt::Windows::UI::Xaml::Visibility m_highlight;
|
2021-10-25 21:40:19 +08:00
|
|
|
winrt::event<Windows::UI::Xaml::Data::PropertyChangedEventHandler> m_propertyChanged;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
namespace winrt::PowerRenameUILib::factory_implementation
|
|
|
|
{
|
|
|
|
struct ExplorerItem : ExplorerItemT<ExplorerItem, implementation::ExplorerItem>
|
|
|
|
{
|
|
|
|
};
|
|
|
|
}
|