本文整理匯總了PHP中Button::Text方法的典型用法代碼示例。如果您正苦於以下問題:PHP Button::Text方法的具體用法?PHP Button::Text怎麽用?PHP Button::Text使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Button
的用法示例。
在下文中一共展示了Button::Text方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: InitButton
/**
* InitButton
*
* @param mixed $Name
* @param mixed $Group
* @param int $T
* @param int $L
* @param int $W
* @param int $H
* @param bool $BStyle
* @param string $Text
* @param int $Expire
* @access public
* @return void
*/
public function InitButton($Name, $Group, $T = 0, $L = 0, $W = 1, $H = 1, $BStyle = null, $Text = '', $Expire = 0)
{
$OldButton = ButtonManager::getButtonForKey($this->UCID, $Name);
if (get_class($OldButton) == 'Button') {
$Button = $OldButton;
} else {
$Button = new Button($this->UCID, $Name, $Group);
}
$Button->T($T)->L($L)->W($W)->H($H);
$Button->BStyle($BStyle);
if (is_array($Text)) {
$Button->Text($Text[0]);
$this->bTexts[$Name] = $Text;
} else {
$Button->Text($Text);
$this->bTexts[$Name][0] = $Text;
}
$Button->Send();
$this->bState[$Name]['ID'] = 0;
$this->bState[$Name]['timestamp'] = time() - 1;
$this->bState[$Name]['expire'] = -1;
$this->bState[$Name]['override'] = false;
if ($Expire > 0) {
$this->bState[$Name]['expire'] = time() + $Expire;
}
}
示例2: OSD
public function OSD($iUCID, $sPName, $sTime, $sΔ)
{
$bName = new Button($iUCID, 'PName', 'FOM');
$bName->L(40)->T(166)->W(40)->H(8);
$bName->BStyle |= ISB_DARK + ISB_RIGHT;
$bName->Text($sPName)->send();
$bTime = new Button($iUCID, 'STime', 'FOM');
$bTime->L(40)->T(174)->W(40)->H(8);
$bTime->BStyle |= ISB_DARK + ISB_RIGHT;
$bTime->Text($sTime)->send();
$bΔ = new Button($iUCID, 'Delta', 'FOM');
$bΔ->L(40)->T(182)->W(40)->H(8);
$bΔ->BStyle |= ISB_DARK + ISB_RIGHT;
$bΔ->Text($sΔ)->send();
$this->createTimer('OSR', 10, Timer::CLOSE, array($iUCID));
}