[英]Can I save a record in a Windows Gadget in a file or other storage (database, etc.)?
I'm planning to create a simple gadget to create a TO DO list application. 我打算创建一个简单的小工具来创建TO DO列表应用程序。 This is just for practice and to explore Windows Gadget .
这仅适用于练习和探索Windows小工具 。 How can I store the values in the database?
如何将值存储在数据库中? As much as possible, I don't want to set up a local http handler file to be a means to store value to file or database.
尽可能地,我不想将本地http处理程序文件设置为将值存储到文件或数据库的方法。
Note : I tag this with html and javascript since I'm aware it uses such. 注意 :我用html和javascript标记这个,因为我知道它使用了这个。
Once installed, gadgets run with all the permissions of the logged in user. 安装后,小工具将以登录用户的所有权限运行。 So you should be able to access the local file system and instantiate COM objects such as ADO to connect to a database.
因此,您应该能够访问本地文件系统并实例化COM对象(如ADO)以连接到数据库。
The chap here wrote a gadget settings persistence manager to allow gadgets to save their settings between being uninstalled and re-installed in the sidebar. 这里的小伙伴编写了一个小工具设置持久性管理器,允许小工具在侧边栏中卸载和重新安装之间保存设置。 He uses the
Scripting.FileSystemObject
to write out settings to a file: 他使用
Scripting.FileSystemObject
将设置写出到文件中:
http://channel9.msdn.com/playground/Sandbox/231595/
http://channel9.msdn.com/playground/Sandbox/231595/
This is also worthwhile reading to understand gadget security: 这也是值得阅读以了解小工具安全性:
http://msdn.microsoft.com/en-us/library/aa965881(VS.85).aspx
http://msdn.microsoft.com/en-us/library/aa965881(VS.85).aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.