需要我的应用程序的WPF设计思路 [英] need WPF Design ideas for my application

查看:129
本文介绍了需要我的应用程序的WPF设计思路的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个应用程序,我需要通知站在许多队列中的人,这是下一个回合

问题是我必须在同一个窗口中显示全屏视频,应该通知人们

任何想法我应该如何设计这个窗口?

你知道像一个盒子的想法可以在屏幕的角落临时出现

I have this application where I need to notify people standing in many queues that it is the next one's turn
the problem is I have to display full screen video in the same window that should notify people
any Ideas how I should design this window?
you know ideas like a box can temporarly apear in the corner of the screen

推荐答案

首先去他们已经做过这种事情的地方:例如我的银行 - 一个显示收银员空闲时间以及下一个用户应该去哪个位置的屏幕。在英国,有一个名为Argos的目录商店,它做了类似的事情,但收集了订单号。一些医生手术也做了视频和病人呼叫系统。我相信你也可以找到如何做到这一点的好的和坏的例子。



值得查看现有的例子,因为它们可能会促使你思考为什么会那样? - 这可以促使你想到你没有考虑的条件 - 例如不是每个人都有良好的视力,所以字体必须非常清晰。



其他比这更重要的是,这是你的设计:你知道优先级是什么而我们不知道,所以决定并不是我们可以帮助的那些决定!
Start by going to places where they already do this kind of thing: my bank does for example - a screen which shows when a cashier is free and which position the next user should go to. In the UK, there is a "catalog shop" called Argos which does a similar thing, but with "order numbers" for collection. Some doctors surgeries also do a "video and patient call" system. I'm sure you can find good and bad examples of how to do this near you as well.

It's worth looking at existing examples because they may prompt you to think "why is it like that?" - and that can prompt you to think of conditions you hadn't considered - such as not everyone has good eyesight, so the font has to be very clear.

Other than that, it's your design: you know what the priorities are and we don't, so the decisions aren't really somethign we can help with that much!


首先,我宁愿考虑与操作系统设计一致的替代方法:任务栏通知,它是专门为此目的而设计的。请参阅这些CodeProject文章:

WPF NotifyIcon [ ^ ],

WFF任务栏通知程序 - WPF任务栏通知窗口 [ ^ ]。



显示某个通知窗口的通常方式也可以与任务栏相关,如果您想要显示它而不管应用程序的当前Z顺序位置。首先,要注意:现代版本的Windows不再支持系统模式对话框。因此,您需要以其他方式显示通知。



您可以在任意位置放置任何窗口,但需要确定当前屏幕大小以将其放在角落, System.Windows。 SystemParameters.PrimaryScreenHeight System.Windows.SystemParameters.PrimaryScreenWidth



First of所有,你可以在顶部带一些应用程序窗口。您可以激活该窗口:

https://msdn.microsoft.com/en-us/library/system.windows.window.activate%28v=vs.110%29.aspx [ ^ ],

https: //msdn.microsoft.com/en-us/library/system.windows.window.showactivated%28v=vs.110%29.aspx [ ^ ]。



请注意, Window.Activate 中的MSDN页面会告诉您:尝试将窗口置于前台并激活它。您可以通过在任务栏中闪烁窗口来获取通知。我建议在显示通知窗口之前处理窗口之间的所有权关系:使其由主窗口拥有,因此两者都将显示在顶部。请参阅:

https://msdn.microsoft.com/en-us/library/system.windows.window.owner(v=vs.110).aspx [ ^ ]。



此外,最好确保主窗口显示在任务栏中,而不是通知窗口。这是正确的,这样,不是相反的。这样,主窗口将代表任务栏中的其他窗口。但是,通知窗口可以是模态的,显示为 ShowDialog 。请参阅:

https://msdn.microsoft.com/en-us/library/system.windows.window.showdialog(v=vs.110).aspx [ ^ ],

https://msdn.microsoft.com /en-us/library/system.windows.window.showintaskbar(v=vs.110).aspx [ ^ ]。



另一种方式是显示一个几乎在顶部风格的窗口,它有一个缺点:只有在系统中没有其他最顶层的窗口时,它才能保证在顶部。方法如下: https:// msdn。 microsoft.com/en-us/library/system.windows.window.topmost%28v=vs.110%29.aspx [ ^ ]。



我不会这样推荐。



我会推荐第一种方法,一种基于 NotifyIcon的方法



-SA
First of all, I would rather consider the alternative approach inline with the design of the OS: taskbar notifications, which have been designed exactly for this purpose. Please see these CodeProject articles:
WPF NotifyIcon[^],
WPF Taskbar Notifier - A WPF Taskbar Notification Window[^].

The "usual" way of showing some notification window can also be related to the taskbar if you want to show it regardless the current Z-order position of your application. First of all, pay attention: system-modal dialogs are not supported by modern versions of Windows anymore. So, you need to make the notification visible in some other ways.

You can place any window where you want, but you need to determine current screen size to put it in the corner, System.Windows.SystemParameters.PrimaryScreenHeight and System.Windows.SystemParameters.PrimaryScreenWidth.

First of all, you can bring some application window on top. You can activate the window:
https://msdn.microsoft.com/en-us/library/system.windows.window.activate%28v=vs.110%29.aspx[^],
https://msdn.microsoft.com/en-us/library/system.windows.window.showactivated%28v=vs.110%29.aspx[^].

Note that the MSDN page in Window.Activate tells you: "Attempts to bring the window to the foreground and activates it". You can get a notification by blinking the window in the task bar. I would advise to take care of ownership relationships between window before you show the notification window: makes it owned by the main window, so both would be shown on top. Please see:
https://msdn.microsoft.com/en-us/library/system.windows.window.owner(v=vs.110).aspx[^].

Also, it's better to make sure that main window is shown in taskbar, but not the notification window. That's right, this way, not to opposite. This way, the main window will represent other windows in task bar. However, the notification window can be modal, showing with ShowDialog. Please see:
https://msdn.microsoft.com/en-us/library/system.windows.window.showdialog(v=vs.110).aspx[^],
https://msdn.microsoft.com/en-us/library/system.windows.window.showintaskbar(v=vs.110).aspx[^].

Another way is showing a window with "almost-on-top" style, which has one drawback: it will be guaranteed to be on top only if there are no other topmost windows in the system. Here is how: https://msdn.microsoft.com/en-us/library/system.windows.window.topmost%28v=vs.110%29.aspx[^].

I would not recommend this way though.

I would recommend the first method, the one based on NotifyIcon.

—SA


这篇关于需要我的应用程序的WPF设计思路的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆