===== USERINTERFACE ===== \\ \\ This element, **UserInterface**, is part of the **appData** object, having own characteristics which make it has been described below.\\ \\ Within this scope, we can find functions that allow us to interact with the user or with the physical device, by allowing enabling or unabling peripherals, printing, sound notifications or more basic functionalities as amsgbox.\\ \\ It is possible to call the methods with **ui.nombremetodo**, instead using the former **appdata.userinterface**.\\ \\ ==== MsgBox ==== \\ ^ Type |Method - Function| ^ Parameters |**Message**:Message we want to show.\\ **Caption**: Title of the sale of the message. \\ **Options**:Parameter which specifies the type of msgbox to show. They are the following ones: \\ 0 - It shows an informative message with "Ok" button. It returns no value. \\ 1 - Message for confirmation request "Accept"/"Cancel". \\ 4 - Message for confirmation request "Yes" or"No". | ^ Type of data returned |For Options=0 - There is no return \\ For Options=1 - It returns 1 if the user clicks on "Accept" and 2 if clicks on "Cancel" \\ For Options=4 - It returns 6 if the user clicks on "Yes" and 7 if clicks on "No"| ^ Platform |Win32, Web, .NET, .NET CF, WM (2003, 2005, 6.0, 6.5) Blackberry (5.0), iPhone, Linux, MC+, Symbian (3ed, 5ed)| \\ It shows a message windows at the corresponding UI. \\ \\ Depending on the platform also we can take a text by the console of the system like a trace.\\ \\ The values of the options have been normalized according to those defined for Windows, so they can be used at any of the platforms with same meaning, since the machinery is responsible for translating the meanings.\\ \\ \\ ==== SendMail ==== \\ ^ Type | Method | ^ Parameters | "direcciondestino@correo.es", "direccionencopia@correo.es", "Subject", "Message text", "ficheroadjunto.zip" | ^ Type of value returned | None | ^ Platform | Android | \\ Only Android. This method allows to send an email by filling the fields in the mail manager that the client has installed. The user is responsible to click on the send button. A file can be attached which is in the files folder or in any other path if it is full specified.\\ Example: ui.SendMail "direcciondestino@correo.es", "direccionencopia@correo.es", "Subject", "Message text", "" \\ ==== OpenMenu ==== \\ ^ Type |Method| ^ Parameters |**CollName**:Name of the collection to be shown. **Mask**:Mask of the appwizard./ **Mode**:Mode of the appwizard | ^ Type of value returned |None| ^ Platform |Win32, Web, .NET, .NET CF, WM (2003, 2005, 6.0, 6.5) Blackberry (5.0), Android, iPhone, Linux, MC+, Symbian (3ed, 5ed)| \\ It shows a collection on screen. \\ \\ Depending on how the UI of the collection in the mappings is defined, we can use an special control or in case not having anything defined, it is displayed on grid mode. \\ \\ This function only is defined in some frameworks, independently of the platform, but the idea is to generalize.\\ \\ Anyways, the use of the UI new rules will make that this kind of functionality is being replaced. \\ \\ Example: \\ ui.OpenMenu "ColeccionQueSea",31,1 \\ ==== GetInputString ==== \\ ^ Type |Method| ^ Parmeters |**Message**:Message we want to display. **Caption**: Title of the message sale. **Options**:Options of buttons, icons and else. | ^ Type of value returned |Text| ^ Platform |Win32, Web, .NET, .NET CF, WM (2003, 2005, 6.0, 6.5) Blackberry (5.0), iPhone, Linux, MC+, Symbian (3ed, 5ed)| \\ It displays an screen to ask the user for a datum.\\ \\ The form that this data request has depends on the platform. \\ \\ In some platforms, even, it may be available or not depending on the framework used, as could be in the PC case. \\ \\ ==== StartPrint ==== \\ ^ Type |Function| ^ Parameters |**IndexPrinter**:It is the index of the inputs of the printer.bin file which is going to be used. It uses index zero, that is, the first option from the available ones in printer.bin, it would be 0. | ^ Type of value returned |None, if the connection is correct, otherwise an Error code. | ^ WM Sintax |string appdata.userinterface.StartPrint ( int IndexPrinter ) | ^ Android Sintax |string appdata.userinterface.StartPrint "zebra" | ^ Platform |Win32, Web, .NET, .NET CF, WM (2003, 2005, 6.0, 6.5) Blackberry (5.0), iPhone, Android, Linux, MC+, Symbian (3ed, 5ed)| \\ It starts and connects with the printer indicated by parameter.\\ \\ ==== EndPrint ==== \\ ^ Type |Function| ^ Type of value returned |None| ^ Sintax |appdata.userinterface.EndPrint | ^ Platform |Win32, Web, .NET, .NET CF, WM (2003, 2005, 6.0, 6.5) Blackberry (5.0), iPhone, Linux, MC+, Symbian (3ed, 5ed)| \\ It ends the connection to the printer. \\ \\ ==== Print ==== \\ ^ Type |Function| ^ Parameters |**Text** [in]: The text will be sent to print.| ^ Type of value returned |None, if the printing is correct, otherwise it returns Error. | ^ Sintax |int appdata.userinterface.Print (string Text )| ^ Platform |Win32, Web, .NET, .NET CF, WM (2003, 2005, 6.0, 6.5) Blackberry (5.0), iPhone, Linux, MC+, Symbian (3ed, 5ed)| \\ It prints the string received as parameter. \\ ==== PrintLine ==== \\ ^ Type |Function| ^ Parameters |**Text** [in]:The text which will be sent to be printed.| ^ Type of value returned |None, if the printing is correct, otherwise it returns Error. | ^ Sintax |int appdata.userinterface.PrintLine(string Text )| ^ Platform |Win32, Web, .NET, .NET CF, WM (2003, 2005, 6.0, 6.5) Blackberry (5.0), iPhone, Linux, MC+, Symbian (3ed, 5ed)| \\ It prints the string received by parameter and causes a break line. \\ \\ ====LineFeed==== \\ ^ Type |Function| ^ Parameters |**Breaks** [in]:Numbers of line breaks. | ^ Type of value returned |None| ^ Sintax |appdata.userinterface.LineFeed int Breaks | ^ Platform |Win32, Web, .NET, .NET CF, WM (2003, 2005, 6.0, 6.5) Blackberry (5.0), iPhone, Linux, MC+, Symbian (3ed, 5ed)| \\ It makes as much line breaks as indicated by parameter. \\ \\ ====PrintCommand==== \\ ^ Type |Function| ^ Parameters |**Text** [in]:The text will be sent to the printer as ascii commands unless the ##**TEXT**## macro is specified.(*)| ^ Tipo de valor devuelto |None, if the printing is correct, otherwise it returns Error.| ^ Sintax |Int appdata.userinterface.PrintCommand (int String )| ^ Platform |Win32, Web, .NET, .NET CF, WM (2003, 2005, 6.0, 6.5) Blackberry (5.0), iPhone, Linux, MC+, Symbian (3ed, 5ed)| \\ (*)The sintax can be: 1) For writing normal text and that the control interpretes them as ASCII, it would be:\\ appdata.userinterface.PrintCommand "##TEXT##hola 130 15 ##END_TEXT##" appdata.userinterface.PrintCommand "##TEXT##! 0 200 200 210 1##END_TEXT##" 2) Any value between commas without the previous macros, will be interpreted as an ASCII value: appdata.userinterface.PrintCommand "32,35,104,111,108,97,10" it would be same than: appdata.userinterface.PrintCommand "32,35,##TEXT##hola##END_TEXT##,10" \\ It prints specific commands of the printer, through the string received as parameter.\\ \\ ==== PrintBarCode ==== \\ ^ Type |Function| ^ Parameter |**Type** [in]:The bars code type which will be printed. Availables types: "EAN13","EAN8","CODE39",”CODE128","PDF417”,"UPCA","UPCE". \\**Value** [in]: The value that the bars code will make up. | ^ Type of value returned |None if the printing is correct, otherwise it will return Error.| ^ Sintax |int appdata.userinterface.PrintBarCode (string Tipostring Value )| ^ Platform |Win32, Web, .NET, .NET CF, WM (2003, 2005, 6.0, 6.5) Blackberry (5.0), iPhone, Linux, MC+, Symbian (3ed, 5ed)| \\ It prints a bars code of the type specified by parameter.\\ \\ ==== ChronoStart ==== \\ It starts a time counter.\\ \\ ^ Type |Function| ^ Sintax |objeto.ChronoStart ^ Platform |Win32, Web, .NET, .NET CF, WM (2003, 2005, 6.0, 6.5) Blackberry (5.0), iPhone, Linux, MC+, Symbian (3ed, 5ed)| \\ ====ChronoStop==== \\ It stops the time counter.\\ \\ ^ Type |Function| ^ Sintax |Object.ChronoStop| ^ Platform |Win32, Web, .NET, .NET CF, WM (2003, 2005, 6.0, 6.5) Blackberry (5.0), iPhone, Linux, MC+, Symbian (3ed, 5ed)| \\ ====ChronoValue==== \\ It returns the time elapsed in milliseconds, from the timer was started or from the last call to ChronoValue.\\ \\ ^ Type |Function| ^ Sintax |long object.ChronoValue| ^ Type of value returned | The milliseconds elapsed from the last call to ChronoValue. The first time it is called it returns the total of the time elapsed.| ^ Platform |Win32, Web, .NET, .NET CF, WM (2003, 2005, 6.0, 6.5) Blackberry (5.0), iPhone, Linux, MC+, Symbian (3ed, 5ed)| \\ /* ====WriteString==== \\ Escribe la cadena de texto, que se pasa por parámetro, a la pantalla de depuración. En el caso de Windows Mobile esta pantalla es la ventana de resultados de Visual Studio. \\ \\ ^ Tipo |Función| ^ Parámetros | Cadena (in)El mensaje que se va a mostrar en pantalla.| ^ Sintáxis |objeto.ChronoValue (string Cadena)| ^ Tipo de valor devuelto | No retorna valor.| ^ Plataforma |Win32, Web, .NET, .NET CF, WM (2003, 2005, 6.0, 6.5) Blackberry (5.0), iPhone, Linux, MC+, Symbian (3ed, 5ed)| \\ Ejemplo\\ \\ set xcrn = CreateObject("System.Debug") xcrn.WriteString "INICIO CALCULOS" xcrn.ChronoStart REALIZAR TRABAJO 1 ... xcrn.WriteString "El tiempo trabajo 1: " + CStr(xcrn.ChronoValue) 'REALIZAR TRABAJO 2 ... xcrn.ChronoStop xcrn.WriteString "El tiempo trabajo 2: " + CStr(xcrn.ChronoValue) xcrn.WriteString "FIN" \\ */ ==== StartScanner ==== \\ It launchs or connects the scanner for the 2d codes reading, by making the reading it will be assigned the value to the property with the barcode =”true” attribute.\\ Later has been implemented a third parameter which allows us to specify the destination property of the bars code reading, no matter it has the barcode="true" attribute or it has not. This command, for its proper functioning will search an application named "Barcode Scanner" by ZXing. If it is not installed, it will open us the market in order to install it. \\ \\ ^**Type**|Function| ^**Parameters**|//__**Parameter 1: application of scanner to use.**__// * **quickmark1d**: Using QuickMark for one-dimensional codes. * **quickmark**: Using QuickMark with generic scanner. * **zxing**: Using Zxing. This is the preferred one. //__**Parameter 2 (optional): types of code.**__// * If this parameter is not present or its value is empty, it will try to identify all the supported codes. * The values will go separated by commas. P.Ex: "QRCODE,EAN,ISBN". * **EAN**: "European article number" includes (EAN2,EAN5,EAN8,EAN13). * **UPC**: "Uniform product code" indludes (UPC-A, UPC-E). * **ISBN**: "International Standart Book Number" includes (ISBN-10, ISBN-13). * **COMPOSITE**: EAN/UPC composite. 125: Interleaved 2 of 5. * **DATABAR**: GS1 DataBar (RSS). * **CODE 39**: Code 39. * **PDF417**: PDF417. * **QRCODE**: QR Code. * **CODE93**: Code 93. * **CODE128**: Code 128. //__**Parameter 3 (optional): Property destination of the reading.**__//| ^ Type of value returned |None, if the printing is correct, otherwise it returns Error.| ^ Platforms|Win32, Web, .NET, .NET CF, WM (2003, 2005, 6.0, 6.5) Blackberry (5.0), iPhone, Linux, MC+, Symbian (3ed, 5ed)| \\ **Example of use:**\\