2017-07-07 15:46:32 +02:00
|
|
|
|
/*
|
2024-03-05 18:37:42 +01:00
|
|
|
|
* Copyright (c) 2024 ETH Zürich, IT Services
|
2017-07-07 15:46:32 +02:00
|
|
|
|
*
|
|
|
|
|
* 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/.
|
|
|
|
|
*/
|
|
|
|
|
|
2019-10-11 15:46:15 +02:00
|
|
|
|
using System.Collections.Generic;
|
2019-08-30 09:55:26 +02:00
|
|
|
|
using SafeExamBrowser.Applications.Contracts;
|
|
|
|
|
using SafeExamBrowser.Configuration.Contracts;
|
2021-03-18 23:12:07 +01:00
|
|
|
|
using SafeExamBrowser.Core.Contracts.Notifications;
|
2019-08-30 09:55:26 +02:00
|
|
|
|
using SafeExamBrowser.I18n.Contracts;
|
|
|
|
|
using SafeExamBrowser.Logging.Contracts;
|
2021-09-17 10:47:02 +02:00
|
|
|
|
using SafeExamBrowser.Proctoring.Contracts;
|
2020-07-28 19:56:25 +02:00
|
|
|
|
using SafeExamBrowser.Server.Contracts.Data;
|
2019-10-11 15:46:15 +02:00
|
|
|
|
using SafeExamBrowser.Settings.Browser;
|
2021-09-17 10:47:02 +02:00
|
|
|
|
using SafeExamBrowser.Settings.Proctoring;
|
2024-06-12 17:30:19 +02:00
|
|
|
|
using SafeExamBrowser.Settings.UserInterface;
|
2019-08-30 17:33:28 +02:00
|
|
|
|
using SafeExamBrowser.SystemComponents.Contracts.Audio;
|
2019-08-30 15:59:51 +02:00
|
|
|
|
using SafeExamBrowser.SystemComponents.Contracts.Keyboard;
|
2022-04-19 18:21:29 +02:00
|
|
|
|
using SafeExamBrowser.SystemComponents.Contracts.Network;
|
2019-09-03 11:46:36 +02:00
|
|
|
|
using SafeExamBrowser.SystemComponents.Contracts.PowerSupply;
|
2019-08-30 09:55:26 +02:00
|
|
|
|
using SafeExamBrowser.UserInterface.Contracts.Browser;
|
2021-02-19 22:03:52 +01:00
|
|
|
|
using SafeExamBrowser.UserInterface.Contracts.Proctoring;
|
2019-08-30 09:55:26 +02:00
|
|
|
|
using SafeExamBrowser.UserInterface.Contracts.Shell;
|
|
|
|
|
using SafeExamBrowser.UserInterface.Contracts.Windows;
|
2019-10-11 15:46:15 +02:00
|
|
|
|
using SafeExamBrowser.UserInterface.Contracts.Windows.Data;
|
2017-07-12 15:36:30 +02:00
|
|
|
|
|
2019-08-30 09:55:26 +02:00
|
|
|
|
namespace SafeExamBrowser.UserInterface.Contracts
|
2017-07-07 15:46:32 +02:00
|
|
|
|
{
|
2018-03-06 11:38:12 +01:00
|
|
|
|
/// <summary>
|
2019-03-15 09:44:17 +01:00
|
|
|
|
/// The factory for user interface elements which cannot be instantiated at the composition root.
|
2018-03-06 11:38:12 +01:00
|
|
|
|
/// </summary>
|
2018-03-14 12:07:20 +01:00
|
|
|
|
public interface IUserInterfaceFactory
|
2017-07-07 15:46:32 +02:00
|
|
|
|
{
|
2017-08-02 10:13:23 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a new about window displaying information about the currently running application version.
|
|
|
|
|
/// </summary>
|
2018-06-29 09:50:20 +02:00
|
|
|
|
IWindow CreateAboutWindow(AppConfig appConfig);
|
2017-08-02 10:13:23 +02:00
|
|
|
|
|
2020-03-17 11:07:40 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a new action center.
|
|
|
|
|
/// </summary>
|
|
|
|
|
IActionCenter CreateActionCenter();
|
|
|
|
|
|
2017-07-12 15:36:30 +02:00
|
|
|
|
/// <summary>
|
2019-08-30 12:30:00 +02:00
|
|
|
|
/// Creates an application control for the specified application and location.
|
2017-07-12 15:36:30 +02:00
|
|
|
|
/// </summary>
|
2024-02-13 11:04:36 +01:00
|
|
|
|
IApplicationControl CreateApplicationControl(IApplication<IApplicationWindow> application, Location location);
|
2017-07-17 16:59:50 +02:00
|
|
|
|
|
2019-08-15 10:46:47 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a system control which allows to change the audio settings of the computer.
|
|
|
|
|
/// </summary>
|
2019-08-30 17:33:28 +02:00
|
|
|
|
ISystemControl CreateAudioControl(IAudio audio, Location location);
|
2019-08-15 10:46:47 +02:00
|
|
|
|
|
2017-07-24 17:31:28 +02:00
|
|
|
|
/// <summary>
|
2017-07-31 20:22:53 +02:00
|
|
|
|
/// Creates a new browser window loaded with the given browser control and settings.
|
2017-07-24 17:31:28 +02:00
|
|
|
|
/// </summary>
|
2022-05-03 08:59:22 +02:00
|
|
|
|
IBrowserWindow CreateBrowserWindow(IBrowserControl control, BrowserSettings settings, bool isMainWindow, ILogger logger);
|
2017-07-24 17:31:28 +02:00
|
|
|
|
|
2024-05-21 19:11:42 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a credentials dialog for the given purpose and with the specified message and title.
|
|
|
|
|
/// </summary>
|
|
|
|
|
ICredentialsDialog CreateCredentialsDialog(CredentialsDialogPurpose purpose, string message, string title);
|
|
|
|
|
|
2020-07-22 18:11:51 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates an exam selection dialog for the given exams.
|
|
|
|
|
/// </summary>
|
2020-07-24 18:22:22 +02:00
|
|
|
|
IExamSelectionDialog CreateExamSelectionDialog(IEnumerable<Exam> exams);
|
2020-07-22 18:11:51 +02:00
|
|
|
|
|
2018-06-27 14:02:16 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a system control which allows to change the keyboard layout of the computer.
|
|
|
|
|
/// </summary>
|
2019-08-30 15:59:51 +02:00
|
|
|
|
ISystemControl CreateKeyboardLayoutControl(IKeyboard keyboard, Location location);
|
2018-06-27 14:02:16 +02:00
|
|
|
|
|
2019-10-11 15:46:15 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a lock screen with the given message, title and options.
|
|
|
|
|
/// </summary>
|
2024-06-12 17:30:19 +02:00
|
|
|
|
ILockScreen CreateLockScreen(string message, string title, IEnumerable<LockScreenOption> options, LockScreenSettings settings);
|
2019-10-11 15:46:15 +02:00
|
|
|
|
|
2017-08-07 12:23:56 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a new log window which runs on its own thread.
|
|
|
|
|
/// </summary>
|
2018-02-07 13:25:49 +01:00
|
|
|
|
IWindow CreateLogWindow(ILogger logger);
|
2017-08-07 12:23:56 +02:00
|
|
|
|
|
2022-04-19 18:21:29 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a system control which allows to view and/or change the network connection of the computer.
|
|
|
|
|
/// </summary>
|
|
|
|
|
ISystemControl CreateNetworkControl(INetworkAdapter adapter, Location location);
|
|
|
|
|
|
2017-07-19 14:43:54 +02:00
|
|
|
|
/// <summary>
|
2019-09-04 14:11:19 +02:00
|
|
|
|
/// Creates a notification control for the given notification, initialized for the specified location.
|
2017-07-19 14:43:54 +02:00
|
|
|
|
/// </summary>
|
2021-03-18 23:12:07 +01:00
|
|
|
|
INotificationControl CreateNotificationControl(INotification notification, Location location);
|
2017-08-15 15:30:31 +02:00
|
|
|
|
|
2017-09-13 08:33:12 +02:00
|
|
|
|
/// <summary>
|
2018-06-27 14:02:16 +02:00
|
|
|
|
/// Creates a password dialog with the given message and title.
|
2017-09-13 08:33:12 +02:00
|
|
|
|
/// </summary>
|
2018-06-27 14:02:16 +02:00
|
|
|
|
IPasswordDialog CreatePasswordDialog(string message, string title);
|
2017-09-13 08:33:12 +02:00
|
|
|
|
|
2019-01-10 10:04:30 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a password dialog with the given message and title.
|
|
|
|
|
/// </summary>
|
|
|
|
|
IPasswordDialog CreatePasswordDialog(TextKey message, TextKey title);
|
|
|
|
|
|
2017-08-15 15:30:31 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a system control displaying the power supply status of the computer.
|
|
|
|
|
/// </summary>
|
2019-09-03 11:46:36 +02:00
|
|
|
|
ISystemControl CreatePowerSupplyControl(IPowerSupply powerSupply, Location location);
|
2017-07-19 14:43:54 +02:00
|
|
|
|
|
2024-02-29 21:05:43 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a new dialog to display the status of the proctoring finalization.
|
|
|
|
|
/// </summary>
|
|
|
|
|
IProctoringFinalizationDialog CreateProctoringFinalizationDialog();
|
|
|
|
|
|
2021-02-19 22:03:52 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a new proctoring window loaded with the given proctoring control.
|
|
|
|
|
/// </summary>
|
|
|
|
|
IProctoringWindow CreateProctoringWindow(IProctoringControl control);
|
|
|
|
|
|
2021-09-17 10:47:02 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a new notification control for the raise hand functionality of a remote proctoring session.
|
|
|
|
|
/// </summary>
|
|
|
|
|
INotificationControl CreateRaiseHandControl(IProctoringController controller, Location location, ProctoringSettings settings);
|
|
|
|
|
|
2018-01-30 14:41:36 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a new runtime window which runs on its own thread.
|
|
|
|
|
/// </summary>
|
2018-06-29 09:50:20 +02:00
|
|
|
|
IRuntimeWindow CreateRuntimeWindow(AppConfig appConfig);
|
2018-01-30 14:41:36 +01:00
|
|
|
|
|
2020-07-24 18:22:22 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a new server failure dialog with the given parameters.
|
|
|
|
|
/// </summary>
|
|
|
|
|
IServerFailureDialog CreateServerFailureDialog(string info, bool showFallback);
|
|
|
|
|
|
2017-07-17 16:59:50 +02:00
|
|
|
|
/// <summary>
|
2017-07-24 15:29:17 +02:00
|
|
|
|
/// Creates a new splash screen which runs on its own thread.
|
2017-07-17 16:59:50 +02:00
|
|
|
|
/// </summary>
|
2018-06-29 09:50:20 +02:00
|
|
|
|
ISplashScreen CreateSplashScreen(AppConfig appConfig = null);
|
2017-11-13 10:26:30 +01:00
|
|
|
|
|
2020-03-17 11:07:40 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a new taskbar.
|
|
|
|
|
/// </summary>
|
|
|
|
|
ITaskbar CreateTaskbar(ILogger logger);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a new taskview.
|
|
|
|
|
/// </summary>
|
|
|
|
|
ITaskview CreateTaskview();
|
2017-07-07 15:46:32 +02:00
|
|
|
|
}
|
|
|
|
|
}
|