diff --git a/SafeExamBrowser.Browser/BrowserApplicationController.cs b/SafeExamBrowser.Browser/BrowserApplicationController.cs index 7fbb54a7..977b5534 100644 --- a/SafeExamBrowser.Browser/BrowserApplicationController.cs +++ b/SafeExamBrowser.Browser/BrowserApplicationController.cs @@ -116,7 +116,8 @@ namespace SafeExamBrowser.Browser { CachePath = appConfig.BrowserCachePath, LogFile = appConfig.BrowserLogFile, - LogSeverity = error ? LogSeverity.Error : (warning ? LogSeverity.Warning : LogSeverity.Info) + LogSeverity = error ? LogSeverity.Error : (warning ? LogSeverity.Warning : LogSeverity.Info), + UserAgent = settings.UseCustomUserAgent ? settings.CustomUserAgent : string.Empty }; logger.Debug($"CEF cache path is '{cefSettings.CachePath}'."); diff --git a/SafeExamBrowser.Browser/BrowserApplicationInstance.cs b/SafeExamBrowser.Browser/BrowserApplicationInstance.cs index 50d0276b..34fe2b04 100644 --- a/SafeExamBrowser.Browser/BrowserApplicationInstance.cs +++ b/SafeExamBrowser.Browser/BrowserApplicationInstance.cs @@ -65,12 +65,11 @@ namespace SafeExamBrowser.Browser downloadHandler.ConfigurationDownloadRequested += DownloadHandler_ConfigurationDownloadRequested; - control = new BrowserControl(appConfig, settings, controlLogger, text); + control = new BrowserControl(appConfig, settings, downloadHandler, controlLogger, text); control.AddressChanged += Control_AddressChanged; control.LoadingStateChanged += Control_LoadingStateChanged; control.TitleChanged += Control_TitleChanged; - (control as BrowserControl).DownloadHandler = downloadHandler; - (control as BrowserControl).Initialize(); + control.Initialize(); logger.Debug("Initialized browser control."); diff --git a/SafeExamBrowser.Browser/BrowserControl.cs b/SafeExamBrowser.Browser/BrowserControl.cs index 833c4ee1..14fe359d 100644 --- a/SafeExamBrowser.Browser/BrowserControl.cs +++ b/SafeExamBrowser.Browser/BrowserControl.cs @@ -23,6 +23,7 @@ namespace SafeExamBrowser.Browser { private AppConfig appConfig; private BrowserSettings settings; + private IDownloadHandler downloadHandler; private ILogger logger; private IText text; @@ -48,9 +49,15 @@ namespace SafeExamBrowser.Browser remove { titleChanged -= value; } } - public BrowserControl(AppConfig appConfig, BrowserSettings settings, ILogger logger, IText text) : base(settings.StartUrl) + public BrowserControl( + AppConfig appConfig, + BrowserSettings settings, + IDownloadHandler downloadHandler, + ILogger logger, + IText text) : base(settings.StartUrl) { this.appConfig = appConfig; + this.downloadHandler = downloadHandler; this.logger = logger; this.settings = settings; this.text = text; @@ -62,6 +69,7 @@ namespace SafeExamBrowser.Browser LoadingStateChanged += (o, args) => loadingStateChanged?.Invoke(args.IsLoading); TitleChanged += (o, args) => titleChanged?.Invoke(args.Title); + DownloadHandler = downloadHandler; KeyboardHandler = new KeyboardHandler(settings); MenuHandler = new ContextMenuHandler(settings, text); RequestHandler = new RequestHandler(appConfig); diff --git a/SafeExamBrowser.Client/Operations/TaskbarOperation.cs b/SafeExamBrowser.Client/Operations/TaskbarOperation.cs index 6da1e150..990f4312 100644 --- a/SafeExamBrowser.Client/Operations/TaskbarOperation.cs +++ b/SafeExamBrowser.Client/Operations/TaskbarOperation.cs @@ -74,6 +74,7 @@ namespace SafeExamBrowser.Client.Operations StatusChanged?.Invoke(TextKey.OperationStatus_InitializeTaskbar); AddAboutNotification(); + taskbar.ShowClock = settings.ShowClock; if (settings.AllowApplicationLog) { diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.Browser.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.Browser.cs new file mode 100644 index 00000000..62280af9 --- /dev/null +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.Browser.cs @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2019 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.Collections.Generic; +using SafeExamBrowser.Contracts.Configuration.Settings; + +namespace SafeExamBrowser.Configuration.ConfigurationData +{ + internal partial class DataMapper + { + private void MapMainWindowMode(Settings settings, object value) + { + const int FULLSCREEN = 1; + + if (value is int mode) + { + settings.Browser.FullScreenMode = mode == FULLSCREEN; + } + } + + private void MapUserAgentMode(IDictionary rawData, Settings settings) + { + const int DEFAULT = 0; + + var useCustomForDesktop = rawData.TryGetValue(Keys.Browser.UserAgentModeDesktop, out var value) && value as int? != DEFAULT; + var useCustomForMobile = rawData.TryGetValue(Keys.Browser.UserAgentModeMobile, out value) && value as int? != DEFAULT; + + if (settings.UserInterfaceMode == UserInterfaceMode.Desktop && useCustomForDesktop) + { + settings.Browser.UseCustomUserAgent = true; + settings.Browser.CustomUserAgent = rawData[Keys.Browser.CustomUserAgentDesktop] as string; + } + else if (settings.UserInterfaceMode == UserInterfaceMode.Mobile && useCustomForMobile) + { + settings.Browser.UseCustomUserAgent = true; + settings.Browser.CustomUserAgent = rawData[Keys.Browser.CustomUserAgentMobile] as string; + } + } + + private void MapZoomMode(Settings settings, object value) + { + const int PAGE = 0; + + if (value is int mode) + { + // TODO: settings.Browser.ZoomMode = mode == PAGE ? BrowserZoomMode.Page : BrowserZoomMode.Text; + } + } + } +} diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.UserInterface.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.UserInterface.cs new file mode 100644 index 00000000..a54331d5 --- /dev/null +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.UserInterface.cs @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2019 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 SafeExamBrowser.Contracts.Configuration.Settings; + +namespace SafeExamBrowser.Configuration.ConfigurationData +{ + internal partial class DataMapper + { + private void MapClock(Settings settings, object value) + { + if (value is bool show) + { + settings.Taskbar.ShowClock = show; + } + } + + private void MapKeyboardLayout(Settings settings, object value) + { + if (value is bool enabled) + { + settings.Taskbar.AllowKeyboardLayout = enabled; + } + } + + private void MapWirelessNetwork(Settings settings, object value) + { + if (value is bool enabled) + { + settings.Taskbar.AllowWirelessNetwork = enabled; + } + } + + private void MapUserInterfaceMode(Settings settings, object value) + { + if (value is bool mobile) + { + settings.UserInterfaceMode = mobile ? UserInterfaceMode.Mobile : UserInterfaceMode.Desktop; + } + } + } +} diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.cs index 14052b45..0ae12ecf 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.cs @@ -19,12 +19,26 @@ namespace SafeExamBrowser.Configuration.ConfigurationData { Map(item.Key, item.Value, settings); } + + MapUserAgentMode(rawData, settings); } private void Map(string key, object value, Settings settings) { switch (key) { + case Keys.Browser.EnablePageZoom: + // TODO: MapPageZoom(settings, value); + break; + case Keys.Browser.EnableTextZoom: + // TODO: MapTextZoom(settings, value); + break; + case Keys.Browser.MainWindowMode: + MapMainWindowMode(settings, value); + break; + case Keys.Browser.ZoomMode: + MapZoomMode(settings, value); + break; case Keys.ConfigurationFile.ConfigurationPurpose: MapConfigurationMode(settings, value); break; @@ -97,6 +111,18 @@ namespace SafeExamBrowser.Configuration.ConfigurationData case Keys.Input.Mouse.EnableRightMouse: MapEnableRightMouse(settings, value); break; + case Keys.UserInterface.ShowClock: + MapClock(settings, value); + break; + case Keys.UserInterface.AllowKeyboardLayout: + MapKeyboardLayout(settings, value); + break; + case Keys.UserInterface.AllowWirelessNetwork: + MapWirelessNetwork(settings, value); + break; + case Keys.UserInterface.UserInterfaceMode: + MapUserInterfaceMode(settings, value); + break; } } } diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataValues.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataValues.cs index 5dce77d0..cfde24e6 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataValues.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataValues.cs @@ -128,6 +128,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData settings.Taskbar.AllowApplicationLog = false; settings.Taskbar.AllowKeyboardLayout = true; settings.Taskbar.AllowWirelessNetwork = false; + settings.Taskbar.ShowClock = true; // TODO: Default values for alpha version only, remove for final release! settings.Browser.AllowAddressBar = true; diff --git a/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs b/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs index 702c2c32..dd8b8d9d 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs @@ -20,6 +20,14 @@ namespace SafeExamBrowser.Configuration.ConfigurationData internal static class Browser { + internal const string CustomUserAgentDesktop = "browserUserAgentWinDesktopModeCustom"; + internal const string CustomUserAgentMobile = "browserUserAgentWinTouchModeCustom"; + internal const string EnablePageZoom = "enableZoomPage"; + internal const string EnableTextZoom = "enableZoomText"; + internal const string MainWindowMode = "browserViewMode"; + internal const string UserAgentModeDesktop = "browserUserAgentWinDesktopMode"; + internal const string UserAgentModeMobile = "browserUserAgentWinTouchMode"; + internal const string ZoomMode = "zoomMode"; } internal static class ConfigurationFile @@ -90,6 +98,10 @@ namespace SafeExamBrowser.Configuration.ConfigurationData internal static class UserInterface { + internal const string AllowKeyboardLayout = "showInputLanguage"; + internal const string AllowWirelessNetwork = "allowWlan"; + internal const string ShowClock = "showTime"; + internal const string UserInterfaceMode = "touchOptimized"; } } } diff --git a/SafeExamBrowser.Configuration/SafeExamBrowser.Configuration.csproj b/SafeExamBrowser.Configuration/SafeExamBrowser.Configuration.csproj index 0efb7d80..102824c0 100644 --- a/SafeExamBrowser.Configuration/SafeExamBrowser.Configuration.csproj +++ b/SafeExamBrowser.Configuration/SafeExamBrowser.Configuration.csproj @@ -69,6 +69,9 @@ + + DataMapper.cs + DataMapper.cs @@ -78,6 +81,9 @@ DataMapper.cs + + DataMapper.cs + diff --git a/SafeExamBrowser.Contracts/Configuration/Settings/BrowserSettings.cs b/SafeExamBrowser.Contracts/Configuration/Settings/BrowserSettings.cs index 4bde7941..aa24d326 100644 --- a/SafeExamBrowser.Contracts/Configuration/Settings/BrowserSettings.cs +++ b/SafeExamBrowser.Contracts/Configuration/Settings/BrowserSettings.cs @@ -51,6 +51,11 @@ namespace SafeExamBrowser.Contracts.Configuration.Settings /// public bool AllowReloading { get; set; } + /// + /// The custom user agent to optionally be used for all requests. + /// + public string CustomUserAgent { get; set; } + /// /// Determines whether the main browser window should be rendered in fullscreen mode, i.e. without window frame. /// @@ -60,5 +65,10 @@ namespace SafeExamBrowser.Contracts.Configuration.Settings /// The start URL with which a new browser window should be loaded. /// public string StartUrl { get; set; } + + /// + /// Determines whether a custom user agent should be used for all requests, see . + /// + public bool UseCustomUserAgent { get; set; } } } diff --git a/SafeExamBrowser.Contracts/Configuration/Settings/Settings.cs b/SafeExamBrowser.Contracts/Configuration/Settings/Settings.cs index c4fcf1ef..bc9bdd03 100644 --- a/SafeExamBrowser.Contracts/Configuration/Settings/Settings.cs +++ b/SafeExamBrowser.Contracts/Configuration/Settings/Settings.cs @@ -61,6 +61,11 @@ namespace SafeExamBrowser.Contracts.Configuration.Settings /// public TaskbarSettings Taskbar { get; set; } + /// + /// The mode which determines the look & feel of the user interface. + /// + public UserInterfaceMode UserInterfaceMode { get; set; } + public Settings() { Browser = new BrowserSettings(); diff --git a/SafeExamBrowser.Contracts/Configuration/Settings/TaskbarSettings.cs b/SafeExamBrowser.Contracts/Configuration/Settings/TaskbarSettings.cs index a92b71e0..f415e591 100644 --- a/SafeExamBrowser.Contracts/Configuration/Settings/TaskbarSettings.cs +++ b/SafeExamBrowser.Contracts/Configuration/Settings/TaskbarSettings.cs @@ -30,5 +30,10 @@ namespace SafeExamBrowser.Contracts.Configuration.Settings /// Determines whether the user may control the wireless network connection during runtime. /// public bool AllowWirelessNetwork { get; set; } + + /// + /// Determines whether the current date and time will be rendered in the taskbar. + /// + public bool ShowClock { get; set; } } } diff --git a/SafeExamBrowser.Contracts/Configuration/Settings/UserInterfaceMode.cs b/SafeExamBrowser.Contracts/Configuration/Settings/UserInterfaceMode.cs new file mode 100644 index 00000000..286934f0 --- /dev/null +++ b/SafeExamBrowser.Contracts/Configuration/Settings/UserInterfaceMode.cs @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2019 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.Configuration.Settings +{ + /// + /// Defines all possible look & feel options for the application. + /// + public enum UserInterfaceMode + { + /// + /// In this mode, the user interface is optimized for desktop computers with keyboard and mouse. + /// + Desktop, + + /// + /// In this mode, the user interface is optimized for mobile computers with touch capability. + /// + Mobile + } +} diff --git a/SafeExamBrowser.Contracts/SafeExamBrowser.Contracts.csproj b/SafeExamBrowser.Contracts/SafeExamBrowser.Contracts.csproj index 4081dbd7..a1c01d94 100644 --- a/SafeExamBrowser.Contracts/SafeExamBrowser.Contracts.csproj +++ b/SafeExamBrowser.Contracts/SafeExamBrowser.Contracts.csproj @@ -70,6 +70,7 @@ + diff --git a/SafeExamBrowser.Contracts/UserInterface/Browser/IBrowserControl.cs b/SafeExamBrowser.Contracts/UserInterface/Browser/IBrowserControl.cs index dd4926b2..ce502faf 100644 --- a/SafeExamBrowser.Contracts/UserInterface/Browser/IBrowserControl.cs +++ b/SafeExamBrowser.Contracts/UserInterface/Browser/IBrowserControl.cs @@ -31,6 +31,11 @@ namespace SafeExamBrowser.Contracts.UserInterface.Browser /// event TitleChangedEventHandler TitleChanged; + /// + /// Initializes the browser control. + /// + void Initialize(); + /// /// Navigates to the previous page in the browser control history. /// diff --git a/SafeExamBrowser.Contracts/UserInterface/Taskbar/ITaskbar.cs b/SafeExamBrowser.Contracts/UserInterface/Taskbar/ITaskbar.cs index 92597244..461e5db9 100644 --- a/SafeExamBrowser.Contracts/UserInterface/Taskbar/ITaskbar.cs +++ b/SafeExamBrowser.Contracts/UserInterface/Taskbar/ITaskbar.cs @@ -16,6 +16,11 @@ namespace SafeExamBrowser.Contracts.UserInterface.Taskbar /// public interface ITaskbar { + /// + /// Controls the visibility of the clock. + /// + bool ShowClock { set; } + /// /// Event fired when the user clicked the quit button in the taskbar. /// diff --git a/SafeExamBrowser.UserInterface.Classic/Taskbar.xaml b/SafeExamBrowser.UserInterface.Classic/Taskbar.xaml index 46335e33..73329356 100644 --- a/SafeExamBrowser.UserInterface.Classic/Taskbar.xaml +++ b/SafeExamBrowser.UserInterface.Classic/Taskbar.xaml @@ -24,7 +24,7 @@ - + diff --git a/SafeExamBrowser.UserInterface.Classic/Taskbar.xaml.cs b/SafeExamBrowser.UserInterface.Classic/Taskbar.xaml.cs index d92b9267..7d2cf33a 100644 --- a/SafeExamBrowser.UserInterface.Classic/Taskbar.xaml.cs +++ b/SafeExamBrowser.UserInterface.Classic/Taskbar.xaml.cs @@ -20,6 +20,11 @@ namespace SafeExamBrowser.UserInterface.Classic private bool allowClose; private ILogger logger; + public bool ShowClock + { + set { Dispatcher.Invoke(() => Clock.Visibility = value ? Visibility.Visible : Visibility.Collapsed); } + } + public event QuitButtonClickedEventHandler QuitButtonClicked; public Taskbar(ILogger logger) diff --git a/SafeExamBrowser.UserInterface.Windows10/AboutWindow.xaml b/SafeExamBrowser.UserInterface.Windows10/AboutWindow.xaml deleted file mode 100644 index 6ab39955..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/AboutWindow.xaml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - This application is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed - with this application, You can obtain one at http://mozilla.org/MPL/2.0/. - - - CefSharp (.NET bindings for the Chromium Embedded Framework) - - Copyright © 2010-2017 The CefSharp Authors. All rights reserved. - - - CEF (Chromium Embedded Framework) - - Copyright © 2008-2014 Marshall A. Greenblatt. Portions Copyright © 2006-2009 Google Inc. All rights reserved. - - - - diff --git a/SafeExamBrowser.UserInterface.Windows10/AboutWindow.xaml.cs b/SafeExamBrowser.UserInterface.Windows10/AboutWindow.xaml.cs deleted file mode 100644 index 7b234389..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/AboutWindow.xaml.cs +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2019 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 System.Windows.Documents; -using SafeExamBrowser.Contracts.Configuration; -using SafeExamBrowser.Contracts.I18n; -using SafeExamBrowser.Contracts.UserInterface.Taskbar.Events; -using SafeExamBrowser.Contracts.UserInterface.Windows; - -namespace SafeExamBrowser.UserInterface.Windows10 -{ - public partial class AboutWindow : Window, IWindow - { - private AppConfig appConfig; - private IText text; - private WindowClosingEventHandler closing; - - event WindowClosingEventHandler IWindow.Closing - { - add { closing += value; } - remove { closing -= value; } - } - - public AboutWindow(AppConfig appConfig, IText text) - { - this.appConfig = appConfig; - this.text = text; - - InitializeComponent(); - InitializeAboutWindow(); - } - - public void BringToForeground() - { - Activate(); - } - - private void InitializeAboutWindow() - { - Closing += (o, args) => closing?.Invoke(); - VersionInfo.Inlines.Add(new Run($"{text.Get(TextKey.Version)} {appConfig.ProgramVersion}") { FontStyle = FontStyles.Italic }); - VersionInfo.Inlines.Add(new LineBreak()); - VersionInfo.Inlines.Add(new LineBreak()); - VersionInfo.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10 }); - } - } -} diff --git a/SafeExamBrowser.UserInterface.Windows10/BrowserWindow.xaml b/SafeExamBrowser.UserInterface.Windows10/BrowserWindow.xaml deleted file mode 100644 index d451e890..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/BrowserWindow.xaml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/SafeExamBrowser.UserInterface.Windows10/BrowserWindow.xaml.cs b/SafeExamBrowser.UserInterface.Windows10/BrowserWindow.xaml.cs deleted file mode 100644 index 3ce346be..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/BrowserWindow.xaml.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2019 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; - -namespace SafeExamBrowser.UserInterface.Windows10 -{ - public partial class BrowserWindow : Window // TODO, IBrowserWindow - { - //private bool isMainWindow; - //private BrowserSettings settings; - //public WindowClosingEventHandler closing; - - //public bool IsMainWindow - //{ - // get - // { - // return isMainWindow; - // } - // set - // { - // isMainWindow = value; - // ApplySettings(); - // } - //} - - //public event AddressChangedEventHandler AddressChanged; - //public event ActionRequestedEventHandler BackwardNavigationRequested; - //public event ActionRequestedEventHandler ForwardNavigationRequested; - //public event ActionRequestedEventHandler ReloadRequested; - - //event WindowClosingEventHandler IWindow.Closing - //{ - // add { closing += value; } - // remove { closing -= value; } - //} - - //public BrowserWindow(IBrowserControl browserControl, BrowserSettings settings) - //{ - // this.settings = settings; - - // InitializeComponent(); - // InitializeBrowserWindow(browserControl); - //} - - //public void BringToForeground() - //{ - // Dispatcher.Invoke(() => - // { - // if (WindowState == WindowState.Minimized) - // { - // WindowState = WindowState.Normal; - // } - - // Activate(); - // }); - //} - - //public new void Close() - //{ - // Dispatcher.Invoke(base.Close); - //} - - //public new void Hide() - //{ - // Dispatcher.Invoke(base.Hide); - //} - - //public new void Show() - //{ - // Dispatcher.Invoke(base.Show); - //} - - //public void UpdateAddress(string url) - //{ - // Dispatcher.Invoke(() => UrlTextBox.Text = url); - //} - - //public void UpdateTitle(string title) - //{ - // Dispatcher.Invoke(() => Title = title); - //} - - //private void InitializeBrowserWindow(IBrowserControl browserControl) - //{ - // if (browserControl is System.Windows.Forms.Control control) - // { - // BrowserControlHost.Child = control; - // } - - // Closing += (o, args) => closing?.Invoke(); - // KeyUp += BrowserWindow_KeyUp; - // UrlTextBox.KeyUp += UrlTextBox_KeyUp; - // ReloadButton.Click += (o, args) => ReloadRequested?.Invoke(); - // BackButton.Click += (o, args) => BackwardNavigationRequested?.Invoke(); - // ForwardButton.Click += (o, args) => ForwardNavigationRequested?.Invoke(); - - // ApplySettings(); - //} - - //private void BrowserWindow_KeyUp(object sender, KeyEventArgs e) - //{ - // if (e.Key == Key.F5) - // { - // ReloadRequested?.Invoke(); - // } - //} - - //private void UrlTextBox_KeyUp(object sender, KeyEventArgs e) - //{ - // if (e.Key == Key.Enter) - // { - // AddressChanged?.Invoke(UrlTextBox.Text); - // } - //} - - //private void ApplySettings() - //{ - // if (IsMainWindow && settings.FullScreenMode) - // { - // MaxHeight = SystemParameters.WorkArea.Height; - // ResizeMode = ResizeMode.NoResize; - // WindowState = WindowState.Maximized; - // WindowStyle = WindowStyle.None; - // } - - // UrlTextBox.IsEnabled = settings.AllowAddressBar; - - // ReloadButton.IsEnabled = settings.AllowReloading; - // ReloadButton.Visibility = settings.AllowReloading ? Visibility.Visible : Visibility.Collapsed; - - // BackButton.IsEnabled = settings.AllowBackwardNavigation; - // BackButton.Visibility = settings.AllowBackwardNavigation ? Visibility.Visible : Visibility.Collapsed; - - // ForwardButton.IsEnabled = settings.AllowForwardNavigation; - // ForwardButton.Visibility = settings.AllowForwardNavigation ? Visibility.Visible : Visibility.Collapsed; - //} - } -} diff --git a/SafeExamBrowser.UserInterface.Windows10/Controls/ApplicationButton.xaml b/SafeExamBrowser.UserInterface.Windows10/Controls/ApplicationButton.xaml deleted file mode 100644 index 4569fd69..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Controls/ApplicationButton.xaml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - 5 - - - - - - - diff --git a/SafeExamBrowser.UserInterface.Windows10/Controls/ApplicationInstanceButton.xaml.cs b/SafeExamBrowser.UserInterface.Windows10/Controls/ApplicationInstanceButton.xaml.cs deleted file mode 100644 index be3eff97..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Controls/ApplicationInstanceButton.xaml.cs +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2019 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 System.Windows.Controls; -using SafeExamBrowser.Contracts.Core; -using SafeExamBrowser.Contracts.Configuration; -using SafeExamBrowser.Contracts.UserInterface.Taskbar.Events; -using SafeExamBrowser.UserInterface.Windows10.Utilities; - -namespace SafeExamBrowser.UserInterface.Windows10.Controls -{ - public partial class ApplicationInstanceButton : UserControl - { - private IApplicationInfo info; - private IApplicationInstance instance; - - internal event ApplicationButtonClickedEventHandler Clicked; - - public ApplicationInstanceButton(IApplicationInstance instance, IApplicationInfo info) - { - this.info = info; - this.instance = instance; - - InitializeComponent(); - InitializeApplicationInstanceButton(); - } - - private void InitializeApplicationInstanceButton() - { - Icon.Content = IconResourceLoader.Load(info.IconResource); - Text.Text = instance.Name; - Button.ToolTip = instance.Name; - - instance.NameChanged += (name) => - { - Dispatcher.Invoke(() => - { - Text.Text = name; - Button.ToolTip = name; - }); - }; - } - - private void Button_Click(object sender, RoutedEventArgs e) - { - Clicked?.Invoke(instance.Id); - } - } -} diff --git a/SafeExamBrowser.UserInterface.Windows10/Controls/DateTimeControl.xaml b/SafeExamBrowser.UserInterface.Windows10/Controls/DateTimeControl.xaml deleted file mode 100644 index 08607fbd..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Controls/DateTimeControl.xaml +++ /dev/null @@ -1,33 +0,0 @@ - - - diff --git a/SafeExamBrowser.UserInterface.Windows10/Controls/DateTimeControl.xaml.cs b/SafeExamBrowser.UserInterface.Windows10/Controls/DateTimeControl.xaml.cs deleted file mode 100644 index 2cf27d41..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Controls/DateTimeControl.xaml.cs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2019 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.Controls; -using SafeExamBrowser.UserInterface.Windows10.ViewModels; - -namespace SafeExamBrowser.UserInterface.Windows10.Controls -{ - public partial class DateTimeControl : UserControl - { - private DateTimeViewModel model = new DateTimeViewModel(); - - public DateTimeControl() - { - InitializeComponent(); - - DataContext = model; - TimeTextBlock.DataContext = model; - DateTextBlock.DataContext = model; - } - } -} diff --git a/SafeExamBrowser.UserInterface.Windows10/Controls/NotificationButton.xaml b/SafeExamBrowser.UserInterface.Windows10/Controls/NotificationButton.xaml deleted file mode 100644 index 077c821e..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Controls/NotificationButton.xaml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/SafeExamBrowser.UserInterface.Windows10/Controls/PowerSupplyControl.xaml.cs b/SafeExamBrowser.UserInterface.Windows10/Controls/PowerSupplyControl.xaml.cs deleted file mode 100644 index 7468ad20..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Controls/PowerSupplyControl.xaml.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2019 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 System.Windows.Controls; -using System.Windows.Media; -using SafeExamBrowser.Contracts.SystemComponents; -using SafeExamBrowser.Contracts.UserInterface.Taskbar; - -namespace SafeExamBrowser.UserInterface.Windows10.Controls -{ - public partial class PowerSupplyControl : UserControl, ISystemPowerSupplyControl - { - private double BATTERY_CHARGE_MAX_WIDTH; - - public PowerSupplyControl() - { - InitializeComponent(); - BATTERY_CHARGE_MAX_WIDTH = BatteryCharge.Width; - } - - public void Close() - { - Popup.IsOpen = false; - } - - public void SetBatteryCharge(double charge, BatteryChargeStatus status) - { - Dispatcher.Invoke(() => - { - var width = BATTERY_CHARGE_MAX_WIDTH * charge; - - width = width > BATTERY_CHARGE_MAX_WIDTH ? BATTERY_CHARGE_MAX_WIDTH : width; - width = width < 0 ? 0 : width; - - BatteryCharge.Width = width; - BatteryCharge.Fill = status == BatteryChargeStatus.Low ? Brushes.Orange : BatteryCharge.Fill; - BatteryCharge.Fill = status == BatteryChargeStatus.Critical ? Brushes.Red : BatteryCharge.Fill; - Warning.Visibility = status == BatteryChargeStatus.Critical ? Visibility.Visible : Visibility.Collapsed; - }); - } - - public void SetPowerGridConnection(bool connected) - { - Dispatcher.Invoke(() => PowerPlug.Visibility = connected ? Visibility.Visible : Visibility.Collapsed); - } - - public void SetTooltip(string text) - { - Dispatcher.Invoke(() => Button.ToolTip = text); - } - - public void ShowCriticalBatteryWarning(string warning) - { - Dispatcher.Invoke(() => ShowPopup(warning)); - } - - public void ShowLowBatteryInfo(string info) - { - Dispatcher.Invoke(() => ShowPopup(info)); - } - - private void ShowPopup(string text) - { - Popup.IsOpen = true; - PopupText.Text = text; - Background = (Brush) new BrushConverter().ConvertFrom("#2AFFFFFF"); - } - - private void Button_Click(object sender, RoutedEventArgs e) - { - Popup.IsOpen = false; - Background = (Brush) new BrushConverter().ConvertFrom("#00000000"); - } - } -} diff --git a/SafeExamBrowser.UserInterface.Windows10/Controls/QuitButton.xaml b/SafeExamBrowser.UserInterface.Windows10/Controls/QuitButton.xaml deleted file mode 100644 index 4a727ba1..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Controls/QuitButton.xaml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - diff --git a/SafeExamBrowser.UserInterface.Windows10/Controls/QuitButton.xaml.cs b/SafeExamBrowser.UserInterface.Windows10/Controls/QuitButton.xaml.cs deleted file mode 100644 index 43bbec96..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Controls/QuitButton.xaml.cs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2019 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.ComponentModel; -using System.Windows; -using System.Windows.Controls; -using SafeExamBrowser.Contracts.UserInterface.Taskbar; -using SafeExamBrowser.Contracts.UserInterface.Taskbar.Events; - -namespace SafeExamBrowser.UserInterface.Windows10.Controls -{ - public partial class QuitButton : UserControl - { - public event QuitButtonClickedEventHandler Clicked; - - public QuitButton() - { - InitializeComponent(); - } - - private void Button_Click(object sender, RoutedEventArgs e) - { - Clicked?.Invoke(new CancelEventArgs()); - } - } -} diff --git a/SafeExamBrowser.UserInterface.Windows10/Images/Chromium.ico b/SafeExamBrowser.UserInterface.Windows10/Images/Chromium.ico deleted file mode 100644 index 46025b80..00000000 Binary files a/SafeExamBrowser.UserInterface.Windows10/Images/Chromium.ico and /dev/null differ diff --git a/SafeExamBrowser.UserInterface.Windows10/Images/LogNotification.ico b/SafeExamBrowser.UserInterface.Windows10/Images/LogNotification.ico deleted file mode 100644 index 1c7fb20f..00000000 Binary files a/SafeExamBrowser.UserInterface.Windows10/Images/LogNotification.ico and /dev/null differ diff --git a/SafeExamBrowser.UserInterface.Windows10/Images/SafeExamBrowser.ico b/SafeExamBrowser.UserInterface.Windows10/Images/SafeExamBrowser.ico deleted file mode 100644 index abdc4635..00000000 Binary files a/SafeExamBrowser.UserInterface.Windows10/Images/SafeExamBrowser.ico and /dev/null differ diff --git a/SafeExamBrowser.UserInterface.Windows10/Images/SplashScreen.png b/SafeExamBrowser.UserInterface.Windows10/Images/SplashScreen.png deleted file mode 100644 index c56dd2b0..00000000 Binary files a/SafeExamBrowser.UserInterface.Windows10/Images/SplashScreen.png and /dev/null differ diff --git a/SafeExamBrowser.UserInterface.Windows10/LogWindow.xaml b/SafeExamBrowser.UserInterface.Windows10/LogWindow.xaml deleted file mode 100644 index c22785ea..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/LogWindow.xaml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - diff --git a/SafeExamBrowser.UserInterface.Windows10/LogWindow.xaml.cs b/SafeExamBrowser.UserInterface.Windows10/LogWindow.xaml.cs deleted file mode 100644 index c47d63bd..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/LogWindow.xaml.cs +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2019 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.ComponentModel; -using System.Windows; -using SafeExamBrowser.Contracts.I18n; -using SafeExamBrowser.Contracts.Logging; -using SafeExamBrowser.Contracts.UserInterface.Taskbar.Events; -using SafeExamBrowser.Contracts.UserInterface.Windows; -using SafeExamBrowser.UserInterface.Windows10.ViewModels; - -namespace SafeExamBrowser.UserInterface.Windows10 -{ - public partial class LogWindow : Window, IWindow - { - private ILogger logger; - private LogViewModel model; - private WindowClosingEventHandler closing; - - event WindowClosingEventHandler IWindow.Closing - { - add { closing += value; } - remove { closing -= value; } - } - - public LogWindow(ILogger logger, IText text) - { - InitializeComponent(); - - this.logger = logger; - this.model = new LogViewModel(text, ScrollViewer, LogContent); - - InitializeLogWindow(); - } - - public void BringToForeground() - { - Dispatcher.Invoke(Activate); - } - - public new void Close() - { - Dispatcher.Invoke(base.Close); - } - - public new void Hide() - { - Dispatcher.Invoke(base.Hide); - } - - public new void Show() - { - Dispatcher.Invoke(base.Show); - } - - private void InitializeLogWindow() - { - DataContext = model; - Closing += LogWindow_Closing; - Loaded += LogWindow_Loaded; - } - - private void LogWindow_Loaded(object sender, RoutedEventArgs e) - { - var log = logger.GetLog(); - - foreach (var content in log) - { - model.Notify(content); - } - - logger.Subscribe(model); - logger.Info("Opened log window."); - } - - private void LogWindow_Closing(object sender, CancelEventArgs e) - { - logger.Unsubscribe(model); - logger.Info("Closed log window."); - - closing?.Invoke(); - } - } -} diff --git a/SafeExamBrowser.UserInterface.Windows10/Properties/AssemblyInfo.cs b/SafeExamBrowser.UserInterface.Windows10/Properties/AssemblyInfo.cs deleted file mode 100644 index a7fce91d..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; -using System.Windows; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SafeExamBrowser.UserInterface")] -[assembly: AssemblyDescription("Safe Exam Browser")] -[assembly: AssemblyCompany("ETH Zürich")] -[assembly: AssemblyProduct("SafeExamBrowser.UserInterface")] -[assembly: AssemblyCopyright("Copyright © 2019 ETH Zürich, Educational Development and Technology (LET)")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SafeExamBrowser.UserInterface.Windows10/Properties/Resources.Designer.cs b/SafeExamBrowser.UserInterface.Windows10/Properties/Resources.Designer.cs deleted file mode 100644 index 52f5e8f4..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace SafeExamBrowser.UserInterface.Windows10.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SafeExamBrowser.UserInterface.Windows10.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/SafeExamBrowser.UserInterface.Windows10/Properties/Resources.resx b/SafeExamBrowser.UserInterface.Windows10/Properties/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/SafeExamBrowser.UserInterface.Windows10/Properties/Settings.Designer.cs b/SafeExamBrowser.UserInterface.Windows10/Properties/Settings.Designer.cs deleted file mode 100644 index 145ce273..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace SafeExamBrowser.UserInterface.Windows10.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.3.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} diff --git a/SafeExamBrowser.UserInterface.Windows10/Properties/Settings.settings b/SafeExamBrowser.UserInterface.Windows10/Properties/Settings.settings deleted file mode 100644 index 033d7a5e..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/SafeExamBrowser.UserInterface.Windows10/SafeExamBrowser.UserInterface.Windows10.csproj b/SafeExamBrowser.UserInterface.Windows10/SafeExamBrowser.UserInterface.Windows10.csproj deleted file mode 100644 index 48b11485..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/SafeExamBrowser.UserInterface.Windows10.csproj +++ /dev/null @@ -1,194 +0,0 @@ - - - - - Debug - AnyCPU - {E1BE031A-4354-41E7-83E8-843DED4489FF} - library - SafeExamBrowser.UserInterface.Windows10 - SafeExamBrowser.UserInterface.Windows10 - v4.5.2 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - bin\x86\Debug\ - DEBUG;TRACE - full - x86 - prompt - MinimumRecommendedRules.ruleset - - - bin\x86\Release\ - TRACE - true - pdbonly - x86 - prompt - - - - - - - 4.0 - - - - - - - - - - AboutWindow.xaml - - - BrowserWindow.xaml - - - ApplicationInstanceButton.xaml - - - DateTimeControl.xaml - - - ApplicationButton.xaml - - - NotificationButton.xaml - - - PowerSupplyControl.xaml - - - QuitButton.xaml - - - LogWindow.xaml - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - SplashScreen.xaml - - - Taskbar.xaml - - - - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - - - {47DA5933-BEF8-4729-94E6-ABDE2DB12262} - SafeExamBrowser.Contracts - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SafeExamBrowser.UserInterface.Windows10/SplashScreen.xaml b/SafeExamBrowser.UserInterface.Windows10/SplashScreen.xaml deleted file mode 100644 index 66d802f6..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/SplashScreen.xaml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SafeExamBrowser.UserInterface.Windows10/SplashScreen.xaml.cs b/SafeExamBrowser.UserInterface.Windows10/SplashScreen.xaml.cs deleted file mode 100644 index 021dbfe9..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/SplashScreen.xaml.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 2019 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 System.Windows.Documents; -using SafeExamBrowser.Contracts.Configuration; -using SafeExamBrowser.Contracts.I18n; -using SafeExamBrowser.Contracts.UserInterface.Taskbar.Events; -using SafeExamBrowser.Contracts.UserInterface.Windows; -using SafeExamBrowser.UserInterface.Windows10.ViewModels; - -namespace SafeExamBrowser.UserInterface.Windows10 -{ - public partial class SplashScreen : Window, ISplashScreen - { - private bool allowClose; - private SplashScreenViewModel model = new SplashScreenViewModel(); - private AppConfig appConfig; - private IText text; - private WindowClosingEventHandler closing; - - public AppConfig AppConfig - { - set - { - Dispatcher.Invoke(() => - { - appConfig = value; - UpdateAppInfo(); - }); - } - } - - event WindowClosingEventHandler IWindow.Closing - { - add { closing += value; } - remove { closing -= value; } - } - - public SplashScreen(IText text, AppConfig appConfig = null) - { - this.appConfig = appConfig; - this.text = text; - - InitializeComponent(); - InitializeSplashScreen(); - } - - public void BringToForeground() - { - Dispatcher.Invoke(Activate); - } - - public new void Close() - { - Dispatcher.Invoke(() => - { - allowClose = true; - base.Close(); - }); - } - - public new void Hide() - { - Dispatcher.Invoke(base.Hide); - } - - public new void Show() - { - Dispatcher.Invoke(base.Show); - } - - public void Progress() - { - model.CurrentProgress += 1; - } - - public void Regress() - { - model.CurrentProgress -= 1; - } - - public void SetIndeterminate() - { - model.IsIndeterminate = true; - } - - public void SetMaxValue(int max) - { - model.MaxProgress = max; - } - - public void SetValue(int value) - { - model.CurrentProgress = value; - } - - public void UpdateStatus(TextKey key, bool showBusyIndication = false) - { - // TODO: Handle auto-start of busy indication - model.Status = text.Get(key); - } - - private void InitializeSplashScreen() - { - UpdateAppInfo(); - - StatusTextBlock.DataContext = model; - ProgressBar.DataContext = model; - - // To prevent the progress bar going from max to min value at startup... - model.MaxProgress = 1; - - Closing += (o, args) => args.Cancel = !allowClose; - } - - private void UpdateAppInfo() - { - if (appConfig != null) - { - InfoTextBlock.Inlines.Add(new Run($"Version {appConfig.ProgramVersion}") { FontStyle = FontStyles.Italic }); - InfoTextBlock.Inlines.Add(new LineBreak()); - InfoTextBlock.Inlines.Add(new LineBreak()); - InfoTextBlock.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10 }); - } - } - } -} diff --git a/SafeExamBrowser.UserInterface.Windows10/Taskbar.xaml b/SafeExamBrowser.UserInterface.Windows10/Taskbar.xaml deleted file mode 100644 index 607cd586..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Taskbar.xaml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - 5 - - - - - - - - - - diff --git a/SafeExamBrowser.UserInterface.Windows10/Taskbar.xaml.cs b/SafeExamBrowser.UserInterface.Windows10/Taskbar.xaml.cs deleted file mode 100644 index 735faf16..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Taskbar.xaml.cs +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2019 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.ComponentModel; -using System.Windows; -using SafeExamBrowser.Contracts.Logging; -using SafeExamBrowser.Contracts.UserInterface.Taskbar; -using SafeExamBrowser.Contracts.UserInterface.Taskbar.Events; -using SafeExamBrowser.UserInterface.Windows10.Utilities; - -namespace SafeExamBrowser.UserInterface.Windows10 -{ - public partial class Taskbar : Window, ITaskbar - { - private bool allowClose; - private ILogger logger; - - public event QuitButtonClickedEventHandler QuitButtonClicked; - - public Taskbar(ILogger logger) - { - this.logger = logger; - - InitializeComponent(); - - Closing += Taskbar_Closing; - Loaded += (o, args) => InitializeBounds(); - QuitButtonClicked += QuitButton_Clicked; - } - - public void AddApplication(IApplicationButton button) - { - if (button is UIElement uiElement) - { - ApplicationStackPanel.Children.Add(uiElement); - } - } - - public void AddNotification(INotificationButton button) - { - if (button is UIElement uiElement) - { - NotificationStackPanel.Children.Add(uiElement); - } - } - - public void AddSystemControl(ISystemControl control) - { - if (control is UIElement uiElement) - { - SystemControlStackPanel.Children.Add(uiElement); - } - } - - public new void Close() - { - Dispatcher.Invoke(base.Close); - } - - public int GetAbsoluteHeight() - { - return Dispatcher.Invoke(() => - { - var height = (int) this.TransformToPhysical(Width, Height).Y; - - logger.Info($"Calculated physical taskbar height is {height}px."); - - return height; - }); - } - - public void InitializeBounds() - { - Dispatcher.Invoke(() => - { - Width = SystemParameters.WorkArea.Right; - Left = SystemParameters.WorkArea.Right - Width; - Top = SystemParameters.WorkArea.Bottom; - - var position = this.TransformToPhysical(Left, Top); - var size = this.TransformToPhysical(Width, Height); - - logger.Info($"Set taskbar bounds to {Width}x{Height} at ({Left}/{Top}), in physical pixels: {size.X}x{size.Y} at ({position.X}/{position.Y})."); - }); - } - - private void QuitButton_Clicked(CancelEventArgs args) - { - QuitButtonClicked?.Invoke(args); - allowClose = !args.Cancel; - } - - private void Taskbar_Closing(object sender, CancelEventArgs e) - { - if (!allowClose) - { - e.Cancel = true; - - return; - } - - foreach (var child in SystemControlStackPanel.Children) - { - if (child is ISystemControl systemControl) - { - systemControl.Close(); - } - } - } - } -} diff --git a/SafeExamBrowser.UserInterface.Windows10/Templates/Buttons.xaml b/SafeExamBrowser.UserInterface.Windows10/Templates/Buttons.xaml deleted file mode 100644 index 781ee401..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Templates/Buttons.xaml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SafeExamBrowser.UserInterface.Windows10/UserInterfaceFactory.cs b/SafeExamBrowser.UserInterface.Windows10/UserInterfaceFactory.cs deleted file mode 100644 index f0cac923..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/UserInterfaceFactory.cs +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 2019 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.Threading; -using SafeExamBrowser.Contracts.Configuration; -using SafeExamBrowser.Contracts.Configuration.Settings; -using SafeExamBrowser.Contracts.I18n; -using SafeExamBrowser.Contracts.Logging; -using SafeExamBrowser.Contracts.UserInterface; -using SafeExamBrowser.Contracts.UserInterface.Browser; -using SafeExamBrowser.Contracts.UserInterface.Taskbar; -using SafeExamBrowser.Contracts.UserInterface.Windows; -using SafeExamBrowser.UserInterface.Windows10.Controls; - -namespace SafeExamBrowser.UserInterface.Windows10 -{ - public class UserInterfaceFactory : IUserInterfaceFactory - { - private IText text; - - public UserInterfaceFactory(IText text) - { - this.text = text; - } - - public IWindow CreateAboutWindow(AppConfig appConfig) - { - return new AboutWindow(appConfig, text); - } - - public IApplicationButton CreateApplicationButton(IApplicationInfo info) - { - return new ApplicationButton(info); - } - - public IBrowserWindow CreateBrowserWindow(IBrowserControl control, BrowserSettings settings) - { - // TODO - // return new BrowserWindow(control, settings); - throw new System.NotImplementedException(); - } - - public IWindow CreateLogWindow(ILogger logger) - { - LogWindow logWindow = null; - var logWindowReadyEvent = new AutoResetEvent(false); - var logWindowThread = new Thread(() => - { - logWindow = new LogWindow(logger, text); - logWindow.Closed += (o, args) => logWindow.Dispatcher.InvokeShutdown(); - logWindow.Show(); - - logWindowReadyEvent.Set(); - - System.Windows.Threading.Dispatcher.Run(); - }); - - logWindowThread.SetApartmentState(ApartmentState.STA); - logWindowThread.IsBackground = true; - logWindowThread.Start(); - - logWindowReadyEvent.WaitOne(); - - return logWindow; - } - - public INotificationButton CreateNotification(INotificationInfo info) - { - return new NotificationButton(info); - } - - public ISystemKeyboardLayoutControl CreateKeyboardLayoutControl() - { - // TODO - throw new System.NotImplementedException(); - } - - public IPasswordDialog CreatePasswordDialog(string message, string title) - { - // TODO - throw new System.NotImplementedException(); - } - - public IPasswordDialog CreatePasswordDialog(TextKey message, TextKey title) - { - // TODO - throw new System.NotImplementedException(); - } - - public ISystemPowerSupplyControl CreatePowerSupplyControl() - { - return new PowerSupplyControl(); - } - - public IRuntimeWindow CreateRuntimeWindow(AppConfig appConfig) - { - // TODO - throw new System.NotImplementedException(); - } - - public ISplashScreen CreateSplashScreen(AppConfig appConfig = null) - { - SplashScreen splashScreen = null; - var splashReadyEvent = new AutoResetEvent(false); - var splashScreenThread = new Thread(() => - { - splashScreen = new SplashScreen(text, appConfig); - splashScreen.Closed += (o, args) => splashScreen.Dispatcher.InvokeShutdown(); - splashScreen.Show(); - - splashReadyEvent.Set(); - - System.Windows.Threading.Dispatcher.Run(); - }); - - splashScreenThread.SetApartmentState(ApartmentState.STA); - splashScreenThread.Name = nameof(SplashScreen); - splashScreenThread.IsBackground = true; - splashScreenThread.Start(); - - splashReadyEvent.WaitOne(); - - return splashScreen; - } - - public ISystemWirelessNetworkControl CreateWirelessNetworkControl() - { - // TODO - throw new System.NotImplementedException(); - } - } -} diff --git a/SafeExamBrowser.UserInterface.Windows10/Utilities/IconResourceLoader.cs b/SafeExamBrowser.UserInterface.Windows10/Utilities/IconResourceLoader.cs deleted file mode 100644 index d0a8e1b8..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Utilities/IconResourceLoader.cs +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2019 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; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using SafeExamBrowser.Contracts.Configuration; - -namespace SafeExamBrowser.UserInterface.Windows10.Utilities -{ - internal static class IconResourceLoader - { - internal static UIElement Load(IIconResource resource) - { - try - { - if (resource.IsBitmapResource) - { - return LoadBitmapResource(resource); - } - else if (resource.IsXamlResource) - { - return LoadXamlResource(resource); - } - } - catch (Exception) - { - return new TextBlock(new Run("X") { Foreground = Brushes.Red, FontWeight = FontWeights.Bold }); - } - - throw new NotSupportedException($"Application icon resource of type '{resource.GetType()}' is not supported!"); - } - - private static UIElement LoadBitmapResource(IIconResource resource) - { - return new Image - { - Source = new BitmapImage(resource.Uri) - }; - } - - private static UIElement LoadXamlResource(IIconResource resource) - { - using (var stream = Application.GetResourceStream(resource.Uri)?.Stream) - { - return XamlReader.Load(stream) as UIElement; - } - } - } -} diff --git a/SafeExamBrowser.UserInterface.Windows10/Utilities/VisualExtensions.cs b/SafeExamBrowser.UserInterface.Windows10/Utilities/VisualExtensions.cs deleted file mode 100644 index a12a5c82..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/Utilities/VisualExtensions.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2019 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 System.Windows.Interop; -using System.Windows.Media; - -namespace SafeExamBrowser.UserInterface.Windows10.Utilities -{ - internal static class VisualExtensions - { - /// - /// WPF works with device-independent pixels. This method is required to - /// transform such values to their absolute, device-specific pixel value. - /// Source: https://stackoverflow.com/questions/3286175/how-do-i-convert-a-wpf-size-to-physical-pixels - /// - internal static Vector TransformToPhysical(this Visual visual, double x, double y) - { - Matrix transformToDevice; - var source = PresentationSource.FromVisual(visual); - - if (source != null) - { - transformToDevice = source.CompositionTarget.TransformToDevice; - } - else - { - using (var newSource = new HwndSource(new HwndSourceParameters())) - { - transformToDevice = newSource.CompositionTarget.TransformToDevice; - } - } - - return transformToDevice.Transform(new Vector(x, y)); - } - } -} diff --git a/SafeExamBrowser.UserInterface.Windows10/ViewModels/DateTimeViewModel.cs b/SafeExamBrowser.UserInterface.Windows10/ViewModels/DateTimeViewModel.cs deleted file mode 100644 index 361b7efa..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/ViewModels/DateTimeViewModel.cs +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2019 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; -using System.ComponentModel; -using System.Timers; - -namespace SafeExamBrowser.UserInterface.Windows10.ViewModels -{ - class DateTimeViewModel : INotifyPropertyChanged - { - private Timer timer; - - public string Date { get; private set; } - public string Time { get; private set; } - public string ToolTip { get; private set; } - - public event PropertyChangedEventHandler PropertyChanged; - - public DateTimeViewModel() - { - timer = new Timer(1000); - timer.Elapsed += Timer_Elapsed; - timer.Start(); - } - - private void Timer_Elapsed(object sender, ElapsedEventArgs e) - { - var date = DateTime.Now; - - Date = date.ToShortDateString(); - Time = date.ToShortTimeString(); - ToolTip = $"{date.ToLongDateString()} {date.ToLongTimeString()}"; - - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Time))); - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Date))); - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(ToolTip))); - } - } -} diff --git a/SafeExamBrowser.UserInterface.Windows10/ViewModels/LogViewModel.cs b/SafeExamBrowser.UserInterface.Windows10/ViewModels/LogViewModel.cs deleted file mode 100644 index abb7b720..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/ViewModels/LogViewModel.cs +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2019 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; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Media; -using SafeExamBrowser.Contracts.I18n; -using SafeExamBrowser.Contracts.Logging; - -namespace SafeExamBrowser.UserInterface.Windows10.ViewModels -{ - internal class LogViewModel : ILogObserver - { - private IText text; - private ScrollViewer scrollViewer; - private TextBlock textBlock; - - public string WindowTitle => text.Get(TextKey.LogWindow_Title); - - public LogViewModel(IText text, ScrollViewer scrollViewer, TextBlock textBlock) - { - this.text = text; - this.scrollViewer = scrollViewer; - this.textBlock = textBlock; - } - - public void Notify(ILogContent content) - { - switch (content) - { - case ILogText text: - AppendLogText(text); - break; - case ILogMessage message: - AppendLogMessage(message); - break; - default: - throw new NotImplementedException($"The log window is not yet implemented for log content of type {content.GetType()}!"); - } - - scrollViewer.Dispatcher.Invoke(scrollViewer.ScrollToEnd); - } - - private void AppendLogText(ILogText logText) - { - textBlock.Dispatcher.Invoke(() => - { - var isHeader = logText.Text.StartsWith("/* "); - var isComment = logText.Text.StartsWith("# "); - var brush = isHeader || isComment ? Brushes.ForestGreen : textBlock.Foreground; - - textBlock.Inlines.Add(new Run($"{logText.Text}{Environment.NewLine}") - { - FontWeight = isHeader ? FontWeights.Bold : FontWeights.Normal, - Foreground = brush - }); - }); - } - - private void AppendLogMessage(ILogMessage message) - { - textBlock.Dispatcher.Invoke(() => - { - var date = message.DateTime.ToString("yyyy-MM-dd HH:mm:ss.fff"); - var severity = message.Severity.ToString().ToUpper(); - var threadInfo = $"{message.ThreadInfo.Id}{(message.ThreadInfo.HasName ? ": " + message.ThreadInfo.Name : string.Empty)}"; - - var infoRun = new Run($"{date} [{threadInfo}] - ") { Foreground = Brushes.Gray }; - var messageRun = new Run($"{severity}: {message.Message}{Environment.NewLine}") { Foreground = GetBrushFor(message.Severity) }; - - textBlock.Inlines.Add(infoRun); - textBlock.Inlines.Add(messageRun); - }); - } - - private Brush GetBrushFor(LogLevel severity) - { - switch (severity) - { - case LogLevel.Debug: - return Brushes.Gray; - case LogLevel.Error: - return Brushes.Red; - case LogLevel.Warning: - return Brushes.Yellow; - default: - return Brushes.White; - } - } - } -} diff --git a/SafeExamBrowser.UserInterface.Windows10/ViewModels/SplashScreenViewModel.cs b/SafeExamBrowser.UserInterface.Windows10/ViewModels/SplashScreenViewModel.cs deleted file mode 100644 index c61a8f55..00000000 --- a/SafeExamBrowser.UserInterface.Windows10/ViewModels/SplashScreenViewModel.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2019 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.ComponentModel; -using System.Timers; - -namespace SafeExamBrowser.UserInterface.Windows10.ViewModels -{ - class SplashScreenViewModel : INotifyPropertyChanged - { - private int currentProgress; - private bool isIndeterminate; - private int maxProgress; - private string status; - private Timer busyTimer; - - public event PropertyChangedEventHandler PropertyChanged; - - public int CurrentProgress - { - get - { - return currentProgress; - } - set - { - currentProgress = value; - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(CurrentProgress))); - } - } - - public bool IsIndeterminate - { - get - { - return isIndeterminate; - } - set - { - isIndeterminate = value; - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsIndeterminate))); - } - } - - public int MaxProgress - { - get - { - return maxProgress; - } - set - { - maxProgress = value; - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(MaxProgress))); - } - } - - public string Status - { - get - { - return status; - } - set - { - status = value; - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Status))); - } - } - - public void StartBusyIndication() - { - StopBusyIndication(); - - busyTimer = new Timer - { - AutoReset = true, - Interval = 750 - }; - - busyTimer.Elapsed += BusyTimer_Elapsed; - busyTimer.Start(); - } - - public void StopBusyIndication() - { - busyTimer?.Stop(); - busyTimer?.Close(); - } - - private void BusyTimer_Elapsed(object sender, ElapsedEventArgs e) - { - var next = Status ?? string.Empty; - - if (next.EndsWith("...")) - { - next = Status.Substring(0, Status.Length - 3); - } - else - { - next += "."; - } - - Status = next; - } - } -} diff --git a/SafeExamBrowser.sln b/SafeExamBrowser.sln index fa17c343..ae6b80d7 100644 --- a/SafeExamBrowser.sln +++ b/SafeExamBrowser.sln @@ -13,8 +13,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution LICENSE.txt = LICENSE.txt EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.UserInterface.Windows10", "SafeExamBrowser.UserInterface.Windows10\SafeExamBrowser.UserInterface.Windows10.csproj", "{E1BE031A-4354-41E7-83E8-843DED4489FF}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.Core.UnitTests", "SafeExamBrowser.Core.UnitTests\SafeExamBrowser.Core.UnitTests.csproj", "{48B9F2A1-B87D-40F0-BEC9-399E8909860F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.Contracts", "SafeExamBrowser.Contracts\SafeExamBrowser.Contracts.csproj", "{47DA5933-BEF8-4729-94E6-ABDE2DB12262}" @@ -80,14 +78,6 @@ Global {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