Silverlight 更新功能,这感觉非常错误。 ReportProgress 或 CheckForUpdate() 和 Update() 之间的分离在哪里

发布于 2024-10-05 03:27:26 字数 355 浏览 2 评论 0原文

我创建了一个业务线“浏览器外应用程序”。

我需要对更新过程进行更多控制。

我想在更新下载开始后启动时启动更新屏幕,并停用应用程序。但据我所知,我无法判断工人是否正在进行中。如果 ReportProgress 可用或类似的东西就好了。也许有,但我完全想念它。如果我可以根据下载的字节数制作进度条,那就太好了。

现在,我可以像这样远程执行任何操作的唯一方法是等待几秒钟,如果 CheckAndDownloadUpdateCompleted 事件尚未触发,我知道它可能正在下载???显示间歇性进度条,并等待其完成。幸运的是,业务需求之一是启动启动画面。我打赌这会起作用......但是男人这样做只是感觉非常错误,必须有更好的方法。

建议?

I've created a line of business Out of Browser Application.

I need more control over the update process.

I would like to initiate an updating screen, on start-up when the download of the update has started, and deactivate the app. But as far as I know, I have no way to tell if the worker is in progress. Be nice if ReportProgress was available or something similar. Maybe there is and I'm totally missing it. Be great if I could do a progress bar based on bytes downloaded.

Right now the only way I can do anything remotely like this, is by waiting a couple seconds, and if the CheckAndDownloadUpdateCompleted event hasn't fired, I know its probably downloading??? Show an intermittent progress bar, and wait for it to complete. Luckily one of the business requirements is a start-up splash screen. I'm betting this will work... but man does that just feel ooooh so wrong, there has to be a better way.

Suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一念一轮回 2024-10-12 03:27:34

不,您没有遗漏 CheckAndDownloadUpdateAsync 的任何内容,其 Completed 事件是 Silverlight 中升级 API 传递的事件的总和。听起来你有一个合理的计划。

您可能对 Silverlight Toolkit BusyIndi​​cator 控件感兴趣。除了满足您的进度条要求之外,它还有一个 DisplayAfter 属性,该属性将阻止其在 IsBusy 属性设置为 true 后指定的时间显示。

Nope you're not missing anything the CheckAndDownloadUpdateAsync and its Completed event is the sum total to what passes for an upgrading API in Silverlight. Sounds like you have a reasonable plan.

You might be interested in the Silverlight Toolkit BusyIndicator control. In addition to delivering your progress bar requirement it also has a DisplayAfter property which will prevent it displaying for the time specified after its IsBusy property is set true.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文