summaryrefslogtreecommitdiff
path: root/demos/composer/protected/pages/Home.php
diff options
context:
space:
mode:
authorxue <>2006-01-13 04:33:09 +0000
committerxue <>2006-01-13 04:33:09 +0000
commitd202492e4ad31c4127b4b459b300de7cd1976c1b (patch)
tree1d8be599d532c0607a2cd2ec6f388e14a672c157 /demos/composer/protected/pages/Home.php
parent41c22e5708904d20362bdd987567fb5f074f07d0 (diff)
Added documentation.
Diffstat (limited to 'demos/composer/protected/pages/Home.php')
-rw-r--r--demos/composer/protected/pages/Home.php28
1 files changed, 26 insertions, 2 deletions
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;
+ }
}
}