小刀人
-No business too small, no problem too big.
<2007年4月>
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345
公告
  • Learn,Think,and Imagine...

    正在看的书:

    点击发送消息给我

留言簿(6)

随笔分类

随笔档案

文章档案

相册

CSDN

VC知识库

开发站点

技术blog

搜索

最新评论

  • 1. purchase xanax
  • Some editors are failed writers, but so are most writers.
  • --purchase xanax
  • 2. neomwvbl
  • --neomwvbl
  • 3. order xanax
  • Think of yourself as an incandescent power, illuminated and perhaps forever talked to by God and his messengers.
  • --order xanax
  • 4. cialis for
  • It is your work in life that is the ultimate seduction.
  • --cialis for
  • 5. ffysegxg
  • --ffysegxg
  • 6. ammonation
  • God is a comedian playing to an audience too afraid to laugh.
  • --ammonation
  • 7. dyed
  • That would be a good thing for them to cut on my tombstone: Wherever she went, including here, it was against her better judgment.
  • --dyed
  • 8. ebullioscopic
  • We are made to persist. That's how we find out who we are.
  • --ebullioscopic
  • 9. keppra
  • They are ill discoverers that think there is no land, when they can see nothing but sea.
  • --keppra
  • 10. ampicillin
  • Any transition serious enough to alter your definition of self will require not just small adjustments in your way of living and thinking but a full-on metamorphosis.
  • --ampicillin
  • 11. reglan
  • The most erroneous stories are those we think we know best - and therefore never scrutinize or question.
  • --reglan
  • 12. oryxbxoc
  • --oryxbxoc
  • 13. linnaeite
  • In America, they want you to accomplish these great feats, to pull off these David Copperfield-type stunts. You want me to be great, but you don't ever want me to say I'm great?
  • --linnaeite
  • 14. humungous
  • --humungous
  • 15. doxycycline hyclate
  • There are sadistic scientists who hurry to hunt down errors instead of establishing the truth.
  • --doxycycline hyclate
  • 16. cephalexin 500mg hypermedia argyrophil
  • It is not enough to aim; you must hit.
  • --cephalexin 500mg hypermedia argyrophil
  • 17. female viagra
  • Good judgment comes from experience, and experience comes from bad judgment.
  • --female viagra
  • 18. sjkovbbg
  • --sjkovbbg
  • 19. datapath
  • We don't know a millionth of one percent about anything.
  • --datapath
  • 20. verticilliose
  • All truth passes through three stages. First, it is ridiculed. Second, it is violently opposed. Third, it is accepted as being self-evident.
  • --verticilliose

阅读排行榜

评论排行榜

 
VC知识库BLOG   首页  新随笔  联系  聚合  登录 
  随笔-23 文章-0 评论-184 Trackbacks-0

软件是用户使用的,我觉得一个软件如果没有提供用户修改配置的功能是不完善的,也不够人性化。以下是我收集到的一些保存用户配置(由用户设置系统属性)的方法:

1、读取ini文件,这是一个老当益壮的方法。使用的方法可以参见:如何在C#中读写INI文件
http://www.vckbase.com/document/viewdoc/?id=1001#cppqa3
代码http://www.vckbase.com/code/listcode.asp?mclsid=15&sclsid=1509

2、用注册表,http://www.vckbase.com/document/viewdoc/?id=442,修改注册表一般不受绿色软件支持者的欢迎;

3、定制自己的数据文件包括使用数据库。如果软件本身就使用数据库,那么在数据库里加上一张用户属性设置表并且读写它都将是比较容易的事情了。访问数据库不是一件很难的事情,比较容易实现,参考资料比比皆是。

4、Paul DiLascia在回答问题“我正在用 C# 在 Microsoft .NET Framework 和 Windows Forms 下创建一个基于 Windows 的应用。我正尝试记下窗口的位置,使它每次打开时都能记起它前一次的位置。在.NET Framework 中有没有特殊的方法可用?我可以用配置文件吗?”时说:“.NET Framework 支持配置文件的概念,它是用 XML 文件来保存应用程序配置信息的,但是这并不是你真正想 要的答案。配置文件是给管理员用来设置你的应用程序的,而不是给用户保存设置的。”但是我却找到了反证啊,参见《VB.NET中建立动态属性和保存属性设置》。关键是*.exe.config为可执行的应用(包括控制台、Windows服务、Windows桌面应用程序)提供配置信息的,该文的“建立新的动态属性”部分讲述了通过读写这个配置文件保存用户设置的动态属性值,并在下次打开时应用。Paul DiLascia应该不是不知道这个方法,可能是他觉得保存这些简单的属性值,最好不要用这个方法吧。

还有什么方法呢,大家尽可以补充......

posted on 2005-11-30 21:47 小刀人 阅读(8521) 评论(6)  编辑 收藏
Comments
  • # to 小刀人 //re: 保存用户配置的方法收集
    一笑
    Posted @ 2005-11-30 22:08
    就用文本文件,每个数值见用tab分割,列为字段,行为数据行——就是一个平面数据库!^_^  比如linux下的fstab ~
  • # re: 保存用户配置的方法收集
    freedk
    Posted @ 2005-11-30 22:53
    用文本文件,用"|"分开,这样也好将文本以后导到informix数据库中.....
  • # re: 保存用户配置的方法收集
    kingesoft
    Posted @ 2005-12-01 10:01
    我原来用自定义的数据格式,现在用xml
  • # re: 保存用户配置的方法收集
    小刀人
    Posted @ 2005-12-01 12:16
    config文件其实是xml,ini文件也可视为一种文本文件,呵呵。
  • # re: 保存用户配置的方法收集
    Abbey
    Posted @ 2007-03-13 22:12
    我用XML文件,格式基本就仿INI
  • # re: 保存用户配置的方法收集
    codeArt
    Posted @ 2007-04-14 12:28
    XML文件比较好些,配置组件尤其方便
标题  
姓名  
主页
验证码 *
内容   
  登录  使用高级评论  Top
[使用Ctrl+Enter键可以直接提交]