保存对话框并检索它 [英] Save dialog Box and retrive it

查看:74
本文介绍了保存对话框并检索它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


需要帮助.我可以保存此List控件并在以后检索吗?这样我就不必在可编辑列和组合框列中再次输入所有值.

在此先谢谢您.

Hi,
Need help..Can I save this List control and retrive it later ? so that i don''t have to enter all values again in editable column and in combobox column.

Thanks in advance.

推荐答案

网上有很多示例.基本上,您需要两种功能:一种将控件的当前内容序列化为XML文件,另一种通过反序列化文件来加载控件.您可以使用将控件作为参数的单独方法,也可以通过将控件子类化来实现此目的.

这是一种常见的技术,因此网络上有很多示例,比我快速给出的示例要好.它非常简单,但是确实需要一些有关XML以及如何读写XML文件的知识.
There are a lot of examples of how to do this on the web. Basically, you need two functions: one that serializes the current contents of the control to an XML file, and one that loads the control by deserializing the file. You can do this either with separate methods that take the control as a parameter or by subclassing the control.

It is a common technique, so there are lots of examples on the web, better than I could offer in a quick answer. It''s pretty straightforward, but does require a bit of knowledge about XML and how to read and write XML files.


这篇关于保存对话框并检索它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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