C#保存树视图设置 [英] C# save treeview settings

查看:54
本文介绍了C#保存树视图设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道必须保存一个normel字符串并从设置区域中的用户settikngs加载它,但是我不知道如何在树视图中保存设置,不给任何人任何链接或快速示例代码,我可以离开,我希望它能够保存所有节点以及具有名称的子节点和根节点

I know have to save a normel string and load it from the user settikngs in the settings area, but I don''t know how to save the settings in a treeview, dose anyone have any links or a quick example codede that i can go off, i want it to be able to save all the nodes and the children and root''s with there names

推荐答案

我不知道是否可以序列化,或者是否需要构建自己的格式,然后以该格式保存/加载数据.我认为编写自己的代码来存储设置(例如XML)将是最简单的.
I don''t know if you can serialise this, or if you need to build your own format, and save/load the data in that format. I would think that writing your own code to store the settings, say as XML, would be easiest.


认为XML是默认的处理方式:

加载:
http://support.microsoft.com/kb/317597 [将TreeView控件加载并保存到XML文件使用XmlTextWriter和XmlTextReader [ ^ ]


http://msdn.microsoft.com/en-us/library/bb387089.aspx [ ^ ]

http://msdn.microsoft.com/en-us/library/system.xml. xmldocument.aspx [ ^ ]
Think XML is the default way to go:

For loading:
http://support.microsoft.com/kb/317597[^]

For loading and saving from codeproject:
Loading and Saving a TreeView control to an XML file using XmlTextWriter and XmlTextReader[^]


http://msdn.microsoft.com/en-us/library/bb387089.aspx[^]

http://msdn.microsoft.com/en-us/library/system.xml.xmldocument.aspx[^]


这篇关于C#保存树视图设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆