128 return 'Type: separator';
145 global $bearsamppTools;
147 if ($title ===
null) {
148 $title = $bearsamppTools->getPowerShell()->getTabTitleDefault();
153 $pwsh = $bearsamppTools->getPowerShell()->getExe();
160 $psCommand =
'[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;' .
161 '[Console]::InputEncoding=[System.Text.Encoding]::UTF8;' .
162 '$Host.UI.RawUI.WindowTitle=\'' . $title .
'\';
';
164 if ($command !== null) {
165 $psCommand .= $command . ';
';
168 $psCommand .= '. \
'' . $profilePath .
'\'';
172 $params =
'-NoExit -NoProfile';
173 if ($initDir !==
null) {
174 $params .=
' -WorkingDirectory ""' . $initDir .
'""';
176 $params .=
' -Command ""' . $psCommand .
'""';
191 public static function getItemLink($caption, $link, $local =
false, $glyph = self::GLYPH_WEB_PAGE)
237 public static function getItemExe($caption, $exe, $glyph, $params =
null)
239 return 'Type: item; ' .
240 'Caption: "' . $caption .
'"; ' .
242 'FileName: "' . $exe .
'"; ' .
243 (!empty($params) ?
'Parameters: "' . $params .
'"; ' :
'') .
257 return 'Type: item; ' .
258 'Caption: "' . $caption .
'"; ' .
259 'Action: shellexecute; ' .
260 'FileName: "' . $path .
'"; ' .
261 'Glyph: ' . self::GLYPH_FOLDER_OPEN;
276 $result =
'Action: ' . $action;
278 if ($service !=
null) {
279 $result =
'Action: service; ' .
280 'Service: ' . $service .
'; ' .
281 'ServiceAction: ' . $action;
286 if ($action == self::SERVICE_START) {
288 '; Glyph: ' . self::GLYPH_START;
289 } elseif ($action == self::SERVICE_STOP) {
291 '; Glyph: ' . self::GLYPH_STOP;
292 } elseif ($action == self::SERVICE_RESTART) {
294 '; Glyph: ' . self::GLYPH_RELOAD;
296 } elseif ($action != self::SERVICES_CLOSE) {
297 $result .=
'; Flags: ignoreerrors waituntilterminated';
404 return '[Messages]' . PHP_EOL .
419 return '[Config]' . PHP_EOL .
420 'ImageList=' . self::IMG_GLYPH_SPRITES . PHP_EOL .
421 'ServiceCheckInterval=1' . PHP_EOL .
422 'TrayIconAllRunning=' . self::GLYPH_SERVICE_ALL_RUNNING . PHP_EOL .
423 'TrayIconSomeRunning=' . self::GLYPH_SERVICE_SOME_RUNNING . PHP_EOL .
424 'TrayIconNoneRunning=' . self::GLYPH_SERVICE_NONE_RUNNING . PHP_EOL .
425 'ID={' . strtolower(
APP_TITLE) .
'}' . PHP_EOL .
427 'AboutVersion=Version ' .
$bearsamppCore->getAppVersion() . PHP_EOL;
437 return '[Menu.Right.Settings]' . PHP_EOL .
438 'BarVisible=no' . PHP_EOL .
439 'SeparatorsAlignment=center' . PHP_EOL .
440 'SeparatorsFade=yes' . PHP_EOL .
441 'SeparatorsFadeColor=clBtnShadow' . PHP_EOL .
442 'SeparatorsFlatLines=yes' . PHP_EOL .
443 'SeparatorsGradientEnd=clSilver' . PHP_EOL .
444 'SeparatorsGradientStart=clGray' . PHP_EOL .
445 'SeparatorsGradientStyle=horizontal' . PHP_EOL .
446 'SeparatorsSeparatorStyle=shortline' . PHP_EOL;
458 return '[Menu.Left.Settings]' . PHP_EOL .
459 'AutoLineReduction=no' . PHP_EOL .
460 'BarVisible=yes' . PHP_EOL .
461 'BarCaptionAlignment=bottom' . PHP_EOL .
462 'BarCaptionCaption=' . $caption . PHP_EOL .
463 'BarCaptionDepth=1' . PHP_EOL .
464 'BarCaptionDirection=downtoup' . PHP_EOL .
465 'BarCaptionFont=Tahoma,14,clWhite' . PHP_EOL .
466 'BarCaptionHighlightColor=clNone' . PHP_EOL .
467 'BarCaptionOffsetY=0' . PHP_EOL .
468 'BarCaptionShadowColor=clNone' . PHP_EOL .
469 'BarPictureHorzAlignment=center' . PHP_EOL .
470 'BarPictureOffsetX=0' . PHP_EOL .
471 'BarPictureOffsetY=0' . PHP_EOL .
472 'BarPicturePicture=' . self::IMG_BAR_PICTURE . PHP_EOL .
473 'BarPictureTransparent=yes' . PHP_EOL .
474 'BarPictureVertAlignment=bottom' . PHP_EOL .
475 'BarBorder=clNone' . PHP_EOL .
476 'BarGradientEnd=$00c07840' . PHP_EOL .
477 'BarGradientStart=$00c07840' . PHP_EOL .
478 'BarGradientStyle=horizontal' . PHP_EOL .
479 'BarSide=left' . PHP_EOL .
480 'BarSpace=0' . PHP_EOL .
481 'BarWidth=32' . PHP_EOL .
482 'SeparatorsAlignment=center' . PHP_EOL .
483 'SeparatorsFade=yes' . PHP_EOL .
484 'SeparatorsFadeColor=clBtnShadow' . PHP_EOL .
485 'SeparatorsFlatLines=yes' . PHP_EOL .
486 'SeparatorsFont=Arial,8,clWhite,bold' . PHP_EOL .
487 'SeparatorsGradientEnd=$00FFAA55' . PHP_EOL .
488 'SeparatorsGradientStart=$00550000' . PHP_EOL .
489 'SeparatorsGradientStyle=horizontal' . PHP_EOL .
490 'SeparatorsSeparatorStyle=caption' . PHP_EOL;
const MENU_RESTART_SERVICE
static getLocalUrl($request=null)
static formatWindowsPath($path)
static getActionService($service, $action, $item=false)
static getActionServiceStop($service)
const GLYPH_SERVICE_SOME_RUNNING
static getItemPowerShell($caption, $glyph, $id=null, $title=null, $initDir=null, $command=null)
static getItemExe($caption, $exe, $glyph, $params=null)
const GLYPH_SERVICE_NONE_RUNNING
static getSectionConfig()
const GLYPH_SERVICES_STOP
const GLYPH_FOLDER_DISABLED
const GLYPH_SERVICES_RESTART
const GLYPH_SERVICE_REMOVE
static getItemActionServicesClose()
static getGlyphFlah($lang)
static getActionServiceStart($service)
const GLYPH_FOLDER_ENABLED
static getSectionMessages()
static getItemActionServiceStop($service)
const GLYPH_SERVICES_START
const GLYPH_SERVICE_ALL_RUNNING
static getActionServiceRestart($service)
static getSectionMenuLeftSettings($caption)
static getItemExplore($caption, $path)
const GLYPH_SERVICE_INSTALL
static getItemLink($caption, $link, $local=false, $glyph=self::GLYPH_WEB_PAGE)
static getItemNotepad($caption, $path)
static getSectionMenuRightSettings()
const GLYPH_SSL_CERTIFICATE
static getActionServicesClose()
static getItemActionServiceStart($service)
static getItemSeparator()
static getItemActionServiceRestart($service)
if( $raw) foreach($opts as $opt) if( $store_system_config) if($store_user_config) $command