最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

C#保存树视图设置

SEO心得admin68浏览0评论
本文介绍了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是默认的处理方式: 加载: support.microsoft/kb/317597 [ ^ ] 用于从codeproject加载和保存: 将TreeView控件加载并保存到XML文件使用XmlTextWriter和XmlTextReader [ ^ ] msdn.microsoft/en-us/library/bb387089.aspx [ ^ ] msdn.microsoft/en-us/library/system.xml. xmldocument.aspx [ ^ ] Think XML is the default way to go: For loading: support.microsoft/kb/317597[^] For loading and saving from codeproject: Loading and Saving a TreeView control to an XML file using XmlTextWriter and XmlTextReader[^] msdn.microsoft/en-us/library/bb387089.aspx[^] msdn.microsoft/en-us/library/system.xml.xmldocument.aspx[^]

发布评论

评论列表(0)

  1. 暂无评论