使用文本文件设置Windows应用程序 [英] Setup windows application with text files

查看:75
本文介绍了使用文本文件设置Windows应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,我在安装项目后使用文本文件作为数据库(windows应用程序)

c:programfiles / projectname / bin / debug /,用户可以看到文本文件

用于数据保护的文本文件没有显示给客户端



有没有办法将textfile转换成.dll文件

可以任意一个帮助我。

in my project i am using text files as database (windows application) after setup project
c:programfiles/projectname/bin/debug/in that text files are visible to user
for data protection text files are not show to client

is there any way to textfile convert into .dll file
can any one help me.

推荐答案

我建​​议加密数据;但是,既然你说它只是词汇单词,你可以使文件成为二进制文件,如果用户删除它,你的程序将无法正常工作。这就是Microsoft Office的工作方式,所以我不认为这是一个问题。
I would recommend encrypting the data; however, since you said it is just vocab words you can make the file a binary file and if the user deletes it, your program won't work. That's how Microsoft Office works so I don't see that as being an issue.


您可以使用文件系统属性隐藏。有办法查看隐藏文件,但需要花费一些力气。我不知道隐藏文件的方法,所以没有人能看到它。



参见 File.SetAttributes [ ^ ]



You could use the file system attribute "Hidden". There are ways to see hidden files but it takes a bit of effort. I don't know of a way to hide a file so no one can see it.

See File.SetAttributes[^]

File.SetAttributes(path, File.GetAttributes(path) | FileAttributes.Hidden);


我想谈谈在Solution1中暗示的解决方案:使用数据库。我建议 SQLite 。这是非常简单的基于文件的数据库。最大的好处是它可以确保数据的完整性。当然,您正在使用强大的SQL来访问和操作数据。我认为这比仅仅设置文件要好得多。试一试。
I want to talk a little bit more about solution hinted in Solution1: use the database. I would suggest SQLite. This is very simple file based database. Big advantage is that it will ensure integrity of your data. And of course you are getting powerful SQL to access and manipulate data. I think this is much better than just set of files. Give it a try.


这篇关于使用文本文件设置Windows应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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