mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-05-31 05:35:18 +08:00
...
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
#define GAC_HEADER_USE_NAMESPACE
|
||||||
#include "UI/Source/Demo.h"
|
#include "UI/Source/Demo.h"
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
@@ -44,17 +45,17 @@ public:
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<GuiImageData> GetImage()override
|
vl::Ptr<GuiImageData> GetImage()override
|
||||||
{
|
{
|
||||||
return folderImage;
|
return folderImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<IValueObservableList> GetFolders()override
|
vl::Ptr<IValueObservableList> GetFolders()override
|
||||||
{
|
{
|
||||||
return folders.GetWrapper();
|
return folders.GetWrapper();
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<IValueObservableList> GetContacts()override
|
vl::Ptr<IValueObservableList> GetContacts()override
|
||||||
{
|
{
|
||||||
return contacts.GetWrapper();
|
return contacts.GetWrapper();
|
||||||
}
|
}
|
||||||
@@ -85,12 +86,12 @@ public:
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<GuiImageData> GetBigImage()override
|
vl::Ptr<GuiImageData> GetBigImage()override
|
||||||
{
|
{
|
||||||
return contactBigImage;
|
return contactBigImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<GuiImageData> GetSmallImage()override
|
vl::Ptr<GuiImageData> GetSmallImage()override
|
||||||
{
|
{
|
||||||
return contactSmallImage;
|
return contactSmallImage;
|
||||||
}
|
}
|
||||||
@@ -167,17 +168,17 @@ public:
|
|||||||
return L"";
|
return L"";
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<GuiImageData> GetImage()override
|
vl::Ptr<GuiImageData> GetImage()override
|
||||||
{
|
{
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<IValueObservableList> GetFolders()override
|
vl::Ptr<IValueObservableList> GetFolders()override
|
||||||
{
|
{
|
||||||
return folders.GetWrapper();
|
return folders.GetWrapper();
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<IValueObservableList> GetContacts()override
|
vl::Ptr<IValueObservableList> GetContacts()override
|
||||||
{
|
{
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@@ -186,9 +187,9 @@ public:
|
|||||||
class ViewModel : public Object, public IViewModel
|
class ViewModel : public Object, public IViewModel
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
Ptr<RootCategory> rootCategory;
|
vl::Ptr<RootCategory> rootCategory;
|
||||||
Ptr<ICategory> selectedCategory;
|
vl::Ptr<ICategory> selectedCategory;
|
||||||
Ptr<IContact> selectedContact;
|
vl::Ptr<IContact> selectedContact;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ViewModel()
|
ViewModel()
|
||||||
@@ -196,12 +197,12 @@ public:
|
|||||||
rootCategory = new RootCategory;
|
rootCategory = new RootCategory;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<ICategory> GetRootCategory()override
|
vl::Ptr<ICategory> GetRootCategory()override
|
||||||
{
|
{
|
||||||
return rootCategory;
|
return rootCategory;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<ICategory> GetSelectedCategory()override
|
vl::Ptr<ICategory> GetSelectedCategory()override
|
||||||
{
|
{
|
||||||
return selectedCategory;
|
return selectedCategory;
|
||||||
}
|
}
|
||||||
@@ -215,7 +216,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<IContact> GetSelectedContact()override
|
vl::Ptr<IContact> GetSelectedContact()override
|
||||||
{
|
{
|
||||||
return selectedContact;
|
return selectedContact;
|
||||||
}
|
}
|
||||||
@@ -248,7 +249,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<IContact> CreateContact()override
|
vl::Ptr<IContact> CreateContact()override
|
||||||
{
|
{
|
||||||
if (auto category = dynamic_cast<Category*>(selectedCategory.Obj()))
|
if (auto category = dynamic_cast<Category*>(selectedCategory.Obj()))
|
||||||
{
|
{
|
||||||
@@ -259,7 +260,7 @@ public:
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddContact(vl::Ptr<demo::IContact> contact)override
|
void AddContact(Ptr<demo::IContact> contact)override
|
||||||
{
|
{
|
||||||
dynamic_cast<Contact*>(contact.Obj())->GetCategory()->contacts.Add(contact);
|
dynamic_cast<Contact*>(contact.Obj())->GetCategory()->contacts.Add(contact);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace demo
|
|||||||
|
|
||||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||||
|
|
||||||
NewContactWindow::NewContactWindow(Ptr<demo::IContact> Contact)
|
NewContactWindow::NewContactWindow(vl::Ptr<demo::IContact> Contact)
|
||||||
{
|
{
|
||||||
InitializeComponents(Contact);
|
InitializeComponents(Contact);
|
||||||
OnCreate();
|
OnCreate();
|
||||||
@@ -133,7 +133,7 @@ namespace vl
|
|||||||
|
|
||||||
BEGIN_CLASS_MEMBER(demo::MainWindow)
|
BEGIN_CLASS_MEMBER(demo::MainWindow)
|
||||||
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
|
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
|
||||||
CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(Ptr<demo::IViewModel>), { L"ViewModel" })
|
CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(vl::Ptr<demo::IViewModel>), { L"ViewModel" })
|
||||||
|
|
||||||
CLASS_MEMBER_GUIEVENT_HANDLER(commandBigIcon_Executed, ::vl::presentation::compositions::GuiEventArgs)
|
CLASS_MEMBER_GUIEVENT_HANDLER(commandBigIcon_Executed, ::vl::presentation::compositions::GuiEventArgs)
|
||||||
CLASS_MEMBER_GUIEVENT_HANDLER(commandDetail_Executed, ::vl::presentation::compositions::GuiEventArgs)
|
CLASS_MEMBER_GUIEVENT_HANDLER(commandDetail_Executed, ::vl::presentation::compositions::GuiEventArgs)
|
||||||
@@ -147,7 +147,7 @@ namespace vl
|
|||||||
|
|
||||||
BEGIN_CLASS_MEMBER(demo::NewContactWindow)
|
BEGIN_CLASS_MEMBER(demo::NewContactWindow)
|
||||||
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
|
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
|
||||||
CLASS_MEMBER_CONSTRUCTOR(demo::NewContactWindow*(Ptr<demo::IContact>), { L"Contact" })
|
CLASS_MEMBER_CONSTRUCTOR(demo::NewContactWindow*(vl::Ptr<demo::IContact>), { L"Contact" })
|
||||||
|
|
||||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(Contact)
|
CLASS_MEMBER_PROPERTY_READONLY_FAST(Contact)
|
||||||
CLASS_MEMBER_EVENT(ForEditChanged)
|
CLASS_MEMBER_EVENT(ForEditChanged)
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ namespace demo
|
|||||||
{
|
{
|
||||||
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
||||||
private:
|
private:
|
||||||
Ptr<demo::IViewModel> ViewModel_;
|
vl::Ptr<demo::IViewModel> ViewModel_;
|
||||||
protected:
|
protected:
|
||||||
::vl::presentation::controls::GuiToolstripCommand* commandBigIcon;
|
::vl::presentation::controls::GuiToolstripCommand* commandBigIcon;
|
||||||
::vl::presentation::controls::GuiToolstripCommand* commandDeleteContact;
|
::vl::presentation::controls::GuiToolstripCommand* commandDeleteContact;
|
||||||
@@ -84,7 +84,7 @@ namespace demo
|
|||||||
::vl::presentation::controls::GuiWindow* self;
|
::vl::presentation::controls::GuiWindow* self;
|
||||||
::vl::presentation::controls::GuiBindableTreeView* treeViewFolders;
|
::vl::presentation::controls::GuiBindableTreeView* treeViewFolders;
|
||||||
|
|
||||||
void InitializeComponents(Ptr<demo::IViewModel> ViewModel)
|
void InitializeComponents(vl::Ptr<demo::IViewModel> ViewModel)
|
||||||
{
|
{
|
||||||
ViewModel_ = ViewModel;
|
ViewModel_ = ViewModel;
|
||||||
if (InitializeFromResource())
|
if (InitializeFromResource())
|
||||||
@@ -130,7 +130,7 @@ namespace demo
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<demo::IViewModel> GetViewModel()
|
vl::Ptr<demo::IViewModel> GetViewModel()
|
||||||
{
|
{
|
||||||
return ViewModel_;
|
return ViewModel_;
|
||||||
}
|
}
|
||||||
@@ -141,7 +141,7 @@ namespace demo
|
|||||||
{
|
{
|
||||||
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
||||||
private:
|
private:
|
||||||
Ptr<demo::IContact> Contact_;
|
vl::Ptr<demo::IContact> Contact_;
|
||||||
bool ForEdit_;
|
bool ForEdit_;
|
||||||
bool Ready_;
|
bool Ready_;
|
||||||
protected:
|
protected:
|
||||||
@@ -151,7 +151,7 @@ namespace demo
|
|||||||
::vl::presentation::controls::GuiDocumentLabel* textBoxName;
|
::vl::presentation::controls::GuiDocumentLabel* textBoxName;
|
||||||
::vl::presentation::controls::GuiDocumentLabel* textBoxPhone;
|
::vl::presentation::controls::GuiDocumentLabel* textBoxPhone;
|
||||||
|
|
||||||
void InitializeComponents(Ptr<demo::IContact> Contact)
|
void InitializeComponents(vl::Ptr<demo::IContact> Contact)
|
||||||
{
|
{
|
||||||
Contact_ = Contact;
|
Contact_ = Contact;
|
||||||
if (InitializeFromResource())
|
if (InitializeFromResource())
|
||||||
@@ -177,23 +177,23 @@ namespace demo
|
|||||||
,textBoxName(0)
|
,textBoxName(0)
|
||||||
,textBoxPhone(0)
|
,textBoxPhone(0)
|
||||||
{
|
{
|
||||||
this->ForEdit = vl::reflection::description::UnboxValue<bool>(
|
this->ForEdit_ = vl::reflection::description::UnboxValue<bool>(
|
||||||
[]()
|
[]()
|
||||||
{
|
{
|
||||||
vl::reflection::description::Value value;
|
vl::reflection::description::Value value;
|
||||||
reflection::description::GetTypeDescriptor<bool>()->GetSerializableType()->Deserialize(L"false", value);
|
vl::reflection::description::GetTypeDescriptor<bool>()->GetSerializableType()->Deserialize(L"false", value);
|
||||||
return value;
|
return value;
|
||||||
}());
|
}());
|
||||||
this->Ready = vl::reflection::description::UnboxValue<bool>(
|
this->Ready_ = vl::reflection::description::UnboxValue<bool>(
|
||||||
[]()
|
[]()
|
||||||
{
|
{
|
||||||
vl::reflection::description::Value value;
|
vl::reflection::description::Value value;
|
||||||
reflection::description::GetTypeDescriptor<bool>()->GetSerializableType()->Deserialize(L"true", value);
|
vl::reflection::description::GetTypeDescriptor<bool>()->GetSerializableType()->Deserialize(L"true", value);
|
||||||
return value;
|
return value;
|
||||||
}());
|
}());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<demo::IContact> GetContact()
|
vl::Ptr<demo::IContact> GetContact()
|
||||||
{
|
{
|
||||||
return Contact_;
|
return Contact_;
|
||||||
}
|
}
|
||||||
@@ -254,18 +254,18 @@ namespace demo
|
|||||||
,self(0)
|
,self(0)
|
||||||
,textBoxName(0)
|
,textBoxName(0)
|
||||||
{
|
{
|
||||||
this->FolderName = vl::reflection::description::UnboxValue<::vl::WString>(
|
this->FolderName_ = vl::reflection::description::UnboxValue<::vl::WString>(
|
||||||
[]()
|
[]()
|
||||||
{
|
{
|
||||||
vl::reflection::description::Value value;
|
vl::reflection::description::Value value;
|
||||||
reflection::description::GetTypeDescriptor<::vl::WString>()->GetSerializableType()->Deserialize(L"", value);
|
vl::reflection::description::GetTypeDescriptor<::vl::WString>()->GetSerializableType()->Deserialize(L"", value);
|
||||||
return value;
|
return value;
|
||||||
}());
|
}());
|
||||||
this->Ready = vl::reflection::description::UnboxValue<bool>(
|
this->Ready_ = vl::reflection::description::UnboxValue<bool>(
|
||||||
[]()
|
[]()
|
||||||
{
|
{
|
||||||
vl::reflection::description::Value value;
|
vl::reflection::description::Value value;
|
||||||
reflection::description::GetTypeDescriptor<bool>()->GetSerializableType()->Deserialize(L"true", value);
|
vl::reflection::description::GetTypeDescriptor<bool>()->GetSerializableType()->Deserialize(L"true", value);
|
||||||
return value;
|
return value;
|
||||||
}());
|
}());
|
||||||
}
|
}
|
||||||
@@ -327,7 +327,7 @@ namespace demo
|
|||||||
void OnDestroy();
|
void OnDestroy();
|
||||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||||
public:
|
public:
|
||||||
NewContactWindow(Ptr<demo::IContact> Contact);
|
NewContactWindow(vl::Ptr<demo::IContact> Contact);
|
||||||
~NewContactWindow();
|
~NewContactWindow();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,34 +6,53 @@ GacUI::MainWindow
|
|||||||
This file is generated by: Vczh GacUI Resource Code Generator
|
This file is generated by: Vczh GacUI Resource Code Generator
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
|
#define GAC_HEADER_USE_NAMESPACE
|
||||||
#include "Demo.h"
|
#include "Demo.h"
|
||||||
|
|
||||||
namespace demo
|
namespace demo
|
||||||
{
|
{
|
||||||
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
||||||
|
|
||||||
void MainWindow::commandBigIcon_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandBigIcon_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
ClearViewSelection();
|
||||||
|
commandBigIcon->SetSelected(true);
|
||||||
|
listViewContacts->ChangeItemStyle(new list::ListViewBigIconContentProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandDetail_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandDetail_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
ClearViewSelection();
|
||||||
|
commandDetail->SetSelected(true);
|
||||||
|
listViewContacts->ChangeItemStyle(new list::ListViewDetailContentProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandInformation_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandInformation_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
ClearViewSelection();
|
||||||
|
commandInformation->SetSelected(true);
|
||||||
|
listViewContacts->ChangeItemStyle(new list::ListViewInformationContentProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandList_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandList_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
ClearViewSelection();
|
||||||
|
commandList->SetSelected(true);
|
||||||
|
listViewContacts->ChangeItemStyle(new list::ListViewListContentProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandSmallIcon_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandSmallIcon_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
ClearViewSelection();
|
||||||
|
commandSmallIcon->SetSelected(true);
|
||||||
|
listViewContacts->ChangeItemStyle(new list::ListViewSmallIconContentProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandTile_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandTile_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
ClearViewSelection();
|
||||||
|
commandTile->SetSelected(true);
|
||||||
|
listViewContacts->ChangeItemStyle(new list::ListViewTileContentProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::OnCreate()
|
void MainWindow::OnCreate()
|
||||||
@@ -44,48 +63,6 @@ namespace demo
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandBigIcon_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
ClearViewSelection();
|
|
||||||
commandBigIcon->SetSelected(true);
|
|
||||||
listViewContacts->ChangeItemStyle(new list::ListViewBigIconContentProvider);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandDetail_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
ClearViewSelection();
|
|
||||||
commandDetail->SetSelected(true);
|
|
||||||
listViewContacts->ChangeItemStyle(new list::ListViewDetailContentProvider);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandInformation_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
ClearViewSelection();
|
|
||||||
commandInformation->SetSelected(true);
|
|
||||||
listViewContacts->ChangeItemStyle(new list::ListViewInformationContentProvider);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandList_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
ClearViewSelection();
|
|
||||||
commandList->SetSelected(true);
|
|
||||||
listViewContacts->ChangeItemStyle(new list::ListViewListContentProvider);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandSmallIcon_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
ClearViewSelection();
|
|
||||||
commandSmallIcon->SetSelected(true);
|
|
||||||
listViewContacts->ChangeItemStyle(new list::ListViewSmallIconContentProvider);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandTile_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
ClearViewSelection();
|
|
||||||
commandTile->SetSelected(true);
|
|
||||||
listViewContacts->ChangeItemStyle(new list::ListViewTileContentProvider);
|
|
||||||
}
|
|
||||||
|
|
||||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||||
|
|
||||||
void MainWindow::ClearViewSelection()
|
void MainWindow::ClearViewSelection()
|
||||||
@@ -98,7 +75,7 @@ namespace demo
|
|||||||
commandInformation->SetSelected(false);
|
commandInformation->SetSelected(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::MainWindow(Ptr<demo::IViewModel> ViewModel)
|
MainWindow::MainWindow(vl::Ptr<demo::IViewModel> ViewModel)
|
||||||
{
|
{
|
||||||
InitializeComponents(ViewModel);
|
InitializeComponents(ViewModel);
|
||||||
OnCreate();
|
OnCreate();
|
||||||
|
|||||||
@@ -20,19 +20,19 @@ namespace demo
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
||||||
void commandBigIcon_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandBigIcon_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandDetail_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandDetail_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandInformation_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandInformation_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandList_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandList_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandSmallIcon_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandSmallIcon_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandTile_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandTile_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void OnCreate();
|
void OnCreate();
|
||||||
void OnDestroy();
|
void OnDestroy();
|
||||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||||
|
|
||||||
void ClearViewSelection();
|
void ClearViewSelection();
|
||||||
public:
|
public:
|
||||||
MainWindow(Ptr<demo::IViewModel> ViewModel);
|
MainWindow(vl::Ptr<demo::IViewModel> ViewModel);
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#define GAC_HEADER_USE_NAMESPACE
|
||||||
#include "UI/Source/Demo.h"
|
#include "UI/Source/Demo.h"
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace demo
|
|||||||
|
|
||||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||||
|
|
||||||
ColorBomboItemTemplate::ColorBomboItemTemplate(Ptr<demo::IColorItem> ViewModel)
|
ColorBomboItemTemplate::ColorBomboItemTemplate(vl::Ptr<demo::IColorItem> ViewModel)
|
||||||
{
|
{
|
||||||
InitializeComponents(ViewModel);
|
InitializeComponents(ViewModel);
|
||||||
OnCreate();
|
OnCreate();
|
||||||
@@ -52,7 +52,7 @@ namespace demo
|
|||||||
|
|
||||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||||
|
|
||||||
ColorListItemTemplate::ColorListItemTemplate(Ptr<demo::IColorItem> ViewModel)
|
ColorListItemTemplate::ColorListItemTemplate(vl::Ptr<demo::IColorItem> ViewModel)
|
||||||
{
|
{
|
||||||
InitializeComponents(ViewModel);
|
InitializeComponents(ViewModel);
|
||||||
OnCreate();
|
OnCreate();
|
||||||
@@ -80,7 +80,7 @@ namespace demo
|
|||||||
|
|
||||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||||
|
|
||||||
MainWindow::MainWindow(Ptr<demo::IViewModel> ViewModel)
|
MainWindow::MainWindow(vl::Ptr<demo::IViewModel> ViewModel)
|
||||||
{
|
{
|
||||||
InitializeComponents(ViewModel);
|
InitializeComponents(ViewModel);
|
||||||
OnCreate();
|
OnCreate();
|
||||||
@@ -123,7 +123,7 @@ namespace vl
|
|||||||
|
|
||||||
BEGIN_CLASS_MEMBER(demo::ColorBomboItemTemplate)
|
BEGIN_CLASS_MEMBER(demo::ColorBomboItemTemplate)
|
||||||
CLASS_MEMBER_BASE(::vl::presentation::templates::GuiControlTemplate)
|
CLASS_MEMBER_BASE(::vl::presentation::templates::GuiControlTemplate)
|
||||||
CLASS_MEMBER_CONSTRUCTOR(demo::ColorBomboItemTemplate*(Ptr<demo::IColorItem>), { L"ViewModel" })
|
CLASS_MEMBER_CONSTRUCTOR(demo::ColorBomboItemTemplate*(vl::Ptr<demo::IColorItem>), { L"ViewModel" })
|
||||||
|
|
||||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(ViewModel)
|
CLASS_MEMBER_PROPERTY_READONLY_FAST(ViewModel)
|
||||||
CLASS_MEMBER_EVENT(TextColorChanged)
|
CLASS_MEMBER_EVENT(TextColorChanged)
|
||||||
@@ -132,14 +132,14 @@ namespace vl
|
|||||||
|
|
||||||
BEGIN_CLASS_MEMBER(demo::ColorListItemTemplate)
|
BEGIN_CLASS_MEMBER(demo::ColorListItemTemplate)
|
||||||
CLASS_MEMBER_BASE(::vl::presentation::templates::GuiTextListItemTemplate)
|
CLASS_MEMBER_BASE(::vl::presentation::templates::GuiTextListItemTemplate)
|
||||||
CLASS_MEMBER_CONSTRUCTOR(demo::ColorListItemTemplate*(Ptr<demo::IColorItem>), { L"ViewModel" })
|
CLASS_MEMBER_CONSTRUCTOR(demo::ColorListItemTemplate*(vl::Ptr<demo::IColorItem>), { L"ViewModel" })
|
||||||
|
|
||||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(ViewModel)
|
CLASS_MEMBER_PROPERTY_READONLY_FAST(ViewModel)
|
||||||
END_CLASS_MEMBER(demo::ColorListItemTemplate)
|
END_CLASS_MEMBER(demo::ColorListItemTemplate)
|
||||||
|
|
||||||
BEGIN_CLASS_MEMBER(demo::MainWindow)
|
BEGIN_CLASS_MEMBER(demo::MainWindow)
|
||||||
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
|
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
|
||||||
CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(Ptr<demo::IViewModel>), { L"ViewModel" })
|
CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(vl::Ptr<demo::IViewModel>), { L"ViewModel" })
|
||||||
|
|
||||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(ViewModel)
|
CLASS_MEMBER_PROPERTY_READONLY_FAST(ViewModel)
|
||||||
END_CLASS_MEMBER(demo::MainWindow)
|
END_CLASS_MEMBER(demo::MainWindow)
|
||||||
|
|||||||
@@ -39,12 +39,12 @@ namespace demo
|
|||||||
{
|
{
|
||||||
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
||||||
private:
|
private:
|
||||||
Ptr<demo::IColorItem> ViewModel_;
|
vl::Ptr<demo::IColorItem> ViewModel_;
|
||||||
::vl::presentation::Color TextColor_;
|
::vl::presentation::Color TextColor_;
|
||||||
protected:
|
protected:
|
||||||
::vl::presentation::templates::GuiControlTemplate* self;
|
::vl::presentation::templates::GuiControlTemplate* self;
|
||||||
|
|
||||||
void InitializeComponents(Ptr<demo::IColorItem> ViewModel)
|
void InitializeComponents(vl::Ptr<demo::IColorItem> ViewModel)
|
||||||
{
|
{
|
||||||
ViewModel_ = ViewModel;
|
ViewModel_ = ViewModel;
|
||||||
if (InitializeFromResource())
|
if (InitializeFromResource())
|
||||||
@@ -61,16 +61,16 @@ namespace demo
|
|||||||
:vl::presentation::GuiInstancePartialClass<::vl::presentation::templates::GuiControlTemplate>(L"demo::ColorBomboItemTemplate")
|
:vl::presentation::GuiInstancePartialClass<::vl::presentation::templates::GuiControlTemplate>(L"demo::ColorBomboItemTemplate")
|
||||||
,self(0)
|
,self(0)
|
||||||
{
|
{
|
||||||
this->TextColor = vl::reflection::description::UnboxValue<::vl::presentation::Color>(
|
this->TextColor_ = vl::reflection::description::UnboxValue<::vl::presentation::Color>(
|
||||||
[]()
|
[]()
|
||||||
{
|
{
|
||||||
vl::reflection::description::Value value;
|
vl::reflection::description::Value value;
|
||||||
reflection::description::GetTypeDescriptor<::vl::presentation::Color>()->GetSerializableType()->Deserialize(L"", value);
|
vl::reflection::description::GetTypeDescriptor<::vl::presentation::Color>()->GetSerializableType()->Deserialize(L"", value);
|
||||||
return value;
|
return value;
|
||||||
}());
|
}());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<demo::IColorItem> GetViewModel()
|
vl::Ptr<demo::IColorItem> GetViewModel()
|
||||||
{
|
{
|
||||||
return ViewModel_;
|
return ViewModel_;
|
||||||
}
|
}
|
||||||
@@ -94,11 +94,11 @@ namespace demo
|
|||||||
{
|
{
|
||||||
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
||||||
private:
|
private:
|
||||||
Ptr<demo::IColorItem> ViewModel_;
|
vl::Ptr<demo::IColorItem> ViewModel_;
|
||||||
protected:
|
protected:
|
||||||
::vl::presentation::templates::GuiTextListItemTemplate* self;
|
::vl::presentation::templates::GuiTextListItemTemplate* self;
|
||||||
|
|
||||||
void InitializeComponents(Ptr<demo::IColorItem> ViewModel)
|
void InitializeComponents(vl::Ptr<demo::IColorItem> ViewModel)
|
||||||
{
|
{
|
||||||
ViewModel_ = ViewModel;
|
ViewModel_ = ViewModel;
|
||||||
if (InitializeFromResource())
|
if (InitializeFromResource())
|
||||||
@@ -117,7 +117,7 @@ namespace demo
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<demo::IColorItem> GetViewModel()
|
vl::Ptr<demo::IColorItem> GetViewModel()
|
||||||
{
|
{
|
||||||
return ViewModel_;
|
return ViewModel_;
|
||||||
}
|
}
|
||||||
@@ -128,10 +128,10 @@ namespace demo
|
|||||||
{
|
{
|
||||||
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
||||||
private:
|
private:
|
||||||
Ptr<demo::IViewModel> ViewModel_;
|
vl::Ptr<demo::IViewModel> ViewModel_;
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
void InitializeComponents(Ptr<demo::IViewModel> ViewModel)
|
void InitializeComponents(vl::Ptr<demo::IViewModel> ViewModel)
|
||||||
{
|
{
|
||||||
ViewModel_ = ViewModel;
|
ViewModel_ = ViewModel;
|
||||||
if (InitializeFromResource())
|
if (InitializeFromResource())
|
||||||
@@ -149,7 +149,7 @@ namespace demo
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<demo::IViewModel> GetViewModel()
|
vl::Ptr<demo::IViewModel> GetViewModel()
|
||||||
{
|
{
|
||||||
return ViewModel_;
|
return ViewModel_;
|
||||||
}
|
}
|
||||||
@@ -184,7 +184,7 @@ namespace demo
|
|||||||
void OnDestroy();
|
void OnDestroy();
|
||||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||||
public:
|
public:
|
||||||
ColorBomboItemTemplate(Ptr<demo::IColorItem> ViewModel);
|
ColorBomboItemTemplate(vl::Ptr<demo::IColorItem> ViewModel);
|
||||||
~ColorBomboItemTemplate();
|
~ColorBomboItemTemplate();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -203,7 +203,7 @@ namespace demo
|
|||||||
void OnDestroy();
|
void OnDestroy();
|
||||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||||
public:
|
public:
|
||||||
ColorListItemTemplate(Ptr<demo::IColorItem> ViewModel);
|
ColorListItemTemplate(vl::Ptr<demo::IColorItem> ViewModel);
|
||||||
~ColorListItemTemplate();
|
~ColorListItemTemplate();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -222,7 +222,7 @@ namespace demo
|
|||||||
void OnDestroy();
|
void OnDestroy();
|
||||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||||
public:
|
public:
|
||||||
MainWindow(Ptr<demo::IViewModel> ViewModel);
|
MainWindow(vl::Ptr<demo::IViewModel> ViewModel);
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#define GAC_HEADER_USE_NAMESPACE
|
||||||
#include "UI/Source/Demo.h"
|
#include "UI/Source/Demo.h"
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#define GAC_HEADER_USE_NAMESPACE
|
||||||
#include "UI/Source/Demo.h"
|
#include "UI/Source/Demo.h"
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ namespace demo
|
|||||||
{
|
{
|
||||||
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
||||||
|
|
||||||
void AboutWindow::documentLabel_ActiveHyperlinkExecuted(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void AboutWindow::documentLabel_ActiveHyperlinkExecuted(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
ShellExecute(NULL, L"OPEN", documentLabel->GetActiveHyperlinkReference().Buffer(), NULL, NULL, SW_MAXIMIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AboutWindow::OnCreate()
|
void AboutWindow::OnCreate()
|
||||||
@@ -25,11 +26,6 @@ namespace demo
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void AboutWindow::documentLabel_ActiveHyperlinkExecuted(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
ShellExecute(NULL, L"OPEN", documentLabel->GetActiveHyperlinkReference().Buffer(), NULL, NULL, SW_MAXIMIZE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||||
|
|
||||||
AboutWindow::AboutWindow()
|
AboutWindow::AboutWindow()
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace demo
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
||||||
void documentLabel_ActiveHyperlinkExecuted(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void documentLabel_ActiveHyperlinkExecuted(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void OnCreate();
|
void OnCreate();
|
||||||
void OnDestroy();
|
void OnDestroy();
|
||||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace demo
|
|||||||
|
|
||||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||||
|
|
||||||
FindWindow::FindWindow(Ptr<vm::IFindWindowViewModel> ViewModel)
|
FindWindow::FindWindow(vl::Ptr<vm::IFindWindowViewModel> ViewModel)
|
||||||
{
|
{
|
||||||
InitializeComponents(ViewModel);
|
InitializeComponents(ViewModel);
|
||||||
OnCreate();
|
OnCreate();
|
||||||
@@ -64,7 +64,7 @@ namespace vl
|
|||||||
|
|
||||||
BEGIN_CLASS_MEMBER(demo::FindWindow)
|
BEGIN_CLASS_MEMBER(demo::FindWindow)
|
||||||
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
|
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
|
||||||
CLASS_MEMBER_CONSTRUCTOR(demo::FindWindow*(Ptr<vm::IFindWindowViewModel>), { L"ViewModel" })
|
CLASS_MEMBER_CONSTRUCTOR(demo::FindWindow*(vl::Ptr<vm::IFindWindowViewModel>), { L"ViewModel" })
|
||||||
|
|
||||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(ViewModel)
|
CLASS_MEMBER_PROPERTY_READONLY_FAST(ViewModel)
|
||||||
END_CLASS_MEMBER(demo::FindWindow)
|
END_CLASS_MEMBER(demo::FindWindow)
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ namespace demo
|
|||||||
{
|
{
|
||||||
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
||||||
private:
|
private:
|
||||||
Ptr<vm::IFindWindowViewModel> ViewModel_;
|
vl::Ptr<vm::IFindWindowViewModel> ViewModel_;
|
||||||
protected:
|
protected:
|
||||||
::vl::presentation::controls::GuiSelectableButton* checkCase;
|
::vl::presentation::controls::GuiSelectableButton* checkCase;
|
||||||
::vl::presentation::controls::GuiMessageDialog* dialogContentNotFound;
|
::vl::presentation::controls::GuiMessageDialog* dialogContentNotFound;
|
||||||
@@ -80,7 +80,7 @@ namespace demo
|
|||||||
::vl::presentation::controls::GuiWindow* self;
|
::vl::presentation::controls::GuiWindow* self;
|
||||||
::vl::presentation::controls::GuiSinglelineTextBox* textFind;
|
::vl::presentation::controls::GuiSinglelineTextBox* textFind;
|
||||||
|
|
||||||
void InitializeComponents(Ptr<vm::IFindWindowViewModel> ViewModel)
|
void InitializeComponents(vl::Ptr<vm::IFindWindowViewModel> ViewModel)
|
||||||
{
|
{
|
||||||
ViewModel_ = ViewModel;
|
ViewModel_ = ViewModel;
|
||||||
if (InitializeFromResource())
|
if (InitializeFromResource())
|
||||||
@@ -112,7 +112,7 @@ namespace demo
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<vm::IFindWindowViewModel> GetViewModel()
|
vl::Ptr<vm::IFindWindowViewModel> GetViewModel()
|
||||||
{
|
{
|
||||||
return ViewModel_;
|
return ViewModel_;
|
||||||
}
|
}
|
||||||
@@ -242,7 +242,7 @@ namespace demo
|
|||||||
void OnDestroy();
|
void OnDestroy();
|
||||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||||
public:
|
public:
|
||||||
FindWindow(Ptr<vm::IFindWindowViewModel> ViewModel);
|
FindWindow(vl::Ptr<vm::IFindWindowViewModel> ViewModel);
|
||||||
~FindWindow();
|
~FindWindow();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ GacUI::MainWindow
|
|||||||
This file is generated by: Vczh GacUI Resource Code Generator
|
This file is generated by: Vczh GacUI Resource Code Generator
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
|
#define GAC_HEADER_USE_NAMESPACE
|
||||||
#include "Demo.h"
|
#include "Demo.h"
|
||||||
|
|
||||||
using namespace vl::stream;
|
using namespace vl::stream;
|
||||||
@@ -86,76 +87,106 @@ namespace demo
|
|||||||
{
|
{
|
||||||
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
||||||
|
|
||||||
void MainWindow::commandAbout_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandAbout_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
auto window = new AboutWindow;
|
||||||
|
window->MoveToScreenCenter();
|
||||||
|
window->ShowModalAndDelete(this, []() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandEditCopy_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandEditCopy_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
textBox->Copy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandEditCut_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandEditCut_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
textBox->Cut();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandEditDelete_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandEditDelete_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
textBox->SetSelectionText(L"");
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandEditFind_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandEditFind_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
findWindow->Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandEditPaste_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandEditPaste_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
textBox->Paste();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandEditRedo_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandEditRedo_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
textBox->Redo();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandEditSelect_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandEditSelect_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
textBox->SelectAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandEditUndo_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandEditUndo_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
textBox->Undo();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandFileExit_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandFileExit_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandFileNewText_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandFileNewText_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
if (CanCloseFile())
|
||||||
|
{
|
||||||
|
textBox->SetText(L"");
|
||||||
|
textBox->ClearUndoRedo();
|
||||||
|
SetupTextConfig();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandFileNewXml_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandFileNewXml_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
if (CanCloseFile())
|
||||||
|
{
|
||||||
|
textBox->SetText(L"");
|
||||||
|
textBox->ClearUndoRedo();
|
||||||
|
SetupXmlConfig();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandFileOpenText_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandFileOpenText_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
OpenFile(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandFileOpenXml_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandFileOpenXml_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
OpenFile(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandFileOpen_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandFileOpen_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
OpenFile(dialogOpen->GetFilterIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandFileSaveAs_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandFileSaveAs_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
SaveFile(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandFileSave_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
void MainWindow::commandFileSave_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
SaveFile(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::window_Closing(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiRequestEventArgs& arguments)
|
void MainWindow::window_Closing(::vl::presentation::compositions::GuiGraphicsComposition* sender, vl::presentation::compositions::GuiRequestEventArgs& arguments)
|
||||||
{
|
{
|
||||||
|
arguments.cancel = !CanCloseFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::OnCreate()
|
void MainWindow::OnCreate()
|
||||||
@@ -169,108 +200,6 @@ namespace demo
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::commandAbout_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
auto window = new AboutWindow;
|
|
||||||
window->MoveToScreenCenter();
|
|
||||||
window->ShowModalAndDelete(this, [](){});
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandEditCopy_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
textBox->Copy();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandEditCut_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
textBox->Cut();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandEditDelete_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
textBox->SetSelectionText(L"");
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandEditFind_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
findWindow->Show();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandEditPaste_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
textBox->Paste();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandEditRedo_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
textBox->Redo();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandEditSelect_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
textBox->SelectAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandEditUndo_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
textBox->Undo();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandFileExit_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandFileNewText_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
if (CanCloseFile())
|
|
||||||
{
|
|
||||||
textBox->SetText(L"");
|
|
||||||
textBox->ClearUndoRedo();
|
|
||||||
SetupTextConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandFileNewXml_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
if (CanCloseFile())
|
|
||||||
{
|
|
||||||
textBox->SetText(L"");
|
|
||||||
textBox->ClearUndoRedo();
|
|
||||||
SetupXmlConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandFileOpenText_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
OpenFile(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandFileOpenXml_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
OpenFile(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandFileOpen_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
OpenFile(dialogOpen->GetFilterIndex());
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandFileSaveAs_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
SaveFile(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::commandFileSave_Executed(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiEventArgs& arguments)
|
|
||||||
{
|
|
||||||
SaveFile(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::window_Closing(GuiGraphicsComposition* sender, vl::presentation::compositions::GuiRequestEventArgs& arguments)
|
|
||||||
{
|
|
||||||
arguments.cancel = !CanCloseFile();
|
|
||||||
}
|
|
||||||
|
|
||||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||||
|
|
||||||
bool MainWindow::CanCloseFile()
|
bool MainWindow::CanCloseFile()
|
||||||
|
|||||||
@@ -20,24 +20,24 @@ namespace demo
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
||||||
void commandAbout_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandAbout_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandEditCopy_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandEditCopy_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandEditCut_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandEditCut_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandEditDelete_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandEditDelete_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandEditFind_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandEditFind_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandEditPaste_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandEditPaste_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandEditRedo_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandEditRedo_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandEditSelect_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandEditSelect_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandEditUndo_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandEditUndo_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandFileExit_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandFileExit_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandFileNewText_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandFileNewText_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandFileNewXml_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandFileNewXml_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandFileOpenText_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandFileOpenText_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandFileOpenXml_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandFileOpenXml_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandFileOpen_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandFileOpen_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandFileSaveAs_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandFileSaveAs_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void commandFileSave_Executed(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
void commandFileSave_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||||
void window_Closing(GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiRequestEventArgs& arguments);
|
void window_Closing(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiRequestEventArgs& arguments);
|
||||||
void OnCreate();
|
void OnCreate();
|
||||||
void OnDestroy();
|
void OnDestroy();
|
||||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||||
@@ -46,21 +46,21 @@ namespace demo
|
|||||||
class FindWindowViewModel : public Object, public virtual vm::IFindWindowViewModel
|
class FindWindowViewModel : public Object, public virtual vm::IFindWindowViewModel
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
GuiMultilineTextBox* textBox;
|
vl::presentation::controls::GuiMultilineTextBox* textBox;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FindWindowViewModel(GuiMultilineTextBox* _textBox);
|
FindWindowViewModel(vl::presentation::controls::GuiMultilineTextBox* _textBox);
|
||||||
|
|
||||||
bool FindNext(vl::WString toFind, bool caseSensitive, bool down)override;
|
bool FindNext(vl::WString toFind, bool caseSensitive, bool down)override;
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WString fileName;
|
vl::WString fileName;
|
||||||
bool isXml = false;
|
bool isXml = false;
|
||||||
Ptr<FindWindow> findWindow;
|
vl::Ptr<FindWindow> findWindow;
|
||||||
|
|
||||||
bool CanCloseFile();
|
bool CanCloseFile();
|
||||||
bool OpenFile(vint filterIndex);
|
bool OpenFile(vl::vint filterIndex);
|
||||||
bool SaveFile(bool saveAs);
|
bool SaveFile(bool saveAs);
|
||||||
void SetupTextConfig();
|
void SetupTextConfig();
|
||||||
void SetupXmlConfig();
|
void SetupXmlConfig();
|
||||||
|
|||||||
Reference in New Issue
Block a user