mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-05-27 18:25:27 +08:00
Merge branch 'release-1.0'
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
#define GAC_HEADER_USE_NAMESPACE
|
#define GAC_HEADER_USE_NAMESPACE
|
||||||
#include "UI/Source/Demo.h"
|
#include "UI/Source/Demo.h"
|
||||||
|
#if defined VCZH_MSVC
|
||||||
|
#include <Windows.h>
|
||||||
|
#elif defined VCZH_GCC
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace vl::collections;
|
using namespace vl::collections;
|
||||||
using namespace vl::stream;
|
using namespace vl::stream;
|
||||||
@@ -11,20 +16,32 @@ public:
|
|||||||
{
|
{
|
||||||
GetApplication()->InvokeAsync([=]()
|
GetApplication()->InvokeAsync([=]()
|
||||||
{
|
{
|
||||||
|
// This is a fake progress, it is just for demo
|
||||||
|
#if defined VCZH_MSVC
|
||||||
HttpRequest request;
|
HttpRequest request;
|
||||||
request.SetHost(L"http://www.microsoft.com/");
|
request.SetHost(L"http://www.microsoft.com/");
|
||||||
|
|
||||||
HttpResponse response;
|
HttpResponse response;
|
||||||
HttpQuery(request, response);
|
HttpQuery(request, response);
|
||||||
|
|
||||||
// This is a fake progress, it is just for demo
|
|
||||||
progress(1);
|
progress(1);
|
||||||
for (vint i = 2; i <= 10; i++)
|
for (vint i = 2; i <= 10; i++)
|
||||||
{
|
{
|
||||||
Sleep(500);
|
Sleep(500);
|
||||||
progress(i);
|
progress(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
callback(response.GetBodyUtf8());
|
callback(response.GetBodyUtf8());
|
||||||
|
#elif defined VCZH_GCC
|
||||||
|
progress(1);
|
||||||
|
for (vint i = 2; i <= 10; i+=2)
|
||||||
|
{
|
||||||
|
Sleep(1000);
|
||||||
|
progress(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
callback(L"HttpQuery function only works on Windows.");
|
||||||
|
#endif
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<Folder name="Cpp">
|
<Folder name="Cpp">
|
||||||
<Text name="SourceFolder">Source</Text>
|
<Text name="SourceFolder">Source</Text>
|
||||||
<Text name="Resource">..\..\UIRes\TextEditor.bin</Text>
|
<Text name="Resource">..\..\UIRes\TextEditor.bin</Text>
|
||||||
<Text name="NormalInclude">..\..\Utilities.h</Text>
|
<Text name="NormalInclude">../../Utilities.h</Text>
|
||||||
<Text name="Name">Demo</Text>
|
<Text name="Name">Demo</Text>
|
||||||
</Folder>
|
</Folder>
|
||||||
</Folder>
|
</Folder>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ https://github.com/vczh-libraries
|
|||||||
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOPARTIALCLASSES
|
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOPARTIALCLASSES
|
||||||
#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOPARTIALCLASSES
|
#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOPARTIALCLASSES
|
||||||
|
|
||||||
#include "..\..\Utilities.h"
|
#include "../../Utilities.h"
|
||||||
|
|
||||||
#if defined( _MSC_VER)
|
#if defined( _MSC_VER)
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using namespace vl::stream;
|
|||||||
class ViewModelImpl : public Object, public virtual demo::IViewModel
|
class ViewModelImpl : public Object, public virtual demo::IViewModel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
vint32_t Add(vint32_t a, vint32_t b)override
|
vint Add(vint a, vint b)override
|
||||||
{
|
{
|
||||||
return a + b;
|
return a + b;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user