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