Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to customize the save file? (Read 1962 times)
Gu Wenwei
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 49
Joined: May 2nd, 2017
How to customize the save file?
Dec 29th, 2017 at 1:33pm
Print Post  
A part of a custom savefile
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: How to customize the save file?
Reply #1 - Jan 2nd, 2018 at 9:28am
Print Post  
If using binary format, you could call Diagram.SaveToStream method to store the diagram as part of your own file. Alternatively store your data as a serializable Diagram.Tag object and SaveToFile will save it as part of the diagram file.

If using XML format, you could call Diagram.SaveToXml (XmlDocument) to save the diagram in an in-memory document, and then either move the root element to your own document, or add your own elements to the diagram's document.

Another option is to make your files zip archives and store diagrams' and your custom data separately inside.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Gu Wenwei
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 49
Joined: May 2nd, 2017
Re: How to customize the save file?
Reply #2 - Jan 3rd, 2018 at 12:29pm
Print Post  
THX;
now, i use SaveToString (SaveToStringFormat.Base64),  then process the string
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint