简体   繁体   English

我可以将Windows Gadget中的记录保存在文件或其他存储(数据库等)中吗?

[英]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.

相关问题 如何在销毁前保存 tinyMCE 的内容? (关闭标签,导航等) - How can I save the content of tinyMCE before destruction? (close tab, navigate etc.) 如何使用scrollTo,scrollTop等在javascript中指定像素以外的单位? - How can I specify units other than pixels in javascript using scrollTo, scrollTop etc.? 如果可以将文件路径保存在数据库中并将实际文件保存在存储中,为什么还要使用Blob? - Why to use Blob at all if I can save file pathes in database and actual files in storage? 是否可以使用javascript在特定目录中保存诸如.swf,.mp3,.txt等文件,而无需“另存为”提示? - Is it possible to save a file such as .swf, .mp3, .txt, etc. without the “save as” prompt using javascript in a specific directory? 如何将输入类型文件数组保存在存储位置? - How can I save the array of input type file in storage location? 从Windows小工具读取文件内容 - Reading file contents from Windows gadget 我需要创建Windows 7小工具的帮助 - I need help creating a Windows 7 Gadget 如何在IE,FF,Chrome等上可靠地设置类attr w / JavaScript? - How can I reliably set the class attr w/JavaScript on IE, FF, Chrome, etc.? 如何更改javascript计算的字体,颜色,大小等? - How can I change the font, colour, size etc. of a javascript calculation? 如何通过 devtools(chrome、Edge 等)查看 JavaScript 使用的内存中的哪些变量? - How can I see which variables are specifically in memory used by JavaScript through devtools (chrome, Edge, etc.)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM