SEBWIN-312: Only show an application in the shell if the configuration says so.
This commit is contained in:
parent
1ffb796963
commit
f1fc27e451
2 changed files with 15 additions and 8 deletions
|
@ -175,6 +175,7 @@ namespace SafeExamBrowser.Client.UnitTests.Operations
|
||||||
public void TODO()
|
public void TODO()
|
||||||
{
|
{
|
||||||
// TODO: Only start activator if ALT+TAB enabled! -> Perform_MustInitializeTaskView
|
// TODO: Only start activator if ALT+TAB enabled! -> Perform_MustInitializeTaskView
|
||||||
|
// TODO: Test correct initialization of applications (including ShowInShell setting)!
|
||||||
Assert.Fail("TODO");
|
Assert.Fail("TODO");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System.Linq;
|
||||||
using SafeExamBrowser.Client.Contracts;
|
using SafeExamBrowser.Client.Contracts;
|
||||||
using SafeExamBrowser.Core.Contracts.OperationModel;
|
using SafeExamBrowser.Core.Contracts.OperationModel;
|
||||||
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
|
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
|
||||||
|
@ -184,16 +185,21 @@ namespace SafeExamBrowser.Client.Operations
|
||||||
{
|
{
|
||||||
foreach (var application in Context.Applications)
|
foreach (var application in Context.Applications)
|
||||||
{
|
{
|
||||||
var control = uiFactory.CreateApplicationControl(application, location);
|
var settings = Context.Settings.Applications.Whitelist.First(a => a.Id == application.Id);
|
||||||
|
|
||||||
switch (location)
|
if (settings.ShowInShell)
|
||||||
{
|
{
|
||||||
case Location.ActionCenter:
|
var control = uiFactory.CreateApplicationControl(application, location);
|
||||||
actionCenter.AddApplicationControl(control);
|
|
||||||
break;
|
switch (location)
|
||||||
case Location.Taskbar:
|
{
|
||||||
taskbar.AddApplicationControl(control);
|
case Location.ActionCenter:
|
||||||
break;
|
actionCenter.AddApplicationControl(control);
|
||||||
|
break;
|
||||||
|
case Location.Taskbar:
|
||||||
|
taskbar.AddApplicationControl(control);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue