From d202492e4ad31c4127b4b459b300de7cd1976c1b Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 13 Jan 2006 04:33:09 +0000 Subject: Added documentation. --- demos/composer/protected/pages/Home.page | 51 +++++++++++++++++++++++++------- demos/composer/protected/pages/Home.php | 28 ++++++++++++++++-- 2 files changed, 67 insertions(+), 12 deletions(-) (limited to 'demos/composer') diff --git a/demos/composer/protected/pages/Home.page b/demos/composer/protected/pages/Home.page index 65391bd5..e7d7eea0 100644 --- a/demos/composer/protected/pages/Home.page +++ b/demos/composer/protected/pages/Home.page @@ -14,6 +14,9 @@ implements + + + @@ -24,7 +27,12 @@ implements - + + + +
NameComments Actions
+ + @@ -58,29 +66,49 @@ implements Parent->DataItem->Comments %> CssClass="slTextBox"/> - Parent->ItemIndex %> /> - Parent->ItemIndex %> /> + CommandParameter=<%# $this->Parent->ItemIndex %> + /> + Parent->ItemIndex %> + Enabled=<%# $this->Parent->ItemIndex > 0%> + /> + Parent->ItemIndex %> + Enabled=<%# $this->Parent->ItemIndex < $this->Page->ClassDefinition->Properties->Count-1 %> + /> +
- + + +
+ + + - + + + +
Name Comments Actions
+ + @@ -101,8 +129,11 @@ implements +
- + + +

diff --git a/demos/composer/protected/pages/Home.php b/demos/composer/protected/pages/Home.php index ddeeb2fe..10e86582 100644 --- a/demos/composer/protected/pages/Home.php +++ b/demos/composer/protected/pages/Home.php @@ -28,6 +28,7 @@ class Home extends TPage protected function refresh() { $this->PropertyList->DataSource=$this->ClassDefinition->Properties; + $this->EventList->DataSource=$this->ClassDefinition->Events; $this->dataBind(); } @@ -37,10 +38,26 @@ class Home extends TPage { $this->ClassDefinition->Properties->removeAt($param->CommandParameter); } - else if($param->CommandName==='add') + else if($param->CommandName==='up') { - $this->ClassDefinition->Properties->insert($param->CommandParameter+1,new PropertyDefinition); + //$this->ClassDefinition->Properties->insert($param->CommandParameter+1,new PropertyDefinition); } + else if($param->CommandName==='down') + { + //$this->ClassDefinition->Properties->insert($param->CommandParameter+1,new PropertyDefinition); + } + $this->refresh(); + } + + public function addProperty($sender,$param) + { + $this->ClassDefinition->Properties->add(new PropertyDefinition); + $this->refresh(); + } + + public function addEvent($sender,$param) + { + $this->ClassDefinition->Events->add(new EventDefinition); $this->refresh(); } @@ -70,6 +87,13 @@ class Home extends TPage $property->Storage=$item->Storage->Text; $def->Properties[]=$property; } + foreach($this->EventList->Items as $item) + { + $event=new EventDefinition; + $event->Name=$item->EventName->Text; + $event->Comments=$item->Comments->Text; + $def->Events[]=$event; + } } } -- cgit v1.2.3