Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to manage custom properties for a shape? (Read 1653 times)
vicmart69
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Aug 28th, 2009
How to manage custom properties for a shape?
Aug 28th, 2009 at 8:42pm
Print Post  
Hi,

I am using workflow to generate sequence of events, and those events will be stored in a database.

1) What is the best way to manage custom properties (ie: each shape will represent a specific activity with a server name, DB name....)

2) Is there a way to save the diagram along with these custom properties in a single shot? In readable format?

Thanks,

MA
« Last Edit: Aug 28th, 2009 at 11:48pm by vicmart69 »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to manage custom properties for a shape?
Reply #1 - Aug 30th, 2009 at 7:18am
Print Post  
Hi,

1) You could define a class that contain the custom properties, and assign its instances to the Tag property of items. This is useful if you need the same properties attached to several item types. If you need them for just one type of items, e.g. ShapeNode, you could derive from it and add new properties to the class declaration.

2) You might save it to XML by calling diagram.SaveToXml() or SaveToString(StringFormat.Xml). If the properties are stored as Tag values, handle the SerializeTag event to add custom Xml element to the node element.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
vicmart69
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Aug 28th, 2009
Re: How to manage custom properties for a shape?
Reply #2 - Aug 31st, 2009 at 3:48pm
Print Post  
Just like magic!!

Thanks.

MA
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint