mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-03-24 08:54:21 +08:00
...
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#define GAC_HEADER_USE_NAMESPACE
|
||||
#include "UI/Source/Demo.h"
|
||||
#include <Windows.h>
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace demo
|
||||
|
||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||
|
||||
MainWindow::MainWindow(Ptr<demo::IViewModel> ViewModel)
|
||||
MainWindow::MainWindow(vl::Ptr<demo::IViewModel> ViewModel)
|
||||
{
|
||||
InitializeComponents(ViewModel);
|
||||
OnCreate();
|
||||
@@ -49,13 +49,13 @@ namespace vl
|
||||
IMPL_CPP_TYPE_INFO(demo::MainWindow)
|
||||
|
||||
BEGIN_CLASS_MEMBER(demo::IViewModel)
|
||||
CLASS_MEMBER_BASE(vl::reflection::IDescriptable)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::IDescriptable)
|
||||
CLASS_MEMBER_METHOD(GetMessageFromName, { L"name" });
|
||||
END_CLASS_MEMBER(demo::IViewModel)
|
||||
|
||||
BEGIN_CLASS_MEMBER(demo::MainWindow)
|
||||
CLASS_MEMBER_BASE(vl::presentation::controls::GuiWindow)
|
||||
CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(Ptr<demo::IViewModel>), { L"ViewModel" })
|
||||
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
|
||||
CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(vl::Ptr<demo::IViewModel>), { L"ViewModel" })
|
||||
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(ViewModel)
|
||||
END_CLASS_MEMBER(demo::MainWindow)
|
||||
|
||||
@@ -18,22 +18,22 @@ namespace demo
|
||||
class IViewModel;
|
||||
class MainWindow;
|
||||
|
||||
class IViewModel : public virtual vl::reflection::IDescriptable, public vl::reflection::Description<IViewModel>
|
||||
class IViewModel : public virtual ::vl::reflection::IDescriptable, public vl::reflection::Description<IViewModel>
|
||||
{
|
||||
public:
|
||||
virtual vl::WString GetMessageFromName(vl::WString name) = 0;
|
||||
virtual ::vl::WString GetMessageFromName(::vl::WString name) = 0;
|
||||
};
|
||||
|
||||
template<typename TImpl>
|
||||
class MainWindow_ : public vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>, public vl::reflection::Description<TImpl>
|
||||
class MainWindow_ : public ::vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>, public vl::reflection::Description<TImpl>
|
||||
{
|
||||
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
||||
private:
|
||||
Ptr<demo::IViewModel> ViewModel_;
|
||||
vl::Ptr<demo::IViewModel> ViewModel_;
|
||||
protected:
|
||||
vl::presentation::controls::GuiSinglelineTextBox* textBoxName;
|
||||
::vl::presentation::controls::GuiSinglelineTextBox* textBoxName;
|
||||
|
||||
void InitializeComponents(Ptr<demo::IViewModel> ViewModel)
|
||||
void InitializeComponents(vl::Ptr<demo::IViewModel> ViewModel)
|
||||
{
|
||||
ViewModel_ = ViewModel;
|
||||
if (InitializeFromResource())
|
||||
@@ -47,13 +47,13 @@ namespace demo
|
||||
}
|
||||
public:
|
||||
MainWindow_()
|
||||
:vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>(L"demo::MainWindow")
|
||||
,vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle())
|
||||
:vl::presentation::GuiInstancePartialClass<::vl::presentation::controls::GuiWindow>(L"demo::MainWindow")
|
||||
,::vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle())
|
||||
,textBoxName(0)
|
||||
{
|
||||
}
|
||||
|
||||
Ptr<demo::IViewModel> GetViewModel()
|
||||
vl::Ptr<demo::IViewModel> GetViewModel()
|
||||
{
|
||||
return ViewModel_;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ namespace demo
|
||||
void OnDestroy();
|
||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||
public:
|
||||
MainWindow(Ptr<demo::IViewModel> ViewModel);
|
||||
MainWindow(vl::Ptr<demo::IViewModel> ViewModel);
|
||||
~MainWindow();
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user