Example #1
0
	/**
	* Constructor
	* 
	* @param self::Area|self::Bar|self::Column|self::Line|self::Pie|self::Scatter|self::Spline $type
	* @param integer $left
	* @param integer $top
	* @param mixed $width
	* @param mixed $height
	* @return Highcharts
	*/
	function __construct($type = self::Bar, $left=0, $top=0, $width=500, $height=300)
	{
		parent::Panel($left, $top, $width, $height);
//		$this->Strips = new ImplicitArrayList($this, 'AddStrip', 'RemoveStripAt', 'ClearStrips');
//		$this->Strips->InsertFunctionName = 'InsertStrip';
		$this->SetDefaults();
	}
Example #2
0
 /**
  * Constructor
  * 
  * @param self::Month|self::Week|self::BasicWeek|self::BasicDay|self::AgendaWeek|self::AgendaDay|array(types) $type
  * @param integer $left
  * @param integer $top
  * @param mixed $width
  * @param mixed $height
  * @return Highcharts
  */
 function __construct($type = self::Month, $left = 0, $top = 0, $width = 900, $height = 707)
 {
     parent::Panel($left, $top, $width, $height);
     $this->Events = new ImplicitArrayList($this, 'AddEvent', 'RemoveEventAt', 'ClearEvents');
     $this->SetDefaults();
     $this->SetType($type);
 }
Example #3
0
 function NOLOHBadge($left = 0, $top = 0, $textOnly = false, $showVersion = true)
 {
     parent::Panel($left, $top, null, null);
     $this->ToolTip = 'powered by NOLOH';
     $imagePath = GetRelativePath(dirname($_SERVER['SCRIPT_FILENAME']), dirname(__FILE__) . 'Images');
     if ($textOnly) {
         $poweredBy = new Link('http://www.noloh.com', 'powered by noloh');
         $poweredBy->Height = 18;
         $poweredBy->Width = 105;
         $poweredBy->CSSFontSize = '12px';
         $poweredBy->CSSFontFamily = 'helvetica, arial';
     } else {
         $link = new Image(GetRelativePath(dirname($_SERVER['SCRIPT_FILENAME']), dirname(__FILE__) . '/Images') . '/PoweredBy.png');
         $poweredBy = new Link('http://www.noloh.com', $link);
     }
     $poweredBy->Target = Link::Blank;
     $this->Controls->Add($poweredBy);
     if ($showVersion) {
         $this->Controls->Add($this->VersionLabel = new Label(GetNOLOHVersion(), $poweredBy->Right, 0));
         $this->VersionLabel->ReflectAxis('y');
         $this->VersionLabel->Color = '#011f43';
         $this->VersionLabel->CSSFontSize = '12px';
         $this->VersionLabel->CSSFontFamily = 'helvetica, arial';
     }
     $this->Height = $poweredBy->Height;
     $this->Width = $this->VersionLabel->Right;
 }
Example #4
0
	function __construct($left = 0, $top = 0, $width = 400, $height = 150)
	{
		parent::Panel($left, $top, $width, $height);
		$this->Controls->Add($comment = new TinyMCE('', 0, 0, $width, $height - 30));
		$this->Controls->Add(new Button('Save'))
			->Click = new ServerEvent($this, 'Save', $comment);
		$this->Controls->AllLayout = Layout::Relative;
	}
Example #5
0
 /**
  * Constructor
  * 
  * @param string $text
  * @param integer $left
  * @param integer $top
  * @param integer $width
  * @param integer $height
  * @return CKEditor
  */
 function CKEditor($text = '', $left = 0, $top = 0, $width = 400, $height = 500)
 {
     parent::Panel($left, $top, $width, $height);
     $this->TextHolder = new TextArea($text);
     $this->TextHolder->ParentId = $this->Id;
     $this->TextHolder->Visible = false;
     $this->Strips = new ImplicitArrayList($this, 'AddStrip', 'RemoveStrip', 'ClearStrips');
     $this->Strips->InsertFunctionName = 'InsertStrip';
     $this->SetDefaults();
 }
Example #6
0
	function ContentSlider($content=null, $left, $top, $width, $height)
	{
		parent::Panel($left, $top, $width, $height);
		WebPage::That()->CSSFiles->Add(GetRelativePath(getcwd(), dirname(__FILE__)) . '/Styles/default.css');
		$this->CSSClasses->Add('ContentSlider');
		$this->SlideHolder = new Panel(0, 0, '100%', '100%');
		$this->Slides = new Group();
		$this->Slides->Change = new ServerEvent($this, 'SlideContent');
		$this->SlideHolder->Controls->Add($this->Slides);
		if($content)
			$this->SetContent($content);
		$this->Controls->Add($this->SlideHolder);
		$this->SetPrevious();
		$this->SetNext();
	}
Example #7
0
 function Hangman($left, $top, $width, $height)
 {
     parent::Panel($left, $top, $width, $height);
     // A Group of RadioButtons allows only one RadioButton to be Checked
     $this->DifficultyGroup = new Group();
     /* Each of the next three lines adds a new RadioButton Control 
     		to the Group. A new Item is passed into the RadioButton so that  a 
     		certain Text will be displayed while the Value will correspond to the 
     		number of Chances that that difficulty allows.*/
     $this->DifficultyGroup->Add(new RadioButton(new Item('Easy game; you are allowed 10 misses.', 10), 15, 98, 300));
     $this->DifficultyGroup->Add(new RadioButton(new Item('Medium game; you are allowed 5 misses.', 5), 15, 121, 300));
     $this->DifficultyGroup->Add(new RadioButton(new Item('Hard game; you are only allowed 3 misses.', 3), 15, 144, 300));
     //Play button which starts the game
     $play = new Button('Play', 15, 169, 60);
     //Assign a Click Event to the play button
     $play->Click = new ServerEvent($this, 'PlayGame');
     //label to display HangMan instructions
     $explanation = new Label('This is the game of HangMan. You must guess a word or phrase, a letter at a time. If you make too many mistakes, you lose the game!', 15, 60, 620, 40);
     //AddRange allows you to add an multiple Control in a single statement
     $this->Controls->AddRange($explanation, $this->DifficultyGroup, $play);
 }