Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic the tag property for xml.writer (Read 1198 times)
alexdoan
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Jun 16th, 2006
the tag property for xml.writer
Jul 2nd, 2006 at 10:30am
Print Post  
I need a vb.net example how to serialize and deserialize the tag property.

I am having problems because the serialize and deserialize is not firing.

i added:

AddHandler writer.SerializeTag, AddressOf writer_SerializeTag

but the writer is not firing this event.

please give me code example
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: the tag property for xml.writer
Reply #1 - Jul 3rd, 2006 at 5:40am
Print Post  
The event if fired only if some item's Tag is set, e.g.:

Private Sub fc_InitializeBox(ByVal sender As Object, ByVal e As MindFusion.FlowChartX.BoxEventArgs) Handles fc.InitializeBox
e.Box.Tag = fc.Boxes.Count
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim xw As New XmlWriter(fc)
AddHandler xw.SerializeTag, AddressOf WriteTag
xw.Options.CustomTagSerialization = False
xw.Write("C:\test.xml")
End Sub

Private Sub WriteTag(ByVal sender As Object, ByVal e As MindFusion.FlowChartX.Xml.SerializeTagArgs)
If TypeOf e.Object Is Box Then
Dim b As Box = e.Object
e.Representation = b.Tag.ToString()
End If
End Sub

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