mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-05-21 14:46:20 +08:00
Update HelloWorld/MVVM
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -69,7 +69,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -96,8 +96,8 @@
|
||||
<ClInclude Include="UI\Source\MainWindow.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Lib\GacUI\GacUI.vcxproj">
|
||||
<Project>{8018d622-66ba-4e65-9d03-bdac37ea9a54}</Project>
|
||||
<ProjectReference Include="..\..\Lib\GacUILite\GacUILite.vcxproj">
|
||||
<Project>{96c559ca-9718-4bec-a053-28a0ab6a8ca2}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
return userName;
|
||||
}
|
||||
|
||||
void SetUserName(WString value)override
|
||||
void SetUserName(const WString& value)override
|
||||
{
|
||||
userName = value;
|
||||
UserNameErrorChanged();
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
return password;
|
||||
}
|
||||
|
||||
void SetPassword(WString value)override
|
||||
void SetPassword(const WString& value)override
|
||||
{
|
||||
password = value;
|
||||
PasswordErrorChanged();
|
||||
|
||||
@@ -1,7 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Instance ref.CodeBehind="true" ref.Class="helloworld::MainWindow">
|
||||
<ref.Parameter Name="ViewModel" Class="vm::IViewModel"/>
|
||||
<ref.Property Name="HasLoggedIn" Type="bool" Value="false"/>
|
||||
<ref.Members>
|
||||
@cpp:Protected
|
||||
var hasLoggedIn : bool = false;
|
||||
event HasLoggedInChanged();
|
||||
|
||||
func GetHasLoggedIn() : bool
|
||||
{
|
||||
return hasLoggedIn;
|
||||
}
|
||||
|
||||
func SetHasLoggedIn(value : bool) : void
|
||||
{
|
||||
if (hasLoggedIn != value)
|
||||
{
|
||||
hasLoggedIn = value;
|
||||
HasLoggedInChanged();
|
||||
}
|
||||
}
|
||||
|
||||
prop HasLoggedIn : bool {GetHasLoggedIn, SetHasLoggedIn : HasLoggedInChanged}
|
||||
</ref.Members>
|
||||
<Window ref.Name="self" Text="Let's Sign Up!" ClientSize="x:320 y:280">
|
||||
<att.BoundsComposition-set PreferredMinSize="x:320 y:280"/>
|
||||
<att.ViewModel-set UserName-bind="textBoxUserName.Text" Password-bind="textBoxPassword.Text"/>
|
||||
|
||||
@@ -2,14 +2,10 @@
|
||||
<Resource>
|
||||
<Folder name="GacGenConfig">
|
||||
<Folder name="Cpp">
|
||||
<Text name="Output">Source</Text>
|
||||
<Text name="Include">GacUIReflection.h</Text>
|
||||
<Text name="SourceFolder">Source</Text>
|
||||
<Text name="Resource">..\..\UIRes\MVVM.bin</Text>
|
||||
<Text name="NormalInclude">GacUI.h</Text>
|
||||
<Text name="Name">HelloWorld</Text>
|
||||
<Text name="Prefix"></Text>
|
||||
</Folder>
|
||||
<Folder name="Res">
|
||||
<Text name="Output">..\..\UIRes</Text>
|
||||
<Text name="PrecompiledBinary">MVVM.bin</Text>
|
||||
</Folder>
|
||||
</Folder>
|
||||
<Folder name="MainWindow">
|
||||
|
||||
@@ -1,17 +1,68 @@
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
GacUI::HelloWorld
|
||||
/***********************************************************************
|
||||
!!!!!! DO NOT MODIFY !!!!!!
|
||||
|
||||
This file is generated by: Vczh GacUI Resource Code Generator
|
||||
************************************************************************
|
||||
DO NOT MODIFY
|
||||
GacGen.exe Resource.xml
|
||||
|
||||
This file is generated by Workflow compiler
|
||||
https://github.com/vczh-libraries
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_HelloWorld
|
||||
#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_HelloWorld
|
||||
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_HELLOWORLD
|
||||
#define VCZH_WORKFLOW_COMPILER_GENERATED_HELLOWORLD
|
||||
|
||||
#include "HelloWorldPartialClasses.h"
|
||||
#include "MainWindow.h"
|
||||
|
||||
/***********************************************************************
|
||||
Reflection
|
||||
***********************************************************************/
|
||||
|
||||
namespace vl
|
||||
{
|
||||
namespace reflection
|
||||
{
|
||||
namespace description
|
||||
{
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
DECL_TYPE_INFO(::helloworld::MainWindow)
|
||||
DECL_TYPE_INFO(::helloworld::MainWindowConstructor)
|
||||
DECL_TYPE_INFO(::vm::IViewModel)
|
||||
|
||||
BEGIN_INTERFACE_PROXY_NOPARENT_SHAREDPTR(::vm::IViewModel)
|
||||
::vl::WString GetPassword() override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY_NOPARAMS(GetPassword);
|
||||
}
|
||||
::vl::WString GetPasswordError() override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY_NOPARAMS(GetPasswordError);
|
||||
}
|
||||
::vl::WString GetUserName() override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY_NOPARAMS(GetUserName);
|
||||
}
|
||||
::vl::WString GetUserNameError() override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY_NOPARAMS(GetUserNameError);
|
||||
}
|
||||
void SetPassword(const ::vl::WString& value) override
|
||||
{
|
||||
INVOKE_INTERFACE_PROXY(SetPassword, value);
|
||||
}
|
||||
void SetUserName(const ::vl::WString& value) override
|
||||
{
|
||||
INVOKE_INTERFACE_PROXY(SetUserName, value);
|
||||
}
|
||||
bool SignUp() override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY_NOPARAMS(SignUp);
|
||||
}
|
||||
END_INTERFACE_PROXY(::vm::IViewModel)
|
||||
#endif
|
||||
|
||||
extern bool LoadHelloWorldTypes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,126 +1,156 @@
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
GacUI::Partial Classes
|
||||
/***********************************************************************
|
||||
!!!!!! DO NOT MODIFY !!!!!!
|
||||
|
||||
This file is generated by: Vczh GacUI Resource Code Generator
|
||||
************************************************************************
|
||||
DO NOT MODIFY
|
||||
GacGen.exe Resource.xml
|
||||
|
||||
This file is generated by Workflow compiler
|
||||
https://github.com/vczh-libraries
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_HelloWorld_PARTIAL_CLASSES
|
||||
#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_HelloWorld_PARTIAL_CLASSES
|
||||
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_HELLOWORLDPARTIALCLASSES
|
||||
#define VCZH_WORKFLOW_COMPILER_GENERATED_HELLOWORLDPARTIALCLASSES
|
||||
|
||||
#include "GacUIReflection.h"
|
||||
#include "GacUI.h"
|
||||
|
||||
#if defined( _MSC_VER)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4250)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wparentheses-equality"
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wparentheses-equality"
|
||||
#endif
|
||||
|
||||
namespace vl_workflow_global
|
||||
{
|
||||
class __vwsnc10_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
class __vwsnc1_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
class __vwsnc2_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
class __vwsnc3_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
class __vwsnc4_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
class __vwsnc5_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
class __vwsnc6_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
class __vwsnc7_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
class __vwsnc8_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
class __vwsnc9_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
struct __vwsnf1_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
struct __vwsnf2_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
struct __vwsnf3_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
struct __vwsnf5_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
struct __vwsnf6_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
struct __vwsnf7_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
struct __vwsno4_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
}
|
||||
|
||||
namespace helloworld
|
||||
{
|
||||
class MainWindowConstructor;
|
||||
class MainWindow;
|
||||
}
|
||||
namespace vm
|
||||
{
|
||||
class IViewModel;
|
||||
|
||||
}
|
||||
namespace helloworld
|
||||
{
|
||||
class MainWindow;
|
||||
class MainWindowConstructor : public ::vl::Object, public ::vl::reflection::Description<MainWindowConstructor>
|
||||
{
|
||||
friend class ::vl_workflow_global::__vwsnc10_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
friend class ::vl_workflow_global::__vwsnc1_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
friend class ::vl_workflow_global::__vwsnc2_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
friend class ::vl_workflow_global::__vwsnc3_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
friend class ::vl_workflow_global::__vwsnc4_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
friend class ::vl_workflow_global::__vwsnc5_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
friend class ::vl_workflow_global::__vwsnc6_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
friend class ::vl_workflow_global::__vwsnc7_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
friend class ::vl_workflow_global::__vwsnc8_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
friend class ::vl_workflow_global::__vwsnc9_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
friend struct ::vl_workflow_global::__vwsnf1_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
friend struct ::vl_workflow_global::__vwsnf2_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
friend struct ::vl_workflow_global::__vwsnf3_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
friend struct ::vl_workflow_global::__vwsnf5_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
friend struct ::vl_workflow_global::__vwsnf6_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
friend struct ::vl_workflow_global::__vwsnf7_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
friend struct ::vl_workflow_global::__vwsno4_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<MainWindowConstructor>;
|
||||
#endif
|
||||
protected:
|
||||
::vl::Ptr<::vm::IViewModel> ViewModel = ::vl::Ptr<::vm::IViewModel>();
|
||||
::helloworld::MainWindow* self = static_cast<::helloworld::MainWindow*>(nullptr);
|
||||
::vl::presentation::controls::GuiSinglelineTextBox* textBoxUserName = static_cast<::vl::presentation::controls::GuiSinglelineTextBox*>(nullptr);
|
||||
::vl::presentation::controls::GuiSinglelineTextBox* textBoxPassword = static_cast<::vl::presentation::controls::GuiSinglelineTextBox*>(nullptr);
|
||||
::vl::presentation::controls::GuiButton* buttonSignUp = static_cast<::vl::presentation::controls::GuiButton*>(nullptr);
|
||||
::vl::presentation::controls::GuiButton* buttonCancel = static_cast<::vl::presentation::controls::GuiButton*>(nullptr);
|
||||
::vl::presentation::compositions::GuiTableComposition* __vwsn_precompile_0 = static_cast<::vl::presentation::compositions::GuiTableComposition*>(nullptr);
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_1 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::Ptr<::vl::presentation::elements::GuiSolidLabelElement> __vwsn_precompile_2 = ::vl::Ptr<::vl::presentation::elements::GuiSolidLabelElement>();
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_3 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::Ptr<::vl::presentation::elements::GuiSolidLabelElement> __vwsn_precompile_4 = ::vl::Ptr<::vl::presentation::elements::GuiSolidLabelElement>();
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_5 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_6 = static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr);
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_7 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::Ptr<::vl::presentation::elements::GuiSolidLabelElement> __vwsn_precompile_8 = ::vl::Ptr<::vl::presentation::elements::GuiSolidLabelElement>();
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_9 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::Ptr<::vl::presentation::elements::GuiSolidLabelElement> __vwsn_precompile_10 = ::vl::Ptr<::vl::presentation::elements::GuiSolidLabelElement>();
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_11 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_12 = static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr);
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_13 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::Ptr<::vl::presentation::elements::GuiSolidLabelElement> __vwsn_precompile_14 = ::vl::Ptr<::vl::presentation::elements::GuiSolidLabelElement>();
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_15 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_16 = static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr);
|
||||
::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_17 = static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr);
|
||||
::vl::Ptr<::vm::IViewModel> __vwsn_precompile_18 = ::vl::Ptr<::vm::IViewModel>();
|
||||
::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_19 = static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr);
|
||||
void __vwsn_initialize_instance_(::helloworld::MainWindow* __vwsn_this_, ::vl::presentation::GuiResourcePathResolver* __vwsn_resolver_);
|
||||
public:
|
||||
MainWindowConstructor();
|
||||
};
|
||||
|
||||
}
|
||||
namespace vm
|
||||
{
|
||||
class IViewModel : public virtual ::vl::reflection::IDescriptable, public vl::reflection::Description<IViewModel>
|
||||
class IViewModel : public virtual ::vl::reflection::IDescriptable, public ::vl::reflection::Description<IViewModel>
|
||||
{
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<IViewModel>;
|
||||
#endif
|
||||
public:
|
||||
virtual ::vl::WString GetUserName() = 0;
|
||||
virtual void SetUserName(::vl::WString value) = 0;
|
||||
virtual void SetUserName(const ::vl::WString& value) = 0;
|
||||
virtual ::vl::WString GetPassword() = 0;
|
||||
virtual void SetPassword(::vl::WString value) = 0;
|
||||
virtual void SetPassword(const ::vl::WString& value) = 0;
|
||||
virtual ::vl::WString GetUserNameError() = 0;
|
||||
vl::Event<void()> UserNameErrorChanged;
|
||||
::vl::Event<void()> UserNameErrorChanged;
|
||||
virtual ::vl::WString GetPasswordError() = 0;
|
||||
vl::Event<void()> PasswordErrorChanged;
|
||||
::vl::Event<void()> PasswordErrorChanged;
|
||||
virtual bool SignUp() = 0;
|
||||
};
|
||||
|
||||
}
|
||||
namespace helloworld
|
||||
{
|
||||
template<typename TImpl>
|
||||
class MainWindow_ : public ::vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>, public vl::reflection::Description<TImpl>
|
||||
{
|
||||
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
||||
private:
|
||||
vl::Ptr<vm::IViewModel> ViewModel_;
|
||||
bool HasLoggedIn_;
|
||||
protected:
|
||||
::vl::presentation::controls::GuiButton* buttonCancel;
|
||||
::vl::presentation::controls::GuiButton* buttonSignUp;
|
||||
::vl::presentation::controls::GuiWindow* self;
|
||||
::vl::presentation::controls::GuiSinglelineTextBox* textBoxPassword;
|
||||
::vl::presentation::controls::GuiSinglelineTextBox* textBoxUserName;
|
||||
/***********************************************************************
|
||||
Global Variables and Functions
|
||||
***********************************************************************/
|
||||
|
||||
void InitializeComponents(vl::Ptr<vm::IViewModel> ViewModel)
|
||||
{
|
||||
ViewModel_ = ViewModel;
|
||||
if (InitializeFromResource())
|
||||
{
|
||||
GUI_INSTANCE_REFERENCE(buttonCancel);
|
||||
GUI_INSTANCE_REFERENCE(buttonSignUp);
|
||||
GUI_INSTANCE_REFERENCE(self);
|
||||
GUI_INSTANCE_REFERENCE(textBoxPassword);
|
||||
GUI_INSTANCE_REFERENCE(textBoxUserName);
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewModel_ = 0;
|
||||
}
|
||||
}
|
||||
namespace vl_workflow_global
|
||||
{
|
||||
class HelloWorld
|
||||
{
|
||||
public:
|
||||
MainWindow_()
|
||||
:vl::presentation::GuiInstancePartialClass<::vl::presentation::controls::GuiWindow>(L"helloworld::MainWindow")
|
||||
,::vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle())
|
||||
,buttonCancel(0)
|
||||
,buttonSignUp(0)
|
||||
,self(0)
|
||||
,textBoxPassword(0)
|
||||
,textBoxUserName(0)
|
||||
{
|
||||
this->HasLoggedIn_ = vl::reflection::description::UnboxValue<bool>(
|
||||
[]()
|
||||
{
|
||||
vl::reflection::description::Value value;
|
||||
vl::reflection::description::GetTypeDescriptor<bool>()->GetSerializableType()->Deserialize(L"false", value);
|
||||
return value;
|
||||
}());
|
||||
}
|
||||
|
||||
vl::Ptr<vm::IViewModel> GetViewModel()
|
||||
{
|
||||
return ViewModel_;
|
||||
}
|
||||
|
||||
vl::Event<void()> HasLoggedInChanged;
|
||||
|
||||
bool GetHasLoggedIn()
|
||||
{
|
||||
return HasLoggedIn_;
|
||||
}
|
||||
|
||||
void SetHasLoggedIn(bool value)
|
||||
{
|
||||
HasLoggedIn_ = value;
|
||||
HasLoggedInChanged();
|
||||
}
|
||||
static HelloWorld& Instance();
|
||||
};
|
||||
|
||||
}
|
||||
namespace vl
|
||||
{
|
||||
namespace reflection
|
||||
{
|
||||
namespace description
|
||||
{
|
||||
DECL_TYPE_INFO(vm::IViewModel)
|
||||
DECL_TYPE_INFO(helloworld::MainWindow)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#if defined( _MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,45 +1,89 @@
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
GacUI::MainWindow
|
||||
/***********************************************************************
|
||||
!!!!!! DO NOT MODIFY !!!!!!
|
||||
|
||||
This file is generated by: Vczh GacUI Resource Code Generator
|
||||
GacGen.exe Resource.xml
|
||||
|
||||
This file is generated by Workflow compiler
|
||||
https://github.com/vczh-libraries
|
||||
***********************************************************************/
|
||||
|
||||
#include "HelloWorld.h"
|
||||
|
||||
#if defined( _MSC_VER)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4250)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wparentheses-equality"
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wparentheses-equality"
|
||||
#endif
|
||||
|
||||
#define GLOBAL_SYMBOL ::vl_workflow_global::HelloWorld::
|
||||
#define GLOBAL_NAME ::vl_workflow_global::HelloWorld::Instance().
|
||||
#define GLOBAL_OBJ &::vl_workflow_global::HelloWorld::Instance()
|
||||
#define USERIMPL(...)
|
||||
|
||||
/***********************************************************************
|
||||
Class (::helloworld::MainWindow)
|
||||
***********************************************************************/
|
||||
|
||||
namespace helloworld
|
||||
{
|
||||
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
||||
bool MainWindow::GetHasLoggedIn()
|
||||
{
|
||||
return ::vl::__vwsn::This(this)->hasLoggedIn;
|
||||
}
|
||||
|
||||
void MainWindow::buttonSignUp_Clicked(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
||||
void MainWindow::SetHasLoggedIn(bool value)
|
||||
{
|
||||
if ((::vl::__vwsn::This(this)->hasLoggedIn != value))
|
||||
{
|
||||
(::vl::__vwsn::This(this)->hasLoggedIn = value);
|
||||
::vl::__vwsn::EventInvoke(::vl::__vwsn::This(this)->HasLoggedInChanged)();
|
||||
}
|
||||
}
|
||||
|
||||
::vl::Ptr<::vm::IViewModel> MainWindow::GetViewModel()
|
||||
{
|
||||
return ::vl::__vwsn::This(this)->__vwsn_parameter_ViewModel;
|
||||
}
|
||||
|
||||
USERIMPL(/* ::helloworld::MainWindow */)
|
||||
void MainWindow::buttonSignUp_Clicked(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
if (this->GetViewModel()->SignUp())
|
||||
{
|
||||
this->SetHasLoggedIn(true);
|
||||
this->buttonSignUp->SetText(L"Suggess!");
|
||||
this->buttonSignUp->SetText(L"Success!");
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::OnCreate()
|
||||
MainWindow::MainWindow(::vl::Ptr<::vm::IViewModel> __vwsn_ctor_parameter_ViewModel)
|
||||
: ::vl::presentation::controls::GuiWindow(::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateWindowStyle())
|
||||
{
|
||||
}
|
||||
|
||||
void MainWindow::OnDestroy()
|
||||
{
|
||||
}
|
||||
|
||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||
|
||||
MainWindow::MainWindow(vl::Ptr<vm::IViewModel> ViewModel)
|
||||
{
|
||||
InitializeComponents(ViewModel);
|
||||
OnCreate();
|
||||
(::vl::__vwsn::This(this)->__vwsn_parameter_ViewModel = __vwsn_ctor_parameter_ViewModel);
|
||||
auto __vwsn_resource_ = ::vl::__vwsn::This(::vl::presentation::GetResourceManager())->GetResourceFromClassName(::vl::WString(L"helloworld::MainWindow", false));
|
||||
auto __vwsn_resolver_ = ::vl::Ptr<::vl::presentation::GuiResourcePathResolver>(new ::vl::presentation::GuiResourcePathResolver(__vwsn_resource_, ::vl::__vwsn::This(__vwsn_resource_.Obj())->GetWorkingDirectory()));
|
||||
::vl::__vwsn::This(this)->__vwsn_initialize_instance_(this, ::vl::__vwsn::Ensure(static_cast<::vl::presentation::GuiResourcePathResolver*>(__vwsn_resolver_.Obj())));
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
OnDestroy();
|
||||
ClearSubscriptions();
|
||||
::vl::__vwsn::This(this)->ClearSubscriptions();
|
||||
}
|
||||
|
||||
}
|
||||
#undef GLOBAL_SYMBOL
|
||||
#undef GLOBAL_NAME
|
||||
#undef GLOBAL_OBJ
|
||||
#undef USERIMPL
|
||||
|
||||
#if defined( _MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
@@ -1,33 +1,75 @@
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
GacUI::MainWindow
|
||||
/***********************************************************************
|
||||
!!!!!! DO NOT MODIFY !!!!!!
|
||||
|
||||
This file is generated by: Vczh GacUI Resource Code Generator
|
||||
GacGen.exe Resource.xml
|
||||
|
||||
This file is generated by Workflow compiler
|
||||
https://github.com/vczh-libraries
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_HelloWorld_MainWindow
|
||||
#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_HelloWorld_MainWindow
|
||||
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_MAINWINDOW
|
||||
#define VCZH_WORKFLOW_COMPILER_GENERATED_MAINWINDOW
|
||||
|
||||
#include "HelloWorldPartialClasses.h"
|
||||
|
||||
#if defined( _MSC_VER)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4250)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wparentheses-equality"
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wparentheses-equality"
|
||||
#endif
|
||||
|
||||
namespace helloworld
|
||||
{
|
||||
class MainWindow : public helloworld::MainWindow_<helloworld::MainWindow>
|
||||
class MainWindow : public ::vl::presentation::controls::GuiWindow, public ::helloworld::MainWindowConstructor, public ::vl::reflection::Description<MainWindow>
|
||||
{
|
||||
friend class helloworld::MainWindow_<helloworld::MainWindow>;
|
||||
friend struct vl::reflection::description::CustomTypeDescriptorSelector<helloworld::MainWindow>;
|
||||
friend class ::helloworld::MainWindowConstructor;
|
||||
friend class ::vl_workflow_global::__vwsnc10_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
friend class ::vl_workflow_global::__vwsnc1_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
friend class ::vl_workflow_global::__vwsnc2_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
friend class ::vl_workflow_global::__vwsnc3_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
friend class ::vl_workflow_global::__vwsnc4_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
friend class ::vl_workflow_global::__vwsnc5_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
friend class ::vl_workflow_global::__vwsnc6_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
friend class ::vl_workflow_global::__vwsnc7_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
friend class ::vl_workflow_global::__vwsnc8_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
friend class ::vl_workflow_global::__vwsnc9_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
friend struct ::vl_workflow_global::__vwsnf1_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
friend struct ::vl_workflow_global::__vwsnf2_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
friend struct ::vl_workflow_global::__vwsnf3_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
friend struct ::vl_workflow_global::__vwsnf5_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
friend struct ::vl_workflow_global::__vwsnf6_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
friend struct ::vl_workflow_global::__vwsnf7_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
friend struct ::vl_workflow_global::__vwsno4_HelloWorld_helloworld_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<MainWindow>;
|
||||
#endif
|
||||
protected:
|
||||
|
||||
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
||||
void buttonSignUp_Clicked(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||
void OnCreate();
|
||||
void OnDestroy();
|
||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||
bool hasLoggedIn = false;
|
||||
public:
|
||||
MainWindow(vl::Ptr<vm::IViewModel> ViewModel);
|
||||
::vl::Event<void()> HasLoggedInChanged;
|
||||
bool GetHasLoggedIn();
|
||||
void SetHasLoggedIn(bool value);
|
||||
::vl::Ptr<::vm::IViewModel> __vwsn_parameter_ViewModel = ::vl::Ptr<::vm::IViewModel>();
|
||||
::vl::Ptr<::vm::IViewModel> GetViewModel();
|
||||
protected:
|
||||
void buttonSignUp_Clicked(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments);
|
||||
public:
|
||||
MainWindow(::vl::Ptr<::vm::IViewModel> __vwsn_ctor_parameter_ViewModel);
|
||||
~MainWindow();
|
||||
};
|
||||
|
||||
}
|
||||
#if defined( _MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Workflow-ViewModel>
|
||||
<Workflow>
|
||||
<![CDATA[
|
||||
module viewmodel;
|
||||
|
||||
@@ -27,4 +27,4 @@
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</Workflow-ViewModel>
|
||||
</Workflow>
|
||||
Binary file not shown.
Binary file not shown.
@@ -2,8 +2,7 @@
|
||||
<Resource>
|
||||
<Folder name="GacGenConfig">
|
||||
<Folder name="Res">
|
||||
<Text name="Output">..\..\UIRes</Text>
|
||||
<Text name="PrecompiledBinary">Xml.bin</Text>
|
||||
<Text name="Resource">..\..\UIRes\Xml.bin</Text>
|
||||
</Folder>
|
||||
</Folder>
|
||||
<Folder name="MainWindow">
|
||||
|
||||
Reference in New Issue
Block a user