diff --git a/SafeExamBrowser.Client.UnitTests/Operations/ShellOperationTests.cs b/SafeExamBrowser.Client.UnitTests/Operations/ShellOperationTests.cs index f36f4dec..2ced5bdb 100644 --- a/SafeExamBrowser.Client.UnitTests/Operations/ShellOperationTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Operations/ShellOperationTests.cs @@ -175,6 +175,7 @@ namespace SafeExamBrowser.Client.UnitTests.Operations public void TODO() { // TODO: Only start activator if ALT+TAB enabled! -> Perform_MustInitializeTaskView + // TODO: Test correct initialization of applications (including ShowInShell setting)! Assert.Fail("TODO"); } diff --git a/SafeExamBrowser.Client/Operations/ShellOperation.cs b/SafeExamBrowser.Client/Operations/ShellOperation.cs index 2eaf78b7..7ba8cae1 100644 --- a/SafeExamBrowser.Client/Operations/ShellOperation.cs +++ b/SafeExamBrowser.Client/Operations/ShellOperation.cs @@ -6,6 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +using System.Linq; using SafeExamBrowser.Client.Contracts; using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel.Events; @@ -184,16 +185,21 @@ namespace SafeExamBrowser.Client.Operations { 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: - actionCenter.AddApplicationControl(control); - break; - case Location.Taskbar: - taskbar.AddApplicationControl(control); - break; + var control = uiFactory.CreateApplicationControl(application, location); + + switch (location) + { + case Location.ActionCenter: + actionCenter.AddApplicationControl(control); + break; + case Location.Taskbar: + taskbar.AddApplicationControl(control); + break; + } } } }