如何:创建应触发要在 Windows 应用程序中处理的事件的提醒?

发布于 2024-07-29 02:58:28 字数 253 浏览 1 评论 0原文

我需要使用 .NET 3.5 开发一个 Windows 应用程序,该应用程序需要有日历并且用户可以安排约会。

我希望(不是使用 Windows 服务)在应用程序打开时,为此用户设置的所有提醒 + 管理员设置它们的提醒,应该在应用程序中触发一个事件,以便我可以处理它(显示一旦日期时间变成现在,用户就会收到消息、通知图标或其他任何内容。 数据保存在 SQL Server 中并可从多台计算机访问,管理员应该能够在外部为用户创建提醒。

有什么办法吗?

I need to develop a windows application with .NET 3.5 that needs to have a calendar and user can schedule appointments.

I want (not with a windows-service) that while the application is on, all the reminders that are set up for this user + reminders that admins set them up, should trigger an event in the application so I can handle it (showing the user a message, notify icon or whatever), once its datetime becomes now.
The data is saved in SQL Server and accessible from many computers, the admin should be able to externally create reminders for users.

Any approaches?

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

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

发布评论

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

评论(2

烧了回忆取暖 2024-08-05 02:58:28

在本地,您可以使用计时器触发事件​​,该计时器检查当前时间,例如每 10 秒或更频繁。 客户端应定期与数据库服务器同步,查询当天或(根据用户需求)稍后事件的所有数据。 即使网络出现故障一段时间,客户端也可以运行并提醒用户。

另一个非常有趣的选项是数据库旁边的服务器端提醒工具。 它生成提醒并通过 XMPP 将其发送给客户端。 客户端计算机不再需要特殊的软件 - 任何 Jabber 客户端就足够了,尽管也可以使用充当 XMPP 客户端的特殊软件。

Locally, you could trigger the events using a timer that check the current time e.g. every 10 seconds or more often. The clients should regularily synchronize with the database server, querying all data for the current day or (on user demand) later events. This allows the clients to run and to remind the user even when the network fails for some time.

Another very interesting option is a server side reminder tool next to the database. It generates reminders and sends them via XMPP to the clients. The client machines don't need a special software anymore - any Jabber client would be sufficient, although a special software acting as an XMPP client would be possible, too.

深爱不及久伴 2024-08-05 02:58:28

您确实应该避免弹出窗口。 弹出窗口通常被认为不方便用户。 它们会中断用户的工作流程。 更糟糕的是,他们窃取了键盘输入。 如果用户现在正在输入一封重要的电子邮件怎么办?

相反,您可以提供优美动听的声音和任务栏气泡或类似内容。

You should really avoid popups. Popups are generally considered not user friendly. They interrupt the user's work flow. Even worse, they steal the keyboard input. What if the users was typing an important email right now?

Instead you might provide a nice, pleasant sound and a task bar bubble or similar.

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