Exemplo n.º 1
0
$input2 = new InputText();
$input2->setReadOnly(true);
$input2->setClass("label.black");
$table_outcome_month = new Table();
$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'];
Exemplo n.º 2
0
//Controls in grid.
$image = new InputImage();
$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'];
Exemplo n.º 3
0
$title = new InputText(150);
$title->setClass("inputtextTitlewhite");
$title->setAutoGrow(true);
$image = new InputImage();
$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'];
Exemplo n.º 4
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("First Canvas!");
$canvas = new Canvas();
$canvas->setWidth("100%");
$canvas->setHeight("100%");
$mainTable = new Table();
$table = new Table();
$label = new Label();
$label->setCaption("First image:");
$label2 = new Label();
$label2->setCaption("Second image:");
$image = new Image();
$image->setImage("img/Android/hdpi/appicon.png");
$image2 = new Image();
$image2->setImage("img/Android/hdpi/lunchimage.png");
$table->addControl($label, 1, 1);
$table->addControl($label2, 3, 1);
$canvas->addPosition($image2, "0%", "100%", "0", "350dip", "0%", "100%", 0);
$canvas->addPosition($image, "0%", "100%", "0", "66dip", "0%", "100%", 1);
$canvas->addPosition($table, "0%", "100%", "0", "180dip", "0%", "100%", 2);
$mainTable->addControl($canvas, 1, 1);
$win->addControl($mainTable);
Exemplo n.º 5
0
$title = new InputText(150);
$title->setClass("inputtextTitlewhite");
$title->setAutoGrow(true);
$image = new InputImage();
$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", "185dip", "0%", "100%");
$table_grid->addPosition($table_desc, "0%", "100%", "95dip", "70dip", "0", "0");
$grid->addControl($table_grid);
$table->addControl($grid);
$win->addControl($table);
$win->Render();
function lista()
{
    $win->Open("ProductList", $cat);
}
//Grid load function
function grid_load()
{
    $url = "http://demo.kikapptools.com/magento/apiKikApp/Products.php?cId=" . $cat;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
Exemplo n.º 6
0
$statusLabel->setCaption("Done");
$statusLabel->setClass("inputcommon");
$statusLabel->onTap(changeStatus());
/*
$statusButton = new ButtonBar();
$statusButton -> setCaption("change");
//$statusButton -> setImage("img/ico_thumb.png");
$statusButton -> setClass("buttonform");
$statusButton -> onTap(changeViewType());
*/
$table_list = new Table();
$table_list->addControl($name, 1, 1, 1, 4, "Left", "Middle");
$table_list->addControl($statusLabel, 1, 2, 1, 1, "Right", "Middle");
//$table_list -> addControl($status,1,3,1,1,"Right","Middle");
//$table_list -> addControl($statusButton,1,4,1,1,"Right","Middle");
$table_grid->addPosition($table_list, "0%", "100%", "0", "50dip", "0%", "100%");
$table_grid->onTap(detail());
$table_grid->onLongTap(delete());
$list->addControl($table_grid);
$table->addControl($list);
$win->addControl($table);
$win->Render();
function load_grid()
{
    //Make JSON request
    $url = "http://52.34.247.215/frameWorkExamples/taskManager/crud/getTask.php";
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    //Cast response data type
    $struct = array(array("ID" => type::Numeric(6), "TASK" => type::Character(150), "STATUS" => type::Numeric(1)));
    Data::FromJson($struct, $result);