本文整理汇总了PHP中Button::onTap方法的典型用法代码示例。如果您正苦于以下问题:PHP Button::onTap方法的具体用法?PHP Button::onTap怎么用?PHP Button::onTap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Button
的用法示例。
在下文中一共展示了Button::onTap方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SDPanel
/**
* Main object.
* @author Kikapp
* @version 1.0
*/
$win = new SDPanel();
$win->setCaption("Address Book");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
$btn_contact_add = new Button();
$btn_contact_add->setCaption("Add Contact");
$btn_contact_add->onTap(addContact());
$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);
示例2: PostOnFacebook
<?php
/**
* Main object.
* @author Kikapp
* @version 1.0
*/
$win = new SDPanel();
$win->setCaption("First Facebook Post!");
$mainTable = new Table();
$input = new InputText();
$input->setLabelCaption("");
$button = new Button();
$button->setCaption("Post on Facebook");
$button->onTap(PostOnFacebook());
$mainTable->addControl($input, 1, 1);
$mainTable->addControl($button, 2, 1);
$win->addControl($mainTable);
function PostOnFacebook()
{
Facebook::PostToWall("First post", "Caption", $input, "http://www.kikapptools.com", "");
}
示例3: message
<?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_message = new Button();
$button_message->setCaption("Message!");
$button_message->onTap(message());
$mainTable->addControl($input_message, 1, 1);
$mainTable->addControl($input_phone, 2, 1);
$mainTable->addControl($button_message, 3, 1);
$win->addControl($mainTable);
function message()
{
Interop::SendMessage($input_message, $input_phone);
}
示例4: clickme
<?php
/***
* Popup
*/
$win = new SDPanel();
$win->setCaption("");
$table = new Table();
$table->setFormClass("form.algo");
$lugar = new Label();
$lugar->setCaption("Place");
$combo_box_lugar = new ComboBox();
$combo_box_lugar->setEmptyItem(false);
$combo_box_lugar->setValues("All:1, Staples Center:2, Quicken Loans Arena:3");
$boton = new Button();
$boton->setCaption("Search");
$boton->onTap(clickme());
$table->addControl($lugar, 1, 1);
$table->addControl($combo_box_lugar, 1, 2);
$table->addControl($boton, 2, 1, 1, 2, "", "");
$win->addControl($table);
function clickme()
{
echo "Searching...";
}
示例5: load_image
//$grid -> setPageControllerBackColor("#FFFFFF");
$grid->addData(load_image());
//$grid -> onTap(view_image());
$grid->setPageControllerClass("table.grid");
$table_grid = new Table();
$table_grid->setRowsStyle("100%");
$table_grid->setHeight("100%");
$table_grid->setClass("table.grid");
$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();
示例6: clickme
<?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;
}
示例7: facebook
<?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", "");
}
示例8: list_companies
* Main object.
* @author KikApp
* @version 1.0
*/
$win = new SDPanel();
$win->setCaption("Gecko CRM");
$mainTable = new Table();
$button = new Button();
$button->setCaption("Companies");
$button->onTap(list_companies());
$button_2 = new Button();
$button_2->setCaption("Contacts");
$button_2->onTap(list_contacts());
$button_3 = new Button();
$button_3->setCaption("Meetings");
$button_3->onTap(list_meetings());
$mainTable->addControl($button, 1, 1);
$mainTable->addControl($button_2, 2, 1);
$mainTable->addControl($button_3, 3, 1);
$win->addControl($mainTable);
function list_companies()
{
$win->Open("list_companies");
}
function list_contacts()
{
$win->Open("list_contact");
}
function list_meetings()
{
$win->Open("list_meeting");
示例9: InputText
$total->setClass("input.textPriceTotal");
//$total -> setLabelPosition("Left");
//$total -> setLabelCaption("$");
$subtotal = new InputText(10);
$subtotal->setReadOnly(true);
$subtotal->setClass("input.textPrice");
$shipping = new InputText(10);
$shipping->setReadOnly(true);
$shipping->setClass("input.textPrice");
$tax = new InputText(10);
$tax->setReadOnly(true);
$tax->setClass("input.textPrice");
$btn_checkout = new Button();
$btn_checkout->setClass("buttonred");
$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");
示例10: action
<?php
/**
* Button control example.
* mainButton.php
*/
$win = new SDPanel();
$win->setCaption("Button control");
$tabMain = new Table();
$button = new Button();
$button->setCaption("Button");
$button->setClass("button.Example");
$button->onTap(action());
$tabMain->addControl($button, 1, 1);
$win->addControl($tabMain);
function action()
{
echo "Hello world!";
}
示例11: prueba
<?php
/***
* Popup
*/
$win = new SDPanel();
$win->setCaption("");
$table = new Table();
//$table -> setFormClass("form.algo");
$lugar = new Label();
$lugar->setCaption("Place");
$combo_box_lugar = new ComboBox();
$combo_box_lugar->setEmptyItem(false);
//$combo_box_fecha-> setEmptyItemText("Choose options");
$combo_box_lugar->setValues("All:1, Staples Center:2, Quickens Loans Arena:3");
$boton = new Button();
$boton->setCaption("Search");
$boton->onTap(prueba());
$table->addControl($lugar, 1, 1);
$table->addControl($combo_box_lugar, 1, 2);
$table->addControl($boton, 2, 1, 1, 2, "", "");
$win->addControl($table);
function prueba()
{
echo "Searching...";
}
示例12: back
<?php
/**
* Main object.
* @author Kikapp
* @version 1.0
*/
$win = new SDPanel();
$win->setCaption("Hello world!");
$mainTable = new Table();
$button = new Button();
$button->setCaption("Click me!");
$button->onTap(back());
$mainTable->addControl($button, 1, 1);
$win->addControl($mainTable);
function back()
{
$ok = new InputBoolean();
$ok = Interop::Confirm('Are you sure you want to close?');
if ($ok == true) {
return;
}
}
示例13: call
<?php
/**
* Main object.
* @author Kikapp
* @version 1.0
*/
$win = new SDPanel();
$win->setCaption("Interop");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
$input_phone = new InputPhone();
$input_phone->setLabelCaption("Write the phone number");
$button_call = new Button();
$button_call->setCaption("Call!");
$button_call->onTap(call());
$mainTable->addControl($input_phone, 1, 1);
$mainTable->addControl($button_call, 2, 1);
$win->addControl($mainTable);
function call()
{
Interop::PlaceCall($input_phone);
}
示例14: login
* Main object.
* @author Kikapp
* @version 1.0
*/
$win = new SDPanel();
$win->setCaption("Login");
$table = new Table();
$table_form = new Table();
$email = new InputEmail();
$email->setInviteMessage("E-Mail");
$pass = new InputText();
$pass->setIsPassword(true);
//it hides characters
$btn_save = new Button();
$btn_save->setCaption("LOG IN");
$btn_save->onTap(login());
$table_form->addControl($email, 1, 1);
$table_form->addControl($pass, 2, 1);
$table->addControl($table_form, 2, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table->addControl($table_button, 3, 1);
$win->addControl($table);
function login()
{
if ($email == null) {
echo "E-Mail is a required field.";
//you can't leave it blank
} else {
ProgressIndicator::ShowWithTitle("Loading...");
ProgressIndicator::Hide();
示例15: confirm
$token = new InputText(80);
$table = new Table();
$table->setRowsStyle("100%");
$table->setWidth("100%");
$table->setHeight("100%");
$table->setClass("table.white");
$table_form = new Table();
$table_form->setRowsStyle("76dip;76dip");
$table_form->setClass("table.forms");
$money_value = new InputNumeric(15);
$money_value->setClass("input.form");
$input_date = new InputDate();
$input_date->setClass("input.form");
$button = new Button();
$button->setCaption("Confirm");
$button->onTap(confirm());
$button->setClass("button.blue");
$table_form->addControl($money_value, 1, 1, 1, 1, "Center", "Middle");
$table_form->addControl($input_date, 2, 1, 1, 1, "Center", "Middle");
$table_button = new Table();
$table_button->addControl($button, 1, 1, 1, 1, "Center", "Middle");
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1);
$win->addControl($table);
function confirm()
{
$token = StorageAPI::Get("token");
ProgressIndicator::ShowWithTitle("Adding budget...");
$httpUpdate = new httpClient();
$httpUpdate->addVariable('money', $money_value);
$httpUpdate->addVariable('dates', $input_date);