Esempio n. 1
0
<?php

require_once 'Zenity.php';
$zenity = new Zenity();
//Show this file in a text box
$zenity->showTextInfo(__FILE__, __FILE__);
//Show this file in an editable text box and print the result
$result = $zenity->showTextInfo(__FILE__, 'Edit Me', true);
print "RESULT\n";
print "------\n";
print $result;
Esempio n. 2
0
<?php

require_once 'Zenity.php';
$zenity = new Zenity();
//Get a file path using a file dialogue
$path = $zenity->getFile('Please Select a file');
print "You selected " . implode(', ', $path) . "\n";
//Getting Multiple File Paths:
$paths = $zenity->getFile('Please Select files', true);
print "You selected " . implode(', ', $paths) . "\n";
Esempio n. 3
0
<?php

require_once 'Zenity.php';
$zenity = new Zenity();
$data = array(array('key' => 1, 'column 1' => 'Item 1', 'column 2' => 'Another Value 1'), array('key' => 2, 'column 1' => 'Item 2', 'column 2' => 'Another Value 2'), array('key' => 3, 'column 3' => 'Item 3', 'column 2' => 'Another Value 3'));
//Get a date using a calendar:
$selected = $zenity->showList('Select from the list', 'Example List', $data);
print $selected;
Esempio n. 4
0
<?php

require_once 'Zenity.php';
$zenity = new Zenity();
//Get a date using a calendar:
$date = $zenity->getDate('Please Select Date', 'Select Date');
print "You selected {$date}\n";
Esempio n. 5
0
<?php

require_once 'Zenity.php';
$zenity = new Zenity();
$zenity->showProgress();
for ($i = 1; $i <= 10; $i++) {
    sleep(1);
    $zenity->updateProgress($i * 10, 'Testing Progress - ' . $i * 10 . '%');
}
$zenity->closeProgress();