<?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); }
$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); $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() {