diff --git a/SafeExamBrowser.Browser/BrowserApplicationController.cs b/SafeExamBrowser.Browser/BrowserApplicationController.cs index f58eef63..b4c0d379 100644 --- a/SafeExamBrowser.Browser/BrowserApplicationController.cs +++ b/SafeExamBrowser.Browser/BrowserApplicationController.cs @@ -7,7 +7,11 @@ */ using System; +using System.Collections.Generic; +using System.Linq; +using CefSharp; using SafeExamBrowser.Contracts.Behaviour; +using SafeExamBrowser.Contracts.Configuration; using SafeExamBrowser.Contracts.UserInterface; namespace SafeExamBrowser.Browser @@ -15,6 +19,25 @@ namespace SafeExamBrowser.Browser public class BrowserApplicationController : IApplicationController { private ITaskbarButton button; + private IList instances = new List(); + private ISettings settings; + private IUiElementFactory uiFactory; + + public BrowserApplicationController(ISettings settings, IUiElementFactory uiFactory) + { + this.settings = settings; + this.uiFactory = uiFactory; + } + + public void Initialize() + { + var cefSettings = new CefSettings + { + CachePath = settings.BrowserCachePath + }; + + Cef.Initialize(cefSettings, true, null); + } public void RegisterApplicationButton(ITaskbarButton button) { @@ -22,9 +45,32 @@ namespace SafeExamBrowser.Browser this.button.OnClick += ButtonClick; } + public void Terminate() + { + Cef.Shutdown(); + } + private void ButtonClick(Guid? instanceId = null) { - button.RegisterInstance(new BrowserApplicationInstance("A new instance. Yaji...")); + if (instanceId.HasValue) + { + instances.FirstOrDefault(i => i.Id == instanceId)?.Window?.BringToForeground(); + } + else + { + CreateNewInstance(); + } + } + + private void CreateNewInstance() + { + var control = new BrowserControl("www.duckduckgo.com"); + var window = uiFactory.CreateBrowserWindow(control); + var instance = new BrowserApplicationInstance("DuckDuckGo"); + + instances.Add(instance); + instance.RegisterWindow(window); + button.RegisterInstance(instance); } } } diff --git a/SafeExamBrowser.Browser/BrowserApplicationInstance.cs b/SafeExamBrowser.Browser/BrowserApplicationInstance.cs index fda9df52..ec58c8fb 100644 --- a/SafeExamBrowser.Browser/BrowserApplicationInstance.cs +++ b/SafeExamBrowser.Browser/BrowserApplicationInstance.cs @@ -8,6 +8,7 @@ using System; using SafeExamBrowser.Contracts.Configuration; +using SafeExamBrowser.Contracts.UserInterface; namespace SafeExamBrowser.Browser { @@ -15,11 +16,17 @@ namespace SafeExamBrowser.Browser { public Guid Id { get; private set; } public string Name { get; private set; } + public IWindow Window { get; private set; } public BrowserApplicationInstance(string name) { Id = Guid.NewGuid(); Name = name; } + + public void RegisterWindow(IWindow window) + { + Window = window; + } } } diff --git a/SafeExamBrowser.Browser/BrowserControl.cs b/SafeExamBrowser.Browser/BrowserControl.cs new file mode 100644 index 00000000..42cf681e --- /dev/null +++ b/SafeExamBrowser.Browser/BrowserControl.cs @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2017 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +using CefSharp.Wpf; +using SafeExamBrowser.Contracts.UserInterface; + +namespace SafeExamBrowser.Browser +{ + class BrowserControl : ChromiumWebBrowser, IBrowserControl + { + public BrowserControl(string url) + { + Address = url; + } + } +} diff --git a/SafeExamBrowser.Browser/SafeExamBrowser.Browser.csproj b/SafeExamBrowser.Browser/SafeExamBrowser.Browser.csproj index c1edbf8f..5bb20232 100644 --- a/SafeExamBrowser.Browser/SafeExamBrowser.Browser.csproj +++ b/SafeExamBrowser.Browser/SafeExamBrowser.Browser.csproj @@ -1,5 +1,7 @@  + + Debug @@ -11,6 +13,8 @@ SafeExamBrowser.Browser v4.5.2 512 + + true @@ -29,20 +33,43 @@ prompt 4 + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + + + + + + @@ -58,5 +85,23 @@ Designer + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + + + \ No newline at end of file diff --git a/SafeExamBrowser.Browser/packages.config b/SafeExamBrowser.Browser/packages.config new file mode 100644 index 00000000..b9a5f22b --- /dev/null +++ b/SafeExamBrowser.Browser/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/SafeExamBrowser.Configuration/SafeExamBrowser.Configuration.csproj b/SafeExamBrowser.Configuration/SafeExamBrowser.Configuration.csproj index 4f3ea868..f6ff08aa 100644 --- a/SafeExamBrowser.Configuration/SafeExamBrowser.Configuration.csproj +++ b/SafeExamBrowser.Configuration/SafeExamBrowser.Configuration.csproj @@ -29,6 +29,24 @@ prompt 4 + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + diff --git a/SafeExamBrowser.Configuration/Settings.cs b/SafeExamBrowser.Configuration/Settings.cs index 63370932..becb0217 100644 --- a/SafeExamBrowser.Configuration/Settings.cs +++ b/SafeExamBrowser.Configuration/Settings.cs @@ -15,11 +15,21 @@ namespace SafeExamBrowser.Configuration { public class Settings : ISettings { + private const string AppDataFolder = "SafeExamBrowser"; + + public string BrowserCachePath + { + get + { + return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), AppDataFolder, "Cache"); + } + } + public string LogFolderPath { get { - return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "SafeExamBrowser", "Logs"); + return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), AppDataFolder, "Logs"); } } diff --git a/SafeExamBrowser.Contracts/Behaviour/IApplicationController.cs b/SafeExamBrowser.Contracts/Behaviour/IApplicationController.cs index a2324799..93d28484 100644 --- a/SafeExamBrowser.Contracts/Behaviour/IApplicationController.cs +++ b/SafeExamBrowser.Contracts/Behaviour/IApplicationController.cs @@ -12,9 +12,19 @@ namespace SafeExamBrowser.Contracts.Behaviour { public interface IApplicationController { + /// + /// Performs any initialization work, if necessary. + /// + void Initialize(); + /// /// Registers the taskbar button for this application. /// void RegisterApplicationButton(ITaskbarButton button); + + /// + /// Performs any termination work, e.g. freeing of resources. + /// + void Terminate(); } } diff --git a/SafeExamBrowser.Contracts/Configuration/IApplicationInstance.cs b/SafeExamBrowser.Contracts/Configuration/IApplicationInstance.cs index 651a3bdd..160ae56a 100644 --- a/SafeExamBrowser.Contracts/Configuration/IApplicationInstance.cs +++ b/SafeExamBrowser.Contracts/Configuration/IApplicationInstance.cs @@ -7,6 +7,7 @@ */ using System; +using SafeExamBrowser.Contracts.UserInterface; namespace SafeExamBrowser.Contracts.Configuration { @@ -21,5 +22,15 @@ namespace SafeExamBrowser.Contracts.Configuration /// The name or (document) title of the application instance. /// string Name { get; } + + /// + /// The main window of the application instance. + /// + IWindow Window { get; } + + /// + /// Registers the given window as the main window of the application instance. + /// + void RegisterWindow(IWindow window); } } diff --git a/SafeExamBrowser.Contracts/Configuration/ISettings.cs b/SafeExamBrowser.Contracts/Configuration/ISettings.cs index 0b618c5b..b5a80ae0 100644 --- a/SafeExamBrowser.Contracts/Configuration/ISettings.cs +++ b/SafeExamBrowser.Contracts/Configuration/ISettings.cs @@ -10,6 +10,11 @@ namespace SafeExamBrowser.Contracts.Configuration { public interface ISettings { + /// + /// The path where the browser cache is to be stored. + /// + string BrowserCachePath { get; } + /// /// The path where the log files are to be stored. /// diff --git a/SafeExamBrowser.Contracts/SafeExamBrowser.Contracts.csproj b/SafeExamBrowser.Contracts/SafeExamBrowser.Contracts.csproj index 74432070..c5d07b3d 100644 --- a/SafeExamBrowser.Contracts/SafeExamBrowser.Contracts.csproj +++ b/SafeExamBrowser.Contracts/SafeExamBrowser.Contracts.csproj @@ -29,6 +29,24 @@ prompt 4 + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + @@ -64,6 +82,8 @@ + + @@ -72,6 +92,7 @@ + diff --git a/SafeExamBrowser.Contracts/UserInterface/IBrowserControl.cs b/SafeExamBrowser.Contracts/UserInterface/IBrowserControl.cs new file mode 100644 index 00000000..e6501147 --- /dev/null +++ b/SafeExamBrowser.Contracts/UserInterface/IBrowserControl.cs @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2017 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +namespace SafeExamBrowser.Contracts.UserInterface +{ + public interface IBrowserControl + { + } +} diff --git a/SafeExamBrowser.Contracts/UserInterface/IBrowserWindow.cs b/SafeExamBrowser.Contracts/UserInterface/IBrowserWindow.cs new file mode 100644 index 00000000..7d920d84 --- /dev/null +++ b/SafeExamBrowser.Contracts/UserInterface/IBrowserWindow.cs @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2017 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +namespace SafeExamBrowser.Contracts.UserInterface +{ + public interface IBrowserWindow : IWindow + { + } +} diff --git a/SafeExamBrowser.Contracts/UserInterface/IUiElementFactory.cs b/SafeExamBrowser.Contracts/UserInterface/IUiElementFactory.cs index 23e732e6..615482dd 100644 --- a/SafeExamBrowser.Contracts/UserInterface/IUiElementFactory.cs +++ b/SafeExamBrowser.Contracts/UserInterface/IUiElementFactory.cs @@ -18,6 +18,11 @@ namespace SafeExamBrowser.Contracts.UserInterface /// ITaskbarButton CreateApplicationButton(IApplicationInfo info); + /// + /// Creates a new browser window loaded with the given browser control. + /// + IBrowserWindow CreateBrowserWindow(IBrowserControl control); + /// /// Creates a taskbar notification, initialized with the given notification information. /// diff --git a/SafeExamBrowser.Contracts/UserInterface/IWindow.cs b/SafeExamBrowser.Contracts/UserInterface/IWindow.cs new file mode 100644 index 00000000..e8c6921d --- /dev/null +++ b/SafeExamBrowser.Contracts/UserInterface/IWindow.cs @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2017 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +namespace SafeExamBrowser.Contracts.UserInterface +{ + public interface IWindow + { + /// + /// Brings the window to the foreground. + /// + void BringToForeground(); + } +} diff --git a/SafeExamBrowser.Core.UnitTests/SafeExamBrowser.Core.UnitTests.csproj b/SafeExamBrowser.Core.UnitTests/SafeExamBrowser.Core.UnitTests.csproj index 6d6a473c..a12c93dc 100644 --- a/SafeExamBrowser.Core.UnitTests/SafeExamBrowser.Core.UnitTests.csproj +++ b/SafeExamBrowser.Core.UnitTests/SafeExamBrowser.Core.UnitTests.csproj @@ -37,6 +37,24 @@ prompt 4 + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + ..\packages\Castle.Core.4.1.0\lib\net45\Castle.Core.dll diff --git a/SafeExamBrowser.Core/Behaviour/Operations/BrowserInitializationOperation.cs b/SafeExamBrowser.Core/Behaviour/Operations/BrowserInitializationOperation.cs index 0daf7abb..9bde5d97 100644 --- a/SafeExamBrowser.Core/Behaviour/Operations/BrowserInitializationOperation.cs +++ b/SafeExamBrowser.Core/Behaviour/Operations/BrowserInitializationOperation.cs @@ -45,13 +45,17 @@ namespace SafeExamBrowser.Core.Behaviour.Operations var browserButton = uiFactory.CreateApplicationButton(browserInfo); + browserController.Initialize(); browserController.RegisterApplicationButton(browserButton); + taskbar.AddButton(browserButton); } public void Revert() { - // Nothing to do here so far... + logger.Info("Terminating browser..."); + browserController.Terminate(); + logger.Info("Browser successfully terminated."); } } } diff --git a/SafeExamBrowser.Core/SafeExamBrowser.Core.csproj b/SafeExamBrowser.Core/SafeExamBrowser.Core.csproj index 35af286c..f7c6be2d 100644 --- a/SafeExamBrowser.Core/SafeExamBrowser.Core.csproj +++ b/SafeExamBrowser.Core/SafeExamBrowser.Core.csproj @@ -29,6 +29,24 @@ prompt 4 + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + diff --git a/SafeExamBrowser.Monitoring/SafeExamBrowser.Monitoring.csproj b/SafeExamBrowser.Monitoring/SafeExamBrowser.Monitoring.csproj index 5ae6e5ef..de380c5f 100644 --- a/SafeExamBrowser.Monitoring/SafeExamBrowser.Monitoring.csproj +++ b/SafeExamBrowser.Monitoring/SafeExamBrowser.Monitoring.csproj @@ -29,6 +29,24 @@ prompt 4 + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + diff --git a/SafeExamBrowser.UserInterface/BrowserWindow.xaml b/SafeExamBrowser.UserInterface/BrowserWindow.xaml new file mode 100644 index 00000000..c1743649 --- /dev/null +++ b/SafeExamBrowser.UserInterface/BrowserWindow.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/SafeExamBrowser.UserInterface/BrowserWindow.xaml.cs b/SafeExamBrowser.UserInterface/BrowserWindow.xaml.cs new file mode 100644 index 00000000..f12e8de9 --- /dev/null +++ b/SafeExamBrowser.UserInterface/BrowserWindow.xaml.cs @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2017 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +using System.Windows; +using SafeExamBrowser.Contracts.UserInterface; + +namespace SafeExamBrowser.UserInterface +{ + public partial class BrowserWindow : Window, IBrowserWindow + { + public BrowserWindow(IBrowserControl browserControl) + { + InitializeComponent(); + + if (browserControl is UIElement) + { + BrowserContainer.Content = browserControl; + } + } + + public void BringToForeground() + { + Activate(); + } + } +} diff --git a/SafeExamBrowser.UserInterface/Controls/ApplicationInstanceButton.xaml.cs b/SafeExamBrowser.UserInterface/Controls/ApplicationInstanceButton.xaml.cs index 17ae5dbc..31ff5f69 100644 --- a/SafeExamBrowser.UserInterface/Controls/ApplicationInstanceButton.xaml.cs +++ b/SafeExamBrowser.UserInterface/Controls/ApplicationInstanceButton.xaml.cs @@ -35,7 +35,7 @@ namespace SafeExamBrowser.UserInterface.Controls { Icon.Content = IconResourceLoader.Load(info.IconResource); Text.Text = instance.Name; - Button.ToolTip = $"{instance.Name} - {info.Tooltip}"; + Button.ToolTip = $"{instance.Name} - {info.Name}"; } private void Button_Click(object sender, RoutedEventArgs e) diff --git a/SafeExamBrowser.UserInterface/SafeExamBrowser.UserInterface.csproj b/SafeExamBrowser.UserInterface/SafeExamBrowser.UserInterface.csproj index db842aad..6db33368 100644 --- a/SafeExamBrowser.UserInterface/SafeExamBrowser.UserInterface.csproj +++ b/SafeExamBrowser.UserInterface/SafeExamBrowser.UserInterface.csproj @@ -30,6 +30,24 @@ prompt 4 + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + @@ -47,6 +65,9 @@ + + BrowserWindow.xaml + ApplicationInstanceButton.xaml @@ -95,6 +116,10 @@ + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/SafeExamBrowser.UserInterface/UiElementFactory.cs b/SafeExamBrowser.UserInterface/UiElementFactory.cs index fc0641e1..415df723 100644 --- a/SafeExamBrowser.UserInterface/UiElementFactory.cs +++ b/SafeExamBrowser.UserInterface/UiElementFactory.cs @@ -22,9 +22,9 @@ namespace SafeExamBrowser.UserInterface return new ApplicationButton(info); } - public void Show(string message, string title, MessageBoxAction action = MessageBoxAction.Confirm, MessageBoxIcon icon = MessageBoxIcon.Information) + public IBrowserWindow CreateBrowserWindow(IBrowserControl control) { - MessageBox.Show(message, title, ToButton(action), ToImage(icon)); + return new BrowserWindow(control); } public ITaskbarNotification CreateNotification(INotificationInfo info) @@ -57,6 +57,11 @@ namespace SafeExamBrowser.UserInterface return splashScreen; } + public void Show(string message, string title, MessageBoxAction action = MessageBoxAction.Confirm, MessageBoxIcon icon = MessageBoxIcon.Information) + { + MessageBox.Show(message, title, ToButton(action), ToImage(icon)); + } + private MessageBoxButton ToButton(MessageBoxAction action) { switch (action) diff --git a/SafeExamBrowser.WindowsApi/SafeExamBrowser.WindowsApi.csproj b/SafeExamBrowser.WindowsApi/SafeExamBrowser.WindowsApi.csproj index 5e244155..514773e0 100644 --- a/SafeExamBrowser.WindowsApi/SafeExamBrowser.WindowsApi.csproj +++ b/SafeExamBrowser.WindowsApi/SafeExamBrowser.WindowsApi.csproj @@ -29,6 +29,24 @@ prompt 4 + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + diff --git a/SafeExamBrowser.sln b/SafeExamBrowser.sln index 1ad47d35..6f488234 100644 --- a/SafeExamBrowser.sln +++ b/SafeExamBrowser.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26430.14 +VisualStudioVersion = 15.0.26430.15 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser", "SafeExamBrowser\SafeExamBrowser.csproj", "{E3AED2F8-B5DF-45D1-AC19-48066923D6D8}" EndProject @@ -30,45 +30,83 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {E3AED2F8-B5DF-45D1-AC19-48066923D6D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E3AED2F8-B5DF-45D1-AC19-48066923D6D8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E3AED2F8-B5DF-45D1-AC19-48066923D6D8}.Debug|x86.ActiveCfg = Debug|x86 + {E3AED2F8-B5DF-45D1-AC19-48066923D6D8}.Debug|x86.Build.0 = Debug|x86 {E3AED2F8-B5DF-45D1-AC19-48066923D6D8}.Release|Any CPU.ActiveCfg = Release|Any CPU {E3AED2F8-B5DF-45D1-AC19-48066923D6D8}.Release|Any CPU.Build.0 = Release|Any CPU + {E3AED2F8-B5DF-45D1-AC19-48066923D6D8}.Release|x86.ActiveCfg = Release|x86 + {E3AED2F8-B5DF-45D1-AC19-48066923D6D8}.Release|x86.Build.0 = Release|x86 {3D6FDBB6-A4AF-4626-BB2B-BF329D44F9CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3D6FDBB6-A4AF-4626-BB2B-BF329D44F9CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3D6FDBB6-A4AF-4626-BB2B-BF329D44F9CC}.Debug|x86.ActiveCfg = Debug|x86 + {3D6FDBB6-A4AF-4626-BB2B-BF329D44F9CC}.Debug|x86.Build.0 = Debug|x86 {3D6FDBB6-A4AF-4626-BB2B-BF329D44F9CC}.Release|Any CPU.ActiveCfg = Release|Any CPU {3D6FDBB6-A4AF-4626-BB2B-BF329D44F9CC}.Release|Any CPU.Build.0 = Release|Any CPU + {3D6FDBB6-A4AF-4626-BB2B-BF329D44F9CC}.Release|x86.ActiveCfg = Release|x86 + {3D6FDBB6-A4AF-4626-BB2B-BF329D44F9CC}.Release|x86.Build.0 = Release|x86 {E1BE031A-4354-41E7-83E8-843DED4489FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E1BE031A-4354-41E7-83E8-843DED4489FF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E1BE031A-4354-41E7-83E8-843DED4489FF}.Debug|x86.ActiveCfg = Debug|x86 + {E1BE031A-4354-41E7-83E8-843DED4489FF}.Debug|x86.Build.0 = Debug|x86 {E1BE031A-4354-41E7-83E8-843DED4489FF}.Release|Any CPU.ActiveCfg = Release|Any CPU {E1BE031A-4354-41E7-83E8-843DED4489FF}.Release|Any CPU.Build.0 = Release|Any CPU + {E1BE031A-4354-41E7-83E8-843DED4489FF}.Release|x86.ActiveCfg = Release|x86 + {E1BE031A-4354-41E7-83E8-843DED4489FF}.Release|x86.Build.0 = Release|x86 {48B9F2A1-B87D-40F0-BEC9-399E8909860F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {48B9F2A1-B87D-40F0-BEC9-399E8909860F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48B9F2A1-B87D-40F0-BEC9-399E8909860F}.Debug|x86.ActiveCfg = Debug|x86 + {48B9F2A1-B87D-40F0-BEC9-399E8909860F}.Debug|x86.Build.0 = Debug|x86 {48B9F2A1-B87D-40F0-BEC9-399E8909860F}.Release|Any CPU.ActiveCfg = Release|Any CPU {48B9F2A1-B87D-40F0-BEC9-399E8909860F}.Release|Any CPU.Build.0 = Release|Any CPU + {48B9F2A1-B87D-40F0-BEC9-399E8909860F}.Release|x86.ActiveCfg = Release|x86 + {48B9F2A1-B87D-40F0-BEC9-399E8909860F}.Release|x86.Build.0 = Release|x86 {47DA5933-BEF8-4729-94E6-ABDE2DB12262}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {47DA5933-BEF8-4729-94E6-ABDE2DB12262}.Debug|Any CPU.Build.0 = Debug|Any CPU + {47DA5933-BEF8-4729-94E6-ABDE2DB12262}.Debug|x86.ActiveCfg = Debug|x86 + {47DA5933-BEF8-4729-94E6-ABDE2DB12262}.Debug|x86.Build.0 = Debug|x86 {47DA5933-BEF8-4729-94E6-ABDE2DB12262}.Release|Any CPU.ActiveCfg = Release|Any CPU {47DA5933-BEF8-4729-94E6-ABDE2DB12262}.Release|Any CPU.Build.0 = Release|Any CPU + {47DA5933-BEF8-4729-94E6-ABDE2DB12262}.Release|x86.ActiveCfg = Release|x86 + {47DA5933-BEF8-4729-94E6-ABDE2DB12262}.Release|x86.Build.0 = Release|x86 {04E653F1-98E6-4E34-9DD7-7F2BC1A8B767}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {04E653F1-98E6-4E34-9DD7-7F2BC1A8B767}.Debug|Any CPU.Build.0 = Debug|Any CPU + {04E653F1-98E6-4E34-9DD7-7F2BC1A8B767}.Debug|x86.ActiveCfg = Debug|x86 + {04E653F1-98E6-4E34-9DD7-7F2BC1A8B767}.Debug|x86.Build.0 = Debug|x86 {04E653F1-98E6-4E34-9DD7-7F2BC1A8B767}.Release|Any CPU.ActiveCfg = Release|Any CPU {04E653F1-98E6-4E34-9DD7-7F2BC1A8B767}.Release|Any CPU.Build.0 = Release|Any CPU + {04E653F1-98E6-4E34-9DD7-7F2BC1A8B767}.Release|x86.ActiveCfg = Release|x86 + {04E653F1-98E6-4E34-9DD7-7F2BC1A8B767}.Release|x86.Build.0 = Release|x86 {EF563531-4EB5-44B9-A5EC-D6D6F204469B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EF563531-4EB5-44B9-A5EC-D6D6F204469B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF563531-4EB5-44B9-A5EC-D6D6F204469B}.Debug|x86.ActiveCfg = Debug|x86 + {EF563531-4EB5-44B9-A5EC-D6D6F204469B}.Debug|x86.Build.0 = Debug|x86 {EF563531-4EB5-44B9-A5EC-D6D6F204469B}.Release|Any CPU.ActiveCfg = Release|Any CPU {EF563531-4EB5-44B9-A5EC-D6D6F204469B}.Release|Any CPU.Build.0 = Release|Any CPU + {EF563531-4EB5-44B9-A5EC-D6D6F204469B}.Release|x86.ActiveCfg = Release|x86 + {EF563531-4EB5-44B9-A5EC-D6D6F204469B}.Release|x86.Build.0 = Release|x86 {C388C4DD-A159-457D-AF92-89F7AD185109}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C388C4DD-A159-457D-AF92-89F7AD185109}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C388C4DD-A159-457D-AF92-89F7AD185109}.Debug|x86.ActiveCfg = Debug|x86 + {C388C4DD-A159-457D-AF92-89F7AD185109}.Debug|x86.Build.0 = Debug|x86 {C388C4DD-A159-457D-AF92-89F7AD185109}.Release|Any CPU.ActiveCfg = Release|Any CPU {C388C4DD-A159-457D-AF92-89F7AD185109}.Release|Any CPU.Build.0 = Release|Any CPU + {C388C4DD-A159-457D-AF92-89F7AD185109}.Release|x86.ActiveCfg = Release|x86 + {C388C4DD-A159-457D-AF92-89F7AD185109}.Release|x86.Build.0 = Release|x86 {73724659-4150-4792-A94E-42F5F3C1B696}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {73724659-4150-4792-A94E-42F5F3C1B696}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73724659-4150-4792-A94E-42F5F3C1B696}.Debug|x86.ActiveCfg = Debug|x86 + {73724659-4150-4792-A94E-42F5F3C1B696}.Debug|x86.Build.0 = Debug|x86 {73724659-4150-4792-A94E-42F5F3C1B696}.Release|Any CPU.ActiveCfg = Release|Any CPU {73724659-4150-4792-A94E-42F5F3C1B696}.Release|Any CPU.Build.0 = Release|Any CPU + {73724659-4150-4792-A94E-42F5F3C1B696}.Release|x86.ActiveCfg = Release|x86 + {73724659-4150-4792-A94E-42F5F3C1B696}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/SafeExamBrowser/CompositionRoot.cs b/SafeExamBrowser/CompositionRoot.cs index 46300259..584db56b 100644 --- a/SafeExamBrowser/CompositionRoot.cs +++ b/SafeExamBrowser/CompositionRoot.cs @@ -46,7 +46,6 @@ namespace SafeExamBrowser public void BuildObjectGraph() { - browserController = new BrowserApplicationController(); browserInfo = new BrowserApplicationInfo(); logger = new Logger(); settings = new Settings(); @@ -58,6 +57,7 @@ namespace SafeExamBrowser text = new Text(textResource); aboutInfo = new AboutNotificationInfo(text); + browserController = new BrowserApplicationController(settings, uiFactory); processMonitor = new ProcessMonitor(new ModuleLogger(logger, typeof(ProcessMonitor))); windowMonitor = new WindowMonitor(new ModuleLogger(logger, typeof(WindowMonitor))); workingArea = new WorkingArea(new ModuleLogger(logger, typeof(WorkingArea))); diff --git a/SafeExamBrowser/SafeExamBrowser.csproj b/SafeExamBrowser/SafeExamBrowser.csproj index b65858a8..380ae343 100644 --- a/SafeExamBrowser/SafeExamBrowser.csproj +++ b/SafeExamBrowser/SafeExamBrowser.csproj @@ -54,6 +54,26 @@ SafeExamBrowser.ico + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + true + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + true +