|
|
|
@@ -8,6 +8,12 @@ https://github.com/vczh-libraries
|
|
|
|
|
***********************************************************************/
|
|
|
|
|
|
|
|
|
|
#include "Demo.h"
|
|
|
|
|
/* CodePack:BeginIgnore() */
|
|
|
|
|
#ifndef VCZH_DEBUG_NO_REFLECTION
|
|
|
|
|
/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */
|
|
|
|
|
#include "DemoReflection.h"
|
|
|
|
|
#endif
|
|
|
|
|
/* CodePack:EndIgnore() */
|
|
|
|
|
|
|
|
|
|
#if defined( _MSC_VER)
|
|
|
|
|
#pragma warning(push)
|
|
|
|
@@ -69,14 +75,14 @@ Closures
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void __vwsnf2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___::operator()(::vl::vint32_t progress) const
|
|
|
|
|
void __vwsnf2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___::operator()(::vl::vint progress) const
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(::vl::presentation::controls::GetApplication())->InvokeInMainThreadAndWait(LAMBDA(::vl_workflow_global::__vwsnf3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____(progress, __vwsnthis_0)), (- static_cast<::vl::vint32_t>(1)));
|
|
|
|
|
::vl::__vwsn::This(::vl::presentation::controls::GetApplication())->InvokeInMainThreadAndWait(LAMBDA(::vl_workflow_global::__vwsnf3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____(progress, __vwsnthis_0)), (- static_cast<::vl::vint>(1)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
__vwsnf3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____::__vwsnf3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____(::vl::vint32_t __vwsnctor_progress, ::demo::MainWindowConstructor* __vwsnctorthis_0)
|
|
|
|
|
__vwsnf3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____::__vwsnf3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____(::vl::vint __vwsnctor_progress, ::demo::MainWindowConstructor* __vwsnctorthis_0)
|
|
|
|
|
:progress(__vwsnctor_progress)
|
|
|
|
|
, __vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0))
|
|
|
|
|
{
|
|
|
|
@@ -106,14 +112,14 @@ Closures
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void __vwsnf5_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____::operator()(::vl::vint32_t progress) const
|
|
|
|
|
void __vwsnf5_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____::operator()(::vl::vint progress) const
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(::vl::presentation::controls::GetApplication())->InvokeInMainThreadAndWait(LAMBDA(::vl_workflow_global::__vwsnf6_Demo_demo_MainWindowConstructor___vwsn_initialize_instance_____(progress, __vwsnthis_0)), (- static_cast<::vl::vint32_t>(1)));
|
|
|
|
|
::vl::__vwsn::This(::vl::presentation::controls::GetApplication())->InvokeInMainThreadAndWait(LAMBDA(::vl_workflow_global::__vwsnf6_Demo_demo_MainWindowConstructor___vwsn_initialize_instance_____(progress, __vwsnthis_0)), (- static_cast<::vl::vint>(1)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
__vwsnf6_Demo_demo_MainWindowConstructor___vwsn_initialize_instance_____::__vwsnf6_Demo_demo_MainWindowConstructor___vwsn_initialize_instance_____(::vl::vint32_t __vwsnctor_progress, ::demo::MainWindowConstructor* __vwsnctorthis_0)
|
|
|
|
|
__vwsnf6_Demo_demo_MainWindowConstructor___vwsn_initialize_instance_____::__vwsnf6_Demo_demo_MainWindowConstructor___vwsn_initialize_instance_____(::vl::vint __vwsnctor_progress, ::demo::MainWindowConstructor* __vwsnctorthis_0)
|
|
|
|
|
:progress(__vwsnctor_progress)
|
|
|
|
|
, __vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0))
|
|
|
|
|
{
|
|
|
|
@@ -132,14 +138,14 @@ Closures
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void __vwsnf7_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____Resume_::operator()(::vl::vint32_t progress) const
|
|
|
|
|
void __vwsnf7_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____Resume_::operator()(::vl::vint progress) const
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(::vl::presentation::controls::GetApplication())->InvokeInMainThreadAndWait(LAMBDA(::vl_workflow_global::__vwsnf8_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____Resume__(progress, __vwsnthis_0, __vwsnthis_1)), (- static_cast<::vl::vint32_t>(1)));
|
|
|
|
|
::vl::__vwsn::This(::vl::presentation::controls::GetApplication())->InvokeInMainThreadAndWait(LAMBDA(::vl_workflow_global::__vwsnf8_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____Resume__(progress, __vwsnthis_0, __vwsnthis_1)), (- static_cast<::vl::vint>(1)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
__vwsnf8_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____Resume__::__vwsnf8_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____Resume__(::vl::vint32_t __vwsnctor_progress, ::vl::reflection::description::ICoroutine* __vwsnctorthis_0, ::demo::MainWindowConstructor* __vwsnctorthis_1)
|
|
|
|
|
__vwsnf8_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____Resume__::__vwsnf8_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____Resume__(::vl::vint __vwsnctor_progress, ::vl::reflection::description::ICoroutine* __vwsnctorthis_0, ::demo::MainWindowConstructor* __vwsnctorthis_1)
|
|
|
|
|
:progress(__vwsnctor_progress)
|
|
|
|
|
, __vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0))
|
|
|
|
|
, __vwsnthis_1(::vl::__vwsn::This(__vwsnctorthis_1))
|
|
|
|
@@ -170,7 +176,7 @@ Closures
|
|
|
|
|
, __vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0))
|
|
|
|
|
{
|
|
|
|
|
this->__vwsn_co0_text = ::vl::WString(L"", false);
|
|
|
|
|
this->__vwsn_co_state_ = static_cast<::vl::vint32_t>(0);
|
|
|
|
|
this->__vwsn_co_state_ = static_cast<::vl::vint>(0);
|
|
|
|
|
this->__vwsn_prop_Failure = ::vl::Ptr<::vl::reflection::description::IValueException>();
|
|
|
|
|
this->__vwsn_prop_Status = ::vl::reflection::description::CoroutineStatus::Waiting;
|
|
|
|
|
}
|
|
|
|
@@ -205,13 +211,13 @@ Closures
|
|
|
|
|
{
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
|
|
|
|
if ((__vwsn_co_state_ == static_cast<::vl::vint32_t>(0)))
|
|
|
|
|
if ((__vwsn_co_state_ == static_cast<::vl::vint>(0)))
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(__vwsnthis_0->buttonDownload)->SetEnabled(false);
|
|
|
|
|
(__vwsn_co_state_ = static_cast<::vl::vint32_t>(2));
|
|
|
|
|
(__vwsn_co_state_ = static_cast<::vl::vint>(2));
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
if ((__vwsn_co_state_ == static_cast<::vl::vint32_t>(1)))
|
|
|
|
|
if ((__vwsn_co_state_ == static_cast<::vl::vint>(1)))
|
|
|
|
|
{
|
|
|
|
|
if (static_cast<bool>(::vl::__vwsn::This(__vwsn_co_result_.Obj())->GetFailure()))
|
|
|
|
|
{
|
|
|
|
@@ -219,14 +225,14 @@ Closures
|
|
|
|
|
}
|
|
|
|
|
(__vwsn_co0_text = ::demo::IStringAsync::CastResult(::vl::__vwsn::This(__vwsn_co_result_.Obj())->GetResult()));
|
|
|
|
|
::vl::__vwsn::This(__vwsnthis_0->textResult)->SetText(__vwsn_co0_text);
|
|
|
|
|
::vl::__vwsn::This(__vwsnthis_0->textResult)->Select([&](){ ::vl::presentation::TextPos __vwsn_temp__; __vwsn_temp__.row = static_cast<::vl::vint32_t>(0); __vwsn_temp__.column = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }(), [&](){ ::vl::presentation::TextPos __vwsn_temp__; __vwsn_temp__.row = static_cast<::vl::vint32_t>(0); __vwsn_temp__.column = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }());
|
|
|
|
|
::vl::__vwsn::This(__vwsnthis_0->textResult)->Select([&](){ ::vl::presentation::TextPos __vwsn_temp__; __vwsn_temp__.row = static_cast<::vl::vint>(0); __vwsn_temp__.column = static_cast<::vl::vint>(0); return __vwsn_temp__; }(), [&](){ ::vl::presentation::TextPos __vwsn_temp__; __vwsn_temp__.row = static_cast<::vl::vint>(0); __vwsn_temp__.column = static_cast<::vl::vint>(0); return __vwsn_temp__; }());
|
|
|
|
|
this->SetStatus(::vl::reflection::description::CoroutineStatus::Stopped);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ((__vwsn_co_state_ == static_cast<::vl::vint32_t>(2)))
|
|
|
|
|
if ((__vwsn_co_state_ == static_cast<::vl::vint>(2)))
|
|
|
|
|
{
|
|
|
|
|
this->SetStatus(::vl::reflection::description::CoroutineStatus::Waiting);
|
|
|
|
|
(__vwsn_co_state_ = static_cast<::vl::vint32_t>(1));
|
|
|
|
|
(__vwsn_co_state_ = static_cast<::vl::vint>(1));
|
|
|
|
|
{
|
|
|
|
|
::vl::reflection::description::AsyncCoroutine::AwaitAndRead(__vwsn_co_impl_, ::vl::Ptr<::vl::reflection::description::IAsync>(::demo::IViewModel::DownloadAsync(__vwsnthis_0->ViewModel, LAMBDA(::vl_workflow_global::__vwsnf7_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____Resume_(this, __vwsnthis_0)))));
|
|
|
|
|
}
|
|
|
|
@@ -280,43 +286,43 @@ namespace demo
|
|
|
|
|
(this->ViewModel = ::vl::__vwsn::This(__vwsn_this_)->GetViewModel());
|
|
|
|
|
(this->__vwsn_precompile_6 = ::vl::__vwsn::This(this->self)->GetBoundsComposition());
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_6)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }());
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_6)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }());
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(this->self)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }());
|
|
|
|
|
::vl::__vwsn::This(this->self)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }());
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(this->self)->SetText(::vl::WString(L"ProgressAndAsync", false));
|
|
|
|
|
}
|
|
|
|
|
(this->__vwsn_precompile_0 = new ::vl::presentation::compositions::GuiTableComposition());
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_0)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }());
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_0)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }());
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_0)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint32_t>(::vl::WString(L"5", false)));
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_0)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint>(::vl::WString(L"5", false)));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_0)->SetRowsAndColumns(static_cast<::vl::vint32_t>(2), static_cast<::vl::vint32_t>(2));
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_0)->SetRowOption(static_cast<::vl::vint32_t>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }());
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_0)->SetRowOption(static_cast<::vl::vint32_t>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast<double>(1.0); return __vwsn_temp__; }());
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_0)->SetColumnOption(static_cast<::vl::vint32_t>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast<double>(1.0); return __vwsn_temp__; }());
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_0)->SetColumnOption(static_cast<::vl::vint32_t>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }());
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_0)->SetRowsAndColumns(static_cast<::vl::vint>(2), static_cast<::vl::vint>(2));
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_0)->SetRowOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }());
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_0)->SetRowOption(static_cast<::vl::vint>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast<double>(1.0); return __vwsn_temp__; }());
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_0)->SetColumnOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast<double>(1.0); return __vwsn_temp__; }());
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_0)->SetColumnOption(static_cast<::vl::vint>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }());
|
|
|
|
|
}
|
|
|
|
|
(this->__vwsn_precompile_1 = new ::vl::presentation::compositions::GuiCellComposition());
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_1)->SetSite(static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1));
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_1)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateProgressBarStyle();
|
|
|
|
|
(this->progressBar = new ::vl::presentation::controls::GuiScroll(__vwsn_controlStyle_));
|
|
|
|
|
::vl::__vwsn::This(this->progressBar)->SetPageSize(static_cast<::vl::vint32_t>(0));
|
|
|
|
|
::vl::__vwsn::This(this->progressBar)->SetPageSize(static_cast<::vl::vint>(0));
|
|
|
|
|
}
|
|
|
|
|
(this->__vwsn_precompile_2 = ::vl::__vwsn::This(this->progressBar)->GetBoundsComposition());
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_2)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }());
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_2)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }());
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(this->progressBar)->SetTotalSize(::vl::__vwsn::Parse<::vl::vint32_t>(::vl::WString(L"10", false)));
|
|
|
|
|
::vl::__vwsn::This(this->progressBar)->SetTotalSize(::vl::__vwsn::Parse<::vl::vint>(::vl::WString(L"10", false)));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_1)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this->progressBar)->GetBoundsComposition()));
|
|
|
|
@@ -326,7 +332,7 @@ namespace demo
|
|
|
|
|
}
|
|
|
|
|
(this->__vwsn_precompile_3 = new ::vl::presentation::compositions::GuiCellComposition());
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_3)->SetSite(static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1));
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_3)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateButtonStyle();
|
|
|
|
@@ -343,7 +349,7 @@ namespace demo
|
|
|
|
|
}
|
|
|
|
|
(this->__vwsn_precompile_4 = new ::vl::presentation::compositions::GuiCellComposition());
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_4)->SetSite(static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(2));
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_4)->SetSite(static_cast<::vl::vint>(1), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(2));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateMultilineTextBoxStyle();
|
|
|
|
@@ -360,7 +366,7 @@ namespace demo
|
|
|
|
|
}
|
|
|
|
|
(this->__vwsn_precompile_5 = ::vl::__vwsn::This(this->textResult)->GetBoundsComposition());
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }());
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }());
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
::vl::__vwsn::This(this->__vwsn_precompile_4)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this->textResult)->GetBoundsComposition()));
|
|
|
|
@@ -402,7 +408,7 @@ Class (::demo::MainWindow)
|
|
|
|
|
|
|
|
|
|
MainWindow::~MainWindow()
|
|
|
|
|
{
|
|
|
|
|
this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this));
|
|
|
|
|
this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
@@ -418,7 +424,7 @@ Class (::demo::IStringAsync)
|
|
|
|
|
Class (::demo::IViewModel)
|
|
|
|
|
***********************************************************************/
|
|
|
|
|
|
|
|
|
|
::vl::Ptr<::demo::IStringAsync> IViewModel::DownloadAsync(::vl::Ptr<::demo::IViewModel> viewModel, const ::vl::Func<void(::vl::vint32_t)>& progress)
|
|
|
|
|
::vl::Ptr<::demo::IStringAsync> IViewModel::DownloadAsync(::vl::Ptr<::demo::IViewModel> viewModel, const ::vl::Func<void(::vl::vint)>& progress)
|
|
|
|
|
{
|
|
|
|
|
auto future = ::vl::reflection::description::IFuture::Create();
|
|
|
|
|
auto promise = ::vl::__vwsn::This(future.Obj())->GetPromise();
|
|
|
|
@@ -432,88 +438,6 @@ Class (::demo::IViewModel)
|
|
|
|
|
#undef GLOBAL_OBJ
|
|
|
|
|
#undef USERIMPL
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
|
Reflection
|
|
|
|
|
***********************************************************************/
|
|
|
|
|
|
|
|
|
|
namespace vl
|
|
|
|
|
{
|
|
|
|
|
namespace reflection
|
|
|
|
|
{
|
|
|
|
|
namespace description
|
|
|
|
|
{
|
|
|
|
|
#ifndef VCZH_DEBUG_NO_REFLECTION
|
|
|
|
|
IMPL_CPP_TYPE_INFO(demo::IStringAsync)
|
|
|
|
|
IMPL_CPP_TYPE_INFO(demo::IViewModel)
|
|
|
|
|
IMPL_CPP_TYPE_INFO(demo::MainWindow)
|
|
|
|
|
IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor)
|
|
|
|
|
|
|
|
|
|
#define _ ,
|
|
|
|
|
BEGIN_INTERFACE_MEMBER(::demo::IStringAsync)
|
|
|
|
|
CLASS_MEMBER_STATIC_METHOD(CastResult, { L"value" })
|
|
|
|
|
END_INTERFACE_MEMBER(::demo::IStringAsync)
|
|
|
|
|
|
|
|
|
|
BEGIN_INTERFACE_MEMBER(::demo::IViewModel)
|
|
|
|
|
CLASS_MEMBER_METHOD(BeginDownload, { L"progress" _ L"callback" })
|
|
|
|
|
CLASS_MEMBER_STATIC_METHOD(DownloadAsync, { L"viewModel" _ L"progress" })
|
|
|
|
|
END_INTERFACE_MEMBER(::demo::IViewModel)
|
|
|
|
|
|
|
|
|
|
BEGIN_CLASS_MEMBER(::demo::MainWindow)
|
|
|
|
|
CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(::vl::Ptr<::demo::IViewModel>), { L"__vwsn_ctor_parameter_ViewModel" })
|
|
|
|
|
CLASS_MEMBER_METHOD(GetViewModel, NO_PARAMETER)
|
|
|
|
|
CLASS_MEMBER_FIELD(__vwsn_parameter_ViewModel)
|
|
|
|
|
CLASS_MEMBER_PROPERTY_READONLY(ViewModel, GetViewModel)
|
|
|
|
|
END_CLASS_MEMBER(::demo::MainWindow)
|
|
|
|
|
|
|
|
|
|
BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor)
|
|
|
|
|
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER)
|
|
|
|
|
CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" })
|
|
|
|
|
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
|
|
|
|
|
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
|
|
|
|
|
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
|
|
|
|
|
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
|
|
|
|
|
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
|
|
|
|
|
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
|
|
|
|
|
CLASS_MEMBER_FIELD(__vwsn_precompile_6)
|
|
|
|
|
CLASS_MEMBER_FIELD(ViewModel)
|
|
|
|
|
CLASS_MEMBER_FIELD(buttonDownload)
|
|
|
|
|
CLASS_MEMBER_FIELD(progressBar)
|
|
|
|
|
CLASS_MEMBER_FIELD(self)
|
|
|
|
|
CLASS_MEMBER_FIELD(textResult)
|
|
|
|
|
END_CLASS_MEMBER(::demo::MainWindowConstructor)
|
|
|
|
|
|
|
|
|
|
#undef _
|
|
|
|
|
class DemoTypeLoader : public Object, public ITypeLoader
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
void Load(ITypeManager* manager)
|
|
|
|
|
{
|
|
|
|
|
ADD_TYPE_INFO(::demo::IStringAsync)
|
|
|
|
|
ADD_TYPE_INFO(::demo::IViewModel)
|
|
|
|
|
ADD_TYPE_INFO(::demo::MainWindow)
|
|
|
|
|
ADD_TYPE_INFO(::demo::MainWindowConstructor)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Unload(ITypeManager* manager)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
bool LoadDemoTypes()
|
|
|
|
|
{
|
|
|
|
|
#ifndef VCZH_DEBUG_NO_REFLECTION
|
|
|
|
|
if (auto manager = GetGlobalTypeManager())
|
|
|
|
|
{
|
|
|
|
|
return manager->AddTypeLoader(MakePtr<DemoTypeLoader>());
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if defined( _MSC_VER)
|
|
|
|
|
#pragma warning(pop)
|
|
|
|
|
#elif defined(__GNUC__)
|
|
|
|
|