mirror of
https://git.tesses.org/tesses50/tessesframework.git
synced 2026-08-01 16:15:31 +00:00
Fix license compliance and fix things up
This commit is contained in:
@@ -1,31 +1,23 @@
|
||||
#include "TessesFramework/TessesFramework.hpp"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int main(int argc, char **argv) {
|
||||
using namespace Tesses::Framework;
|
||||
using namespace Tesses::Framework::TextStreams;
|
||||
TF_Init();
|
||||
TF_InitWithConsole();
|
||||
|
||||
std::vector<std::string> myList = {
|
||||
"Demi Lovato",
|
||||
"The Gremlins",
|
||||
"Al Gore",
|
||||
"Steve Ballmer",
|
||||
"CrossLang",
|
||||
"Tom Scott",
|
||||
"Louis Rossmann",
|
||||
"Mike Nolan",
|
||||
"Tim Cook"
|
||||
};
|
||||
|
||||
"Demi Lovato", "The Gremlins", "Al Gore",
|
||||
"Steve Ballmer", "CrossLang", "Tom Scott",
|
||||
"Louis Rossmann", "Mike Nolan", "Tim Cook"};
|
||||
|
||||
auto res = Console::List(myList);
|
||||
|
||||
if(res > myList.size())
|
||||
{
|
||||
if (res > myList.size()) {
|
||||
Console::WriteLine("You must select one");
|
||||
}
|
||||
else {
|
||||
TF_RunEventLoop();
|
||||
} else {
|
||||
StdOut() << "You selected " << myList[res] << "." << NewLine();
|
||||
TF_RunEventLoop();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
21
examples/console-login-test.cpp
Normal file
21
examples/console-login-test.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "TessesFramework/TessesFramework.hpp"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
using namespace Tesses::Framework;
|
||||
TF_InitWithConsole();
|
||||
|
||||
Console::Write("Username: ");
|
||||
|
||||
std::string username = Console::ReadLine();
|
||||
|
||||
Console::Write("Password: ");
|
||||
|
||||
std::string password = Console::ReadPassword();
|
||||
|
||||
Console::WriteLine("Your username was: \"" + username + "\", " +
|
||||
std::to_string(username.size()));
|
||||
Console::WriteLine("Your password was: \"" + password + "\", " +
|
||||
std::to_string(password.size()));
|
||||
|
||||
TF_RunEventLoop();
|
||||
}
|
||||
@@ -29,7 +29,7 @@ class WebSocketConn : public WebSocketConnection {
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
Tesses::Framework::TF_Init();
|
||||
HttpDictionary reqHeaders;
|
||||
HttpDictionary reqHeaders(false);
|
||||
std::shared_ptr<WebSocketConn> conn = std::make_shared<WebSocketConn>();
|
||||
WebSocketClient("ws://echo.websocket.org/", reqHeaders, conn);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user