Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic About Print WF datas (Read 2337 times)
Rajan
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Jun 1st, 2009
About Print WF datas
Jun 1st, 2009 at 9:58am
Print Post  
Hi Friends,
   I want to know about -- 
"How do print the WF Property window Properties after start the WF Process?"
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: About Print WF datas
Reply #1 - Jun 1st, 2009 at 10:23am
Print Post  
Are you using our diagramming control? There is no builtin feature to print items properties, but you could create and print a temporary diagram that displays a single TableNode, with the property names in the left column and the property values in the right column. To get all properties and their values for an item, call TypeDescriptor.GetProperties(item) and loop over the returned collection of PropertyDescriptor objects. PropertyDescriptor.Name gives you the property name, and PropertyDescriptor.GetValue() returns its value.

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


I love YaBB 1G - SP1!

Posts: 3
Joined: Jun 1st, 2009
Re: About Print WF datas
Reply #2 - Jun 2nd, 2009 at 7:30am
Print Post  
Hi Stoyan Smiley
    Thanks for ur help. i am new to this WF area and C#. can u send the Print syntax for this. I understand store and retrieve the data from the object. But i can't print that.

Thanks & Regards
Rajan.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: About Print WF datas
Reply #3 - Jun 2nd, 2009 at 12:01pm
Print Post  
Try this

Code
Select All
TableNode table = CreatePropertyTable(diagram.RoutingOptions, "Routing properties");
diagram.Nodes.Add(table);
table.ResizeToFitText(false);
diagram.PrintPreview();

private TableNode CreatePropertyTable(object o, string caption)
{
	TableNode table = new TableNode();
	table.Caption = caption;
	table.RedimTable(2, 0);

	var properties = TypeDescriptor.GetProperties(o);
	foreach (PropertyDescriptor property in properties)
	{
		int r = table.AddRow();
		table[0, r].Text = property.Name;

		object value = property.GetValue(o);
		table[1, r].Text = value != null ? value.ToString() : "null";
	}

	return table;
}
 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint