Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic About Serialize Node's Tag (Read 1598 times)
linzfeng
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Jun 21st, 2010
About Serialize Node's Tag
Jun 21st, 2010 at 4:18am
Print Post  
I use SaveToString(SaveToStringFormat.Xml) to Save my diagram. I want to serialize node's tag. I realize event SerializeTag. In this event  I Use e.Representation.SetAttributeValue("Prop", value) to set the value. But the result of SaveToString has no node's Tag string. Below is my event code,  is there any wrong?
My event code:
if (e.Tag is UIActivity)
           {
               UIActivity activity = e.Tag as UIActivity;

               e.Representation.SetAttributeValue("ActivityId", activity.ActivityGuid);
               e.Representation.SetAttributeValue("Name", activity.Name);
               e.Representation.SetAttributeValue("ActivityType", Convert.ToInt32(activity.ActivityType));
               e.Representation.SetAttributeValue("SignType", Convert.ToInt32(activity.SignType));
               e.Representation.SetAttributeValue("ActivityDisplayName", activity.Name);
               e.Representation.SetAttributeValue("ForceTurnNext", Convert.ToInt32(activity.ForceTurnNext));
               e.Representation.SetAttributeValue("AutoSelectUserType", Convert.ToInt32(activity.AutoSelectUserType));
               e.Representation.SetAttributeValue("ActivityAuditYesType", Convert.ToInt32(activity.ActivityAuditYesType));
               e.Representation.SetAttributeValue("AuditYesNumPercent", Convert.ToInt32(activity.AuditYesNumPercent));
               e.Representation.SetAttributeValue("ActivityDescription", activity.Description);
           }
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: About Serialize Node's Tag
Reply #1 - Jun 21st, 2010 at 7:30am
Print Post  
Try adding this to the event handler:

e.Handled = true

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


I love YaBB 1G - SP1!

Posts: 3
Joined: Jun 21st, 2010
Re: About Serialize Node's Tag
Reply #2 - Jun 21st, 2010 at 8:37am
Print Post  
It work, thank you very much.
Stoyo wrote on Jun 21st, 2010 at 7:30am:
Try adding this to the event handler:

e.Handled = true

I hope that helps,
Stoyan

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