mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-02-06 03:42:11 +08:00
Merge branch 'release-1.0'
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
#define GAC_HEADER_USE_NAMESPACE
|
||||
#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::stream;
|
||||
@@ -11,20 +16,32 @@ public:
|
||||
{
|
||||
GetApplication()->InvokeAsync([=]()
|
||||
{
|
||||
// This is a fake progress, it is just for demo
|
||||
#if defined VCZH_MSVC
|
||||
HttpRequest request;
|
||||
request.SetHost(L"http://www.microsoft.com/");
|
||||
|
||||
HttpResponse response;
|
||||
HttpQuery(request, response);
|
||||
|
||||
// This is a fake progress, it is just for demo
|
||||
progress(1);
|
||||
for (vint i = 2; i <= 10; i++)
|
||||
{
|
||||
Sleep(500);
|
||||
progress(i);
|
||||
}
|
||||
|
||||
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">
|
||||
<Text name="SourceFolder">Source</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>
|
||||
</Folder>
|
||||
</Folder>
|
||||
|
||||
@@ -10,7 +10,7 @@ https://github.com/vczh-libraries
|
||||
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOPARTIALCLASSES
|
||||
#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOPARTIALCLASSES
|
||||
|
||||
#include "..\..\Utilities.h"
|
||||
#include "../../Utilities.h"
|
||||
|
||||
#if defined( _MSC_VER)
|
||||
#pragma warning(push)
|
||||
|
||||
@@ -7,7 +7,7 @@ using namespace vl::stream;
|
||||
class ViewModelImpl : public Object, public virtual demo::IViewModel
|
||||
{
|
||||
public:
|
||||
vint32_t Add(vint32_t a, vint32_t b)override
|
||||
vint Add(vint a, vint b)override
|
||||
{
|
||||
return a + b;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user