本文整理汇总了PHP中wb_destroy_window函数的典型用法代码示例。如果您正苦于以下问题:PHP wb_destroy_window函数的具体用法?PHP wb_destroy_window怎么用?PHP wb_destroy_window使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wb_destroy_window函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process_main
function process_main($window, $id, $ctrl, $lparam1 = 0, $lparam2 = 0)
{
global $wb, $statusbar;
switch ($id) {
case IDC_TREEVIEW:
$selnode = wb_get_selected($wb->tree_view);
if ($wb->left_control) {
wb_set_visible($wb->left_control, false);
}
switch (wb_get_value($wb->tree_view)) {
case 2002:
include_once PATH_FORM . 'Contact.form.php';
$wb->current_ctl = new ContactForm();
$wb->left_control = $wb->current_ctl->renderForm();
break;
case 2003:
$wb->left_control = wb_create_control($wb->mainwin, CheckBox, "Checkbox 1", 170, 105, 91, 14, 0);
break;
case 2004:
$wb->left_control = wb_create_control($wb->mainwin, RTFEditBox, "Rich text", 170, 120, 205, 55, 0);
break;
}
wb_set_text($wb->statusbar, "Selected item: " . wb_get_text($wb->tree_view, $selnode) . " / Value: " . wb_get_value($wb->tree_view) . " / Parent: " . wb_get_parent($wb->tree_view, $selnode) . " / Level: " . wb_get_level($wb->tree_view, $selnode) . " / State: " . (wb_get_state($wb->tree_view, $selnode) ? "expanded" : "collapsed"));
break;
case IDCLOSE:
// IDCLOSE is predefined
if (wb_message_box($wb->mainwin, $wb->vars["Lang"]["lang_sure_logout"], $wb->vars["Lang"]["system_name"], WBC_QUESTION | WBC_YESNO)) {
wb_destroy_window($window);
}
break;
case IDC_CATEGORY_LIST_VIEW:
$sel = wb_get_selected($ctrl);
$sel = $sel ? implode(", ", $sel) : "none";
wb_message_box($wb->mainwin, $sel);
break;
default:
include_once PATH_FORM . 'contact.handle.php';
process_ContactForm($window, $id, $ctrl, $lparam1, $lparam2);
break;
}
}
示例2: process_options
function process_options($window, $id, $ctrl)
{
global $wb;
switch ($id) {
case IDC_WIREFRAME:
case IDC_GRID:
wb_set_value(wb_get_control($wb->mainwin, $id), wb_get_value($ctrl));
break;
case IDC_BROWSE:
$current = wb_get_text(wb_get_control($window, IDC_FILEPATH));
$path = wb_sys_dlg_path($window, 'Select default path for project files:', $current);
if ($path) {
wb_set_text(wb_get_control($window, IDC_FILEPATH), $path);
}
break;
case IDOK:
// Set various settings
foreach ($wb->options_array as $var) {
$var = strtolower($var);
$ctrl = wb_get_control($wb->winoptions, constant("IDC_" . strtoupper($var)));
if (wb_get_class($ctrl) == CheckBox) {
$wb->{$var} = wb_get_value($ctrl);
} else {
$wb->{$var} = wb_get_text($ctrl);
}
}
// Fall-through
// Fall-through
case IDCANCEL:
set_default_accel();
wb_destroy_window($window);
break;
}
}
示例3: process_project
function process_project($window, $id, $ctrl)
{
global $wb;
switch ($id) {
case IDC_ISTABPAGE:
$val = wb_get_value($ctrl);
wb_set_enabled(wb_get_control($wb->winproject, IDC_TABNUMBER), $val);
wb_set_enabled(wb_get_control($wb->winproject, IDC_TABNUMBERSPINNER), $val);
break;
case IDC_CTRLVAR:
$hastext = wb_get_text($ctrl) !== '';
wb_set_enabled(wb_get_control($wb->winproject, IDC_STARTCTRLVAL), $hastext);
break;
case IDC_LOCALIZE:
wb_set_enabled(wb_get_control($wb->winproject, IDC_LOCPREFIX), wb_get_value($ctrl));
break;
case IDOK:
// Set various settings
foreach ($wb->project_array as $var) {
$var = strtolower($var);
$ctrl = wb_get_control($wb->winproject, constant("IDC_" . strtoupper($var)));
if (wb_get_class($ctrl) != RadioButton && wb_get_class($ctrl) != CheckBox) {
$wb->form[$wb->currentform]->{$var} = wb_get_text($ctrl);
} else {
$wb->form[$wb->currentform]->{$var} = wb_get_value($ctrl);
}
}
// Fall-through
// Fall-through
case IDCANCEL:
set_default_accel();
wb_destroy_window($window);
break;
}
}
示例4: process_about
function process_about($window, $id, $ctrl)
{
global $wb;
switch ($id) {
case IDCLOSE:
// IDCLOSE is predefined
// IDCLOSE is predefined
case IDCANCEL:
wb_destroy_window($window);
break;
}
}
示例5: process_prior
function process_prior($window, $id)
{
global $mainwin, $prior_table;
switch ($id) {
case ID_PRIORITYLIST:
update_prior_controls($window);
break;
case ID_NEWITEM:
$name = wb_get_text(wb_get_control($window, ID_NAME));
db_edit_record($prior_table, 0, "name", array($name));
update_priors($window);
update_prior_controls($window);
break;
case ID_SETITEM:
$name = wb_get_text(wb_get_control($window, ID_NAME));
$itemlist = wb_get_control($window, ID_PRIORITYLIST);
$id = db_get_id($prior_table, wb_get_selected($itemlist));
db_edit_record($prior_table, $id, "name", array($name));
update_priors($window);
update_prior_controls($window);
break;
case ID_DELETEITEM:
$itemlist = wb_get_control($window, ID_PRIORITYLIST);
$selected = wb_get_selected($itemlist);
$id = db_get_id($prior_table, $selected);
db_delete_records($prior_table, db_get_id($prior_table, $selected));
update_priors($window);
update_prior_controls($window);
break;
case ID_MOVEUP:
$itemlist = wb_get_control($window, ID_PRIORITYLIST);
$selected = wb_get_selected($itemlist);
$id = db_get_id($prior_table, $selected);
db_swap_records($prior_table, db_get_id($prior_table, $selected), db_get_id($prior_table, $selected - 1));
update_priors($window);
update_prior_controls($window);
break;
case ID_MOVEDOWN:
$itemlist = wb_get_control($window, ID_PRIORITYLIST);
$selected = wb_get_selected($itemlist);
$id = db_get_id($prior_table, $selected);
db_swap_records($prior_table, db_get_id($prior_table, $selected), db_get_id($prior_table, $selected + 1));
update_priors($window);
update_prior_controls($window);
break;
case IDCANCEL:
case IDCLOSE:
case IDOK:
wb_destroy_window($window);
break;
}
}
示例6: process_cat
function process_cat($window, $id)
{
global $it_list, $mainwin, $cat_table;
switch ($id) {
case ID_TREE:
update_cat_controls($window);
break;
case ID_NEWITEM:
$name = wb_get_text(wb_get_control($window, ID_NAME));
$level = wb_get_selected(wb_get_control($window, ID_LEVEL));
// db_edit_record($cat_table, 0, "name\nlevel", array($name, $level));
update_tree($window);
update_cat_controls($window);
break;
case ID_SETITEM:
$name = wb_get_text(wb_get_control($window, ID_NAME));
$level = wb_get_selected(wb_get_control($window, ID_LEVEL));
$id = get_selected_tree_item_id($window);
// db_edit_record($cat_table, $id, "name\nlevel", array($name, $level));
update_tree($window);
update_cat_controls($window);
break;
case ID_DELETEITEM:
$selected = get_selected_tree_item_index($window);
// db_delete_records($cat_table, db_get_id($cat_table, $selected));
update_tree($window);
update_cat_controls($window);
break;
case ID_MOVEUP:
$selected = get_selected_tree_item_index($window);
// db_swap_records($cat_table, db_get_id($cat_table, $selected),
// db_get_id($cat_table, $selected - 1));
update_tree($window);
update_cat_controls($window);
break;
case ID_MOVEDOWN:
$selected = get_selected_tree_item_index($window);
// db_swap_records($cat_table, db_get_id($cat_table, $selected),
// db_get_id($cat_table, $selected + 1));
update_tree($window);
update_cat_controls($window);
break;
case IDCANCEL:
case IDCLOSE:
case IDOK:
wb_destroy_window($window);
update_tree($mainwin);
break;
}
}
示例7: process_item
function process_item($window, $id)
{
global $mainwin;
switch ($id) {
case IDOK:
if (update_item($window)) {
wb_destroy_window($window);
update_items($mainwin);
}
break;
case IDCANCEL:
case IDCLOSE:
wb_destroy_window($window);
break;
}
}
示例8: process_contact_category_search
function process_contact_category_search($window, $id, $ctrl)
{
global $wb;
switch ($id) {
case IDC_SEARCH_SUBMIT:
$wb->current_page = 1;
$wb->keyword = wb_get_text(wb_get_control($window, IDC_KEYWORD));
reset_contact_category_view();
wb_destroy_window($window);
break;
case IDCLOSE:
// IDCLOSE is predefined
// IDCLOSE is predefined
case IDCANCEL:
wb_destroy_window($window);
break;
}
}
示例9: process_agreement_edit
function process_agreement_edit($window, $id, $ctrl)
{
global $wb;
switch ($id) {
case IDC_UPDATE:
$wb->current_action = 'update';
wb_set_enabled(wb_get_control($window, IDC_SAVE), true);
wb_set_enabled(wb_get_control($window, IDC_UPDATE), false);
break;
case IDC_SAVE:
inser_update_agreement($window);
wb_destroy_window($window);
break;
case IDCANCEL:
wb_destroy_window($window);
break;
}
}
示例10: process_classes
function process_classes($window, $id, $ctrl, $lparam1 = 0, $lparam2 = 0)
{
global $wb, $mainwin, $classes_table;
switch ($id) {
case IDCLOSE:
$nclasses = count($wb->classes);
for ($i = 0; $i < $nclasses; $i++) {
$const = "IDC_" . strtoupper($wb->classes[$i][1]);
$c = wb_get_control($wb->classdlg, constant($const));
}
wb_destroy_window($window);
wb_set_selected($wb->mainmenu, ID_TOOLBOX, false);
$wb->classdlg = null;
break;
default:
process_main($window, $id, $ctrl, $lparam1, $lparam2);
break;
}
}
示例11: process_main
function process_main($window, $id)
{
// Try to load the multimedia dll
$winmmlib = wb_load_library("winmm");
$mciSendString = wb_get_function_address("mciSendString", $winmmlib);
static $file_filter = array(array("MP3 file", "*.mp3"));
switch ($id) {
case ID_OPEN:
$filename = wb_sys_dlg_open($window, "Get It", $file_filter);
if ($filename) {
wb_call_function($mciSendString, array("open \"" . $filename . "\" type mpegvideo alias " . $filename, NULL, 0, 0));
}
wb_call_function($mciSendString, array("play \"" . $filename . "\" from 0 notify", NULL, 0, 0));
break;
case IDCLOSE:
// IDCLOSE is predefined
wb_destroy_window($window);
break;
}
}
示例12: process_setting
function process_setting($window, $id, $ctrl)
{
global $wb;
switch ($id) {
case IDOK:
$wb->setting["Settings"]["db_host"] = wb_get_text(wb_get_control($window, IDC_DB_HOST));
$wb->setting["Settings"]["db_username"] = wb_get_text(wb_get_control($window, IDC_DB_USERNAME));
$wb->setting["Settings"]["db_password"] = wb_get_text(wb_get_control($window, IDC_DB_PASSWORD));
$wb->setting["Settings"]["db_dbname"] = wb_get_text(wb_get_control($window, IDC_DB_NAME));
$current_lang = wb_get_text(wb_get_control($window, IDC_LANGUAGE));
include PATH_CONFIG . "common.php";
$lang_value = array_search($current_lang, $LangOption);
// switch ($current_lang)
// {
// case 'english':
// $lang_value='en';
// break;
// case 'chinese':
// $lang_value='zh-cn';
// break;
//
// }
$wb->setting["Settings"]["lang_set"] = $lang_value;
// include('include/wb_generic.inc.php');
// $contents = generate_ini($wb->setting, "; Store Setting INI file\r\n");
$contents = generates_ini($wb->setting, "; Store Setting INI file\r\n");
file_put_contents(PATH_INI . SEETING_DAT, $contents);
wb_destroy_window($window);
break;
case IDCLOSE:
// IDCLOSE is predefined
// IDCLOSE is predefined
case IDCANCEL:
wb_destroy_window($window);
break;
}
}
示例13: process_review_edit
function process_review_edit($window, $id, $ctrl)
{
global $wb;
switch ($id) {
// case IDC_REVIEW_CAL_SELECT:
// wb_set_visible (wb_get_control($window, IDC_REVIEW_CALENDAR), true);
// break;
// case IDC_REVIEW_CALENDAR:
// $date = strftime("%Y-%m-%d %H:%M%:%S", wb_get_value($ctrl));
// wb_set_text(wb_get_control($window, IDC_REVIEW_REVIEWDATE), $date);
//// wb_set_visible (wb_get_control($window, IDC_REVIEW_CALENDAR), false);
// break;
case IDC_UPDATE:
$wb->current_action = 'update';
wb_set_enabled(wb_get_control($window, IDC_SAVE), true);
wb_set_enabled(wb_get_control($window, IDC_UPDATE), false);
break;
case IDC_SAVE:
if (!wb_get_text(wb_get_control($window, IDC_REVIEW_COMPANY))) {
empty_message_box($window, $wb->vars["Lang"]["lang_please_fillup"] . $wb->vars["Lang"]["lang_company"]);
wb_set_focus(wb_get_control($window, IDC_REVIEW_COMPANY));
} else {
inser_update_review($window);
wb_destroy_window($window);
}
break;
case IDCANCEL:
wb_destroy_window($window);
break;
}
}
示例14: process_main
function process_main($window, $id, $ctrl)
{
global $statusbar, $fmod, $mainwin;
switch ($id) {
case ID_INFOTIMER:
$status = "´ÅÅÌ: " . $fmod->fmod_GetOutputName() . " ";
$status .= "¸èÇú³¤¶È: " . $fmod->fmod_GetLenght(true) . " ·ÖÖÓ ";
$status .= "ÒѲ¥·Å: " . $fmod->fmod_Msec2Time($fmod->fmod_GetTime(true)) . " sec ";
if ($song_name = $fmod->fmodStreamUrl) {
$status .= "Ãû³Æ: {$song_name} ";
}
wb_set_text($statusbar, $status);
// play position
if ($fmod->fmod_GetLenght(false)) {
wb_set_value(wb_get_control($mainwin, ID_PLAY_POS), round($fmod->fmod_GetTime(false) / $fmod->fmod_GetLenght(false), 2) * 100);
}
if ($fmod->fmod_GetTime(false) == $fmod->fmod_GetLenght(false)) {
$fmod->fmod_StreamOpen($fmod->fmodStreamUrl);
$fmod->fmod_StreamPlay();
}
break;
case ID_OPEN:
$filename = wb_sys_dlg_open();
if ($filename) {
if ($fmod->fmod_StreamOpen($filename)) {
$fmod->fmod_StreamPlay();
// returns true, then play
} else {
wb_message_box($window, "Error opening Audiostream!\n" . $fmod->lasterror, APPNAME, WBC_INFO);
}
}
break;
case ID_CLOSE:
$fmod->fmod_StreamStop();
break;
case ID_PLAY:
$fmod->fmod_StreamPlay();
break;
case ID_STOP:
$fmod->fmod_StreamStop();
break;
case ID_PAUSE:
if ($fmod->fmodStreamState == 1) {
switch ($fmod->fmodIsPaused) {
case 0:
$fmod->fmod_SoundPause(true);
wb_set_text($ctrl, "¼ÌÐø..");
break;
case 1:
$fmod->fmod_SoundPause(false);
wb_set_text($ctrl, "ÔÝÍ£");
break;
}
}
break;
case ID_MUTE:
if ($fmod->fmodStreamState == 1) {
switch ($fmod->fmodIsMuted) {
case 0:
$fmod->fmod_SoundMute(true);
wb_set_text($ctrl, "·ÅÒô");
break;
case 1:
$fmod->fmod_SoundMute(false);
wb_set_text($ctrl, "¾²Òô");
break;
}
}
break;
case ID_SURROUND:
switch ($fmod->fmodSurroundEnabled) {
case 0:
$fmod->fmod_SetSurround(true);
wb_set_text($ctrl, "Ñ»·");
break;
case 1:
$fmod->fmod_SetSurround(false);
wb_set_text($ctrl, "²»Ñ»·");
break;
}
break;
case ID_VOLUMEN:
$fmod->fmod_SetVolumen(wb_get_value($ctrl));
wb_set_text($statusbar, "ÒôÁ¿: " . $fmod->fmod_GetVolumen());
break;
case ID_BALANCE:
$fmod->fmod_SetPanning(wb_get_value($ctrl));
break;
case ID_BALCENTER:
$fmod->fmod_SetPanning(127);
wb_set_value(wb_get_control($window, ID_BALANCE), 127);
break;
case IDCLOSE:
$fmod->fmod_SoundClose();
wb_release_library($fmod->fmodlib);
wb_destroy_window($window);
break;
}
}
示例15: process_refundment_edit
function process_refundment_edit($window, $id, $ctrl)
{
global $wb;
switch ($id) {
case IDC_UPDATE:
$wb->current_action = 'update';
wb_set_enabled(wb_get_control($window, IDC_SAVE), true);
wb_set_enabled(wb_get_control($window, IDC_UPDATE), false);
break;
case IDC_SAVE:
if (!wb_get_text(wb_get_control($window, IDC_REFUNDMENT_COMPANY))) {
empty_message_box($window, $wb->vars["Lang"]["lang_please_fillup"] . $wb->vars["Lang"]["lang_company"]);
wb_set_focus(wb_get_control($window, IDC_REFUNDMENT_COMPANY));
} else {
inser_update_refundment($window);
wb_destroy_window($window);
}
break;
case IDCANCEL:
wb_destroy_window($window);
break;
}
}