Page 1 of 1
Serialize And Deserialize Stitext
Posted: Thu Apr 12, 2012 8:26 am
by Eng.MAMB
I need save some stitext properties separate than stireport
I used stitext.Serialize Function To save properties in XML File
And
I used stitext.Deserialize to Load properties values from XML File
But the properties is not loaded from XML
I this link file to show my work
and I hope to knew the correct way to save all properties from / to stitext
Thanks
Serialize And Deserialize Stitext
Posted: Fri Apr 13, 2012 8:46 am
by HighAley
Hello.
[quote="Eng".MAMB]I need save some stitext properties separate than stireport
I used stitext.Serialize Function To save properties in XML File
And
I used stitext.Deserialize to Load properties values from XML File
But the properties is not loaded from XML
I this link file to show my work
and I hope to knew the correct way to save all properties from / to stitext[/quote]
There is no any link in your message.
Please, send us your code for analysis.
Thank you.
Serialize And Deserialize Stitext
Posted: Sat Apr 14, 2012 2:39 am
by Eng.MAMB
Serialize And Deserialize Stitext
Posted: Tue Apr 17, 2012 7:36 am
by HighAley
Hello.
Sorry for the delay with response. We need some additional time to prepare the answer for you.
Thank you.
Serialize And Deserialize Stitext
Posted: Wed May 16, 2012 6:46 pm
by Ivan
Hello,
Please modify your code:
Code: Select all
Public Con As New StiReportObjectStringConverter()
Private Sub ButSerializ_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButSerializ.Click
If SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim X As New XmlTextWriter(SaveFileDialog1.FileName, System.Text.Encoding.Default)
X.WriteStartElement("item1")
SText.Serialize(Con, X)
X.WriteEndElement()
X.Flush()
X.Close()
End If
End Sub
Private Sub ButDeSerializ_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButDeSerializ.Click
Dim NText As New StiText
If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim x As New XmlTextReader(OpenFileDialog1.FileName)
x.Read()
NText.Deserialize(Con, x)
End If
Me.PropertyGrid1.SelectedObject = NText
Me.Label2.Text = NText.Name
End Sub
Thank you.