Silverlight 4、浏览器外、打印、自动更新
我目前有一个非常重要的业务应用程序正在使用 Winforms 运行。
该应用程序是一个非常核心的 UI shell。它接受输入数据,调用服务器上的 Web 服务进行计算,在 winforms 应用程序上显示结果,最后将打印流发送到打印机。
目前,该应用程序是使用 Click-once 进行部署的。
展望未来,我正在尝试考虑是否应该将应用程序迁移到 Silverlight 应用程序中。我考虑 silverlight 的原因有几个。
- 让客户感觉这是一个基于云的解决方案。
- 可以从任何 PC 访问。虽然 clickonce 应用程序也能够执行此操作,但他们必须安装应用程序,并且当有可用更新时,他们必须单击“是”才能更新。
- 该应用程序目前有一个客户下拉列表,该列表已扩展到 3000 多条记录。滚动列表是非常痛苦的。对于 Silverlight,我想到的是自动完成功能。
- 在浏览器之外 - 这对于那些每天使用该应用程序的用户来说会很方便。
我以前没有使用过 Silverlight,因此在以下几件事上寻求一些专家建议:
- 打印 - silverlight 是否允许将原始打印数据发送到打印机。该应用程序打印到 Zebra 热敏标签打印机。我必须使用命令将原始字节发送到打印机。这可以用 SL 来完成吗,还是总是提示“打印”对话框?
- 浏览器外 - 当 SL 应用程序在浏览器外安装时,如何进行更新,应用程序是自动更新还是提示用户选择更新?
I have a very critial business application presently running using Winforms.
The application is a very core UI shell. It accepts input data, calls a webservice on my server to do the computation, displays the results on the winforms app and finally send a print stream to the printer.
Presently the application is deployed using Click-once.
Moving forward, I am trying to contemplate wheather I should move the application into a Silverlight application. Couple of reasons I am thinking silverlight.
- Gives clients the feel that it is a cloud based solution.
- Can be accessed from any PC. While the clickonce app is able to do this as well, they have to install an app, and when updates are available they have to click "Yes" to update.
- The application presently has a drop down list of customers, this list has expanded to over 3000 records. Scrolling through the list is very painful. With Silverlight I am thinking of the auto complete ability.
- Out of the browser - this will be handy for those users who use the app daily.
I haven't used Silverlight previous hence looking for some expert advice on a few things:
- Printing - does silverlight allow sending raw print data to the printer. The application prints to a Zebra Thermal label printer. I have to send raw bytes to the printer with the commands. Can this be done with SL, or will it always prompt the "Print" dialog?
- Out of browser - when SL apps are installed as out of browser, how to updates come through, does the app update automatically or is the user prompted to opt for update?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
打印——使用 PrintDocument API,系统将提示您的用户输入打印对话框。目前使用该 API 没有办法抑制这种情况。对于大容量热环境(如药房、运输仓库等)来说,它并不理想。您可以使用受信任的应用程序模式并查看COM并使用打印机执行您想要的任何操作。
当应用程序请求时,更新就会发生。有一个 API 可供使用,一旦调用,如果存在更新,就会下载该更新 - 不会向用户提示作为选项。如果发现更新,您可以提醒用户重新启动,或者在下次重新启动时他们将拥有更新的应用程序。
Printing -- using the PrintDocument API your user will be prompted for a print dialog. Currently using that API there is no way to suppress this. It isn't ideal for high-volume thermal situations (like pharmacies, shipping warehouses, etc.). You could use the trusted application mode and peek out into COM and do whatever you want with the printer.
The update happens when the application asks for it. There is an API to use and, once called, if an update exists it is downloaded -- no prompt to the user as an option. If an update is found you can alert the user to restart or that on the next restart they will have the updated application.
自动完成并不是只能在 Silverlight 中完成的事情。您的 ClickOnce 应用程序已脱离浏览器。通过原始字节打印到热敏打印机在 Silverlight 中不容易实现。
并不是想听起来消极,但总而言之,听起来你最好只是致力于增强你已有的应用程序。
Autocomplete is not something that can only be done in Silverlight. Your ClickOnce app is already out-of-browser. And printing via raw bytes to a thermal printer is something that would not be easily engineered in Silverlight.
Not trying to sound negative, but in sum it sounds like you're better off simply working on enhancing the app that you already have.