$acb = new ActionBar();
$btn_update = new ButtonBar();
$btn_update->setCaption("Save");
$btn_update->onTap(save());
$btn_cancel = new ButtonBar();
$btn_cancel->setCaption("Cancel");
$btn_cancel->onTap(cancel());
$acb->addControl($btn_update);
$acb->addControl($btn_cancel);
$win->addControl($acb);
$mainTable = new Table();
$image = new InputImage();
$name = new InputText();
$address = new InputAddress();
$phone = new InputPhone();
$mainTable->addControl($name, 1, 1);
$mainTable->addControl($address, 2, 1);
$mainTable->addControl($phone, 3, 1);
$mainTable->addControl($image, 4, 1);
$win->addControl($mainTable);
function start()
{
    $url = "http://demo.kikapptools.com/CRMManager/crud/getCompanies.php?companyId=" . $id;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array("CompanyName" => DataType::Character(100), "CompanyImage" => DataType::Character(200), "CompanyPhone" => DataType::Phone(), "CompanyAddress" => DataType::Address());
    Data::FromJson($struct, $result);
    $image = $struct['CompanyImage'];
    $name = $struct['CompanyName'];
    $address = $struct['CompanyAddress'];
    $phone = $struct['CompanyPhone'];
Beispiel #2
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("First Facebook Post!");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
$input = new InputText();
//create input
$input->setLabelCaption("Write your thoughts");
$button = new Button();
$button->setCaption("Post on Facebook");
$button->onTap(facebook());
$button->setClass("button.blue");
$mainTable->addControl($input, 1, 1, 1, 1, "Center", "Middle");
$mainTable->addControl($button, 2, 1, 1, 1, "Center", "Middle");
$win->addControl($mainTable);
function facebook()
{
    Facebook::PostToWall("First post", "Caption", $input, "http://www.kikapptools.com", "");
}
Beispiel #3
0
$maintable->setWidth("100%");
$maintable->setHeight("100%");
$maintable->setClass("table.white");
$label_budget = new Label();
$label_budget->setCaption("Add Budget");
$label_budget->setClass("label.blue");
$label_budget->onTap(budget());
$label_income = new Label();
$label_income->setCaption("Income");
$label_income->setClass("label.green");
$label_income->onTap(income());
$label_outcome = new Label();
$label_outcome->setCaption("Outcome");
$label_outcome->setClass("label.red");
$label_outcome->onTap(outcome());
$maintable->addControl($label_budget, 1, 1, 1, 1, "Center", "Middle");
$maintable->addControl($label_income, 2, 1, 1, 1, "Center", "Middle");
$maintable->addControl($label_outcome, 3, 1, 1, 1, "Center", "Middle");
$win->addControl($maintable);
function budget()
{
    $win->Open("Budget");
}
function income()
{
    $moveType = new InputText();
    $moveType->setValue("0");
    $win->Open("IncomeOutcome", $moveType);
}
function outcome()
{
Beispiel #4
0
$table_twitter->onTap(twitte());
$table_twitter->addControl($img_twitter, 1, 1, 1, 1, "Center", "Middle");
$table_twitter->addControl($lbl_twitter, 1, 2, 1, 1, "Left", "Middle");
$table_map = new Table();
$table_map->setClass("table.MenuOption");
$table_map->setColumnsStyle("20%;80%");
$img_map = new Image();
$img_map->setImage("img/Android/hdpi/ic_map.png");
$img_map->setClass("image.menu");
$lbl_map = new Label();
$lbl_map->setClass("label.MenuOption");
$lbl_map->setCaption("Map");
$table_map->onTap(map());
$table_map->addControl($img_map, 1, 1, 1, 1, "Center", "Middle");
$table_map->addControl($lbl_map, 1, 2, 1, 1, "Left", "Middle");
$mainTable->addControl($table_home, 2, 1);
$mainTable->addControl($table_facebook, 3, 1);
$mainTable->addControl($table_twitter, 4, 1);
$mainTable->addControl($table_map, 5, 1);
$win->addControl($mainTable);
function Slide()
{
    $token = new InputText(80);
    $win->Open("Home");
}
function home()
{
    $win->Open("Home");
}
function facebook()
{
Beispiel #5
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Hello world!");
$mainTable = new Table();
$input = new InputText();
$input->setLabelCaption("Write your name");
$button = new Button();
$button->setCaption("Click me!");
$button->onTap(clickme());
$mainTable->addControl($input, 1, 1);
$mainTable->addControl($button, 2, 1);
$win->addControl($mainTable);
function clickme()
{
    StorageAPI::Set("token", $input);
    $name = new InputText();
    $name = StorageAPI::Get("token");
    echo "Your name is: " . $name;
}
Beispiel #6
0
$table_login->addControl($img_login, 1, 1, 1, 1, "Center", "Middle");
$table_login->addControl($lbl_login, 1, 2, 1, 1, "Left", "Middle");
$table_logout = new Table();
$table_logout->setClass("tableMenuOption");
$table_logout->setColumnsStyle("20%;80%");
$img_logout = new Image();
$img_logout->setImage("img/Android/hdpi/ic_logout.png");
$img_logout->setClass("imagemenu");
$lbl_logout = new Label();
$lbl_logout->setCaption("Logout");
$lbl_logout->setClass("labelMenuOption");
$table_logout->onTap(logout());
$table_logout->addControl($img_logout, 1, 1, 1, 1, "Center", "Middle");
$table_logout->addControl($lbl_logout, 1, 2, 1, 1, "Left", "Middle");
$table_space = new Table();
$table->addControl($table_space, 1, 1);
$table->addControl($table_home, 2, 1);
$table->addControl($table_account, 3, 1);
$table->addControl($table_transactions, 4, 1);
$table->addControl($table_login, 5, 1);
$table->addControl($table_settings, 6, 1);
$table->addControl($table_logout, 7, 1);
$token = new InputText(80);
$win->addControl($table);
function ClientStart()
{
    $token = StorageAPI::Get("token");
    if ($token == "") {
        $table_account->setVisible(false);
        $table_transactions->setVisible(false);
        $table_settings->setVisible(false);
Beispiel #7
0
$table_form = new Table();
$table_form->setClass("tableforms");
$table_form->setRowsStyle("76dip;76dip;76dip");
$table_form->setHeight("90%");
$btn_save = new Button();
$btn_save->setCaption("Save");
$btn_save->setClass("buttonform");
$btn_save->onTap(save());
$table_form->addControl($id, 1, 1);
$table_form->addControl($name, 2, 1);
$table_form->addControl($imagen, 3, 1);
$table_form->addControl($status, 4, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table_button->setHeight("10%");
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1, 1, 1, "Center", "Bottom");
$win->addControl($table);
$win->Render();
function refresh()
{
    echo $name;
}
function start()
{
    echo $id;
}
function save()
{
    ProgressIndicator::Show();
    $request = new httpClient();
Beispiel #8
0
$table_add->addControl($lbl_add, 1, 2, 1, 1, "Left", "Middle");
//Deleted button
$table_deleted = new Table();
$table_deleted->setClass("table.MenuItem");
$table_deleted->setColumnsStyle("20%;80%");
$img_deleted = new Image();
$img_deleted->setImage("img/ic_deleted.png");
$img_deleted->setClass("image.MenuItem");
$lbl_deleted = new Label();
$lbl_deleted->setCaption("Done");
$lbl_deleted->setClass("label.MenuItem");
$table_deleted->onTap(openDoneList());
$table_deleted->addControl($img_deleted, 1, 1, 1, 1, "Center", "Middle");
$table_deleted->addControl($lbl_deleted, 1, 2, 1, 1, "Left", "Middle");
//Add controls to menu
$table->addControl($table_header, 1, 1);
$table->addControl($table_home, 2, 1);
$table->addControl($table_deleted, 3, 1);
$table->addControl($table_add, 4, 1);
//Add controls to main screen
$win->addControl($table);
$win->Render();
function Slide()
{
    $period = new InputNumeric();
    $period->setValue(0);
    $statusList = new InputNumeric();
    $statusList->setValue(0);
    $win->Open("TodoLits", $period, $statusList);
}
function openTodoLits()
Beispiel #9
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Combo Box!");
$mainTable = new Table();
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$button = new Button();
$button->setCaption("Click me!");
$button->onTap(clickme());
$combo_box = new ComboBox();
$combo_box->setEmptyItem(true);
$combo_box->setEmptyItemText("Choose options");
$combo_box->setValues("Option 1:1, Option 2:2, Option 3:3");
$mainTable->addControl($combo_box, 1, 1);
$mainTable->addControl($button, 5, 1);
$win->addControl($mainTable);
function clickme()
{
    echo "You have selected option number " . $combo_box->getValue();
}
Beispiel #10
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("First Label");
$mainTable = new Table();
$label = new Label();
$label->setCaption("My first label!");
$mainTable->addControl($label, 1, 1);
$win->addControl($mainTable);
Beispiel #11
0
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Radio Button!");
$mainTable = new Table();
$mainTable->setRowsStyle("200dip;pd;pd;pd;66dip");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$radio_button = new RadioButton();
$radio_button->setValues("Uruguay:1,US:2,Canada:3");
$radio_button->setAddEmptyItem(false);
$radio_button->setTitle("Where are you from?");
$button = new Button();
$button->setCaption("Click me!");
$button->onTap(clickme());
$mainTable->addControl($radio_button, 1, 1);
$mainTable->addControl($button, 5, 1);
$win->addControl($mainTable);
function clickme()
{
    if ($radio_button->getValue() == "1") {
        echo "You are from Uruguay!";
    }
    if ($radio_button->getValue() == "2") {
        echo "You are from US!";
    }
    if ($radio_button->getValue() == "3") {
        echo "You are from Canada!";
    }
}
Beispiel #12
0
$win = new SDPanel();
$win->setCaption("Image Gallery");
$mainTable = new Table();
//Create Inputs
$id = new InputNumeric();
$title = new InputText();
$desc = new InputText();
$image = new InputImage();
//Create Image Gallery
$grid = new ImageGallery();
$grid->setImage($image);
$grid->setTitle($title);
$grid->setSubtitle($desc);
$grid->setEnableShare(true);
$grid->addData(load_images());
$mainTable->addControl($grid, 1, 1);
$win->addControl($mainTable);
function load_images()
{
    $url = "http://demo.kikapptools.com/magento/apiGecko/productos.php?cId=0";
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array(array("id" => DataType::Numeric(6), "name" => DataType::Character(150), "description" => DataType::Character(300), "pirce" => DataType::Character(10), "thumb" => DataType::Character(200)));
    Data::FromJson($struct, $result);
    foreach ($struct as $product) {
        $id = $product['id'];
        $title = $product['name'];
        $desc = $product['description'];
        $image = $product['thumb'];
    }
}
Beispiel #13
0
$name->setClass("input.Title");
$date = new InputDate();
$date->setClass("input.Common");
$statusIcon = new Image();
$statusIcon->setImage("img/tick.png");
$statusIcon->setClass("image.ListIcon");
$statusIcon->onTap(changeToDone());
$table_list = new Table();
$table_list->addControl($name, 1, 1, 1, 6, "Left", "Middle");
$table_list->addControl($date, 1, 2, 1, 2, "Left", "Middle");
$table_list->addControl($statusIcon, 1, 3, 1, 1, "Middle", "Middle");
$table_grid->addControl($table_list, 1, 1);
$table_grid->onTap(detail());
//Add controls to main screen
$list->addControl($table_grid);
$table->addControl($list);
$win->addControl($table);
$win->Render();
function load_grid()
{
    //Make JSON request
    $url = "http://demo.kikapptools.com/taskManager/crud/getTask.php?status=" . $statusList . "&period=" . $period;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    //Cast response data type
    $struct = array(array("id" => DataType::Numeric(6), "task" => DataType::Character(150), "status" => DataType::Numeric(1), "created_at" => DataType::Character(20)));
    Data::FromJson($struct, $result);
    //Add result to screen vars
    foreach ($struct as $items) {
        $id = $items['id'];
        $name = $items['task'];
Beispiel #14
0
$pass->setInviteMessage("Password");
$pass->setIsPassword(true);
$btn_save = new Button();
$btn_save->setCaption("LOG IN");
$btn_save->setClass("buttonform");
$btn_save->onTap(login());
$lbl_signup = new Label();
$lbl_signup->setClass("label.SubTitlelogin");
$lbl_signup->setCaption("Not a store member?");
$btn_register = new Button();
$btn_register->setCaption("SIGN UP NOW");
$btn_register->setClass("button.Small");
$btn_register->onTap(register());
$table_form->addControl($email, 1, 1);
$table_form->addControl($pass, 2, 1);
$table->addControl($lbl_home, 1, 1, 1, 1, "Center", "Middle");
$table->addControl($table_form, 2, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table_button->addControl($lbl_signup, 2, 1, 1, 1, "Center", "Middle");
$table_button->addControl($btn_register, 3, 1);
$table->addControl($table_button, 3, 1);
$win->addControl($table);
$win->Render();
function login()
{
    if ($email == null) {
        echo "E-Mail is a required field.";
    } else {
        if ($pass == null) {
            echo "Password is a required field.";
Beispiel #15
0
 * Example SDMap.
 * @author KikApp
 * @version 1.0
 */
$win = new SDPanel();
//Create Inputs
$id = new InputNumeric();
$title = new InputText();
$desc = new InputText();
Data::getParm($id, $title);
//get parms.
$mainTable = new Table();
$table = new Table();
$table->addControl($title, 1, 1);
$table->addControl($desc, 2, 1);
$mainTable->addControl($table, 1, 1);
$win->addControl($mainTable);
function start()
{
    /*
    $url = "http://demo.kikapptools.com/SDMap/crud/getPlaces.php?id=".$id;
    $httpClient = new httpClient();
    
    $result = $httpClient -> Execute('GET',$url);
    
    $struct = array(
    		array(
    				"Id" => DataType::Numeric(6),
    				"Title" => DataType::Character(150),
    				"Description" => DataType::Character(300),
    				"Geolocation" => DataType::Geolocation()
Beispiel #16
0
$image->setClass("imageImageList");
$desc = new InputText(300);
$desc->setClass("inputtextwhite");
$price = new InputText(10);
$price->setClass("inputtextPrice");
$table_desc = new Table();
$table_desc->setRowsStyle("25dip;35dip;25dip");
$table_desc->setClass("tableProductThumb");
$table_desc->addControl($title, 1, 1);
$table_desc->addControl($desc, 2, 1);
$table_desc->addControl($price, 3, 1);
$table_grid->addPosition($image, "0%", "100%", "0", "230dip", "0%", "100%");
$table_grid->addPosition($table_desc, "0%", "100%", "140dip", "83dip", "0", "0");
$grid_home->addControl($table_grid);
$mainTable->setRowsStyle("230dip;100%");
$mainTable->addControl($grid_home, 1, 1);
$win->addControl($mainTable);
function grid_load()
{
    $url = "http://www.demo.kikapptools.com/magento/apiGecko/productos.php?display=home";
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array(array("id" => DataType::Numeric(6), "name" => DataType::Character(150), "description" => DataType::Character(300), "pirce" => DataType::Character(10), "thumb" => DataType::Character(200)));
    Data::FromJson($struct, $result);
    foreach ($struct as $product) {
        $id = $product['id'];
        $title = $product['name'];
        $desc = $product['description'];
        $image = $product['thumb'];
        $price = $product['pirce'];
    }
Beispiel #17
0
$table_outcome_month->setColumnsStyle("5dip;50%;50%");
$table_outcome_month->addControl($label_red_bis, 1, 1, 1, 1, "", "Middle");
$table_outcome_month->addControl($label_outcome_month, 1, 2, 1, 1, "Center", "Middle");
$table_outcome_month->addControl($input2, 1, 3, 1, 1, "Right", "Middle");
$table_first->addControl($table_account, 1, 1);
$table_first->addControl($table_income, 2, 1);
$table_first->addControl($table_outcome, 3, 1);
$table_second->addControl($table_title_month, 1, 1);
$table_second->addControl($table_income_month, 2, 1);
$table_second->addControl($table_outcome_month, 3, 1);
//addPosition(control, left, width, top, height, right, bottom, zorder)
$canvas->addPosition($table_first, "10dip", "100%", "15dip", "60dip", "10dip", "0%", 1);
$canvas->addPosition($table_second, "10dip", "100%", "225dip", "60dip", "10dip", "0%", 1);
$canvas->addPosition($img_add, "100%", "60dip", "97%", "60dip", "15dip", "3%", 5);
$table_canvas->addControl($canvas, 1, 1);
$maintable->addControl($table_canvas, 1, 1);
$win->addControl($maintable);
function refresh()
{
    $url = "http://demo.kikapptools.com/Gastos/crud/getIncome.php?id=" . $token;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array("account" => DataType::Numeric(11), "value_income" => DataType::Numeric(11), "value_outcome" => DataType::Numeric(11), "value_income_month" => DataType::Numeric(11), "value_outcome_month" => DataType::Numeric(11), "label_actual_month" => DataType::Character(20));
    Data::FromJson($struct, $result);
    $input_account = $struct['account'];
    $input_income = $struct['value_income'];
    $input_outcome = $struct['value_outcome'];
    $input1 = $struct['value_income_month'];
    $input2 = $struct['value_outcome_month'];
    $label_title = $struct['label_actual_month'];
}
Beispiel #18
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Welcome");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
$mainTable->setClass("table.general");
$label = new Label();
$label->setCaption("Welcome to the Global Example!");
$label->setClass("label.Home");
$label2 = new Label();
$label2->setCaption("Use the Slide to open Facebook, Twitter and Map!");
$label2->setClass("label.Home");
$image = new Image();
$image->setImage("img/Android/hdpi/appicon.png");
$mainTable->addControl($label, 2, 1, 1, 1, "Center", "Middle");
$mainTable->addControl($label2, 3, 1, 1, 1, "Center", "Middle");
$mainTable->addControl($image, 4, 1, 1, 1, "Center", "Middle");
$win->addControl($mainTable);
$image->setReadOnly(true);
$image->setClass("image.roundBorder");
$name = new InputText();
$name->setReadOnly(true);
$name->setClass("input.title");
$address = new InputAddress();
$address->setReadOnly(true);
$phone = new InputPhone();
$phone->setReadOnly(true);
$tableImg->addControl($image, 2, 1, 1, 1, "Center", "Middle");
$tableImg->addControl($name, 3, 1, 1, 1, "Center", "Middle");
$tableDesc = new Table();
$tableDesc->setClass("table.margin");
$tableDesc->addControl($address, 1, 1);
$tableDesc->addControl($phone, 2, 1);
$mainTable->addControl($tableImg, 1, 1);
$mainTable->addControl($tableDesc, 2, 1);
$win->addControl($mainTable);
function start()
{
    $url = "http://demo.kikapptools.com/CRMManager/crud/getCompanies.php?companyId=" . $id;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array("CompanyName" => DataType::Character(100), "CompanyImage" => DataType::Character(200), "CompanyPhone" => DataType::Phone(), "CompanyAddress" => DataType::Address());
    Data::FromJson($struct, $result);
    $image = $struct['CompanyImage'];
    $name = $struct['CompanyName'];
    $address = $struct['CompanyAddress'];
    $phone = $struct['CompanyPhone'];
}
function update()
$image = new InputImage();
$image->setClass("imageImageList");
$table_grid->addControl($image, 1, 1);
$grid->addControl($table_grid, 1, 1);
$btnAdd = new Button();
$btnAdd->setClass("buttonred");
$btnAdd->setCaption("Add to Cart");
$btnAdd->onTap(add_cart());
$tableButtons = new Table();
$tableButtons->addControl($btnAdd, 1, 1);
$tableItemDetail->addControl($title, 1, 1, 1, 2, "Left", "Middle");
$tableItemDetail->addControl($price, 2, 1, 1, 1, "Left", "Middle");
$tableItemDetail->addControl($stock, 2, 2, 1, 1, "Center", "Middle");
$tableItemDetail->addControl($desc, 3, 1, 1, 2, "Left", "Middle");
$tableItemDetail->addControl($tableButtons, 4, 1, 1, 2, "Left", "Middle");
$table->addControl($grid, 1, 1);
$table->addControl($tableItemDetail, 2, 1);
$table->setRowsStyle("250dip;100%");
$win->addControl($table, 1, 1, 1, 2);
function load_image()
{
    $url = "http://www.demo.kikapptools.com/magento/apiKikApp/ProductImages.php?pId=" . $id;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $str_images = array(array("url" => DataType::Character(350)));
    Data::FromJson($str_images, $result);
    foreach ($str_images as $img) {
        $image = $img['url'];
    }
}
function facebook()
Beispiel #21
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("SwitchControl");
$mainTable = new Table();
$switch1 = new SwitchControl();
$switch1->setLabelCaption("Notifications");
$switch1->setLabelPosition("Left");
$button = new Button();
$button->setCaption("Click me!");
$button->onTap(clickme());
$mainTable->addControl($switch1, 1, 1, 1, 1, "Center", "Middle");
$mainTable->addControl($button, 2, 1);
$win->addControl($mainTable);
function clickme()
{
    echo $switch1->getValue();
}
$image->setClass("image.List");
$name = new InputText();
$name->setClass("input.title");
$address = new InputText();
$table_info = new Table();
$table_info->addControl($name, 1, 1, 1, 1, "Left", "Bottom");
$table_info->addControl($address, 2, 1);
$table_list->addControl($image, 1, 1);
$table_list->addControl($table_info, 1, 2);
$list->addData(load_companies());
$list->addSearch($name);
$list->addControl($table_list, 1, 1);
$list->onTap(action());
$canvas->addPosition($list, "0", "100%", "0", "100%", "0", "0", 0);
$canvas->addPosition($img_add, "100%", "60dip", "97%", "60dip", "15dip", "3%", 1);
$mainTable->addControl($canvas, 1, 1);
$win->addControl($mainTable);
function load_companies()
{
    $url = "http://demo.kikapptools.com/CRMManager/crud/getCompanies.php";
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array(array("CompanyId" => DataType::Numeric(8), "CompanyName" => DataType::Character(100), "CompanyImage" => DataType::Character(200), "CompanyAddress" => DataType::Character(200)));
    Data::FromJson($struct, $result);
    $id = new InputNumeric();
    foreach ($struct as $company) {
        $id = $company['CompanyId'];
        $image = $company['CompanyImage'];
        $name = $company['CompanyName'];
        $address = $company['CompanyAddress'];
    }
Beispiel #23
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("PlayAudio");
$mainTable = new Table();
$audio_url = new InputText();
$button = new Button();
$button->setCaption("Click me!");
$button->onTap(clickme());
$mainTable->addControl($button, 1, 1);
$win->addControl($mainTable);
function clickme()
{
    $audio_url = "https://goo.gl/v8IQZB";
    Interop::PlayVideo($audio_url);
}
Beispiel #24
0
}*/
/***
 * Listado de categorias.
 */
$win = new SDPanel();
$win->setCaption("Tasks list");
$table = new Table();
$table->setClass("table.Menu");
$table_home = new Table();
$table_home->setClass("table.MenuOption");
$table_home->setColumnsStyle("20%;80%");
$img_home = new Image();
$img_home->setImage("img/ico_thumb.png");
$img_home->setClass("ImageMenu");
$lbl_home = new Label();
$lbl_home->setClass("LabelMenuOption");
$lbl_home->setCaption("Home");
$table_home->onTap(home());
//$table_home -> addControl($img_home,1,1,1,1,"Center","Middle");
$table_home->addControl($lbl_home, 1, 2, 1, 1, "Left", "Middle");
$table->addControl($table_home, 2, 1);
$win->addControl($table);
$win->Render();
function Slide()
{
    $win->Open("mainThumb");
}
function home()
{
    $win->Open("mainThumb");
}
Beispiel #25
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Interop");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
$input_message = new InputText();
$input_message->setLabelCaption("Write the message");
$input_phone = new InputPhone();
$input_phone->setLabelCaption("Write the phone number");
$button_sms = new Button();
$button_sms->setCaption("Send SMS!");
$button_sms->onTap(sms());
$mainTable->addControl($input_message, 1, 1);
$mainTable->addControl($input_phone, 2, 1);
$mainTable->addControl($button_sms, 3, 1);
$win->addControl($mainTable);
function sms()
{
    Interop::SendSMS($input_phone, $input_message);
}
Beispiel #26
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Image control");
$tabMain = new Table();
$img_arrow = new Image();
$img_arrow->setImage("img/Android/hdpi/appicon.png");
$tabMain->addControl($img_arrow, 1, 1);
$win->addControl($tabMain);
Beispiel #27
0
$name = new InputText();
$name->setClass("inputForm");
$last_name = new InputText();
$last_name->setClass("inputForm");
$email = new InputEmail();
$email->setClass("inputForm");
$btn_save = new Button();
$btn_save->setCaption("Save");
$btn_save->setClass("buttonform");
$btn_save->onTap(save());
$table_form->addControl($name, 1, 1);
$table_form->addControl($last_name, 2, 1);
$table_form->addControl($email, 3, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1);
$win->addControl($table);
$win->Render();
function refresh()
{
    $ur = "http://www.demo.kikapptools.com/magento/apiKikApp/api.php?metodo=userData&customerToken=" . $token;
    $http = new httpClient();
    $result = $http->Execute('GET', $ur);
    $sdtUser = array("firstname" => DataType::Character(35), "lastname" => DataType::Character(50), "email" => DataType::Email());
    Data::FromJson($sdtUser, $result);
    //Asignamos valores a los inputs.
    $name = $sdtUser['firstname'];
    $last_name = $sdtUser['lastname'];
    $email = $sdtUser['email'];
}
Beispiel #28
0
$btn_contact_viewAll = new Button();
$btn_contact_viewAll->setCaption("View All Contact");
$btn_contact_viewAll->onTap(viewAllContact());
$input_name = new InputText();
$input_name->setLabelCaption("Name");
$input_lastname = new InputText();
$input_lastname->setLabelCaption("Last Name");
$input_email = new InputEmail();
$input_email->setLabelCaption("E-mail");
$input_phone = new InputPhone();
$input_phone->setLabelCaption("Phone");
$input_work = new InputText();
$input_work->setLabelCaption("Work");
$input_message = new InputText();
$input_message->setLabelCaption("Message");
$mainTable->addControl($input_name, 1, 1);
$mainTable->addControl($input_lastname, 2, 1);
$mainTable->addControl($input_email, 3, 1);
$mainTable->addControl($input_phone, 4, 1);
$mainTable->addControl($input_work, 5, 1);
$mainTable->addControl($input_message, 6, 1);
$mainTable->addControl($btn_contact_add, 7, 1);
$mainTable->addControl($btn_contact_viewAll, 8, 1);
$win->addControl($mainTable);
function addContact()
{
    $isOk = new InputBoolean();
    $isOk = AddressBook::AddContact($input_name, $input_lastname, $input_email, $input_phone, $input_work, "", $input_message);
    if ($isOk == true) {
        echo "Contact added!";
    }
Beispiel #29
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Hello world!");
$mainTable = new Table();
$mainTable->setRowsStyle("300dip");
$video = new InputVideo();
$video->setReadOnly(true);
$mainTable->addControl($video, 1, 1);
$win->addControl($mainTable);
function clientStart()
{
    $video->setValue("https://www.youtube.com/watch?v=anywfG-X2b8");
}
$btn_checkout->setCaption("CHECKOUT NOW");
$btn_checkout->onTap(checkout());
$table_total = new Table();
$table_total->setColumnsStyle("70%;30%");
$table_total->setRowsStyle("25dip;25dip;25dip;40dip");
$table_total->addControl($lbl_sub_total, 1, 1, 1, 1, "Left", "Middle");
$table_total->addControl($subtotal, 1, 2, 1, 1, "Right", "Middle");
$table_total->addControl($lbl_tax, 2, 1, 1, 1, "Left", "Middle");
$table_total->addControl($tax, 2, 2, 1, 1, "Right", "Middle");
$table_total->addControl($lbl_shipping, 3, 1, 1, 1, "Left", "Middle");
$table_total->addControl($shipping, 3, 2, 1, 1, "Right", "Middle");
$table_total->addControl($lbl_total, 4, 1, 1, 1, "Left", "Middle");
$table_total->addControl($total, 4, 2, 1, 1, "Right", "Middle");
$table_result->addControl($table_total, 1, 1);
$table_result->addControl($btn_checkout, 2, 1, 1, 1, "Left", "Top");
$table->addControl($list, 1, 1);
$table->addControl($table_result, 2, 1, 1, 1, "Left", "Bottom");
$win->addControl($table);
$win->Render();
function removeProduct()
{
    $isOk = new InputBoolean();
    $isOk = Interop::Confirm("Do you want to remove this product from cart ?");
    if ($isOk == true) {
        $token = new InputText(80);
        $token = StorageAPI::Get("token");
        if ($token != null) {
            ProgressIndicator::Show();
            $url_cart = "http://demo.kikapptools.com/magento/apiKikApp/api.php?metodo=removeProductFromCart&productId=" . $id . "&customerToken=" . $token;
            $hc = new httpClient();
            $rs_cart = $hc->Execute("GET", $url_cart);