當前位置: 首頁>>代碼示例>>PHP>>正文


PHP app::close方法代碼示例

本文整理匯總了PHP中app::close方法的典型用法代碼示例。如果您正苦於以下問題:PHP app::close方法的具體用法?PHP app::close怎麽用?PHP app::close使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app的用法示例。


在下文中一共展示了app::close方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: ds_createTrayIconPopUpMenu

 function ds_createTrayIconPopUpMenu()
 {
     if (!isset(self::$wb_controls[IndexWindow])) {
         self::$wb_controls[IndexWindow] = array();
     }
     self::$wb_controls[IndexWindow][IndexPopUpTray] = false;
     self::$wb_controls[IndexWindow][IndexPopUpTray] = new TPopupMenu();
     $popup =& self::$wb_controls[IndexWindow][IndexPopUpTray];
     if (isset(self::$wb_windows[FloatWindow])) {
         $menu = new TMenuItem();
         $menu->caption = self::encoding_toGUI('Показать окно [1xЛКМ]');
         $menu->onClick = function () {
             dsSpy::showWindow(FloatWindow);
         };
         $popup->addItem($menu);
     }
     $menu = new TMenuItem();
     $menu->caption = self::encoding_toGUI((self::$Pause ? 'Снять с паузы' : 'Пауза') . ' [2xЛКМ]');
     $menu->onClick = function () {
         dsSpy::switchPause();
     };
     $menu->picture->transparent = false;
     $menu->picture->loadFromFile(DOC_ROOT . '/files/images/' . (self::$Pause ? 'iconpause0.ico' : 'iconpause1.ico'), 'ico');
     $popup->addItem($menu);
     // разделитель
     $menu = new TMenuItem();
     $menu->caption = self::encoding_toGUI('-');
     $popup->addItem($menu);
     $menu = new TMenuItem();
     $menu->caption = self::encoding_toGUI('Открыть ' . self::$Host . ' [СКМ]');
     $menu->onClick = function () {
         dsSpy::RunURL('http://' . dsSpy::$Host);
     };
     $menu->picture->transparent = false;
     $menu->picture->loadFromFile(DOC_ROOT . '/files/images/community_fav.ico', 'ico');
     $popup->addItem($menu);
     $menu = new TMenuItem();
     $menu->caption = self::encoding_toGUI('Открыть develnet.ru');
     $menu->onClick = function () {
         dsSpy::RunURL('http://develnet.ru');
     };
     $menu->picture->transparent = false;
     $menu->picture->loadFromFile(DOC_ROOT . '/files/images/develnet_fav.ico', 'ico');
     $popup->addItem($menu);
     $menu = new TMenuItem();
     $menu->caption = self::encoding_toGUI('Открыть DS Wiki (ds-wiki.ru)');
     $menu->onClick = function () {
         dsSpy::RunURL('http://ds-wiki.ru');
     };
     $popup->addItem($menu);
     $menu = new TMenuItem();
     $menu->caption = self::encoding_toGUI('Перейти на страницу DS в VK');
     $menu->onClick = function () {
         dsSpy::RunURL('http://vk.com/develstudioru');
     };
     $menu->picture->transparent = false;
     $menu->picture->loadFromFile(DOC_ROOT . '/files/images/vk_fav.ico', 'ico');
     $popup->addItem($menu);
     // разделитель
     $menu = new TMenuItem();
     $menu->caption = self::encoding_toGUI('-');
     $popup->addItem($menu);
     $menu = new TMenuItem();
     $act = !self::getAutoRun();
     $menu->caption = self::encoding_toGUI($act ? 'Поставить в автозагрузку' : 'Убрать из автозагрузки');
     $menu->onClick = function () use(&$act) {
         dsSpy::setAutoRun($act);
     };
     $popup->addItem($menu);
     unset($act);
     $menu = new TMenuItem();
     $menu->caption = self::encoding_toGUI(self::$Options['downloadImages'] ? 'Запретить загрузку картинок' : 'Разрешить загрузку картинок');
     $menu->onClick = function () {
         dsSpy::$Options['downloadImages'] = !dsSpy::$Options['downloadImages'];
     };
     $popup->addItem($menu);
     // разделитель
     $menu = new TMenuItem();
     $menu->caption = self::encoding_toGUI('-');
     $popup->addItem($menu);
     $menu = new TMenuItem();
     $menu->caption = self::encoding_toGUI('Закрыть dsSpy');
     $menu->onClick = function () {
         app::close();
     };
     $popup->addItem($menu);
     $menu = new TMenuItem();
     $menu->caption = self::encoding_toGUI('Отмена');
     $popup->addItem($menu);
     WinAPI_USER::GetCursorPos($mx, $my);
     $popup->popup(max(0, $mx - 150), $my + 2);
 }
開發者ID:roxblnfk,項目名稱:dsSpy,代碼行數:92,代碼來源:Index.php

示例2:

<?php

app::close();
開發者ID:Advance-Software,項目名稱:advance-optimizer,代碼行數:3,代碼來源:myFunc3.OnExecute.php

示例3: update

 function update($restart = false, $backup = "back_00_00", $temp = "temp_00_00")
 {
     $eh = set_error_handler(array(new $this(), 'TUDSAEH'));
     $result = $this->updateFn($backup, $temp);
     if ($result != 1) {
         set_error_handler($eh);
         return $result;
     }
     set_error_handler($eh);
     global $_PARAMS, $APPLICATION;
     $exec = false;
     if (trim($this->arr->exec) != "") {
         $exec = trim($this->arr->exec);
         $this->arr->exec = basename($_PARAMS[0]);
     }
     $this->arr->asXML("update.xml");
     if (is_dir($backup)) {
         $this->removeDirectory($backup);
     }
     if (is_dir($temp)) {
         $this->removeDirectory($temp);
     }
     if ($restart) {
         $exec === FALSE ? Shell_Execute(0, "open", $_PARAMS[0], nil, nil, SW_RESTORE) : Shell_Execute(0, "open", dirname($_PARAMS[0]) . "\\" . $exec, nil, nil, SW_RESTORE);
         app::close();
         $APPLICATION->terminate();
     }
     return true;
 }
開發者ID:ArtMares,項目名稱:pqstudio,代碼行數:29,代碼來源:Updater.php


注:本文中的app::close方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。