diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 78d4791..14c4732 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -1,17 +1,18 @@ --- name: Bug Report -about: Create a bug report to help us improve Safe Exam Browser. +about: Create a bug report to help us improve the Safe Exam Browser Patch title: '' -labels: '' -assignees: dbuechel +labels: bug +assignees: usefulstuffs --- > [!IMPORTANT] -> - Please _always_ consult the documentation first before creating a bug report: https://safeexambrowser.org/windows/win_usermanual_en.html. +> - Please _always_ consult the FAQs before creating an issue: https://github.com/school-cheating/SEBPatch/wiki/FAQs. > - Please _always_ attach the log file(s) of the affected session(s)! They can be found under `%LocalAppData%\SafeExamBrowser\Logs`. +> - Please follow this issue template. Saves me some work while reading all issues. -**Describe the Bug** +**Bug Description** A clear and concise description of what the bug is. **Steps to Reproduce** @@ -29,7 +30,18 @@ If applicable, add screenshots to help explain your problem. **Version Information** - OS: [e.g. Windows 10 Professional, Version 1803] - - SEB-Version [e.g. SEB 3.0.1] + - SEB version: [e.g. SEB 3.0.1] + - SEB patch version: [e.g. 1.5.1] **Additional Context** Add any other context about the problem here. + +**SEB Logs** +``` +Paste here the SEB logs +``` + +**SEB Patcher logs (optional, read below)** +``` +Paste here the SEB patcher logs (if issue is SEB patcher related, else just ignore this section) +``` diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 722ea42..234bbe6 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,11 @@ blank_issues_enabled: false contact_links: - - name: Wiki - url: https://github.com/school-cheating/SEBPatch/wiki - about: Before opening an issue, check out the wiki to see if your issue is listed there. + - name: FAQs + url: https://github.com/school-cheating/SEBPatch/wiki/FAQs + about: Before opening an issue, check out the FAQs. Any issue corresponding to the FAQs will be ignored and closed. + - name: Questions + url: https://github.com/school-cheating/SEBPatch/discussions/categories/q-a + about: Ask questions here about the Safe Exam Browser Patch + - name: Feature Requests + url: https://github.com/school-cheating/SEBPatch/discussions/categories/ideas + about: Propose a feature or a change for the Safe Exam Browser Patch. diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md deleted file mode 100644 index 325de6b..0000000 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature Request -about: Suggest an idea or new feature for Safe Exam Browser. -title: '' -labels: '' -assignees: dbuechel - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/README.md b/README.md index 34892dd..1d04a4a 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Safe Exam Browser Patch A patch to bypass Safe Exam Browser restrictions. -- Patch for version 3.8.0.742 has been deprecated and will not receive updates in the future, please upgrade to Safe Exam Browser 3.9.0.787. +- Currently supported SEB version: 3.9.0.787 -## How to use -Check out the [Wiki](https://github.com/school-cheating/SEBPatch/wiki) +## [HOW TO INSTALL](https://github.com/school-cheating/SEBPatch/wiki/Instructions) +I put this bigger so you actually read it and stop asking how to install the patch. ## Mirrors In case you can't download from the latest release, here is a list of mirrors (will be updated eventually): diff --git a/SafeExamBrowser.Applications.Contracts/Events/IconChangedEventHandler.cs b/SafeExamBrowser.Applications.Contracts/Events/IconChangedEventHandler.cs index a68529e..dba759b 100644 --- a/SafeExamBrowser.Applications.Contracts/Events/IconChangedEventHandler.cs +++ b/SafeExamBrowser.Applications.Contracts/Events/IconChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Applications.Contracts/Events/TitleChangedEventHandler.cs b/SafeExamBrowser.Applications.Contracts/Events/TitleChangedEventHandler.cs index 080133c..8f82ebe 100644 --- a/SafeExamBrowser.Applications.Contracts/Events/TitleChangedEventHandler.cs +++ b/SafeExamBrowser.Applications.Contracts/Events/TitleChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Applications.Contracts/Events/WindowsChangedEventHandler.cs b/SafeExamBrowser.Applications.Contracts/Events/WindowsChangedEventHandler.cs index b399c7e..dc2e00b 100644 --- a/SafeExamBrowser.Applications.Contracts/Events/WindowsChangedEventHandler.cs +++ b/SafeExamBrowser.Applications.Contracts/Events/WindowsChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Applications.Contracts/FactoryResult.cs b/SafeExamBrowser.Applications.Contracts/FactoryResult.cs index cb0a7bd..0286fe7 100644 --- a/SafeExamBrowser.Applications.Contracts/FactoryResult.cs +++ b/SafeExamBrowser.Applications.Contracts/FactoryResult.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Applications.Contracts/IApplication.cs b/SafeExamBrowser.Applications.Contracts/IApplication.cs index 249b878..27b4a13 100644 --- a/SafeExamBrowser.Applications.Contracts/IApplication.cs +++ b/SafeExamBrowser.Applications.Contracts/IApplication.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Applications.Contracts/IApplicationFactory.cs b/SafeExamBrowser.Applications.Contracts/IApplicationFactory.cs index 8b30fb5..c2d0145 100644 --- a/SafeExamBrowser.Applications.Contracts/IApplicationFactory.cs +++ b/SafeExamBrowser.Applications.Contracts/IApplicationFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Applications.Contracts/IApplicationWindow.cs b/SafeExamBrowser.Applications.Contracts/IApplicationWindow.cs index 7981578..2daf8c8 100644 --- a/SafeExamBrowser.Applications.Contracts/IApplicationWindow.cs +++ b/SafeExamBrowser.Applications.Contracts/IApplicationWindow.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Applications.Contracts/Properties/AssemblyInfo.cs b/SafeExamBrowser.Applications.Contracts/Properties/AssemblyInfo.cs index 48034c2..dbc52c2 100644 --- a/SafeExamBrowser.Applications.Contracts/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Applications.Contracts/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Applications.Contracts")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Applications.UnitTests/ApplicationFactoryTests.cs b/SafeExamBrowser.Applications.UnitTests/ApplicationFactoryTests.cs index 074e1cb..8889703 100644 --- a/SafeExamBrowser.Applications.UnitTests/ApplicationFactoryTests.cs +++ b/SafeExamBrowser.Applications.UnitTests/ApplicationFactoryTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Applications.UnitTests/ExternalApplicationInstanceTests.cs b/SafeExamBrowser.Applications.UnitTests/ExternalApplicationInstanceTests.cs index 61b13c3..de49e2e 100644 --- a/SafeExamBrowser.Applications.UnitTests/ExternalApplicationInstanceTests.cs +++ b/SafeExamBrowser.Applications.UnitTests/ExternalApplicationInstanceTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Applications.UnitTests/ExternalApplicationTests.cs b/SafeExamBrowser.Applications.UnitTests/ExternalApplicationTests.cs index f5c9935..80a3a0d 100644 --- a/SafeExamBrowser.Applications.UnitTests/ExternalApplicationTests.cs +++ b/SafeExamBrowser.Applications.UnitTests/ExternalApplicationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Applications.UnitTests/ExternalApplicationWindowTests.cs b/SafeExamBrowser.Applications.UnitTests/ExternalApplicationWindowTests.cs index cf06347..4075e42 100644 --- a/SafeExamBrowser.Applications.UnitTests/ExternalApplicationWindowTests.cs +++ b/SafeExamBrowser.Applications.UnitTests/ExternalApplicationWindowTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Applications.UnitTests/Properties/AssemblyInfo.cs b/SafeExamBrowser.Applications.UnitTests/Properties/AssemblyInfo.cs index 5a24166..f7b4cdf 100644 --- a/SafeExamBrowser.Applications.UnitTests/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Applications.UnitTests/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Applications.UnitTests")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] [assembly: ComVisible(false)] diff --git a/SafeExamBrowser.Applications.UnitTests/SafeExamBrowser.Applications.UnitTests.csproj b/SafeExamBrowser.Applications.UnitTests/SafeExamBrowser.Applications.UnitTests.csproj index a6b7500..466b469 100644 --- a/SafeExamBrowser.Applications.UnitTests/SafeExamBrowser.Applications.UnitTests.csproj +++ b/SafeExamBrowser.Applications.UnitTests/SafeExamBrowser.Applications.UnitTests.csproj @@ -1,8 +1,9 @@  - - - + + + + Debug @@ -68,72 +69,72 @@ ..\packages\Microsoft.ApplicationInsights.2.22.0\lib\net46\Microsoft.ApplicationInsights.dll - - ..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll + + ..\packages\Microsoft.Testing.Platform.MSBuild.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.MSBuild.dll - - ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll + + ..\packages\Microsoft.Testing.Extensions.Telemetry.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll - - ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll + + ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll + + ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.MSBuild.dll + + ..\packages\Microsoft.Testing.Platform.1.5.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - ..\packages\Moq.4.20.70\lib\net462\Moq.dll + + ..\packages\Moq.4.20.72\lib\net462\Moq.dll - - ..\packages\NuGet.Frameworks.6.9.1\lib\net472\NuGet.Frameworks.dll + + ..\packages\NuGet.Frameworks.6.12.1\lib\net472\NuGet.Frameworks.dll - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + ..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll - - ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll + + ..\packages\System.Collections.Immutable.9.0.1\lib\net462\System.Collections.Immutable.dll - - ..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll + + ..\packages\System.Diagnostics.DiagnosticSource.9.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll - - ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + ..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + ..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll - - ..\packages\System.Reflection.Metadata.8.0.0\lib\net462\System.Reflection.Metadata.dll + + ..\packages\System.Reflection.Metadata.9.0.1\lib\net462\System.Reflection.Metadata.dll - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + ..\packages\System.Threading.Tasks.Extensions.4.6.0\lib\net462\System.Threading.Tasks.Extensions.dll @@ -182,18 +183,26 @@ SafeExamBrowser.WindowsApi.Contracts + + + + + + + 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.Applications.UnitTests/app.config b/SafeExamBrowser.Applications.UnitTests/app.config index 9821a52..4a41c0d 100644 --- a/SafeExamBrowser.Applications.UnitTests/app.config +++ b/SafeExamBrowser.Applications.UnitTests/app.config @@ -4,7 +4,7 @@ - + @@ -12,7 +12,7 @@ - + @@ -20,15 +20,23 @@ - + - + - + + + + + + + + + diff --git a/SafeExamBrowser.Applications.UnitTests/packages.config b/SafeExamBrowser.Applications.UnitTests/packages.config index f170b50..da1800f 100644 --- a/SafeExamBrowser.Applications.UnitTests/packages.config +++ b/SafeExamBrowser.Applications.UnitTests/packages.config @@ -2,22 +2,23 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SafeExamBrowser.Applications/ApplicationFactory.cs b/SafeExamBrowser.Applications/ApplicationFactory.cs index 44be9f7..497600d 100644 --- a/SafeExamBrowser.Applications/ApplicationFactory.cs +++ b/SafeExamBrowser.Applications/ApplicationFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Applications/Events/InstanceTerminatedEventHandler.cs b/SafeExamBrowser.Applications/Events/InstanceTerminatedEventHandler.cs index 564a038..cf61b3a 100644 --- a/SafeExamBrowser.Applications/Events/InstanceTerminatedEventHandler.cs +++ b/SafeExamBrowser.Applications/Events/InstanceTerminatedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Applications/ExternalApplication.cs b/SafeExamBrowser.Applications/ExternalApplication.cs index 1767dc1..51371d7 100644 --- a/SafeExamBrowser.Applications/ExternalApplication.cs +++ b/SafeExamBrowser.Applications/ExternalApplication.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Applications/ExternalApplicationInstance.cs b/SafeExamBrowser.Applications/ExternalApplicationInstance.cs index 36e8f6c..fd4ccbf 100644 --- a/SafeExamBrowser.Applications/ExternalApplicationInstance.cs +++ b/SafeExamBrowser.Applications/ExternalApplicationInstance.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Applications/ExternalApplicationWindow.cs b/SafeExamBrowser.Applications/ExternalApplicationWindow.cs index fd07e07..ebdf752 100644 --- a/SafeExamBrowser.Applications/ExternalApplicationWindow.cs +++ b/SafeExamBrowser.Applications/ExternalApplicationWindow.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Applications/Properties/AssemblyInfo.cs b/SafeExamBrowser.Applications/Properties/AssemblyInfo.cs index 615967b..7389252 100644 --- a/SafeExamBrowser.Applications/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Applications/Properties/AssemblyInfo.cs @@ -9,7 +9,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Applications")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Browser.Contracts/Events/DownloadEventArgs.cs b/SafeExamBrowser.Browser.Contracts/Events/DownloadEventArgs.cs index 86c5a22..39773d3 100644 --- a/SafeExamBrowser.Browser.Contracts/Events/DownloadEventArgs.cs +++ b/SafeExamBrowser.Browser.Contracts/Events/DownloadEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.Contracts/Events/DownloadFinishedCallback.cs b/SafeExamBrowser.Browser.Contracts/Events/DownloadFinishedCallback.cs index 6bc0fc8..a444e47 100644 --- a/SafeExamBrowser.Browser.Contracts/Events/DownloadFinishedCallback.cs +++ b/SafeExamBrowser.Browser.Contracts/Events/DownloadFinishedCallback.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.Contracts/Events/DownloadRequestedEventHandler.cs b/SafeExamBrowser.Browser.Contracts/Events/DownloadRequestedEventHandler.cs index 73b80cb..5b7e8b4 100644 --- a/SafeExamBrowser.Browser.Contracts/Events/DownloadRequestedEventHandler.cs +++ b/SafeExamBrowser.Browser.Contracts/Events/DownloadRequestedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.Contracts/Events/LoseFocusRequestedEventHandler.cs b/SafeExamBrowser.Browser.Contracts/Events/LoseFocusRequestedEventHandler.cs index c3ab885..3f40173 100644 --- a/SafeExamBrowser.Browser.Contracts/Events/LoseFocusRequestedEventHandler.cs +++ b/SafeExamBrowser.Browser.Contracts/Events/LoseFocusRequestedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.Contracts/Events/TabPressedEventHandler.cs b/SafeExamBrowser.Browser.Contracts/Events/TabPressedEventHandler.cs index 4e9a13a..c60f7d9 100644 --- a/SafeExamBrowser.Browser.Contracts/Events/TabPressedEventHandler.cs +++ b/SafeExamBrowser.Browser.Contracts/Events/TabPressedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.Contracts/Events/TerminationRequestedEventHandler.cs b/SafeExamBrowser.Browser.Contracts/Events/TerminationRequestedEventHandler.cs index b31dce0..6590a2a 100644 --- a/SafeExamBrowser.Browser.Contracts/Events/TerminationRequestedEventHandler.cs +++ b/SafeExamBrowser.Browser.Contracts/Events/TerminationRequestedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.Contracts/Events/UserIdentifierDetectedEventHandler.cs b/SafeExamBrowser.Browser.Contracts/Events/UserIdentifierDetectedEventHandler.cs index b256954..62dda56 100644 --- a/SafeExamBrowser.Browser.Contracts/Events/UserIdentifierDetectedEventHandler.cs +++ b/SafeExamBrowser.Browser.Contracts/Events/UserIdentifierDetectedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.Contracts/Filters/IRequestFilter.cs b/SafeExamBrowser.Browser.Contracts/Filters/IRequestFilter.cs index 963e38a..65b3a19 100644 --- a/SafeExamBrowser.Browser.Contracts/Filters/IRequestFilter.cs +++ b/SafeExamBrowser.Browser.Contracts/Filters/IRequestFilter.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.Contracts/Filters/IRule.cs b/SafeExamBrowser.Browser.Contracts/Filters/IRule.cs index b0f571f..9e1fed3 100644 --- a/SafeExamBrowser.Browser.Contracts/Filters/IRule.cs +++ b/SafeExamBrowser.Browser.Contracts/Filters/IRule.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.Contracts/Filters/IRuleFactory.cs b/SafeExamBrowser.Browser.Contracts/Filters/IRuleFactory.cs index 97ff254..863abf8 100644 --- a/SafeExamBrowser.Browser.Contracts/Filters/IRuleFactory.cs +++ b/SafeExamBrowser.Browser.Contracts/Filters/IRuleFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.Contracts/Filters/Request.cs b/SafeExamBrowser.Browser.Contracts/Filters/Request.cs index 81a39fe..1adbba6 100644 --- a/SafeExamBrowser.Browser.Contracts/Filters/Request.cs +++ b/SafeExamBrowser.Browser.Contracts/Filters/Request.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.Contracts/IBrowserApplication.cs b/SafeExamBrowser.Browser.Contracts/IBrowserApplication.cs index 7d0bba7..3c7bacc 100644 --- a/SafeExamBrowser.Browser.Contracts/IBrowserApplication.cs +++ b/SafeExamBrowser.Browser.Contracts/IBrowserApplication.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.Contracts/IBrowserWindow.cs b/SafeExamBrowser.Browser.Contracts/IBrowserWindow.cs index 6cc3af1..09affa1 100644 --- a/SafeExamBrowser.Browser.Contracts/IBrowserWindow.cs +++ b/SafeExamBrowser.Browser.Contracts/IBrowserWindow.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.Contracts/Properties/AssemblyInfo.cs b/SafeExamBrowser.Browser.Contracts/Properties/AssemblyInfo.cs index 0dfc261..f6a812c 100644 --- a/SafeExamBrowser.Browser.Contracts/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Browser.Contracts/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Browser.Contracts")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Browser.UnitTests/Filters/LegacyFilter.cs b/SafeExamBrowser.Browser.UnitTests/Filters/LegacyFilter.cs index 1bd2604..6eaa215 100644 --- a/SafeExamBrowser.Browser.UnitTests/Filters/LegacyFilter.cs +++ b/SafeExamBrowser.Browser.UnitTests/Filters/LegacyFilter.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * This Source Code Form is subject to the terms of the Mozilla internal * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/SafeExamBrowser.Browser.UnitTests/Filters/RequestFilterTests.cs b/SafeExamBrowser.Browser.UnitTests/Filters/RequestFilterTests.cs index 195b64f..941c5b5 100644 --- a/SafeExamBrowser.Browser.UnitTests/Filters/RequestFilterTests.cs +++ b/SafeExamBrowser.Browser.UnitTests/Filters/RequestFilterTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.UnitTests/Filters/RuleFactoryTests.cs b/SafeExamBrowser.Browser.UnitTests/Filters/RuleFactoryTests.cs index f1ec7b0..85c3b33 100644 --- a/SafeExamBrowser.Browser.UnitTests/Filters/RuleFactoryTests.cs +++ b/SafeExamBrowser.Browser.UnitTests/Filters/RuleFactoryTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.UnitTests/Filters/Rules/RegexRuleTests.cs b/SafeExamBrowser.Browser.UnitTests/Filters/Rules/RegexRuleTests.cs index 6ba74bd..d4af886 100644 --- a/SafeExamBrowser.Browser.UnitTests/Filters/Rules/RegexRuleTests.cs +++ b/SafeExamBrowser.Browser.UnitTests/Filters/Rules/RegexRuleTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.UnitTests/Filters/Rules/SimplifiedRuleTests.cs b/SafeExamBrowser.Browser.UnitTests/Filters/Rules/SimplifiedRuleTests.cs index 6ee35eb..4d49b26 100644 --- a/SafeExamBrowser.Browser.UnitTests/Filters/Rules/SimplifiedRuleTests.cs +++ b/SafeExamBrowser.Browser.UnitTests/Filters/Rules/SimplifiedRuleTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.UnitTests/Handlers/ContextMenuHandlerTests.cs b/SafeExamBrowser.Browser.UnitTests/Handlers/ContextMenuHandlerTests.cs index 153677a..22e0815 100644 --- a/SafeExamBrowser.Browser.UnitTests/Handlers/ContextMenuHandlerTests.cs +++ b/SafeExamBrowser.Browser.UnitTests/Handlers/ContextMenuHandlerTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.UnitTests/Handlers/DialogHandlerTests.cs b/SafeExamBrowser.Browser.UnitTests/Handlers/DialogHandlerTests.cs index 887bc4f..b2e8dac 100644 --- a/SafeExamBrowser.Browser.UnitTests/Handlers/DialogHandlerTests.cs +++ b/SafeExamBrowser.Browser.UnitTests/Handlers/DialogHandlerTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -80,7 +80,7 @@ namespace SafeExamBrowser.Browser.UnitTests.Handlers threadId = Thread.CurrentThread.ManagedThreadId; }; - var status = sut.OnFileDialog(default, default, mode, title, initialPath, default, callback.Object); + var status = sut.OnFileDialog(default, default, mode, title, initialPath, default, default, default, callback.Object); sync.WaitOne(); diff --git a/SafeExamBrowser.Browser.UnitTests/Handlers/DisplayHandlerTests.cs b/SafeExamBrowser.Browser.UnitTests/Handlers/DisplayHandlerTests.cs index 1ae483f..e525c9d 100644 --- a/SafeExamBrowser.Browser.UnitTests/Handlers/DisplayHandlerTests.cs +++ b/SafeExamBrowser.Browser.UnitTests/Handlers/DisplayHandlerTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.UnitTests/Handlers/DownloadHandlerTests.cs b/SafeExamBrowser.Browser.UnitTests/Handlers/DownloadHandlerTests.cs index 7fe625a..822a30e 100644 --- a/SafeExamBrowser.Browser.UnitTests/Handlers/DownloadHandlerTests.cs +++ b/SafeExamBrowser.Browser.UnitTests/Handlers/DownloadHandlerTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -108,7 +108,7 @@ namespace SafeExamBrowser.Browser.UnitTests.Handlers }; sut.DownloadUpdated += (state) => failed = true; - sut.OnBeforeDownload(default(IWebBrowser), default(IBrowser), item, callback.Object); + sut.OnBeforeDownload(default, default, item, callback.Object); sync.WaitOne(); callback.VerifyNoOtherCalls(); @@ -145,7 +145,7 @@ namespace SafeExamBrowser.Browser.UnitTests.Handlers sut.ConfigurationDownloadRequested += (f, a) => failed = true; sut.DownloadUpdated += (state) => failed = true; - sut.OnBeforeDownload(default(IWebBrowser), default(IBrowser), item, callback.Object); + sut.OnBeforeDownload(default, default, item, callback.Object); sync.WaitOne(); callback.Verify(c => c.Continue(It.Is(p => p.Equals(downloadPath)), false), Times.Once); @@ -180,7 +180,7 @@ namespace SafeExamBrowser.Browser.UnitTests.Handlers sut.ConfigurationDownloadRequested += (f, a) => failed = true; sut.DownloadUpdated += (state) => failed = true; - sut.OnBeforeDownload(default(IWebBrowser), default(IBrowser), item, callback.Object); + sut.OnBeforeDownload(default, default, item, callback.Object); sync.WaitOne(); var downloadPath = Path.Combine(Environment.ExpandEnvironmentVariables(settings.DownAndUploadDirectory), item.SuggestedFileName); @@ -202,12 +202,13 @@ namespace SafeExamBrowser.Browser.UnitTests.Handlers Url = "https://somehost.org/somefile.abc" }; + appConfig.ConfigurationFileMimeType = "application/seb"; settings.AllowDownloads = false; settings.AllowConfigurationDownloads = false; sut.ConfigurationDownloadRequested += (file, args) => fail = true; sut.DownloadUpdated += (state) => fail = true; - sut.OnBeforeDownload(default(IWebBrowser), default(IBrowser), item, callback.Object); + sut.OnBeforeDownload(default, default, item, callback.Object); callback.VerifyNoOtherCalls(); Assert.IsFalse(fail); @@ -233,7 +234,7 @@ namespace SafeExamBrowser.Browser.UnitTests.Handlers settings.AllowConfigurationDownloads = false; sut.ConfigurationDownloadRequested += (f, a) => failed = true; - sut.OnBeforeDownload(default(IWebBrowser), default(IBrowser), item, callback.Object); + sut.OnBeforeDownload(default, default, item, callback.Object); sync.WaitOne(); Assert.IsFalse(failed); @@ -246,7 +247,7 @@ namespace SafeExamBrowser.Browser.UnitTests.Handlers }; item.PercentComplete = 10; - sut.OnDownloadUpdated(default(IWebBrowser), default(IBrowser), item, default(IDownloadItemCallback)); + sut.OnDownloadUpdated(default, default, item, default); sync.WaitOne(); Assert.IsFalse(state.IsCancelled); @@ -255,7 +256,7 @@ namespace SafeExamBrowser.Browser.UnitTests.Handlers Assert.AreNotEqual(Thread.CurrentThread.ManagedThreadId, threadId); item.PercentComplete = 20; - sut.OnDownloadUpdated(default(IWebBrowser), default(IBrowser), item, default(IDownloadItemCallback)); + sut.OnDownloadUpdated(default, default, item, default); sync.WaitOne(); Assert.IsFalse(state.IsCancelled); @@ -265,7 +266,7 @@ namespace SafeExamBrowser.Browser.UnitTests.Handlers item.PercentComplete = 50; item.IsCancelled = true; - sut.OnDownloadUpdated(default(IWebBrowser), default(IBrowser), item, default(IDownloadItemCallback)); + sut.OnDownloadUpdated(default, default, item, default); sync.WaitOne(); Assert.IsFalse(failed); @@ -297,7 +298,7 @@ namespace SafeExamBrowser.Browser.UnitTests.Handlers }; sut.DownloadUpdated += (state) => failed = true; - sut.OnBeforeDownload(default(IWebBrowser), default(IBrowser), item, callback.Object); + sut.OnBeforeDownload(default, default, item, callback.Object); sync.WaitOne(); callback.Verify(c => c.Continue(It.Is(p => p.Equals(args.DownloadPath)), false), Times.Once); diff --git a/SafeExamBrowser.Browser.UnitTests/Handlers/KeyboardHandlerTests.cs b/SafeExamBrowser.Browser.UnitTests/Handlers/KeyboardHandlerTests.cs index 355bc4b..fd5a89a 100644 --- a/SafeExamBrowser.Browser.UnitTests/Handlers/KeyboardHandlerTests.cs +++ b/SafeExamBrowser.Browser.UnitTests/Handlers/KeyboardHandlerTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.UnitTests/Handlers/RequestHandlerTests.cs b/SafeExamBrowser.Browser.UnitTests/Handlers/RequestHandlerTests.cs index db7954a..64c554f 100644 --- a/SafeExamBrowser.Browser.UnitTests/Handlers/RequestHandlerTests.cs +++ b/SafeExamBrowser.Browser.UnitTests/Handlers/RequestHandlerTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.UnitTests/Handlers/ResourceHandlerTests.cs b/SafeExamBrowser.Browser.UnitTests/Handlers/ResourceHandlerTests.cs index 7270cf6..92b3111 100644 --- a/SafeExamBrowser.Browser.UnitTests/Handlers/ResourceHandlerTests.cs +++ b/SafeExamBrowser.Browser.UnitTests/Handlers/ResourceHandlerTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser.UnitTests/Properties/AssemblyInfo.cs b/SafeExamBrowser.Browser.UnitTests/Properties/AssemblyInfo.cs index a3c17ac..29e305f 100644 --- a/SafeExamBrowser.Browser.UnitTests/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Browser.UnitTests/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Browser.UnitTests")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] [assembly: ComVisible(false)] diff --git a/SafeExamBrowser.Browser.UnitTests/SafeExamBrowser.Browser.UnitTests.csproj b/SafeExamBrowser.Browser.UnitTests/SafeExamBrowser.Browser.UnitTests.csproj index 9a48f2a..df98d1c 100644 --- a/SafeExamBrowser.Browser.UnitTests/SafeExamBrowser.Browser.UnitTests.csproj +++ b/SafeExamBrowser.Browser.UnitTests/SafeExamBrowser.Browser.UnitTests.csproj @@ -1,11 +1,12 @@  - - - - - - + + + + + + + Debug @@ -67,82 +68,82 @@ ..\packages\Castle.Core.5.1.1\lib\net462\Castle.Core.dll - - ..\packages\CefSharp.Common.121.3.130\lib\net462\CefSharp.dll + + ..\packages\CefSharp.Common.131.3.50\lib\net462\CefSharp.dll - - ..\packages\CefSharp.Common.121.3.130\lib\net462\CefSharp.Core.dll + + ..\packages\CefSharp.Common.131.3.50\lib\net462\CefSharp.Core.dll ..\packages\Microsoft.ApplicationInsights.2.22.0\lib\net46\Microsoft.ApplicationInsights.dll - - ..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll + + ..\packages\Microsoft.Testing.Platform.MSBuild.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.MSBuild.dll - - ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll + + ..\packages\Microsoft.Testing.Extensions.Telemetry.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll - - ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll + + ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll + + ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.MSBuild.dll + + ..\packages\Microsoft.Testing.Platform.1.5.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - ..\packages\Moq.4.20.70\lib\net462\Moq.dll + + ..\packages\Moq.4.20.72\lib\net462\Moq.dll - - ..\packages\NuGet.Frameworks.6.9.1\lib\net472\NuGet.Frameworks.dll + + ..\packages\NuGet.Frameworks.6.12.1\lib\net472\NuGet.Frameworks.dll - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + ..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll - - ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll + + ..\packages\System.Collections.Immutable.9.0.1\lib\net462\System.Collections.Immutable.dll - - ..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll + + ..\packages\System.Diagnostics.DiagnosticSource.9.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll - - ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + ..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + ..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll - - ..\packages\System.Reflection.Metadata.8.0.0\lib\net462\System.Reflection.Metadata.dll + + ..\packages\System.Reflection.Metadata.9.0.1\lib\net462\System.Reflection.Metadata.dll - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + ..\packages\System.Threading.Tasks.Extensions.4.6.0\lib\net462\System.Threading.Tasks.Extensions.dll @@ -198,23 +199,31 @@ SafeExamBrowser.UserInterface.Contracts + + + + + + + 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.UnitTests/app.config b/SafeExamBrowser.Browser.UnitTests/app.config index bbe04ab..ee510e7 100644 --- a/SafeExamBrowser.Browser.UnitTests/app.config +++ b/SafeExamBrowser.Browser.UnitTests/app.config @@ -4,11 +4,11 @@ - + - + @@ -16,11 +16,11 @@ - + - + @@ -28,7 +28,7 @@ - + @@ -36,15 +36,19 @@ - + - + - + + + + + diff --git a/SafeExamBrowser.Browser.UnitTests/packages.config b/SafeExamBrowser.Browser.UnitTests/packages.config index dbfb0a9..da5a1d8 100644 --- a/SafeExamBrowser.Browser.UnitTests/packages.config +++ b/SafeExamBrowser.Browser.UnitTests/packages.config @@ -1,26 +1,27 @@  - - - + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SafeExamBrowser.Browser/BrowserApplication.cs b/SafeExamBrowser.Browser/BrowserApplication.cs index f11248d..b27ed63 100644 --- a/SafeExamBrowser.Browser/BrowserApplication.cs +++ b/SafeExamBrowser.Browser/BrowserApplication.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -116,18 +116,10 @@ namespace SafeExamBrowser.Browser if (success) { + InitializeCookies(); + InitializeDownAndUploadDirectory(); InitializeIntegrityKeys(); - if (settings.DeleteCookiesOnStartup) - { - DeleteCookies(); - } - - if (settings.UseTemporaryDownAndUploadDirectory) - { - CreateTemporaryDownAndUploadDirectory(); - } - logger.Info("Initialized browser."); } else @@ -144,36 +136,23 @@ namespace SafeExamBrowser.Browser public void Terminate() { logger.Info("Initiating termination..."); + AwaitReady(); foreach (var window in windows) { window.Closed -= Window_Closed; window.Close(); + logger.Info($"Closed browser window #{window.Id}."); } - if (settings.UseTemporaryDownAndUploadDirectory) - { - DeleteTemporaryDownAndUploadDirectory(); - } - - if (settings.DeleteCookiesOnShutdown) - { - DeleteCookies(); - } - + FinalizeCookies(); + FinalizeDownAndUploadDirectory(); Cef.Shutdown(); - logger.Info("Terminated browser."); + FinalizeCache(); - if (settings.DeleteCacheOnShutdown && settings.DeleteCookiesOnShutdown) - { - DeleteCache(); - } - else - { - logger.Info("Retained browser cache."); - } + logger.Info("Terminated browser."); } private void AwaitReady() @@ -231,46 +210,6 @@ namespace SafeExamBrowser.Browser WindowsChanged?.Invoke(); } - private void CreateTemporaryDownAndUploadDirectory() - { - try - { - settings.DownAndUploadDirectory = Path.Combine(appConfig.TemporaryDirectory, Path.GetRandomFileName()); - Directory.CreateDirectory(settings.DownAndUploadDirectory); - logger.Info($"Created temporary down- and upload directory."); - } - catch (Exception e) - { - logger.Error("Failed to create temporary down- and upload directory!", e); - } - } - - private void DeleteTemporaryDownAndUploadDirectory() - { - try - { - Directory.Delete(settings.DownAndUploadDirectory, true); - logger.Info("Deleted temporary down- and upload directory."); - } - catch (Exception e) - { - logger.Error("Failed to delete temporary down- and upload directory!", e); - } - } - - private void DeleteCache() - { - try - { - Directory.Delete(appConfig.BrowserCachePath, true); - logger.Info("Deleted browser cache."); - } - catch (Exception e) - { - logger.Error("Failed to delete browser cache!", e); - } - } - private void DeleteCookies() { var callback = new TaskDeleteCookiesCallback(); @@ -297,6 +236,50 @@ namespace SafeExamBrowser.Browser } } + private void FinalizeCache() + { + if (settings.DeleteCacheOnShutdown && settings.DeleteCookiesOnShutdown) + { + try + { + Directory.Delete(appConfig.BrowserCachePath, true); + logger.Info("Deleted browser cache."); + } + catch (Exception e) + { + logger.Error("Failed to delete browser cache!", e); + } + } + else + { + logger.Info("Retained browser cache."); + } + } + + private void FinalizeCookies() + { + if (settings.DeleteCookiesOnShutdown) + { + DeleteCookies(); + } + } + + private void FinalizeDownAndUploadDirectory() + { + if (settings.UseTemporaryDownAndUploadDirectory) + { + try + { + Directory.Delete(settings.DownAndUploadDirectory, true); + logger.Info("Deleted temporary down- and upload directory."); + } + catch (Exception e) + { + logger.Error("Failed to delete temporary down- and upload directory!", e); + } + } + } + private string GenerateStartUrl() { var url = settings.StartUrl; @@ -371,6 +354,53 @@ namespace SafeExamBrowser.Browser return cefSettings; } + private void InitializeCookies() + { + if (settings.DeleteCookiesOnStartup) + { + DeleteCookies(); + } + } + + private void InitializeDownAndUploadDirectory() + { + if (settings.UseTemporaryDownAndUploadDirectory) + { + InitializeTemporaryDownAndUploadDirectory(); + } + else if (!string.IsNullOrEmpty(settings.DownAndUploadDirectory)) + { + InitializeCustomDownAndUploadDirectory(); + } + } + + private void InitializeCustomDownAndUploadDirectory() + { + if (!Directory.Exists(Environment.ExpandEnvironmentVariables(settings.DownAndUploadDirectory))) + { + logger.Warn("The configured down- and upload directory does not exist! Falling back to the default directory..."); + settings.DownAndUploadDirectory = default; + } + else + { + logger.Debug("Using custom down- and upload directory as defined in the active configuration."); + } + } + + private void InitializeTemporaryDownAndUploadDirectory() + { + try + { + settings.DownAndUploadDirectory = Path.Combine(appConfig.TemporaryDirectory, Path.GetRandomFileName()); + Directory.CreateDirectory(settings.DownAndUploadDirectory); + logger.Info($"Created temporary down- and upload directory."); + } + catch (Exception e) + { + logger.Error("Failed to create temporary down- and upload directory!", e); + } + } + private void InitializeIntegrityKeys() { logger.Debug($"Browser Exam Key (BEK) transmission is {(settings.SendBrowserExamKey ? "enabled" : "disabled")}."); diff --git a/SafeExamBrowser.Browser/BrowserControl.cs b/SafeExamBrowser.Browser/BrowserControl.cs index 64a14b1..445d4b0 100644 --- a/SafeExamBrowser.Browser/BrowserControl.cs +++ b/SafeExamBrowser.Browser/BrowserControl.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -26,6 +26,9 @@ namespace SafeExamBrowser.Browser private readonly IDialogHandler dialogHandler; private readonly IDisplayHandler displayHandler; private readonly IDownloadHandler downloadHandler; + private readonly IDragHandler dragHandler; + private readonly IFocusHandler focusHandler; + private readonly IJsDialogHandler javaScriptDialogHandler; private readonly IKeyboardHandler keyboardHandler; private readonly ILogger logger; private readonly IRenderProcessMessageHandler renderProcessMessageHandler; @@ -47,6 +50,9 @@ namespace SafeExamBrowser.Browser IDialogHandler dialogHandler, IDisplayHandler displayHandler, IDownloadHandler downloadHandler, + IDragHandler dragHandler, + IFocusHandler focusHandler, + IJsDialogHandler javaScriptDialogHandler, IKeyboardHandler keyboardHandler, ILogger logger, IRenderProcessMessageHandler renderProcessMessageHandler, @@ -57,6 +63,9 @@ namespace SafeExamBrowser.Browser this.dialogHandler = dialogHandler; this.displayHandler = displayHandler; this.downloadHandler = downloadHandler; + this.dragHandler = dragHandler; + this.focusHandler = focusHandler; + this.javaScriptDialogHandler = javaScriptDialogHandler; this.keyboardHandler = keyboardHandler; this.logger = logger; this.renderProcessMessageHandler = renderProcessMessageHandler; @@ -67,6 +76,7 @@ namespace SafeExamBrowser.Browser { if (!control.IsDisposed) { + control.CloseDevTools(); control.Dispose(true); } } @@ -119,22 +129,31 @@ namespace SafeExamBrowser.Browser control.AddressChanged += (o, e) => AddressChanged?.Invoke(e.Address); control.AuthCredentialsRequired += (w, b, o, i, h, p, r, s, c, a) => a.Value = requestHandler.GetAuthCredentials(w, b, o, i, h, p, r, s, c); control.BeforeBrowse += (w, b, f, r, u, i, a) => a.Value = requestHandler.OnBeforeBrowse(w, b, f, r, u, i); - control.BeforeDownload += (w, b, d, c) => downloadHandler.OnBeforeDownload(w, b, d, c); + control.BeforeDownload += (w, b, d, c, a) => a.Value = a.Value = downloadHandler.OnBeforeDownload(w, b, d, c); + control.BeforeUnloadDialog += (w, b, m, r, c, a) => a.Value = javaScriptDialogHandler.OnBeforeUnloadDialog(w, b, m, r, c); control.CanDownload += (w, b, u, r, a) => a.Value = downloadHandler.CanDownload(w, b, u, r); control.ContextCreated += (w, b, f) => renderProcessMessageHandler.OnContextCreated(w, b, f); control.ContextReleased += (w, b, f) => renderProcessMessageHandler.OnContextReleased(w, b, f); + control.DialogClosed += (w, b) => javaScriptDialogHandler.OnDialogClosed(w, b); control.DownloadUpdated += (w, b, d, c) => downloadHandler.OnDownloadUpdated(w, b, d, c); + control.DragEnterCefSharp += (w, b, d, m, a) => a.Value = dragHandler.OnDragEnter(w, b, d, m); + control.DraggableRegionsChanged += (w, b, f, r) => dragHandler.OnDraggableRegionsChanged(w, b, f, r); control.FaviconUrlChanged += (w, b, u) => displayHandler.OnFaviconUrlChange(w, b, u); - control.FileDialogRequested += (w, b, m, t, d, f, c) => dialogHandler.OnFileDialog(w, b, m, t, d, f, c); + control.FileDialogRequested += (w, b, m, t, p, f, e, d, c) => dialogHandler.OnFileDialog(w, b, m, t, p, f, e, d, c); control.FocusedNodeChanged += (w, b, f, n) => renderProcessMessageHandler.OnFocusedNodeChanged(w, b, f, n); + control.GotFocusCefSharp += (w, b) => focusHandler.OnGotFocus(w, b); control.IsBrowserInitializedChanged += Control_IsBrowserInitializedChanged; + control.JavaScriptDialog += (IWebBrowser w, IBrowser b, string u, CefJsDialogType t, string m, string p, IJsDialogCallback c, ref bool s, GenericEventArgs a) => a.Value = javaScriptDialogHandler.OnJSDialog(w, b, u, t, m, p, c, ref s); control.KeyEvent += (w, b, t, k, n, m, s) => keyboardHandler.OnKeyEvent(w, b, t, k, n, m, s); control.LoadError += (o, e) => LoadFailed?.Invoke((int) e.ErrorCode, e.ErrorText, e.Frame.IsMain, e.FailedUrl); control.LoadingProgressChanged += (w, b, p) => displayHandler.OnLoadingProgressChange(w, b, p); control.LoadingStateChanged += (o, e) => LoadingStateChanged?.Invoke(e.IsLoading); control.OpenUrlFromTab += (w, b, f, u, t, g, a) => a.Value = requestHandler.OnOpenUrlFromTab(w, b, f, u, t, g); control.PreKeyEvent += (IWebBrowser w, IBrowser b, KeyType t, int k, int n, CefEventFlags m, bool i, ref bool s, GenericEventArgs a) => a.Value = keyboardHandler.OnPreKeyEvent(w, b, t, k, n, m, i, ref s); + control.ResetDialogState += (w, b) => javaScriptDialogHandler.OnResetDialogState(w, b); control.ResourceRequestHandlerRequired += (IWebBrowser w, IBrowser b, IFrame f, IRequest r, bool n, bool d, string i, ref bool h, ResourceRequestEventArgs a) => a.Handler = requestHandler.GetResourceRequestHandler(w, b, f, r, n, d, i, ref h); + control.SetFocus += (w, b, s, a) => a.Value = focusHandler.OnSetFocus(w, b, s); + control.TakeFocus += (w, b, n) => focusHandler.OnTakeFocus(w, b, n); control.TitleChanged += (o, e) => TitleChanged?.Invoke(e.Title); control.UncaughtExceptionEvent += (w, b, f, e) => renderProcessMessageHandler.OnUncaughtException(w, b, f, e); diff --git a/SafeExamBrowser.Browser/BrowserIconResource.cs b/SafeExamBrowser.Browser/BrowserIconResource.cs index b0896ce..350bbc6 100644 --- a/SafeExamBrowser.Browser/BrowserIconResource.cs +++ b/SafeExamBrowser.Browser/BrowserIconResource.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/BrowserWindow.cs b/SafeExamBrowser.Browser/BrowserWindow.cs index dc67d5a..54d68d7 100644 --- a/SafeExamBrowser.Browser/BrowserWindow.cs +++ b/SafeExamBrowser.Browser/BrowserWindow.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -157,6 +157,9 @@ namespace SafeExamBrowser.Browser var displayHandler = new DisplayHandler(); var downloadLogger = logger.CloneFor($"{nameof(DownloadHandler)} #{Id}"); var downloadHandler = new DownloadHandler(appConfig, downloadLogger, settings, WindowSettings); + var dragHandler = new DragHandler(); + var focusHandler = new FocusHandler(); + var javaScriptDialogHandler = new JavaScriptDialogHandler(); var keyboardHandler = new KeyboardHandler(); var renderHandler = new RenderProcessMessageHandler(appConfig, clipboard, keyGenerator, settings, text); var requestFilter = new RequestFilter(); @@ -181,6 +184,7 @@ namespace SafeExamBrowser.Browser downloadHandler.ConfigurationDownloadRequested += DownloadHandler_ConfigurationDownloadRequested; downloadHandler.DownloadAborted += DownloadHandler_DownloadAborted; downloadHandler.DownloadUpdated += DownloadHandler_DownloadUpdated; + javaScriptDialogHandler.DialogRequested += JavaScriptDialogHandler_DialogRequested; keyboardHandler.FindRequested += KeyboardHandler_FindRequested; keyboardHandler.FocusAddressBarRequested += KeyboardHandler_FocusAddressBarRequested; keyboardHandler.HomeNavigationRequested += HomeNavigationRequested; @@ -195,7 +199,19 @@ namespace SafeExamBrowser.Browser InitializeRequestFilter(requestFilter); - Control = new BrowserControl(clipboard, cefSharpControl, dialogHandler, displayHandler, downloadHandler, keyboardHandler, controlLogger, renderHandler, requestHandler); + Control = new BrowserControl( + clipboard, + cefSharpControl, + dialogHandler, + displayHandler, + downloadHandler, + dragHandler, + focusHandler, + javaScriptDialogHandler, + keyboardHandler, + controlLogger, + renderHandler, + requestHandler); Control.AddressChanged += Control_AddressChanged; Control.LoadFailed += Control_LoadFailed; Control.LoadingStateChanged += Control_LoadingStateChanged; @@ -488,6 +504,20 @@ namespace SafeExamBrowser.Browser } } + private void JavaScriptDialogHandler_DialogRequested(JavaScriptDialogRequestedEventArgs args) + { + logger.Debug($"A JavaScript dialog of type '{args.Type}' has been requested..."); + + if (args.Type == JavaScriptDialogType.LeavePage) + { + args.Success = RequestPageLeave(); + } + else + { + args.Success = RequestPageReload(); + } + } + private void KeyboardHandler_FindRequested() { if (settings.AllowFind) @@ -642,29 +672,61 @@ namespace SafeExamBrowser.Browser private void ReloadRequested() { + logger.Debug("A reload of the current page has been requested..."); + + if (RequestPageReload()) + { + Control.Reload(); + } + } + + private bool RequestPageLeave() + { + var allow = false; + var result = messageBox.Show(TextKey.MessageBox_PageLeaveConfirmation, TextKey.MessageBox_PageLeaveConfirmationTitle, MessageBoxAction.YesNo, MessageBoxIcon.Question, window); + + if (result == MessageBoxResult.Yes) + { + allow = true; + logger.Debug("The page leave has been granted by the user."); + } + else + { + logger.Debug("The page leave has been aborted by the user."); + } + + return allow; + } + + private bool RequestPageReload() + { + var allow = false; + if (WindowSettings.AllowReloading && WindowSettings.ShowReloadWarning) { - var result = messageBox.Show(TextKey.MessageBox_ReloadConfirmation, TextKey.MessageBox_ReloadConfirmationTitle, MessageBoxAction.YesNo, MessageBoxIcon.Question, window); + var result = messageBox.Show(TextKey.MessageBox_PageReloadConfirmation, TextKey.MessageBox_PageReloadConfirmationTitle, MessageBoxAction.YesNo, MessageBoxIcon.Question, window); if (result == MessageBoxResult.Yes) { - logger.Debug("The user confirmed reloading the current page..."); - Control.Reload(); + allow = true; + logger.Debug("The page reload has been granted by the user."); } else { - logger.Debug("The user aborted reloading the current page."); + logger.Debug("The page reload has been aborted by the user."); } } else if (WindowSettings.AllowReloading) { - logger.Debug("Reloading current page..."); - Control.Reload(); + allow = true; + logger.Debug("The page reload has been automatically granted."); } else { - logger.Debug("Blocked reload attempt, as the user is not allowed to reload web pages."); + logger.Debug("The page reload has been blocked, as the user is not allowed to reload web pages."); } + + return allow; } private void ShowDownUploadNotAllowedMessage(bool isDownload = true) diff --git a/SafeExamBrowser.Browser/Clipboard.cs b/SafeExamBrowser.Browser/Clipboard.cs index 151e21e..157c358 100644 --- a/SafeExamBrowser.Browser/Clipboard.cs +++ b/SafeExamBrowser.Browser/Clipboard.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -32,7 +32,22 @@ namespace SafeExamBrowser.Browser internal void Process(JavascriptMessageReceivedEventArgs message) { - + if (settings.UseIsolatedClipboard) + { + try + { + var data = message.ConvertMessageTo(); + + if (data != default && data.Type == "Clipboard" && TrySetContent(data.Content)) + { + Task.Run(() => Changed?.Invoke(data.Id)); + } + } + catch (Exception e) + { + logger.Error($"Failed to process browser message '{message}'!", e); + } + } } private bool TrySetContent(object value) diff --git a/SafeExamBrowser.Browser/Content/Api.js b/SafeExamBrowser.Browser/Content/Api.js index c2c1c9a..2210bf7 100644 --- a/SafeExamBrowser.Browser/Content/Api.js +++ b/SafeExamBrowser.Browser/Content/Api.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Content/Clipboard.js b/SafeExamBrowser.Browser/Content/Clipboard.js index a246187..1b1f94b 100644 --- a/SafeExamBrowser.Browser/Content/Clipboard.js +++ b/SafeExamBrowser.Browser/Content/Clipboard.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zrich, IT Services + * Copyright (c) 2025 ETH Zrich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Content/ContentLoader.cs b/SafeExamBrowser.Browser/Content/ContentLoader.cs index bb7e19c..b88854d 100644 --- a/SafeExamBrowser.Browser/Content/ContentLoader.cs +++ b/SafeExamBrowser.Browser/Content/ContentLoader.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Content/PageZoom.js b/SafeExamBrowser.Browser/Content/PageZoom.js index e9b2012..0345dc2 100644 --- a/SafeExamBrowser.Browser/Content/PageZoom.js +++ b/SafeExamBrowser.Browser/Content/PageZoom.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zrich, IT Services + * Copyright (c) 2025 ETH Zrich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Events/ClipboardChangedEventHandler.cs b/SafeExamBrowser.Browser/Events/ClipboardChangedEventHandler.cs index e6baad3..c6886bb 100644 --- a/SafeExamBrowser.Browser/Events/ClipboardChangedEventHandler.cs +++ b/SafeExamBrowser.Browser/Events/ClipboardChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Events/DialogRequestedEventArgs.cs b/SafeExamBrowser.Browser/Events/DialogRequestedEventArgs.cs index 689da60..27ac2d6 100644 --- a/SafeExamBrowser.Browser/Events/DialogRequestedEventArgs.cs +++ b/SafeExamBrowser.Browser/Events/DialogRequestedEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Events/DialogRequestedEventHandler.cs b/SafeExamBrowser.Browser/Events/DialogRequestedEventHandler.cs index f56a02e..871d51d 100644 --- a/SafeExamBrowser.Browser/Events/DialogRequestedEventHandler.cs +++ b/SafeExamBrowser.Browser/Events/DialogRequestedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Events/DownloadAbortedEventHandler.cs b/SafeExamBrowser.Browser/Events/DownloadAbortedEventHandler.cs index 2e85d86..9abd4b6 100644 --- a/SafeExamBrowser.Browser/Events/DownloadAbortedEventHandler.cs +++ b/SafeExamBrowser.Browser/Events/DownloadAbortedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Events/DownloadUpdatedEventHandler.cs b/SafeExamBrowser.Browser/Events/DownloadUpdatedEventHandler.cs index 2f40368..25a24db 100644 --- a/SafeExamBrowser.Browser/Events/DownloadUpdatedEventHandler.cs +++ b/SafeExamBrowser.Browser/Events/DownloadUpdatedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Events/FaviconChangedEventHandler.cs b/SafeExamBrowser.Browser/Events/FaviconChangedEventHandler.cs index 978f50d..6f09ab9 100644 --- a/SafeExamBrowser.Browser/Events/FaviconChangedEventHandler.cs +++ b/SafeExamBrowser.Browser/Events/FaviconChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Events/PopupRequestedEventArgs.cs b/SafeExamBrowser.Browser/Events/PopupRequestedEventArgs.cs index 001b9f0..22107b4 100644 --- a/SafeExamBrowser.Browser/Events/PopupRequestedEventArgs.cs +++ b/SafeExamBrowser.Browser/Events/PopupRequestedEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Events/PopupRequestedEventHandler.cs b/SafeExamBrowser.Browser/Events/PopupRequestedEventHandler.cs index 4d80490..b13da61 100644 --- a/SafeExamBrowser.Browser/Events/PopupRequestedEventHandler.cs +++ b/SafeExamBrowser.Browser/Events/PopupRequestedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Events/ProgressChangedEventHandler.cs b/SafeExamBrowser.Browser/Events/ProgressChangedEventHandler.cs index b122c8f..54e8c64 100644 --- a/SafeExamBrowser.Browser/Events/ProgressChangedEventHandler.cs +++ b/SafeExamBrowser.Browser/Events/ProgressChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Events/ResetRequestedEventHandler.cs b/SafeExamBrowser.Browser/Events/ResetRequestedEventHandler.cs index a1e7ddd..2de3bd9 100644 --- a/SafeExamBrowser.Browser/Events/ResetRequestedEventHandler.cs +++ b/SafeExamBrowser.Browser/Events/ResetRequestedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Events/UrlEventHandler.cs b/SafeExamBrowser.Browser/Events/UrlEventHandler.cs index 0ca49a9..c770ae5 100644 --- a/SafeExamBrowser.Browser/Events/UrlEventHandler.cs +++ b/SafeExamBrowser.Browser/Events/UrlEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Events/WindowClosedEventHandler.cs b/SafeExamBrowser.Browser/Events/WindowClosedEventHandler.cs index f1ca1a1..bfcfec4 100644 --- a/SafeExamBrowser.Browser/Events/WindowClosedEventHandler.cs +++ b/SafeExamBrowser.Browser/Events/WindowClosedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Filters/RequestFilter.cs b/SafeExamBrowser.Browser/Filters/RequestFilter.cs index 83379a0..9d70070 100644 --- a/SafeExamBrowser.Browser/Filters/RequestFilter.cs +++ b/SafeExamBrowser.Browser/Filters/RequestFilter.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Filters/RuleFactory.cs b/SafeExamBrowser.Browser/Filters/RuleFactory.cs index 056d6fa..3b8ddff 100644 --- a/SafeExamBrowser.Browser/Filters/RuleFactory.cs +++ b/SafeExamBrowser.Browser/Filters/RuleFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Filters/Rules/RegexRule.cs b/SafeExamBrowser.Browser/Filters/Rules/RegexRule.cs index 2f23947..b991b5a 100644 --- a/SafeExamBrowser.Browser/Filters/Rules/RegexRule.cs +++ b/SafeExamBrowser.Browser/Filters/Rules/RegexRule.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Filters/Rules/SimplifiedRule.cs b/SafeExamBrowser.Browser/Filters/Rules/SimplifiedRule.cs index c46d86c..818f0d7 100644 --- a/SafeExamBrowser.Browser/Filters/Rules/SimplifiedRule.cs +++ b/SafeExamBrowser.Browser/Filters/Rules/SimplifiedRule.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Handlers/ContextMenuHandler.cs b/SafeExamBrowser.Browser/Handlers/ContextMenuHandler.cs index e8ccaa6..0309e0b 100644 --- a/SafeExamBrowser.Browser/Handlers/ContextMenuHandler.cs +++ b/SafeExamBrowser.Browser/Handlers/ContextMenuHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Handlers/DialogHandler.cs b/SafeExamBrowser.Browser/Handlers/DialogHandler.cs index 75ff993..0120021 100644 --- a/SafeExamBrowser.Browser/Handlers/DialogHandler.cs +++ b/SafeExamBrowser.Browser/Handlers/DialogHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -18,7 +18,16 @@ namespace SafeExamBrowser.Browser.Handlers { internal event DialogRequestedEventHandler DialogRequested; - public bool OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List acceptFilters, IFileDialogCallback callback) + public bool OnFileDialog( + IWebBrowser webBrowser, + IBrowser browser, + CefFileDialogMode mode, + string title, + string defaultFilePath, + IReadOnlyCollection acceptFilters, + IReadOnlyCollection acceptExtensions, + IReadOnlyCollection acceptDescriptions, + IFileDialogCallback callback) { var args = new DialogRequestedEventArgs { diff --git a/SafeExamBrowser.Browser/Handlers/DisplayHandler.cs b/SafeExamBrowser.Browser/Handlers/DisplayHandler.cs index 80ae155..928473a 100644 --- a/SafeExamBrowser.Browser/Handlers/DisplayHandler.cs +++ b/SafeExamBrowser.Browser/Handlers/DisplayHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Handlers/DownloadHandler.cs b/SafeExamBrowser.Browser/Handlers/DownloadHandler.cs index 2f78650..4f35be5 100644 --- a/SafeExamBrowser.Browser/Handlers/DownloadHandler.cs +++ b/SafeExamBrowser.Browser/Handlers/DownloadHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -50,7 +50,7 @@ namespace SafeExamBrowser.Browser.Handlers return true; } - public void OnBeforeDownload(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IBeforeDownloadCallback callback) + public bool OnBeforeDownload(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IBeforeDownloadCallback callback) { var fileExtension = Path.GetExtension(downloadItem.SuggestedFileName); var isConfigurationFile = false; @@ -86,6 +86,8 @@ namespace SafeExamBrowser.Browser.Handlers logger.Info($"Aborted download request{(windowSettings.UrlPolicy.CanLog() ? $" for '{url}'" : "")}, as downloading is not allowed."); Task.Run(() => DownloadAborted?.Invoke()); } + + return true; } public void OnDownloadUpdated(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IDownloadItemCallback callback) @@ -100,6 +102,8 @@ namespace SafeExamBrowser.Browser.Handlers FullPath = downloadItem.FullPath, IsCancelled = downloadItem.IsCancelled, IsComplete = downloadItem.IsComplete, + IsIndeterminate = downloadItem.PercentComplete < 0, + Size = downloadItem.ReceivedBytes, Url = downloadItem.Url }; diff --git a/SafeExamBrowser.Browser/Handlers/KeyboardHandler.cs b/SafeExamBrowser.Browser/Handlers/KeyboardHandler.cs index f197ba9..c93d17e 100644 --- a/SafeExamBrowser.Browser/Handlers/KeyboardHandler.cs +++ b/SafeExamBrowser.Browser/Handlers/KeyboardHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Handlers/RenderProcessMessageHandler.cs b/SafeExamBrowser.Browser/Handlers/RenderProcessMessageHandler.cs index 3f16250..78a025b 100644 --- a/SafeExamBrowser.Browser/Handlers/RenderProcessMessageHandler.cs +++ b/SafeExamBrowser.Browser/Handlers/RenderProcessMessageHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Handlers/RequestHandler.cs b/SafeExamBrowser.Browser/Handlers/RequestHandler.cs index 5baa8f7..9d00b8f 100644 --- a/SafeExamBrowser.Browser/Handlers/RequestHandler.cs +++ b/SafeExamBrowser.Browser/Handlers/RequestHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Handlers/ResourceHandler.cs b/SafeExamBrowser.Browser/Handlers/ResourceHandler.cs index d70de7e..5a75315 100644 --- a/SafeExamBrowser.Browser/Handlers/ResourceHandler.cs +++ b/SafeExamBrowser.Browser/Handlers/ResourceHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Properties/AssemblyInfo.cs b/SafeExamBrowser.Browser/Properties/AssemblyInfo.cs index a1c6e15..c9045c0 100644 --- a/SafeExamBrowser.Browser/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Browser/Properties/AssemblyInfo.cs @@ -9,7 +9,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Browser")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Browser/SafeExamBrowser.Browser.csproj b/SafeExamBrowser.Browser/SafeExamBrowser.Browser.csproj index cf59044..c3a1bf8 100644 --- a/SafeExamBrowser.Browser/SafeExamBrowser.Browser.csproj +++ b/SafeExamBrowser.Browser/SafeExamBrowser.Browser.csproj @@ -1,8 +1,8 @@  - - - + + + Debug @@ -53,14 +53,14 @@ prompt - - ..\packages\CefSharp.Common.121.3.130\lib\net462\CefSharp.dll + + ..\packages\CefSharp.Common.131.3.50\lib\net462\CefSharp.dll - - ..\packages\CefSharp.Common.121.3.130\lib\net462\CefSharp.Core.dll + + ..\packages\CefSharp.Common.131.3.50\lib\net462\CefSharp.Core.dll - - ..\packages\CefSharp.WinForms.121.3.130\lib\net462\CefSharp.WinForms.dll + + ..\packages\CefSharp.WinForms.131.3.50\lib\net462\CefSharp.WinForms.dll ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll @@ -87,6 +87,9 @@ + + + @@ -103,6 +106,8 @@ + + @@ -118,25 +123,38 @@ + + + + + + + + + + + + + @@ -209,10 +227,10 @@ 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/Wrapper/CefSharpBrowserControl.cs b/SafeExamBrowser.Browser/Wrapper/CefSharpBrowserControl.cs index 9f1358e..cfa16e0 100644 --- a/SafeExamBrowser.Browser/Wrapper/CefSharpBrowserControl.cs +++ b/SafeExamBrowser.Browser/Wrapper/CefSharpBrowserControl.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -8,6 +8,7 @@ using System.Collections.Generic; using CefSharp; +using CefSharp.Enums; using CefSharp.WinForms; using SafeExamBrowser.Browser.Handlers; using SafeExamBrowser.Browser.Wrapper.Events; @@ -20,18 +21,27 @@ namespace SafeExamBrowser.Browser.Wrapper public event AuthCredentialsEventHandler AuthCredentialsRequired; public event BeforeBrowseEventHandler BeforeBrowse; public event BeforeDownloadEventHandler BeforeDownload; + public event BeforeUnloadDialogEventHandler BeforeUnloadDialog; public event CanDownloadEventHandler CanDownload; public event ContextCreatedEventHandler ContextCreated; public event ContextReleasedEventHandler ContextReleased; + public event DialogClosedEventHandler DialogClosed; public event DownloadUpdatedEventHandler DownloadUpdated; + public event DragEnterEventHandler DragEnterCefSharp; + public event DraggableRegionsChangedEventHandler DraggableRegionsChanged; public event FaviconUrlChangedEventHandler FaviconUrlChanged; public event FileDialogRequestedEventHandler FileDialogRequested; public event FocusedNodeChangedEventHandler FocusedNodeChanged; + public event GotFocusEventHandler GotFocusCefSharp; + public event JavaScriptDialogEventHandler JavaScriptDialog; public event KeyEventHandler KeyEvent; public event LoadingProgressChangedEventHandler LoadingProgressChanged; public event OpenUrlFromTabEventHandler OpenUrlFromTab; public event PreKeyEventHandler PreKeyEvent; + public event ResetDialogStateEventHandler ResetDialogState; public event ResourceRequestEventHandler ResourceRequestHandlerRequired; + public event SetFocusEventHandler SetFocus; + public event TakeFocusEventHandler TakeFocus; public event UncaughtExceptionEventHandler UncaughtExceptionEvent; public CefSharpBrowserControl(ILifeSpanHandler lifeSpanHandler, string url) : base(url) @@ -39,6 +49,9 @@ namespace SafeExamBrowser.Browser.Wrapper DialogHandler = new DialogHandlerSwitch(); DisplayHandler = new DisplayHandlerSwitch(); DownloadHandler = new DownloadHandlerSwitch(); + DragHandler = new DragHandlerSwitch(); + FocusHandler = new FocusHandlerSwitch(); + JsDialogHandler = new JavaScriptDialogHandlerSwitch(); KeyboardHandler = new KeyboardHandlerSwitch(); LifeSpanHandler = lifeSpanHandler; MenuHandler = new ContextMenuHandler(); @@ -66,9 +79,14 @@ namespace SafeExamBrowser.Browser.Wrapper BeforeBrowse?.Invoke(webBrowser, browser, frame, request, userGesture, isRedirect, args); } - public void OnBeforeDownload(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IBeforeDownloadCallback callback) + public void OnBeforeDownload(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IBeforeDownloadCallback callback, GenericEventArgs args) { - BeforeDownload?.Invoke(webBrowser, browser, downloadItem, callback); + BeforeDownload?.Invoke(webBrowser, browser, downloadItem, callback, args); + } + + public void OnBeforeUnloadDialog(IWebBrowser webBrowser, IBrowser browser, string message, bool isReload, IJsDialogCallback callback, GenericEventArgs args) + { + BeforeUnloadDialog?.Invoke(webBrowser, browser, message, isReload, callback, args); } public void OnCanDownload(IWebBrowser webBrowser, IBrowser browser, string url, string requestMethod, GenericEventArgs args) @@ -86,19 +104,34 @@ namespace SafeExamBrowser.Browser.Wrapper ContextReleased?.Invoke(webBrowser, browser, frame); } + public void OnDialogClosed(IWebBrowser webBrowser, IBrowser browser) + { + DialogClosed?.Invoke(webBrowser, browser); + } + public void OnDownloadUpdated(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IDownloadItemCallback callback) { DownloadUpdated?.Invoke(webBrowser, browser, downloadItem, callback); } + public void OnDragEnter(IWebBrowser webBrowser, IBrowser browser, IDragData dragData, DragOperationsMask mask, GenericEventArgs args) + { + DragEnterCefSharp?.Invoke(webBrowser, browser, dragData, mask, args); + } + + public void OnDraggableRegionsChanged(IWebBrowser webBrowser, IBrowser browser, IFrame frame, IList regions) + { + DraggableRegionsChanged?.Invoke(webBrowser, browser, frame, regions); + } + public void OnFaviconUrlChange(IWebBrowser webBrowser, IBrowser browser, IList urls) { FaviconUrlChanged?.Invoke(webBrowser, browser, urls); } - public void OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List acceptFilters, IFileDialogCallback callback) + public void OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, IReadOnlyCollection acceptFilters, IReadOnlyCollection acceptExtensions, IReadOnlyCollection acceptDescriptions, IFileDialogCallback callback) { - FileDialogRequested?.Invoke(webBrowser, browser, mode, title, defaultFilePath, acceptFilters, callback); + FileDialogRequested?.Invoke(webBrowser, browser, mode, title, defaultFilePath, acceptFilters, acceptExtensions, acceptDescriptions, callback); } public void OnFocusedNodeChanged(IWebBrowser webBrowser, IBrowser browser, IFrame frame, IDomNode node) @@ -106,6 +139,16 @@ namespace SafeExamBrowser.Browser.Wrapper FocusedNodeChanged?.Invoke(webBrowser, browser, frame, node); } + public void OnGotFocus(IWebBrowser webBrowser, IBrowser browser) + { + GotFocusCefSharp?.Invoke(webBrowser, browser); + } + + public void OnJavaScriptDialog(IWebBrowser webBrowser, IBrowser browser, string originUrl, CefJsDialogType type, string message, string promptText, IJsDialogCallback callback, ref bool suppress, GenericEventArgs args) + { + JavaScriptDialog?.Invoke(webBrowser, browser, originUrl, type, message, promptText, callback, ref suppress, args); + } + public void OnKeyEvent(IWebBrowser webBrowser, IBrowser browser, KeyType type, int windowsKeyCode, int nativeKeyCode, CefEventFlags modifiers, bool isSystemKey) { KeyEvent?.Invoke(webBrowser, browser, type, windowsKeyCode, nativeKeyCode, modifiers, isSystemKey); @@ -126,6 +169,21 @@ namespace SafeExamBrowser.Browser.Wrapper PreKeyEvent?.Invoke(webBrowser, browser, type, windowsKeyCode, nativeKeyCode, modifiers, isSystemKey, ref isKeyboardShortcut, args); } + public void OnResetDialogState(IWebBrowser webBrowser, IBrowser browser) + { + ResetDialogState?.Invoke(webBrowser, browser); + } + + public void OnSetFocus(IWebBrowser webBrowser, IBrowser browser, CefFocusSource source, GenericEventArgs args) + { + SetFocus?.Invoke(webBrowser, browser, source, args); + } + + public void OnTakeFocus(IWebBrowser webBrowser, IBrowser browser, bool next) + { + TakeFocus?.Invoke(webBrowser, browser, next); + } + public void OnUncaughtException(IWebBrowser webBrowser, IBrowser browser, IFrame frame, JavascriptException exception) { UncaughtExceptionEvent?.Invoke(webBrowser, browser, frame, exception); diff --git a/SafeExamBrowser.Browser/Wrapper/CefSharpPopupControl.cs b/SafeExamBrowser.Browser/Wrapper/CefSharpPopupControl.cs index d552666..cc38a3b 100644 --- a/SafeExamBrowser.Browser/Wrapper/CefSharpPopupControl.cs +++ b/SafeExamBrowser.Browser/Wrapper/CefSharpPopupControl.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -8,6 +8,7 @@ using System.Collections.Generic; using CefSharp; +using CefSharp.Enums; using CefSharp.WinForms.Host; using SafeExamBrowser.Browser.Wrapper.Events; @@ -18,18 +19,27 @@ namespace SafeExamBrowser.Browser.Wrapper public event AuthCredentialsEventHandler AuthCredentialsRequired; public event BeforeBrowseEventHandler BeforeBrowse; public event BeforeDownloadEventHandler BeforeDownload; + public event BeforeUnloadDialogEventHandler BeforeUnloadDialog; public event CanDownloadEventHandler CanDownload; public event ContextCreatedEventHandler ContextCreated; public event ContextReleasedEventHandler ContextReleased; + public event DialogClosedEventHandler DialogClosed; public event DownloadUpdatedEventHandler DownloadUpdated; + public event DragEnterEventHandler DragEnterCefSharp; + public event DraggableRegionsChangedEventHandler DraggableRegionsChanged; public event FaviconUrlChangedEventHandler FaviconUrlChanged; public event FileDialogRequestedEventHandler FileDialogRequested; public event FocusedNodeChangedEventHandler FocusedNodeChanged; + public event GotFocusEventHandler GotFocusCefSharp; + public event JavaScriptDialogEventHandler JavaScriptDialog; public event KeyEventHandler KeyEvent; public event LoadingProgressChangedEventHandler LoadingProgressChanged; public event OpenUrlFromTabEventHandler OpenUrlFromTab; public event PreKeyEventHandler PreKeyEvent; + public event ResetDialogStateEventHandler ResetDialogState; public event ResourceRequestEventHandler ResourceRequestHandlerRequired; + public event SetFocusEventHandler SetFocus; + public event TakeFocusEventHandler TakeFocus; public event UncaughtExceptionEventHandler UncaughtExceptionEvent; void ICefSharpControl.Dispose(bool disposing) @@ -60,9 +70,14 @@ namespace SafeExamBrowser.Browser.Wrapper BeforeBrowse?.Invoke(webBrowser, browser, frame, request, userGesture, isRedirect, args); } - public void OnBeforeDownload(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IBeforeDownloadCallback callback) + public void OnBeforeDownload(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IBeforeDownloadCallback callback, GenericEventArgs args) { - BeforeDownload?.Invoke(webBrowser, browser, downloadItem, callback); + BeforeDownload?.Invoke(webBrowser, browser, downloadItem, callback, args); + } + + public void OnBeforeUnloadDialog(IWebBrowser webBrowser, IBrowser browser, string message, bool isReload, IJsDialogCallback callback, GenericEventArgs args) + { + BeforeUnloadDialog?.Invoke(webBrowser, browser, message, isReload, callback, args); } public void OnCanDownload(IWebBrowser webBrowser, IBrowser browser, string url, string requestMethod, GenericEventArgs args) @@ -80,19 +95,34 @@ namespace SafeExamBrowser.Browser.Wrapper ContextReleased?.Invoke(webBrowser, browser, frame); } + public void OnDialogClosed(IWebBrowser webBrowser, IBrowser browser) + { + DialogClosed?.Invoke(webBrowser, browser); + } + public void OnDownloadUpdated(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IDownloadItemCallback callback) { DownloadUpdated?.Invoke(webBrowser, browser, downloadItem, callback); } + public void OnDragEnter(IWebBrowser webBrowser, IBrowser browser, IDragData dragData, DragOperationsMask mask, GenericEventArgs args) + { + DragEnterCefSharp?.Invoke(webBrowser, browser, dragData, mask, args); + } + + public void OnDraggableRegionsChanged(IWebBrowser webBrowser, IBrowser browser, IFrame frame, IList regions) + { + DraggableRegionsChanged?.Invoke(webBrowser, browser, frame, regions); + } + public void OnFaviconUrlChange(IWebBrowser webBrowser, IBrowser browser, IList urls) { FaviconUrlChanged?.Invoke(webBrowser, browser, urls); } - public void OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List acceptFilters, IFileDialogCallback callback) + public void OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, IReadOnlyCollection acceptFilters, IReadOnlyCollection acceptExtensions, IReadOnlyCollection acceptDescriptions, IFileDialogCallback callback) { - FileDialogRequested?.Invoke(webBrowser, browser, mode, title, defaultFilePath, acceptFilters, callback); + FileDialogRequested?.Invoke(webBrowser, browser, mode, title, defaultFilePath, acceptFilters, acceptExtensions, acceptDescriptions, callback); } public void OnFocusedNodeChanged(IWebBrowser webBrowser, IBrowser browser, IFrame frame, IDomNode node) @@ -100,6 +130,16 @@ namespace SafeExamBrowser.Browser.Wrapper FocusedNodeChanged?.Invoke(webBrowser, browser, frame, node); } + public void OnGotFocus(IWebBrowser webBrowser, IBrowser browser) + { + GotFocusCefSharp?.Invoke(webBrowser, browser); + } + + public void OnJavaScriptDialog(IWebBrowser webBrowser, IBrowser browser, string originUrl, CefJsDialogType type, string message, string promptText, IJsDialogCallback callback, ref bool suppress, GenericEventArgs args) + { + JavaScriptDialog?.Invoke(webBrowser, browser, originUrl, type, message, promptText, callback, ref suppress, args); + } + public void OnKeyEvent(IWebBrowser webBrowser, IBrowser browser, KeyType type, int windowsKeyCode, int nativeKeyCode, CefEventFlags modifiers, bool isSystemKey) { KeyEvent?.Invoke(webBrowser, browser, type, windowsKeyCode, nativeKeyCode, modifiers, isSystemKey); @@ -120,6 +160,21 @@ namespace SafeExamBrowser.Browser.Wrapper PreKeyEvent?.Invoke(webBrowser, browser, type, windowsKeyCode, nativeKeyCode, modifiers, isSystemKey, ref isKeyboardShortcut, args); } + public void OnResetDialogState(IWebBrowser webBrowser, IBrowser browser) + { + ResetDialogState?.Invoke(webBrowser, browser); + } + + public void OnSetFocus(IWebBrowser webBrowser, IBrowser browser, CefFocusSource source, GenericEventArgs args) + { + SetFocus?.Invoke(webBrowser, browser, source, args); + } + + public void OnTakeFocus(IWebBrowser webBrowser, IBrowser browser, bool next) + { + TakeFocus?.Invoke(webBrowser, browser, next); + } + public void OnUncaughtException(IWebBrowser webBrowser, IBrowser browser, IFrame frame, JavascriptException exception) { UncaughtExceptionEvent?.Invoke(webBrowser, browser, frame, exception); diff --git a/SafeExamBrowser.Browser/Wrapper/Events/AuthCredentialsEventHandler.cs b/SafeExamBrowser.Browser/Wrapper/Events/AuthCredentialsEventHandler.cs index ffa6d00..b4db821 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/AuthCredentialsEventHandler.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/AuthCredentialsEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Events/BeforeBrowseEventHandler.cs b/SafeExamBrowser.Browser/Wrapper/Events/BeforeBrowseEventHandler.cs index 9b0ff73..de3908d 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/BeforeBrowseEventHandler.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/BeforeBrowseEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Events/BeforeDownloadEventHandler.cs b/SafeExamBrowser.Browser/Wrapper/Events/BeforeDownloadEventHandler.cs index f84b6d2..da11652 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/BeforeDownloadEventHandler.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/BeforeDownloadEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -10,5 +10,5 @@ using CefSharp; namespace SafeExamBrowser.Browser.Wrapper.Events { - internal delegate void BeforeDownloadEventHandler(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IBeforeDownloadCallback callback); + internal delegate bool BeforeDownloadEventHandler(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IBeforeDownloadCallback callback, GenericEventArgs args); } diff --git a/SafeExamBrowser.Browser/Wrapper/Events/CanDownloadEventHandler.cs b/SafeExamBrowser.Browser/Wrapper/Events/CanDownloadEventHandler.cs index 97d661a..6abe259 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/CanDownloadEventHandler.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/CanDownloadEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Events/ContextCreatedEventHandler.cs b/SafeExamBrowser.Browser/Wrapper/Events/ContextCreatedEventHandler.cs index 80b2295..a7fcc84 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/ContextCreatedEventHandler.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/ContextCreatedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Events/ContextReleasedEventHandler.cs b/SafeExamBrowser.Browser/Wrapper/Events/ContextReleasedEventHandler.cs index b9ebeb0..dda5ae4 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/ContextReleasedEventHandler.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/ContextReleasedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Events/DownloadUpdatedEventHandler.cs b/SafeExamBrowser.Browser/Wrapper/Events/DownloadUpdatedEventHandler.cs index 89ec6a8..2dee682 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/DownloadUpdatedEventHandler.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/DownloadUpdatedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Events/FaviconUrlChangedEventHandler.cs b/SafeExamBrowser.Browser/Wrapper/Events/FaviconUrlChangedEventHandler.cs index 4ccba6e..9275b9d 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/FaviconUrlChangedEventHandler.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/FaviconUrlChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Events/FileDialogRequestedEventHandler.cs b/SafeExamBrowser.Browser/Wrapper/Events/FileDialogRequestedEventHandler.cs index 7f665b7..b212d52 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/FileDialogRequestedEventHandler.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/FileDialogRequestedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -11,5 +11,5 @@ using CefSharp; namespace SafeExamBrowser.Browser.Wrapper.Events { - internal delegate void FileDialogRequestedEventHandler(IWebBrowser chromiumWebBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List acceptFilters, IFileDialogCallback callback); + internal delegate void FileDialogRequestedEventHandler(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, IReadOnlyCollection acceptFilters, IReadOnlyCollection acceptExtensions, IReadOnlyCollection acceptDescriptions, IFileDialogCallback callback); } diff --git a/SafeExamBrowser.Browser/Wrapper/Events/FocusedNodeChangedEventHandler.cs b/SafeExamBrowser.Browser/Wrapper/Events/FocusedNodeChangedEventHandler.cs index c1e2e67..0f75e1f 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/FocusedNodeChangedEventHandler.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/FocusedNodeChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Events/GenericEventArgs.cs b/SafeExamBrowser.Browser/Wrapper/Events/GenericEventArgs.cs index 4e957f4..3d07db6 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/GenericEventArgs.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/GenericEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Events/KeyEventHandler.cs b/SafeExamBrowser.Browser/Wrapper/Events/KeyEventHandler.cs index ce5f7e3..0a72e80 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/KeyEventHandler.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/KeyEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Events/LoadingProgressChangedEventHandler.cs b/SafeExamBrowser.Browser/Wrapper/Events/LoadingProgressChangedEventHandler.cs index 53d0dc3..2e6a3e2 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/LoadingProgressChangedEventHandler.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/LoadingProgressChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Events/OpenUrlFromTabEventHandler.cs b/SafeExamBrowser.Browser/Wrapper/Events/OpenUrlFromTabEventHandler.cs index 91351a9..4560632 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/OpenUrlFromTabEventHandler.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/OpenUrlFromTabEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Events/PreKeyEventHandler.cs b/SafeExamBrowser.Browser/Wrapper/Events/PreKeyEventHandler.cs index 84de649..cb9098c 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/PreKeyEventHandler.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/PreKeyEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Events/ResourceRequestEventArgs.cs b/SafeExamBrowser.Browser/Wrapper/Events/ResourceRequestEventArgs.cs index d3e64ff..8d01826 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/ResourceRequestEventArgs.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/ResourceRequestEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Events/ResourceRequestEventHandler.cs b/SafeExamBrowser.Browser/Wrapper/Events/ResourceRequestEventHandler.cs index 430e7da..f47ed7c 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/ResourceRequestEventHandler.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/ResourceRequestEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Events/UncaughtExceptionEventHandler.cs b/SafeExamBrowser.Browser/Wrapper/Events/UncaughtExceptionEventHandler.cs index 1c832f2..b53c45a 100644 --- a/SafeExamBrowser.Browser/Wrapper/Events/UncaughtExceptionEventHandler.cs +++ b/SafeExamBrowser.Browser/Wrapper/Events/UncaughtExceptionEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Extensions.cs b/SafeExamBrowser.Browser/Wrapper/Extensions.cs index 10003ef..124214d 100644 --- a/SafeExamBrowser.Browser/Wrapper/Extensions.cs +++ b/SafeExamBrowser.Browser/Wrapper/Extensions.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Handlers/DialogHandlerSwitch.cs b/SafeExamBrowser.Browser/Wrapper/Handlers/DialogHandlerSwitch.cs index f59ebbc..47639ca 100644 --- a/SafeExamBrowser.Browser/Wrapper/Handlers/DialogHandlerSwitch.cs +++ b/SafeExamBrowser.Browser/Wrapper/Handlers/DialogHandlerSwitch.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -15,19 +15,19 @@ namespace SafeExamBrowser.Browser.Wrapper.Handlers { internal class DialogHandlerSwitch : IDialogHandler { - public bool OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List acceptFilters, IFileDialogCallback callback) + public bool OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, IReadOnlyCollection acceptFilters, IReadOnlyCollection acceptExtensions, IReadOnlyCollection acceptDescriptions, IFileDialogCallback callback) { if (browser.IsPopup) { var control = ChromiumHostControl.FromBrowser(browser) as CefSharpPopupControl; - control?.OnFileDialog(webBrowser, browser, mode, title, defaultFilePath, acceptFilters, callback); + control?.OnFileDialog(webBrowser, browser, mode, title, defaultFilePath, acceptFilters, acceptExtensions, acceptDescriptions, callback); } else { var control = ChromiumWebBrowser.FromBrowser(browser) as CefSharpBrowserControl; - control?.OnFileDialog(webBrowser, browser, mode, title, defaultFilePath, acceptFilters, callback); + control?.OnFileDialog(webBrowser, browser, mode, title, defaultFilePath, acceptFilters, acceptExtensions, acceptDescriptions, callback); } return true; diff --git a/SafeExamBrowser.Browser/Wrapper/Handlers/DisplayHandlerSwitch.cs b/SafeExamBrowser.Browser/Wrapper/Handlers/DisplayHandlerSwitch.cs index c954994..b615b51 100644 --- a/SafeExamBrowser.Browser/Wrapper/Handlers/DisplayHandlerSwitch.cs +++ b/SafeExamBrowser.Browser/Wrapper/Handlers/DisplayHandlerSwitch.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Handlers/DownloadHandlerSwitch.cs b/SafeExamBrowser.Browser/Wrapper/Handlers/DownloadHandlerSwitch.cs index 4e3fcbf..0a14b4b 100644 --- a/SafeExamBrowser.Browser/Wrapper/Handlers/DownloadHandlerSwitch.cs +++ b/SafeExamBrowser.Browser/Wrapper/Handlers/DownloadHandlerSwitch.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -35,20 +35,24 @@ namespace SafeExamBrowser.Browser.Wrapper.Handlers return args.Value; } - public void OnBeforeDownload(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IBeforeDownloadCallback callback) + public bool OnBeforeDownload(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IBeforeDownloadCallback callback) { + var args = new GenericEventArgs(); + if (browser.IsPopup) { var control = ChromiumHostControl.FromBrowser(browser) as CefSharpPopupControl; - control?.OnBeforeDownload(webBrowser, browser, downloadItem, callback); + control?.OnBeforeDownload(webBrowser, browser, downloadItem, callback, args); } else { var control = ChromiumWebBrowser.FromBrowser(browser) as CefSharpBrowserControl; - control?.OnBeforeDownload(webBrowser, browser, downloadItem, callback); + control?.OnBeforeDownload(webBrowser, browser, downloadItem, callback, args); } + + return args.Value; } public void OnDownloadUpdated(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IDownloadItemCallback callback) diff --git a/SafeExamBrowser.Browser/Wrapper/Handlers/KeyboardHandlerSwitch.cs b/SafeExamBrowser.Browser/Wrapper/Handlers/KeyboardHandlerSwitch.cs index e91ee84..a7460f0 100644 --- a/SafeExamBrowser.Browser/Wrapper/Handlers/KeyboardHandlerSwitch.cs +++ b/SafeExamBrowser.Browser/Wrapper/Handlers/KeyboardHandlerSwitch.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Handlers/RenderProcessMessageHandlerSwitch.cs b/SafeExamBrowser.Browser/Wrapper/Handlers/RenderProcessMessageHandlerSwitch.cs index 979c8e4..ce48d60 100644 --- a/SafeExamBrowser.Browser/Wrapper/Handlers/RenderProcessMessageHandlerSwitch.cs +++ b/SafeExamBrowser.Browser/Wrapper/Handlers/RenderProcessMessageHandlerSwitch.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/Handlers/RequestHandlerSwitch.cs b/SafeExamBrowser.Browser/Wrapper/Handlers/RequestHandlerSwitch.cs index cbff918..9a9e223 100644 --- a/SafeExamBrowser.Browser/Wrapper/Handlers/RequestHandlerSwitch.cs +++ b/SafeExamBrowser.Browser/Wrapper/Handlers/RequestHandlerSwitch.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Browser/Wrapper/ICefSharpControl.cs b/SafeExamBrowser.Browser/Wrapper/ICefSharpControl.cs index 6e86f04..50ab911 100644 --- a/SafeExamBrowser.Browser/Wrapper/ICefSharpControl.cs +++ b/SafeExamBrowser.Browser/Wrapper/ICefSharpControl.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Windows.Forms; using CefSharp; +using CefSharp.Enums; using CefSharp.WinForms; using SafeExamBrowser.Browser.Wrapper.Events; using KeyEventHandler = SafeExamBrowser.Browser.Wrapper.Events.KeyEventHandler; @@ -21,18 +22,27 @@ namespace SafeExamBrowser.Browser.Wrapper event AuthCredentialsEventHandler AuthCredentialsRequired; event BeforeBrowseEventHandler BeforeBrowse; event BeforeDownloadEventHandler BeforeDownload; + event BeforeUnloadDialogEventHandler BeforeUnloadDialog; event CanDownloadEventHandler CanDownload; event ContextCreatedEventHandler ContextCreated; event ContextReleasedEventHandler ContextReleased; + event DialogClosedEventHandler DialogClosed; event DownloadUpdatedEventHandler DownloadUpdated; + event DragEnterEventHandler DragEnterCefSharp; + event DraggableRegionsChangedEventHandler DraggableRegionsChanged; event FaviconUrlChangedEventHandler FaviconUrlChanged; event FileDialogRequestedEventHandler FileDialogRequested; event FocusedNodeChangedEventHandler FocusedNodeChanged; + event GotFocusEventHandler GotFocusCefSharp; + event JavaScriptDialogEventHandler JavaScriptDialog; event KeyEventHandler KeyEvent; event LoadingProgressChangedEventHandler LoadingProgressChanged; event OpenUrlFromTabEventHandler OpenUrlFromTab; event PreKeyEventHandler PreKeyEvent; + event ResetDialogStateEventHandler ResetDialogState; event ResourceRequestEventHandler ResourceRequestHandlerRequired; + event SetFocusEventHandler SetFocus; + event TakeFocusEventHandler TakeFocus; event UncaughtExceptionEventHandler UncaughtExceptionEvent; void Dispose(bool disposing); @@ -40,18 +50,27 @@ namespace SafeExamBrowser.Browser.Wrapper void GetResourceRequestHandler(IWebBrowser webBrowser, IBrowser browser, IFrame frame, IRequest request, bool isNavigation, bool isDownload, string requestInitiator, ref bool disableDefaultHandling, ResourceRequestEventArgs args); void Load(string address); void OnBeforeBrowse(IWebBrowser webBrowser, IBrowser browser, IFrame frame, IRequest request, bool userGesture, bool isRedirect, GenericEventArgs args); - void OnBeforeDownload(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IBeforeDownloadCallback callback); + void OnBeforeDownload(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IBeforeDownloadCallback callback, GenericEventArgs args); + void OnBeforeUnloadDialog(IWebBrowser webBrowser, IBrowser browser, string message, bool isReload, IJsDialogCallback callback, GenericEventArgs args); void OnCanDownload(IWebBrowser webBrowser, IBrowser browser, string url, string requestMethod, GenericEventArgs args); void OnContextCreated(IWebBrowser webBrowser, IBrowser browser, IFrame frame); void OnContextReleased(IWebBrowser webBrowser, IBrowser browser, IFrame frame); + void OnDialogClosed(IWebBrowser webBrowser, IBrowser browser); void OnDownloadUpdated(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IDownloadItemCallback callback); + void OnDragEnter(IWebBrowser webBrowser, IBrowser browser, IDragData dragData, DragOperationsMask mask, GenericEventArgs args); + void OnDraggableRegionsChanged(IWebBrowser webBrowser, IBrowser browser, IFrame frame, IList regions); void OnFaviconUrlChange(IWebBrowser webBrowser, IBrowser browser, IList urls); - void OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List acceptFilters, IFileDialogCallback callback); + void OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, IReadOnlyCollection acceptFilters, IReadOnlyCollection acceptExtensions, IReadOnlyCollection acceptDescriptions, IFileDialogCallback callback); void OnFocusedNodeChanged(IWebBrowser webBrowser, IBrowser browser, IFrame frame, IDomNode node); + void OnGotFocus(IWebBrowser webBrowser, IBrowser browser); + void OnJavaScriptDialog(IWebBrowser webBrowser, IBrowser browser, string originUrl, CefJsDialogType type, string message, string promptText, IJsDialogCallback callback, ref bool suppress, GenericEventArgs args); void OnKeyEvent(IWebBrowser webBrowser, IBrowser browser, KeyType type, int windowsKeyCode, int nativeKeyCode, CefEventFlags modifiers, bool isSystemKey); void OnLoadingProgressChange(IWebBrowser webBrowser, IBrowser browser, double progress); void OnOpenUrlFromTab(IWebBrowser webBrowser, IBrowser browser, IFrame frame, string targetUrl, WindowOpenDisposition targetDisposition, bool userGesture, GenericEventArgs args); void OnPreKeyEvent(IWebBrowser webBrowser, IBrowser browser, KeyType type, int windowsKeyCode, int nativeKeyCode, CefEventFlags modifiers, bool isSystemKey, ref bool isKeyboardShortcut, GenericEventArgs args); + void OnResetDialogState(IWebBrowser webBrowser, IBrowser browser); + void OnSetFocus(IWebBrowser webBrowser, IBrowser browser, CefFocusSource source, GenericEventArgs args); + void OnTakeFocus(IWebBrowser webBrowser, IBrowser browser, bool next); void OnUncaughtException(IWebBrowser webBrowser, IBrowser browser, IFrame frame, JavascriptException exception); } } diff --git a/SafeExamBrowser.Browser/packages.config b/SafeExamBrowser.Browser/packages.config index 153cba1..8ce2de0 100644 --- a/SafeExamBrowser.Browser/packages.config +++ b/SafeExamBrowser.Browser/packages.config @@ -1,9 +1,9 @@  - - - - + + + + diff --git a/SafeExamBrowser.Client.UnitTests/ClientControllerTests.cs b/SafeExamBrowser.Client.UnitTests/ClientControllerTests.cs index bb05d4c..9436300 100644 --- a/SafeExamBrowser.Client.UnitTests/ClientControllerTests.cs +++ b/SafeExamBrowser.Client.UnitTests/ClientControllerTests.cs @@ -1,49 +1,20 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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.Collections.Generic; -using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; -using SafeExamBrowser.Applications.Contracts; -using SafeExamBrowser.Browser.Contracts; -using SafeExamBrowser.Browser.Contracts.Events; -using SafeExamBrowser.Client.Contracts; -using SafeExamBrowser.Client.Operations.Events; -using SafeExamBrowser.Communication.Contracts.Data; -using SafeExamBrowser.Communication.Contracts.Events; -using SafeExamBrowser.Communication.Contracts.Hosts; +using SafeExamBrowser.Client.Responsibilities; using SafeExamBrowser.Communication.Contracts.Proxies; using SafeExamBrowser.Configuration.Contracts; -using SafeExamBrowser.Configuration.Contracts.Cryptography; -using SafeExamBrowser.Configuration.Contracts.Integrity; using SafeExamBrowser.Core.Contracts.OperationModel; -using SafeExamBrowser.Core.Contracts.OperationModel.Events; -using SafeExamBrowser.I18n.Contracts; +using SafeExamBrowser.Core.Contracts.ResponsibilityModel; using SafeExamBrowser.Logging.Contracts; -using SafeExamBrowser.Monitoring.Contracts.Applications; -using SafeExamBrowser.Monitoring.Contracts.Display; -using SafeExamBrowser.Monitoring.Contracts.System; -using SafeExamBrowser.Server.Contracts; -using SafeExamBrowser.Server.Contracts.Data; -using SafeExamBrowser.Settings; -using SafeExamBrowser.Settings.Monitoring; -using SafeExamBrowser.Settings.UserInterface; -using SafeExamBrowser.SystemComponents.Contracts.Network; -using SafeExamBrowser.UserInterface.Contracts; -using SafeExamBrowser.UserInterface.Contracts.FileSystemDialog; -using SafeExamBrowser.UserInterface.Contracts.MessageBox; -using SafeExamBrowser.UserInterface.Contracts.Shell; using SafeExamBrowser.UserInterface.Contracts.Windows; -using SafeExamBrowser.UserInterface.Contracts.Windows.Data; -using SafeExamBrowser.WindowsApi.Contracts; -using IWindow = SafeExamBrowser.UserInterface.Contracts.Windows.IWindow; namespace SafeExamBrowser.Client.UnitTests { @@ -51,1093 +22,138 @@ namespace SafeExamBrowser.Client.UnitTests public class ClientControllerTests { private AppConfig appConfig; - private Mock actionCenter; - private Mock applicationMonitor; - private Mock browser; - private Mock clientHost; private ClientContext context; - private Mock coordinator; - private Mock displayMonitor; - private Mock explorerShell; - private Mock fileSystemDialog; - private Mock hashAlgorithm; - private Mock integrityModule; private Mock logger; - private Mock messageBox; - private Mock networkAdapter; private Mock operationSequence; + private Mock> responsibilities; private Mock runtimeProxy; - private Mock sentinel; - private Mock server; - private Guid sessionId; - private AppSettings settings; - private Mock shutdown; private Mock splashScreen; - private Mock taskbar; - private Mock text; - private Mock uiFactory; private ClientController sut; [TestInitialize] public void Initialize() { - var valid = true; - appConfig = new AppConfig(); - actionCenter = new Mock(); - applicationMonitor = new Mock(); - browser = new Mock(); - clientHost = new Mock(); context = new ClientContext(); - coordinator = new Mock(); - displayMonitor = new Mock(); - explorerShell = new Mock(); - fileSystemDialog = new Mock(); - hashAlgorithm = new Mock(); - integrityModule = new Mock(); logger = new Mock(); - messageBox = new Mock(); - networkAdapter = new Mock(); operationSequence = new Mock(); + responsibilities = new Mock>(); runtimeProxy = new Mock(); - sentinel = new Mock(); - server = new Mock(); - sessionId = Guid.NewGuid(); - settings = new AppSettings(); - shutdown = new Mock(); splashScreen = new Mock(); - taskbar = new Mock(); - text = new Mock(); - uiFactory = new Mock(); - integrityModule.Setup(m => m.TryVerifySessionIntegrity(It.IsAny(), It.IsAny(), out valid)).Returns(true); operationSequence.Setup(o => o.TryPerform()).Returns(OperationResult.Success); + operationSequence.Setup(o => o.TryRevert()).Returns(OperationResult.Success); runtimeProxy.Setup(r => r.InformClientReady()).Returns(new CommunicationResult(true)); - uiFactory.Setup(u => u.CreateSplashScreen(It.IsAny())).Returns(new Mock().Object); sut = new ClientController( - actionCenter.Object, - applicationMonitor.Object, context, - coordinator.Object, - displayMonitor.Object, - explorerShell.Object, - fileSystemDialog.Object, - hashAlgorithm.Object, logger.Object, - messageBox.Object, - networkAdapter.Object, operationSequence.Object, + responsibilities.Object, runtimeProxy.Object, - shutdown.Object, - splashScreen.Object, - sentinel.Object, - taskbar.Object, - text.Object, - uiFactory.Object); + splashScreen.Object); context.AppConfig = appConfig; - context.Browser = browser.Object; - context.ClientHost = clientHost.Object; - context.IntegrityModule = integrityModule.Object; - context.Server = server.Object; - context.SessionId = sessionId; - context.Settings = settings; } [TestMethod] - public void ApplicationMonitor_MustCorrectlyHandleExplorerStartWithTaskbar() + public void Shutdown_MustDelegateResponsibilities() { - var boundsActionCenter = 0; - var boundsTaskbar = 0; - var height = 30; var order = 0; - var shell = 0; - var workingArea = 0; - settings.UserInterface.Taskbar.EnableTaskbar = true; - - actionCenter.Setup(a => a.InitializeBounds()).Callback(() => boundsActionCenter = ++order); - explorerShell.Setup(e => e.Terminate()).Callback(() => shell = ++order); - displayMonitor.Setup(w => w.InitializePrimaryDisplay(It.Is(h => h == height))).Callback(() => workingArea = ++order); - taskbar.Setup(t => t.GetAbsoluteHeight()).Returns(height); - taskbar.Setup(t => t.InitializeBounds()).Callback(() => boundsTaskbar = ++order); - - sut.TryStart(); - applicationMonitor.Raise(a => a.ExplorerStarted += null); - - actionCenter.Verify(a => a.InitializeBounds(), Times.Once); - explorerShell.Verify(e => e.Terminate(), Times.Once); - displayMonitor.Verify(d => d.InitializePrimaryDisplay(It.Is(h => h == 0)), Times.Never); - displayMonitor.Verify(d => d.InitializePrimaryDisplay(It.Is(h => h == height)), Times.Once); - taskbar.Verify(t => t.InitializeBounds(), Times.Once); - taskbar.Verify(t => t.GetAbsoluteHeight(), Times.Once); - - Assert.IsTrue(shell == 1); - Assert.IsTrue(workingArea == 2); - Assert.IsTrue(boundsActionCenter == 3); - Assert.IsTrue(boundsTaskbar == 4); - } - - [TestMethod] - public void ApplicationMonitor_MustCorrectlyHandleExplorerStartWithoutTaskbar() - { - var boundsActionCenter = 0; - var boundsTaskbar = 0; - var height = 30; - var order = 0; - var shell = 0; - var workingArea = 0; - - settings.UserInterface.Taskbar.EnableTaskbar = false; - - actionCenter.Setup(a => a.InitializeBounds()).Callback(() => boundsActionCenter = ++order); - explorerShell.Setup(e => e.Terminate()).Callback(() => shell = ++order); - displayMonitor.Setup(w => w.InitializePrimaryDisplay(It.Is(h => h == 0))).Callback(() => workingArea = ++order); - taskbar.Setup(t => t.GetAbsoluteHeight()).Returns(height); - taskbar.Setup(t => t.InitializeBounds()).Callback(() => boundsTaskbar = ++order); - - sut.TryStart(); - applicationMonitor.Raise(a => a.ExplorerStarted += null); - - actionCenter.Verify(a => a.InitializeBounds(), Times.Once); - explorerShell.Verify(e => e.Terminate(), Times.Once); - displayMonitor.Verify(d => d.InitializePrimaryDisplay(It.Is(h => h == 0)), Times.Once); - displayMonitor.Verify(d => d.InitializePrimaryDisplay(It.Is(h => h == height)), Times.Never); - taskbar.Verify(t => t.InitializeBounds(), Times.Once); - taskbar.Verify(t => t.GetAbsoluteHeight(), Times.Never); - - Assert.IsTrue(shell == 1); - Assert.IsTrue(workingArea == 2); - Assert.IsTrue(boundsActionCenter == 3); - Assert.IsTrue(boundsTaskbar == 4); - } - - [TestMethod] - public void ApplicationMonitor_MustPermitApplicationIfChosenByUserAfterFailedTermination() - { - var lockScreen = new Mock(); - var result = new LockScreenResult(); - - lockScreen.Setup(l => l.WaitForResult()).Returns(result); - runtimeProxy.Setup(p => p.RequestShutdown()).Returns(new CommunicationResult(true)); - uiFactory - .Setup(f => f.CreateLockScreen(It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny())) - .Returns(lockScreen.Object) - .Callback, LockScreenSettings>((m, t, o, s) => result.OptionId = o.First().Id); - - sut.TryStart(); - applicationMonitor.Raise(m => m.TerminationFailed += null, new List()); - - runtimeProxy.Verify(p => p.RequestShutdown(), Times.Never); - } - - [TestMethod] - public void ApplicationMonitor_MustRequestShutdownIfChosenByUserAfterFailedTermination() - { - var lockScreen = new Mock(); - var result = new LockScreenResult(); - - lockScreen.Setup(l => l.WaitForResult()).Returns(result); - runtimeProxy.Setup(p => p.RequestShutdown()).Returns(new CommunicationResult(true)); - uiFactory - .Setup(f => f.CreateLockScreen(It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny())) - .Returns(lockScreen.Object) - .Callback, LockScreenSettings>((m, t, o, s) => result.OptionId = o.Last().Id); - - sut.TryStart(); - applicationMonitor.Raise(m => m.TerminationFailed += null, new List()); - - runtimeProxy.Verify(p => p.RequestShutdown(), Times.Once); - } - - [TestMethod] - public void ApplicationMonitor_MustShowLockScreenIfTerminationFailed() - { - var activator1 = new Mock(); - var activator2 = new Mock(); - var activator3 = new Mock(); - var lockScreen = new Mock(); - var result = new LockScreenResult(); - var order = 0; - var pause = 0; - var show = 0; - var wait = 0; - var close = 0; - var resume = 0; - - activator1.Setup(a => a.Pause()).Callback(() => pause = ++order); - activator1.Setup(a => a.Resume()).Callback(() => resume = ++order); - context.Activators.Add(activator1.Object); - context.Activators.Add(activator2.Object); - context.Activators.Add(activator3.Object); - lockScreen.Setup(l => l.Show()).Callback(() => show = ++order); - lockScreen.Setup(l => l.WaitForResult()).Callback(() => wait = ++order).Returns(result); - lockScreen.Setup(l => l.Close()).Callback(() => close = ++order); - uiFactory - .Setup(f => f.CreateLockScreen(It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny())) - .Returns(lockScreen.Object); - - sut.TryStart(); - applicationMonitor.Raise(m => m.TerminationFailed += null, new List()); - - activator1.Verify(a => a.Pause(), Times.Once); - activator1.Verify(a => a.Resume(), Times.Once); - activator2.Verify(a => a.Pause(), Times.Once); - activator2.Verify(a => a.Resume(), Times.Once); - activator3.Verify(a => a.Pause(), Times.Once); - activator3.Verify(a => a.Resume(), Times.Once); - lockScreen.Verify(l => l.Show(), Times.Once); - lockScreen.Verify(l => l.WaitForResult(), Times.Once); - lockScreen.Verify(l => l.Close(), Times.Once); - - Assert.IsTrue(pause == 1); - Assert.IsTrue(show == 2); - Assert.IsTrue(wait == 3); - Assert.IsTrue(close == 4); - Assert.IsTrue(resume == 5); - } - - [TestMethod] - public void ApplicationMonitor_MustValidateQuitPasswordIfTerminationFailed() - { - var hash = "12345"; - var lockScreen = new Mock(); - var result = new LockScreenResult { Password = "test" }; - var attempt = 0; - var correct = new Random().Next(1, 50); - var lockScreenResult = new Func(() => ++attempt == correct ? result : new LockScreenResult()); - - context.Settings.Security.QuitPasswordHash = hash; - hashAlgorithm.Setup(a => a.GenerateHashFor(It.Is(p => p == result.Password))).Returns(hash); - lockScreen.Setup(l => l.WaitForResult()).Returns(lockScreenResult); - uiFactory - .Setup(f => f.CreateLockScreen(It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny())) - .Returns(lockScreen.Object); - - sut.TryStart(); - applicationMonitor.Raise(m => m.TerminationFailed += null, new List()); - - hashAlgorithm.Verify(a => a.GenerateHashFor(It.Is(p => p == result.Password)), Times.Once); - hashAlgorithm.Verify(a => a.GenerateHashFor(It.Is(p => p != result.Password)), Times.Exactly(attempt - 1)); - messageBox.Verify(m => m.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.Is(w => w == lockScreen.Object)), Times.Exactly(attempt - 1)); - } - - [TestMethod] - public void Browser_MustHandleUserIdentifierDetection() - { - var counter = 0; - var identifier = "abc123"; - - settings.SessionMode = SessionMode.Server; - server.Setup(s => s.SendUserIdentifier(It.IsAny())).Returns(() => new ServerResponse(++counter == 3)); - - sut.TryStart(); - browser.Raise(b => b.UserIdentifierDetected += null, identifier); - - server.Verify(s => s.SendUserIdentifier(It.Is(id => id == identifier)), Times.Exactly(3)); - } - - [TestMethod] - public void Browser_MustTerminateIfRequested() - { - runtimeProxy.Setup(p => p.RequestShutdown()).Returns(new CommunicationResult(true)); - - sut.TryStart(); - browser.Raise(b => b.TerminationRequested += null); - - runtimeProxy.Verify(p => p.RequestShutdown(), Times.Once); - } - - [TestMethod] - public void Communication_MustCorrectlyHandleExamSelection() - { - var args = new ExamSelectionRequestEventArgs - { - Exams = new List<(string id, string lms, string name, string url)> { ("", "", "", "") }, - RequestId = Guid.NewGuid() - }; - var dialog = new Mock(); - - dialog.Setup(d => d.Show(It.IsAny())).Returns(new ExamSelectionDialogResult { Success = true }); - uiFactory.Setup(f => f.CreateExamSelectionDialog(It.IsAny>())).Returns(dialog.Object); - - sut.TryStart(); - clientHost.Raise(c => c.ExamSelectionRequested += null, args); - - runtimeProxy.Verify(p => p.SubmitExamSelectionResult(It.Is(g => g == args.RequestId), true, null), Times.Once); - uiFactory.Verify(f => f.CreateExamSelectionDialog(It.IsAny>()), Times.Once); - } - - [TestMethod] - public void Communication_MustCorrectlyHandleMessageBoxRequest() - { - var args = new MessageBoxRequestEventArgs - { - Action = (int) MessageBoxAction.YesNo, - Icon = (int) MessageBoxIcon.Question, - Message = "Some question to be answered", - RequestId = Guid.NewGuid(), - Title = "A Title" - }; - - messageBox.Setup(m => m.Show( - It.Is(s => s == args.Message), - It.Is(s => s == args.Title), - It.Is(a => a == (MessageBoxAction) args.Action), - It.Is(i => i == (MessageBoxIcon) args.Icon), - It.IsAny())).Returns(MessageBoxResult.No); - - sut.TryStart(); - clientHost.Raise(c => c.MessageBoxRequested += null, args); - - runtimeProxy.Verify(p => p.SubmitMessageBoxResult( - It.Is(g => g == args.RequestId), - It.Is(r => r == (int) MessageBoxResult.No)), Times.Once); - } - - [TestMethod] - public void Communication_MustCorrectlyHandlePasswordRequest() - { - var args = new PasswordRequestEventArgs - { - Purpose = PasswordRequestPurpose.LocalSettings, - RequestId = Guid.NewGuid() - }; - var dialog = new Mock(); - var result = new PasswordDialogResult { Password = "blubb", Success = true }; - - dialog.Setup(d => d.Show(It.IsAny())).Returns(result); - uiFactory.Setup(f => f.CreatePasswordDialog(It.IsAny(), It.IsAny())).Returns(dialog.Object); - - sut.TryStart(); - clientHost.Raise(c => c.PasswordRequested += null, args); - - runtimeProxy.Verify(p => p.SubmitPassword( - It.Is(g => g == args.RequestId), - It.Is(b => b == result.Success), - It.Is(s => s == result.Password)), Times.Once); - } - - [TestMethod] - public void Communication_MustCorrectlyHandleAbortedReconfiguration() - { - sut.TryStart(); - clientHost.Raise(c => c.ReconfigurationAborted += null); - - splashScreen.Verify(s => s.Hide(), Times.AtLeastOnce); - } - - [TestMethod] - public void Communication_MustInformUserAboutDeniedReconfiguration() - { - var args = new ReconfigurationEventArgs - { - ConfigurationPath = @"C:\Some\File\Path.seb" - }; - - sut.TryStart(); - clientHost.Raise(c => c.ReconfigurationDenied += null, args); - - messageBox.Verify(m => m.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny()), Times.Once); - } - - [TestMethod] - public void Communication_MustCorrectlyHandleServerCommunicationFailure() - { - var args = new ServerFailureActionRequestEventArgs { RequestId = Guid.NewGuid() }; - var dialog = new Mock(); - - dialog.Setup(d => d.Show(It.IsAny())).Returns(new ServerFailureDialogResult()); - uiFactory.Setup(f => f.CreateServerFailureDialog(It.IsAny(), It.IsAny())).Returns(dialog.Object); - - sut.TryStart(); - clientHost.Raise(c => c.ServerFailureActionRequested += null, args); - - runtimeProxy.Verify(r => r.SubmitServerFailureActionResult(It.Is(g => g == args.RequestId), It.IsAny(), It.IsAny(), It.IsAny()), Times.Once); - uiFactory.Verify(f => f.CreateServerFailureDialog(It.IsAny(), It.IsAny()), Times.Once); - } - - [TestMethod] - public void Communication_MustCorrectlyInitiateShutdown() - { - sut.TryStart(); - clientHost.Raise(c => c.Shutdown += null); - - shutdown.Verify(s => s(), Times.Once); - } - - [TestMethod] - public void Communication_MustShutdownOnLostConnection() - { - sut.TryStart(); - runtimeProxy.Raise(p => p.ConnectionLost += null); - - messageBox.Verify(m => m.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny()), Times.Once); - shutdown.Verify(s => s(), Times.Once); - } - - [TestMethod] - public void DisplayMonitor_MustCorrectlyHandleDisplayChangeWithTaskbar() - { - var boundsActionCenter = 0; - var boundsTaskbar = 0; - var height = 25; - var order = 0; - var workingArea = 0; - - settings.UserInterface.Taskbar.EnableTaskbar = true; - - actionCenter.Setup(t => t.InitializeBounds()).Callback(() => boundsActionCenter = ++order); - displayMonitor.Setup(m => m.InitializePrimaryDisplay(It.Is(h => h == height))).Callback(() => workingArea = ++order); - displayMonitor.Setup(m => m.ValidateConfiguration(It.IsAny())).Returns(new ValidationResult { IsAllowed = true }); - taskbar.Setup(t => t.GetAbsoluteHeight()).Returns(height); - taskbar.Setup(t => t.InitializeBounds()).Callback(() => boundsTaskbar = ++order); - - sut.TryStart(); - displayMonitor.Raise(d => d.DisplayChanged += null); - - actionCenter.Verify(a => a.InitializeBounds(), Times.Once); - displayMonitor.Verify(d => d.InitializePrimaryDisplay(It.Is(h => h == 0)), Times.Never); - displayMonitor.Verify(d => d.InitializePrimaryDisplay(It.Is(h => h == height)), Times.Once); - taskbar.Verify(t => t.GetAbsoluteHeight(), Times.Once); - taskbar.Verify(t => t.InitializeBounds(), Times.Once); - - Assert.IsTrue(workingArea == 1); - Assert.IsTrue(boundsActionCenter == 2); - Assert.IsTrue(boundsTaskbar == 3); - } - - [TestMethod] - public void DisplayMonitor_MustCorrectlyHandleDisplayChangeWithoutTaskbar() - { - var boundsActionCenter = 0; - var boundsTaskbar = 0; - var height = 25; - var order = 0; - var workingArea = 0; - - settings.UserInterface.Taskbar.EnableTaskbar = false; - - actionCenter.Setup(t => t.InitializeBounds()).Callback(() => boundsActionCenter = ++order); - displayMonitor.Setup(w => w.InitializePrimaryDisplay(It.Is(h => h == 0))).Callback(() => workingArea = ++order); - displayMonitor.Setup(m => m.ValidateConfiguration(It.IsAny())).Returns(new ValidationResult { IsAllowed = true }); - taskbar.Setup(t => t.GetAbsoluteHeight()).Returns(height); - taskbar.Setup(t => t.InitializeBounds()).Callback(() => boundsTaskbar = ++order); - - sut.TryStart(); - displayMonitor.Raise(d => d.DisplayChanged += null); - - actionCenter.Verify(a => a.InitializeBounds(), Times.Once); - displayMonitor.Verify(d => d.InitializePrimaryDisplay(It.Is(h => h == 0)), Times.Once); - displayMonitor.Verify(d => d.InitializePrimaryDisplay(It.Is(h => h == height)), Times.Never); - taskbar.Verify(t => t.GetAbsoluteHeight(), Times.Never); - taskbar.Verify(t => t.InitializeBounds(), Times.Once); - - Assert.IsTrue(workingArea == 1); - Assert.IsTrue(boundsActionCenter == 2); - Assert.IsTrue(boundsTaskbar == 3); - } - - [TestMethod] - public void DisplayMonitor_MustShowLockScreenOnDisplayChange() - { - var lockScreen = new Mock(); - - displayMonitor.Setup(m => m.ValidateConfiguration(It.IsAny())).Returns(new ValidationResult { IsAllowed = false }); - lockScreen.Setup(l => l.WaitForResult()).Returns(new LockScreenResult()); - uiFactory - .Setup(f => f.CreateLockScreen(It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny())) - .Returns(lockScreen.Object); - - sut.TryStart(); - displayMonitor.Raise(d => d.DisplayChanged += null); - - lockScreen.Verify(l => l.Show(), Times.Once); - } - - [TestMethod] - public void Operations_MustAskForAutomaticApplicationTermination() - { - var args = new ApplicationTerminationEventArgs(Enumerable.Empty()); - - messageBox.Setup(m => m.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())).Returns(MessageBoxResult.Yes); - - sut.TryStart(); - operationSequence.Raise(s => s.ActionRequired += null, args); - - Assert.IsTrue(args.TerminateProcesses); - } - - [TestMethod] - public void Operations_MustAbortAskingForAutomaticApplicationTermination() - { - var args = new ApplicationTerminationEventArgs(Enumerable.Empty()); - - messageBox.Setup(m => m.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())).Returns(MessageBoxResult.No); - - sut.TryStart(); - operationSequence.Raise(s => s.ActionRequired += null, args); - - Assert.IsFalse(args.TerminateProcesses); - } - - [TestMethod] - public void Operations_MustAskForApplicationPath() - { - var args = new ApplicationNotFoundEventArgs(default, default); - var result = new FileSystemDialogResult { FullPath = @"C:\Some\random\path\", Success = true }; - - fileSystemDialog.Setup(d => d.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())).Returns(result); - text.SetReturnsDefault(string.Empty); - - sut.TryStart(); - operationSequence.Raise(s => s.ActionRequired += null, args); - - Assert.AreEqual(result.FullPath, args.CustomPath); - Assert.IsTrue(args.Success); - } - - [TestMethod] - public void Operations_MustAbortAskingForApplicationPath() - { - var args = new ApplicationNotFoundEventArgs(default, default); - var result = new FileSystemDialogResult { Success = false }; - - fileSystemDialog.Setup(d => d.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())).Returns(result); - text.SetReturnsDefault(string.Empty); - - sut.TryStart(); - operationSequence.Raise(s => s.ActionRequired += null, args); - - Assert.IsNull(args.CustomPath); - Assert.IsFalse(args.Success); - } - - [TestMethod] - public void Operations_MustInformAboutFailedApplicationInitialization() - { - var args = new ApplicationInitializationFailedEventArgs(default, default, FactoryResult.NotFound); - - text.SetReturnsDefault(string.Empty); - sut.TryStart(); - operationSequence.Raise(s => s.ActionRequired += null, args); - - messageBox.Verify(m => m.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny()), Times.Once); - } - - [TestMethod] - public void Operations_MustInformAboutFailedApplicationTermination() - { - var args = new ApplicationTerminationFailedEventArgs(Enumerable.Empty()); - - text.SetReturnsDefault(string.Empty); - sut.TryStart(); - operationSequence.Raise(s => s.ActionRequired += null, args); - - messageBox.Verify(m => m.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny()), Times.Once); - } - - [TestMethod] - public void Operations_MustUpdateProgress() - { - var args = new ProgressChangedEventArgs - { - CurrentValue = 23, - IsIndeterminate = true, - MaxValue = 150, - Progress = true, - Regress = true - }; - - sut.TryStart(); - operationSequence.Raise(o => o.ProgressChanged += null, args); - - splashScreen.Verify(s => s.SetValue(It.Is(i => i == args.CurrentValue)), Times.Once); - splashScreen.Verify(s => s.SetIndeterminate(), Times.Once); - splashScreen.Verify(s => s.SetMaxValue(It.Is(i => i == args.MaxValue)), Times.Once); - splashScreen.Verify(s => s.Progress(), Times.Once); - splashScreen.Verify(s => s.Regress(), Times.Once); - } - - [TestMethod] - public void Operations_MustUpdateStatus() - { - var key = TextKey.OperationStatus_InitializeClipboard; - - sut.TryStart(); - operationSequence.Raise(o => o.StatusChanged += null, key); - - splashScreen.Verify(s => s.UpdateStatus(It.Is(k => k == key), It.IsAny()), Times.Once); - } - - [TestMethod] - public void Reconfiguration_MustAllowIfNoQuitPasswordSet() - { - var args = new DownloadEventArgs(); - - appConfig.TemporaryDirectory = @"C:\Folder\Does\Not\Exist"; - coordinator.Setup(c => c.RequestReconfigurationLock()).Returns(true); - runtimeProxy.Setup(r => r.RequestReconfiguration(It.IsAny(), It.IsAny())).Returns(new CommunicationResult(true)); - - sut.TryStart(); - browser.Raise(b => b.ConfigurationDownloadRequested += null, "filepath.seb", args); - args.Callback(true, string.Empty); - - coordinator.Verify(c => c.RequestReconfigurationLock(), Times.Once); - coordinator.Verify(c => c.ReleaseReconfigurationLock(), Times.Never); - runtimeProxy.Verify(r => r.RequestReconfiguration(It.IsAny(), It.IsAny()), Times.Once); - - Assert.IsTrue(args.AllowDownload); - } - - [TestMethod] - public void Reconfiguration_MustNotAllowWithQuitPasswordAndNoUrl() - { - var args = new DownloadEventArgs(); - - appConfig.TemporaryDirectory = @"C:\Folder\Does\Not\Exist"; - settings.Security.AllowReconfiguration = true; - settings.Security.QuitPasswordHash = "abc123"; - runtimeProxy.Setup(r => r.RequestReconfiguration(It.IsAny(), It.IsAny())).Returns(new CommunicationResult(true)); - - sut.TryStart(); - browser.Raise(b => b.ConfigurationDownloadRequested += null, "filepath.seb", args); - - coordinator.Verify(c => c.RequestReconfigurationLock(), Times.Never); - coordinator.Verify(c => c.ReleaseReconfigurationLock(), Times.Never); - runtimeProxy.Verify(r => r.RequestReconfiguration(It.IsAny(), It.IsAny()), Times.Never); - - Assert.IsFalse(args.AllowDownload); - } - - [TestMethod] - public void Reconfiguration_MustNotAllowConcurrentExecution() - { - var args = new DownloadEventArgs(); - - appConfig.TemporaryDirectory = @"C:\Folder\Does\Not\Exist"; - coordinator.Setup(c => c.RequestReconfigurationLock()).Returns(false); - runtimeProxy.Setup(r => r.RequestReconfiguration(It.IsAny(), It.IsAny())).Returns(new CommunicationResult(true)); - - sut.TryStart(); - browser.Raise(b => b.ConfigurationDownloadRequested += null, "filepath.seb", args); - args.Callback?.Invoke(true, string.Empty); - - coordinator.Verify(c => c.RequestReconfigurationLock(), Times.Once); - coordinator.Verify(c => c.ReleaseReconfigurationLock(), Times.Never); - runtimeProxy.Verify(r => r.RequestReconfiguration(It.IsAny(), It.IsAny()), Times.Never); - - Assert.IsFalse(args.AllowDownload); - } - - [TestMethod] - public void Reconfiguration_MustAllowIfUrlMatches() - { - var args = new DownloadEventArgs { Url = "sebs://www.somehost.org/some/path/some_configuration.seb?query=123" }; - - appConfig.TemporaryDirectory = @"C:\Folder\Does\Not\Exist"; - coordinator.Setup(c => c.RequestReconfigurationLock()).Returns(true); - settings.Security.AllowReconfiguration = true; - settings.Security.QuitPasswordHash = "abc123"; - settings.Security.ReconfigurationUrl = "sebs://www.somehost.org/some/path/*.seb?query=123"; - runtimeProxy.Setup(r => r.RequestReconfiguration(It.IsAny(), It.IsAny())).Returns(new CommunicationResult(true)); - - sut.TryStart(); - browser.Raise(b => b.ConfigurationDownloadRequested += null, "filepath.seb", args); - args.Callback(true, string.Empty); - - coordinator.Verify(c => c.RequestReconfigurationLock(), Times.Once); - coordinator.Verify(c => c.ReleaseReconfigurationLock(), Times.Never); - runtimeProxy.Verify(r => r.RequestReconfiguration(It.IsAny(), It.IsAny()), Times.Once); - - Assert.IsTrue(args.AllowDownload); - } - - [TestMethod] - public void Reconfiguration_MustDenyIfNotAllowed() - { - var args = new DownloadEventArgs(); - - settings.Security.AllowReconfiguration = false; - settings.Security.QuitPasswordHash = "abc123"; - - sut.TryStart(); - browser.Raise(b => b.ConfigurationDownloadRequested += null, "filepath.seb", args); - - coordinator.Verify(c => c.RequestReconfigurationLock(), Times.Never); - coordinator.Verify(c => c.ReleaseReconfigurationLock(), Times.Never); - runtimeProxy.Verify(r => r.RequestReconfiguration(It.IsAny(), It.IsAny()), Times.Never); - - Assert.IsFalse(args.AllowDownload); - } - - [TestMethod] - public void Reconfiguration_MustDenyIfUrlDoesNotMatch() - { - var args = new DownloadEventArgs { Url = "sebs://www.somehost.org/some/path/some_configuration.seb?query=123" }; - - settings.Security.AllowReconfiguration = false; - settings.Security.QuitPasswordHash = "abc123"; - settings.Security.ReconfigurationUrl = "sebs://www.somehost.org/some/path/other_configuration.seb?query=123"; - - sut.TryStart(); - browser.Raise(b => b.ConfigurationDownloadRequested += null, "filepath.seb", args); - - coordinator.Verify(c => c.RequestReconfigurationLock(), Times.Never); - coordinator.Verify(c => c.ReleaseReconfigurationLock(), Times.Never); - runtimeProxy.Verify(r => r.RequestReconfiguration(It.IsAny(), It.IsAny()), Times.Never); - - Assert.IsFalse(args.AllowDownload); - } - - [TestMethod] - public void Reconfiguration_MustCorrectlyHandleDownload() - { - var downloadPath = @"C:\Folder\Does\Not\Exist\filepath.seb"; - var downloadUrl = @"https://www.host.abc/someresource.seb"; - var filename = "filepath.seb"; - var args = new DownloadEventArgs(); - - appConfig.TemporaryDirectory = @"C:\Folder\Does\Not\Exist"; - coordinator.Setup(c => c.RequestReconfigurationLock()).Returns(true); - messageBox.Setup(m => m.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())).Returns(MessageBoxResult.Yes); - runtimeProxy.Setup(r => r.RequestReconfiguration( - It.Is(p => p == downloadPath), - It.Is(u => u == downloadUrl))).Returns(new CommunicationResult(true)); - settings.Security.AllowReconfiguration = true; - - sut.TryStart(); - browser.Raise(b => b.ConfigurationDownloadRequested += null, filename, args); - args.Callback(true, downloadUrl, downloadPath); - - coordinator.Verify(c => c.RequestReconfigurationLock(), Times.Once); - coordinator.Verify(c => c.ReleaseReconfigurationLock(), Times.Never); - runtimeProxy.Verify(r => r.RequestReconfiguration(It.Is(p => p == downloadPath), It.Is(u => u == downloadUrl)), Times.Once); - - Assert.AreEqual(downloadPath, args.DownloadPath); - Assert.IsTrue(args.AllowDownload); - } - - [TestMethod] - public void Reconfiguration_MustCorrectlyHandleFailedDownload() - { - var downloadPath = @"C:\Folder\Does\Not\Exist\filepath.seb"; - var downloadUrl = @"https://www.host.abc/someresource.seb"; - var filename = "filepath.seb"; - var args = new DownloadEventArgs(); - - appConfig.TemporaryDirectory = @"C:\Folder\Does\Not\Exist"; - coordinator.Setup(c => c.RequestReconfigurationLock()).Returns(true); - messageBox.Setup(m => m.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())).Returns(MessageBoxResult.Yes); - runtimeProxy.Setup(r => r.RequestReconfiguration( - It.Is(p => p == downloadPath), - It.Is(u => u == downloadUrl))).Returns(new CommunicationResult(true)); - settings.Security.AllowReconfiguration = true; - - sut.TryStart(); - browser.Raise(b => b.ConfigurationDownloadRequested += null, filename, args); - args.Callback(false, downloadPath); - - coordinator.Verify(c => c.RequestReconfigurationLock(), Times.Once); - coordinator.Verify(c => c.ReleaseReconfigurationLock(), Times.Once); - runtimeProxy.Verify(r => r.RequestReconfiguration(It.IsAny(), It.IsAny()), Times.Never); - } - - [TestMethod] - public void Reconfiguration_MustCorrectlyHandleFailedRequest() - { - var downloadPath = @"C:\Folder\Does\Not\Exist\filepath.seb"; - var downloadUrl = @"https://www.host.abc/someresource.seb"; - var filename = "filepath.seb"; - var args = new DownloadEventArgs(); - - appConfig.TemporaryDirectory = @"C:\Folder\Does\Not\Exist"; - coordinator.Setup(c => c.RequestReconfigurationLock()).Returns(true); - messageBox.Setup(m => m.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())).Returns(MessageBoxResult.Yes); - runtimeProxy.Setup(r => r.RequestReconfiguration( - It.Is(p => p == downloadPath), - It.Is(u => u == downloadUrl))).Returns(new CommunicationResult(false)); - settings.Security.AllowReconfiguration = true; - - sut.TryStart(); - browser.Raise(b => b.ConfigurationDownloadRequested += null, filename, args); - args.Callback(true, downloadUrl, downloadPath); - - coordinator.Verify(c => c.RequestReconfigurationLock(), Times.Once); - coordinator.Verify(c => c.ReleaseReconfigurationLock(), Times.Once); - messageBox.Verify(m => m.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.Is(i => i == MessageBoxIcon.Error), - It.IsAny()), Times.Once); - runtimeProxy.Verify(r => r.RequestReconfiguration(It.IsAny(), It.IsAny()), Times.Once); - } - - [TestMethod] - public void Server_MustInitiateShutdownOnEvent() - { - runtimeProxy.Setup(r => r.RequestShutdown()).Returns(new CommunicationResult(true)); - - sut.TryStart(); - server.Raise(s => s.TerminationRequested += null); - - runtimeProxy.Verify(p => p.RequestShutdown(), Times.Once); - } - - [TestMethod] - public void Shutdown_MustAskUserToConfirm() - { - var args = new System.ComponentModel.CancelEventArgs(); - - messageBox.Setup(m => m.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())).Returns(MessageBoxResult.Yes); - runtimeProxy.Setup(r => r.RequestShutdown()).Returns(new CommunicationResult(true)); - - sut.TryStart(); - taskbar.Raise(t => t.QuitButtonClicked += null, args as object); - - runtimeProxy.Verify(p => p.RequestShutdown(), Times.Once); - Assert.IsFalse(args.Cancel); - } - - [TestMethod] - public void Shutdown_MustNotInitiateIfNotWishedByUser() - { - var args = new System.ComponentModel.CancelEventArgs(); - - messageBox.Setup(m => m.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())).Returns(MessageBoxResult.No); - - sut.TryStart(); - taskbar.Raise(t => t.QuitButtonClicked += null, args as object); - - runtimeProxy.Verify(p => p.RequestShutdown(), Times.Never); - Assert.IsTrue(args.Cancel); - } - - [TestMethod] - public void Shutdown_MustCloseActionCenterAndTaskbarIfEnabled() - { - settings.UserInterface.ActionCenter.EnableActionCenter = true; - settings.UserInterface.Taskbar.EnableTaskbar = true; + responsibilities.Setup(r => r.Delegate(ClientTask.CloseShell)).Callback(() => Assert.AreEqual(1, ++order)); + responsibilities.Setup(r => r.Delegate(ClientTask.DeregisterEvents)).Callback(() => Assert.AreEqual(2, ++order)); + responsibilities.Setup(r => r.Delegate(ClientTask.UpdateSessionIntegrity)).Callback(() => Assert.AreEqual(3, ++order)); sut.Terminate(); - actionCenter.Verify(a => a.Close(), Times.Once); - taskbar.Verify(o => o.Close(), Times.Once); - } - - [TestMethod] - public void Shutdown_MustNotCloseActionCenterAndTaskbarIfNotEnabled() - { - settings.UserInterface.ActionCenter.EnableActionCenter = false; - settings.UserInterface.Taskbar.EnableTaskbar = false; - - sut.Terminate(); - - actionCenter.Verify(a => a.Close(), Times.Never); - taskbar.Verify(o => o.Close(), Times.Never); - } - - [TestMethod] - public void Shutdown_MustShowErrorMessageOnCommunicationFailure() - { - var args = new System.ComponentModel.CancelEventArgs(); - - messageBox.Setup(m => m.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())).Returns(MessageBoxResult.Yes); - runtimeProxy.Setup(r => r.RequestShutdown()).Returns(new CommunicationResult(false)); - - sut.TryStart(); - taskbar.Raise(t => t.QuitButtonClicked += null, args as object); - - messageBox.Verify(m => m.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.Is(i => i == MessageBoxIcon.Error), - It.IsAny()), Times.Once); - runtimeProxy.Verify(p => p.RequestShutdown(), Times.Once); - } - - [TestMethod] - public void Shutdown_MustAskUserForQuitPassword() - { - var args = new System.ComponentModel.CancelEventArgs(); - var dialog = new Mock(); - var dialogResult = new PasswordDialogResult { Password = "blobb", Success = true }; - - settings.Security.QuitPasswordHash = "1234"; - dialog.Setup(d => d.Show(It.IsAny())).Returns(dialogResult); - hashAlgorithm.Setup(h => h.GenerateHashFor(It.Is(s => s == dialogResult.Password))).Returns(settings.Security.QuitPasswordHash); - runtimeProxy.Setup(r => r.RequestShutdown()).Returns(new CommunicationResult(true)); - uiFactory.Setup(u => u.CreatePasswordDialog(It.IsAny(), It.IsAny())).Returns(dialog.Object); - - sut.TryStart(); - taskbar.Raise(t => t.QuitButtonClicked += null, args as object); - - uiFactory.Verify(u => u.CreatePasswordDialog(It.IsAny(), It.IsAny()), Times.Once); - runtimeProxy.Verify(p => p.RequestShutdown(), Times.Once); - - Assert.IsFalse(args.Cancel); - } - - [TestMethod] - public void Shutdown_MustAbortAskingUserForQuitPassword() - { - var args = new System.ComponentModel.CancelEventArgs(); - var dialog = new Mock(); - var dialogResult = new PasswordDialogResult { Success = false }; - - settings.Security.QuitPasswordHash = "1234"; - dialog.Setup(d => d.Show(It.IsAny())).Returns(dialogResult); - runtimeProxy.Setup(r => r.RequestShutdown()).Returns(new CommunicationResult(true)); - uiFactory.Setup(u => u.CreatePasswordDialog(It.IsAny(), It.IsAny())).Returns(dialog.Object); - - sut.TryStart(); - taskbar.Raise(t => t.QuitButtonClicked += null, args as object); - - uiFactory.Verify(u => u.CreatePasswordDialog(It.IsAny(), It.IsAny()), Times.Once); - runtimeProxy.Verify(p => p.RequestShutdown(), Times.Never); - - Assert.IsTrue(args.Cancel); - } - - [TestMethod] - public void Shutdown_MustNotInitiateIfQuitPasswordIncorrect() - { - var args = new System.ComponentModel.CancelEventArgs(); - var dialog = new Mock(); - var dialogResult = new PasswordDialogResult { Password = "blobb", Success = true }; - - settings.Security.QuitPasswordHash = "1234"; - dialog.Setup(d => d.Show(It.IsAny())).Returns(dialogResult); - hashAlgorithm.Setup(h => h.GenerateHashFor(It.IsAny())).Returns("9876"); - uiFactory.Setup(u => u.CreatePasswordDialog(It.IsAny(), It.IsAny())).Returns(dialog.Object); - - sut.TryStart(); - taskbar.Raise(t => t.QuitButtonClicked += null, args as object); - - messageBox.Verify(m => m.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.Is(i => i == MessageBoxIcon.Warning), - It.IsAny()), Times.Once); - uiFactory.Verify(u => u.CreatePasswordDialog(It.IsAny(), It.IsAny()), Times.Once); - runtimeProxy.Verify(p => p.RequestShutdown(), Times.Never); - - Assert.IsTrue(args.Cancel); + responsibilities.Verify(r => r.Delegate(ClientTask.CloseShell), Times.Once); + responsibilities.Verify(r => r.Delegate(ClientTask.DeregisterEvents), Times.Once); + responsibilities.Verify(r => r.Delegate(ClientTask.UpdateSessionIntegrity), Times.Once); } [TestMethod] public void Shutdown_MustRevertOperations() { - operationSequence.Setup(o => o.TryRevert()).Returns(OperationResult.Success); sut.Terminate(); + operationSequence.Verify(o => o.TryRevert(), Times.Once); } [TestMethod] - public void Shutdown_MustNotFailIfDependenciesAreNull() + public void Startup_MustDelegateResponsibilities() { - context.AppConfig = null; - context.Browser = null; - context.ClientHost = null; - context.IntegrityModule = null; - context.Server = null; - context.Settings = null; + var clientReady = int.MaxValue; + var order = 0; - sut.Terminate(); + runtimeProxy.Setup(r => r.InformClientReady()).Returns(new CommunicationResult(true)).Callback(() => clientReady = order); + + // Startup + responsibilities.Setup(r => r.Delegate(ClientTask.RegisterEvents)).Callback(() => Assert.AreEqual(1, ++order)); + responsibilities.Setup(r => r.Delegate(ClientTask.ShowShell)).Callback(() => Assert.AreEqual(2, ++order)); + responsibilities.Setup(r => r.Delegate(ClientTask.AutoStartApplications)).Callback(() => Assert.AreEqual(3, ++order)); + responsibilities.Setup(r => r.Delegate(ClientTask.ScheduleIntegrityVerification)).Callback(() => Assert.AreEqual(4, ++order)); + responsibilities.Setup(r => r.Delegate(ClientTask.StartMonitoring)).Callback(() => Assert.AreEqual(5, ++order)); + + // Client Ready + responsibilities.Setup(r => r.Delegate(ClientTask.VerifySessionIntegrity)).Callback(() => Assert.IsTrue(6 == ++order && clientReady < order)); + + sut.TryStart(); + + responsibilities.Verify(r => r.Delegate(ClientTask.RegisterEvents), Times.Once); + responsibilities.Verify(r => r.Delegate(ClientTask.ShowShell), Times.Once); + responsibilities.Verify(r => r.Delegate(ClientTask.AutoStartApplications), Times.Once); + responsibilities.Verify(r => r.Delegate(ClientTask.ScheduleIntegrityVerification), Times.Once); + responsibilities.Verify(r => r.Delegate(ClientTask.StartMonitoring), Times.Once); + responsibilities.Verify(r => r.Delegate(ClientTask.VerifySessionIntegrity), Times.Once); + } + + [TestMethod] + public void Startup_MustNotDelegateStartupResponsibilitiesOnFailure() + { + operationSequence.Setup(o => o.TryPerform()).Returns(OperationResult.Failed); + + sut.TryStart(); + + responsibilities.Verify(r => r.Delegate(ClientTask.RegisterEvents), Times.Never); + responsibilities.Verify(r => r.Delegate(ClientTask.ShowShell), Times.Never); + responsibilities.Verify(r => r.Delegate(ClientTask.AutoStartApplications), Times.Never); + responsibilities.Verify(r => r.Delegate(ClientTask.ScheduleIntegrityVerification), Times.Never); + responsibilities.Verify(r => r.Delegate(ClientTask.StartMonitoring), Times.Never); + } + + [TestMethod] + public void Startup_MustNotDelegateClientReadyResponsibilitiesOnFailure() + { + runtimeProxy.Setup(r => r.InformClientReady()).Returns(new CommunicationResult(false)); + + sut.TryStart(); + + responsibilities.Verify(r => r.Delegate(ClientTask.VerifySessionIntegrity), Times.Never); + } + + [TestMethod] + public void Startup_MustInformRuntime() + { + sut.TryStart(); + + runtimeProxy.Verify(r => r.InformClientReady(), Times.Once); } [TestMethod] public void Startup_MustPerformOperations() { - var success = sut.TryStart(); + sut.TryStart(); operationSequence.Verify(o => o.TryPerform(), Times.Once); + } + + [TestMethod] + public void Startup_MustSucceed() + { + var success = sut.TryStart(); + Assert.IsTrue(success); } @@ -1170,198 +186,8 @@ namespace SafeExamBrowser.Client.UnitTests [TestMethod] public void Startup_MustUpdateAppConfigForSplashScreen() { - sut.TryStart(); sut.UpdateAppConfig(); - splashScreen.VerifySet(s => s.AppConfig = appConfig, Times.Once); } - - [TestMethod] - public void Startup_MustCorrectlyShowTaskbar() - { - settings.UserInterface.Taskbar.EnableTaskbar = true; - sut.TryStart(); - - taskbar.Verify(t => t.Show(), Times.Once); - - taskbar.Reset(); - operationSequence.Setup(o => o.TryPerform()).Returns(OperationResult.Aborted); - sut.TryStart(); - - taskbar.Verify(t => t.Show(), Times.Never); - - taskbar.Reset(); - settings.UserInterface.Taskbar.EnableTaskbar = false; - operationSequence.Setup(o => o.TryPerform()).Returns(OperationResult.Success); - sut.TryStart(); - - taskbar.Verify(t => t.Show(), Times.Never); - } - - [TestMethod] - public void Startup_MustCorrectlyShowActionCenter() - { - settings.UserInterface.ActionCenter.EnableActionCenter = true; - sut.TryStart(); - - actionCenter.Verify(t => t.Promote(), Times.Once); - actionCenter.Verify(t => t.Show(), Times.Never); - - actionCenter.Reset(); - operationSequence.Setup(o => o.TryPerform()).Returns(OperationResult.Aborted); - sut.TryStart(); - - actionCenter.Verify(t => t.Promote(), Times.Never); - actionCenter.Verify(t => t.Show(), Times.Never); - - actionCenter.Reset(); - settings.UserInterface.ActionCenter.EnableActionCenter = false; - operationSequence.Setup(o => o.TryPerform()).Returns(OperationResult.Success); - sut.TryStart(); - - actionCenter.Verify(t => t.Promote(), Times.Never); - actionCenter.Verify(t => t.Show(), Times.Never); - } - - [TestMethod] - public void Startup_MustAutoStartApplications() - { - var application1 = new Mock>(); - var application2 = new Mock>(); - var application3 = new Mock>(); - - application1.SetupGet(a => a.AutoStart).Returns(true); - application2.SetupGet(a => a.AutoStart).Returns(false); - application3.SetupGet(a => a.AutoStart).Returns(true); - context.Applications.Add(application1.Object); - context.Applications.Add(application2.Object); - context.Applications.Add(application3.Object); - - sut.TryStart(); - - application1.Verify(a => a.Start(), Times.Once); - application2.Verify(a => a.Start(), Times.Never); - application3.Verify(a => a.Start(), Times.Once); - } - - [TestMethod] - public void Startup_MustAutoStartBrowser() - { - settings.Browser.EnableBrowser = true; - browser.SetupGet(b => b.AutoStart).Returns(true); - - sut.TryStart(); - - browser.Verify(b => b.Start(), Times.Once); - browser.Reset(); - browser.SetupGet(b => b.AutoStart).Returns(false); - - sut.TryStart(); - - browser.Verify(b => b.Start(), Times.Never); - } - - [TestMethod] - public void Startup_MustNotAutoStartBrowserIfNotEnabled() - { - settings.Browser.EnableBrowser = false; - browser.SetupGet(b => b.AutoStart).Returns(true); - - sut.TryStart(); - - browser.Verify(b => b.Start(), Times.Never); - } - - [TestMethod] - public void SystemMonitor_MustShowLockScreenOnSessionSwitch() - { - var lockScreen = new Mock(); - - coordinator.Setup(c => c.RequestSessionLock()).Returns(true); - lockScreen.Setup(l => l.WaitForResult()).Returns(new LockScreenResult()); - settings.Service.IgnoreService = true; - uiFactory - .Setup(f => f.CreateLockScreen(It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny())) - .Returns(lockScreen.Object); - - sut.TryStart(); - sentinel.Raise(s => s.SessionChanged += null); - - coordinator.Verify(c => c.RequestSessionLock(), Times.Once); - coordinator.Verify(c => c.ReleaseSessionLock(), Times.Once); - lockScreen.Verify(l => l.Show(), Times.Once); - } - - [TestMethod] - public void SystemMonitor_MustTerminateIfRequestedByUser() - { - var lockScreen = new Mock(); - var result = new LockScreenResult(); - - coordinator.Setup(c => c.RequestSessionLock()).Returns(true); - lockScreen.Setup(l => l.WaitForResult()).Returns(result); - runtimeProxy.Setup(r => r.RequestShutdown()).Returns(new CommunicationResult(true)); - settings.Service.IgnoreService = true; - uiFactory - .Setup(f => f.CreateLockScreen(It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny())) - .Callback(new Action, LockScreenSettings>((message, title, options, settings) => result.OptionId = options.Last().Id)) - .Returns(lockScreen.Object); - - sut.TryStart(); - sentinel.Raise(s => s.SessionChanged += null); - - coordinator.Verify(c => c.RequestSessionLock(), Times.Once); - coordinator.Verify(c => c.ReleaseSessionLock(), Times.Once); - lockScreen.Verify(l => l.Show(), Times.Once); - runtimeProxy.Verify(p => p.RequestShutdown(), Times.Once); - } - - [TestMethod] - public void SystemMonitor_MustDoNothingIfSessionSwitchAllowed() - { - var lockScreen = new Mock(); - - settings.Service.IgnoreService = false; - settings.Service.DisableUserLock = false; - settings.Service.DisableUserSwitch = false; - lockScreen.Setup(l => l.WaitForResult()).Returns(new LockScreenResult()); - uiFactory - .Setup(f => f.CreateLockScreen(It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny())) - .Returns(lockScreen.Object); - - sut.TryStart(); - sentinel.Raise(s => s.SessionChanged += null); - - lockScreen.Verify(l => l.Show(), Times.Never); - } - - [TestMethod] - public void TerminationActivator_MustCorrectlyInitiateShutdown() - { - var order = 0; - var pause = 0; - var resume = 0; - var terminationActivator = new Mock(); - - context.Activators.Add(terminationActivator.Object); - messageBox.Setup(m => m.Show( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())).Returns(MessageBoxResult.Yes); - runtimeProxy.Setup(r => r.RequestShutdown()).Returns(new CommunicationResult(true)); - terminationActivator.Setup(t => t.Pause()).Callback(() => pause = ++order); - terminationActivator.Setup(t => t.Resume()).Callback(() => resume = ++order); - - sut.TryStart(); - terminationActivator.Raise(t => t.Activated += null); - - Assert.AreEqual(1, pause); - Assert.AreEqual(2, resume); - terminationActivator.Verify(t => t.Pause(), Times.Once); - terminationActivator.Verify(t => t.Resume(), Times.Once); - runtimeProxy.Verify(p => p.RequestShutdown(), Times.Once); - } } } diff --git a/SafeExamBrowser.Client.UnitTests/Communication/ClientHostTests.cs b/SafeExamBrowser.Client.UnitTests/Communication/ClientHostTests.cs index a6a95b0..193c039 100644 --- a/SafeExamBrowser.Client.UnitTests/Communication/ClientHostTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Communication/ClientHostTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client.UnitTests/CoordinatorTests.cs b/SafeExamBrowser.Client.UnitTests/CoordinatorTests.cs index d27abcb..b280727 100644 --- a/SafeExamBrowser.Client.UnitTests/CoordinatorTests.cs +++ b/SafeExamBrowser.Client.UnitTests/CoordinatorTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client.UnitTests/Notifications/AboutNotificationControllerTests.cs b/SafeExamBrowser.Client.UnitTests/Notifications/AboutNotificationControllerTests.cs index 706dbe4..c0598ea 100644 --- a/SafeExamBrowser.Client.UnitTests/Notifications/AboutNotificationControllerTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Notifications/AboutNotificationControllerTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client.UnitTests/Notifications/LogNotificationControllerTests.cs b/SafeExamBrowser.Client.UnitTests/Notifications/LogNotificationControllerTests.cs index be13f13..b868d76 100644 --- a/SafeExamBrowser.Client.UnitTests/Notifications/LogNotificationControllerTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Notifications/LogNotificationControllerTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client.UnitTests/Operations/ApplicationOperationTests.cs b/SafeExamBrowser.Client.UnitTests/Operations/ApplicationOperationTests.cs index 5d70d82..b188a08 100644 --- a/SafeExamBrowser.Client.UnitTests/Operations/ApplicationOperationTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Operations/ApplicationOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -7,20 +7,21 @@ */ using System; -using System.Collections.Generic; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using SafeExamBrowser.Applications.Contracts; using SafeExamBrowser.Client.Operations; -using SafeExamBrowser.Client.Operations.Events; using SafeExamBrowser.Core.Contracts.OperationModel; -using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Monitoring.Contracts.Applications; using SafeExamBrowser.Settings; using SafeExamBrowser.Settings.Applications; using SafeExamBrowser.Settings.Security; +using SafeExamBrowser.UserInterface.Contracts.FileSystemDialog; +using SafeExamBrowser.UserInterface.Contracts.MessageBox; +using SafeExamBrowser.UserInterface.Contracts.Windows; +using IWindow = SafeExamBrowser.UserInterface.Contracts.Windows.IWindow; namespace SafeExamBrowser.Client.UnitTests.Operations { @@ -29,7 +30,10 @@ namespace SafeExamBrowser.Client.UnitTests.Operations { private ClientContext context; private Mock factory; + private Mock fileSystemDialog; + private Mock messageBox; private Mock monitor; + private Mock splashScreen; private Mock logger; private Mock text; @@ -40,32 +44,29 @@ namespace SafeExamBrowser.Client.UnitTests.Operations { context = new ClientContext(); factory = new Mock(); - monitor = new Mock(); + fileSystemDialog = new Mock(); logger = new Mock(); + messageBox = new Mock(); + monitor = new Mock(); + splashScreen = new Mock(); text = new Mock(); context.Settings = new AppSettings(); + text.Setup(t => t.Get(It.IsAny())).Returns(string.Empty); - sut = new ApplicationOperation(context, factory.Object, monitor.Object, logger.Object, text.Object); + sut = new ApplicationOperation(context, factory.Object, fileSystemDialog.Object, logger.Object, messageBox.Object, monitor.Object, splashScreen.Object, text.Object); } [TestMethod] public void Perform_MustAbortIfUserDeniesAutoTermination() { var initialization = new InitializationResult(); - var args = default(ActionRequiredEventArgs); initialization.RunningApplications.Add(new RunningApplication(default)); + messageBox + .Setup(m => m.Show(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(MessageBoxResult.No); monitor.Setup(m => m.Initialize(It.IsAny())).Returns(initialization); - sut.ActionRequired += (a) => - { - args = a; - - if (a is ApplicationTerminationEventArgs t) - { - t.TerminateProcesses = false; - } - }; var result = sut.Perform(); @@ -73,7 +74,6 @@ namespace SafeExamBrowser.Client.UnitTests.Operations monitor.VerifyNoOtherCalls(); Assert.AreEqual(OperationResult.Aborted, result); - Assert.IsInstanceOfType(args, typeof(ApplicationTerminationEventArgs)); } [TestMethod] @@ -81,27 +81,27 @@ namespace SafeExamBrowser.Client.UnitTests.Operations { var application = new Mock>().Object; var applicationSettings = new WhitelistApplication { AllowCustomPath = true }; - var args = default(ActionRequiredEventArgs); context.Settings.Applications.Whitelist.Add(applicationSettings); factory.Setup(f => f.TryCreate(It.IsAny(), out application)).Returns(FactoryResult.NotFound); + fileSystemDialog + .Setup(d => d.Show( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Returns(new FileSystemDialogResult { Success = false }); monitor.Setup(m => m.Initialize(It.IsAny())).Returns(new InitializationResult()); - sut.ActionRequired += (a) => - { - args = a; - - if (a is ApplicationNotFoundEventArgs n) - { - n.Success = false; - } - }; var result = sut.Perform(); factory.Verify(f => f.TryCreate(It.Is(a => a == applicationSettings), out application), Times.Once); Assert.AreEqual(OperationResult.Success, result); - Assert.IsInstanceOfType(args, typeof(ApplicationInitializationFailedEventArgs)); } [TestMethod] @@ -109,7 +109,6 @@ namespace SafeExamBrowser.Client.UnitTests.Operations { var application = new Mock>().Object; var applicationSettings = new WhitelistApplication { AllowCustomPath = true }; - var args = default(ActionRequiredEventArgs); var attempt = 0; var correct = new Random().Next(2, 50); var factoryResult = new Func(() => ++attempt == correct ? FactoryResult.Success : FactoryResult.NotFound); @@ -117,22 +116,23 @@ namespace SafeExamBrowser.Client.UnitTests.Operations context.Settings.Applications.Whitelist.Add(applicationSettings); factory.Setup(f => f.TryCreate(It.IsAny(), out application)).Returns(factoryResult); monitor.Setup(m => m.Initialize(It.IsAny())).Returns(new InitializationResult()); - sut.ActionRequired += (a) => - { - args = a; - - if (a is ApplicationNotFoundEventArgs n) - { - n.Success = true; - } - }; + fileSystemDialog + .Setup(d => d.Show( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Returns(new FileSystemDialogResult { Success = true }); var result = sut.Perform(); factory.Verify(f => f.TryCreate(It.Is(a => a == applicationSettings), out application), Times.Exactly(correct)); Assert.AreEqual(OperationResult.Success, result); - Assert.IsInstanceOfType(args, typeof(ApplicationNotFoundEventArgs)); } [TestMethod] @@ -140,38 +140,26 @@ namespace SafeExamBrowser.Client.UnitTests.Operations { var application = new Mock>().Object; var applicationSettings = new WhitelistApplication { AllowCustomPath = false }; - var args = default(ActionRequiredEventArgs); context.Settings.Applications.Whitelist.Add(applicationSettings); factory.Setup(f => f.TryCreate(It.IsAny(), out application)).Returns(FactoryResult.NotFound); monitor.Setup(m => m.Initialize(It.IsAny())).Returns(new InitializationResult()); - sut.ActionRequired += (a) => - { - args = a; - - if (a is ApplicationNotFoundEventArgs) - { - Assert.Fail(); - } - }; var result = sut.Perform(); factory.Verify(f => f.TryCreate(It.Is(a => a == applicationSettings), out application), Times.Once); + fileSystemDialog.VerifyNoOtherCalls(); Assert.AreEqual(OperationResult.Success, result); - Assert.IsInstanceOfType(args, typeof(ApplicationInitializationFailedEventArgs)); } [TestMethod] public void Perform_MustFailIfAutoTerminationFails() { var initialization = new InitializationResult(); - var args = default(ActionRequiredEventArgs); initialization.FailedAutoTerminations.Add(new RunningApplication(default)); monitor.Setup(m => m.Initialize(It.IsAny())).Returns(initialization); - sut.ActionRequired += (a) => args = a; var result = sut.Perform(); @@ -179,7 +167,6 @@ namespace SafeExamBrowser.Client.UnitTests.Operations monitor.VerifyNoOtherCalls(); Assert.AreEqual(OperationResult.Failed, result); - Assert.IsInstanceOfType(args, typeof(ApplicationTerminationFailedEventArgs)); } [TestMethod] @@ -187,20 +174,14 @@ namespace SafeExamBrowser.Client.UnitTests.Operations { var application = new RunningApplication(default); var initialization = new InitializationResult(); - var args = new List(); initialization.RunningApplications.Add(application); + messageBox + .Setup(m => m.Show(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(MessageBoxResult.Yes); + monitor.Setup(m => m.Initialize(It.IsAny())).Returns(initialization); monitor.Setup(m => m.Initialize(It.IsAny())).Returns(initialization); monitor.Setup(m => m.TryTerminate(It.IsAny())).Returns(false); - sut.ActionRequired += (a) => - { - args.Add(a); - - if (a is ApplicationTerminationEventArgs t) - { - t.TerminateProcesses = true; - } - }; var result = sut.Perform(); @@ -208,8 +189,6 @@ namespace SafeExamBrowser.Client.UnitTests.Operations monitor.Verify(m => m.TryTerminate(It.Is(a => a == application)), Times.Once); Assert.AreEqual(OperationResult.Failed, result); - Assert.IsInstanceOfType(args[0], typeof(ApplicationTerminationEventArgs)); - Assert.IsInstanceOfType(args[1], typeof(ApplicationTerminationFailedEventArgs)); } [TestMethod] @@ -217,19 +196,20 @@ namespace SafeExamBrowser.Client.UnitTests.Operations { var application = new Mock>().Object; var applicationSettings = new WhitelistApplication(); - var args = default(ActionRequiredEventArgs); context.Settings.Applications.Whitelist.Add(applicationSettings); factory.Setup(f => f.TryCreate(It.IsAny(), out application)).Returns(FactoryResult.Error); + messageBox + .Setup(m => m.Show(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(MessageBoxResult.No); monitor.Setup(m => m.Initialize(It.IsAny())).Returns(new InitializationResult()); - sut.ActionRequired += (a) => args = a; var result = sut.Perform(); factory.Verify(f => f.TryCreate(It.Is(a => a == applicationSettings), out application), Times.Once); + messageBox.Verify(m => m.Show(It.IsAny(), It.IsAny(), It.IsAny(), It.Is(i => i == MessageBoxIcon.Error), It.IsAny()), Times.Once); Assert.AreEqual(OperationResult.Success, result); - Assert.IsInstanceOfType(args, typeof(ApplicationInitializationFailedEventArgs)); } [TestMethod] @@ -301,22 +281,17 @@ namespace SafeExamBrowser.Client.UnitTests.Operations var application2 = new RunningApplication(default); var application3 = new RunningApplication(default); var initialization = new InitializationResult(); - var args = default(ActionRequiredEventArgs); initialization.RunningApplications.Add(application1); initialization.RunningApplications.Add(application2); initialization.RunningApplications.Add(application3); + + messageBox + .Setup(m => m.Show(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(MessageBoxResult.Yes); + monitor.Setup(m => m.Initialize(It.IsAny())).Returns(initialization); monitor.Setup(m => m.TryTerminate(It.IsAny())).Returns(true); - sut.ActionRequired += (a) => - { - args = a; - - if (a is ApplicationTerminationEventArgs t) - { - t.TerminateProcesses = true; - } - }; var result = sut.Perform(); @@ -326,7 +301,6 @@ namespace SafeExamBrowser.Client.UnitTests.Operations monitor.Verify(m => m.TryTerminate(It.Is(a => a == application3)), Times.Once); Assert.AreEqual(OperationResult.Success, result); - Assert.IsInstanceOfType(args, typeof(ApplicationTerminationEventArgs)); } [TestMethod] diff --git a/SafeExamBrowser.Client.UnitTests/Operations/BrowserOperationTests.cs b/SafeExamBrowser.Client.UnitTests/Operations/BrowserOperationTests.cs index 7e3c0be..fe89dac 100644 --- a/SafeExamBrowser.Client.UnitTests/Operations/BrowserOperationTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Operations/BrowserOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client.UnitTests/Operations/ClientHostDisconnectionOperationTests.cs b/SafeExamBrowser.Client.UnitTests/Operations/ClientHostDisconnectionOperationTests.cs index 8f67df9..d9a0e35 100644 --- a/SafeExamBrowser.Client.UnitTests/Operations/ClientHostDisconnectionOperationTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Operations/ClientHostDisconnectionOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client.UnitTests/Operations/ClipboardOperationTests.cs b/SafeExamBrowser.Client.UnitTests/Operations/ClipboardOperationTests.cs index 7c752eb..b3a6217 100644 --- a/SafeExamBrowser.Client.UnitTests/Operations/ClipboardOperationTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Operations/ClipboardOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client.UnitTests/Operations/ConfigurationOperationTests.cs b/SafeExamBrowser.Client.UnitTests/Operations/ConfigurationOperationTests.cs index d8cf53e..5b3d3b5 100644 --- a/SafeExamBrowser.Client.UnitTests/Operations/ConfigurationOperationTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Operations/ConfigurationOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client.UnitTests/Operations/DisplayMonitorOperationTests.cs b/SafeExamBrowser.Client.UnitTests/Operations/DisplayMonitorOperationTests.cs index 647ce52..5c90f16 100644 --- a/SafeExamBrowser.Client.UnitTests/Operations/DisplayMonitorOperationTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Operations/DisplayMonitorOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client.UnitTests/Operations/KeyboardInterceptorOperationTests.cs b/SafeExamBrowser.Client.UnitTests/Operations/KeyboardInterceptorOperationTests.cs index 379cb5f..6199343 100644 --- a/SafeExamBrowser.Client.UnitTests/Operations/KeyboardInterceptorOperationTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Operations/KeyboardInterceptorOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client.UnitTests/Operations/MouseInterceptorOperationTests.cs b/SafeExamBrowser.Client.UnitTests/Operations/MouseInterceptorOperationTests.cs index 54e4082..6c3faa8 100644 --- a/SafeExamBrowser.Client.UnitTests/Operations/MouseInterceptorOperationTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Operations/MouseInterceptorOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client.UnitTests/Operations/ProctoringOperationTests.cs b/SafeExamBrowser.Client.UnitTests/Operations/ProctoringOperationTests.cs index 5f386df..b6689d5 100644 --- a/SafeExamBrowser.Client.UnitTests/Operations/ProctoringOperationTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Operations/ProctoringOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client.UnitTests/Operations/RuntimeConnectionOperationTests.cs b/SafeExamBrowser.Client.UnitTests/Operations/RuntimeConnectionOperationTests.cs index 16bca51..99869b4 100644 --- a/SafeExamBrowser.Client.UnitTests/Operations/RuntimeConnectionOperationTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Operations/RuntimeConnectionOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client.UnitTests/Operations/ServerOperationTests.cs b/SafeExamBrowser.Client.UnitTests/Operations/ServerOperationTests.cs index 2d044f0..bf14aad 100644 --- a/SafeExamBrowser.Client.UnitTests/Operations/ServerOperationTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Operations/ServerOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client.UnitTests/Operations/ShellOperationTests.cs b/SafeExamBrowser.Client.UnitTests/Operations/ShellOperationTests.cs index 7ddf54c..398b1ba 100644 --- a/SafeExamBrowser.Client.UnitTests/Operations/ShellOperationTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Operations/ShellOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client.UnitTests/Properties/AssemblyInfo.cs b/SafeExamBrowser.Client.UnitTests/Properties/AssemblyInfo.cs index 3aa0f7c..aa025b8 100644 --- a/SafeExamBrowser.Client.UnitTests/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Client.UnitTests/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Client.UnitTests")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] [assembly: ComVisible(false)] diff --git a/SafeExamBrowser.Client.UnitTests/SafeExamBrowser.Client.UnitTests.csproj b/SafeExamBrowser.Client.UnitTests/SafeExamBrowser.Client.UnitTests.csproj index 9eacc0b..a59da77 100644 --- a/SafeExamBrowser.Client.UnitTests/SafeExamBrowser.Client.UnitTests.csproj +++ b/SafeExamBrowser.Client.UnitTests/SafeExamBrowser.Client.UnitTests.csproj @@ -1,8 +1,9 @@  - - - + + + + Debug AnyCPU @@ -66,80 +67,80 @@ ..\packages\Microsoft.ApplicationInsights.2.22.0\lib\net46\Microsoft.ApplicationInsights.dll - - ..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll + + ..\packages\Microsoft.Testing.Platform.MSBuild.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.MSBuild.dll - - ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll + + ..\packages\Microsoft.Testing.Extensions.Telemetry.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll - - ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll + + ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll + + ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.MSBuild.dll + + ..\packages\Microsoft.Testing.Platform.1.5.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - ..\packages\Moq.4.20.70\lib\net462\Moq.dll + + ..\packages\Moq.4.20.72\lib\net462\Moq.dll - - ..\packages\NuGet.Frameworks.6.9.1\lib\net472\NuGet.Frameworks.dll + + ..\packages\NuGet.Frameworks.6.12.1\lib\net472\NuGet.Frameworks.dll - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + ..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll - - ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll + + ..\packages\System.Collections.Immutable.9.0.1\lib\net462\System.Collections.Immutable.dll - - ..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll + + ..\packages\System.Diagnostics.DiagnosticSource.9.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll ..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll True True - - ..\packages\System.IO.Packaging.8.0.0\lib\net462\System.IO.Packaging.dll + + ..\packages\System.IO.Packaging.9.0.1\lib\net462\System.IO.Packaging.dll - - ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + ..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + ..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll - - ..\packages\System.Reflection.Metadata.8.0.0\lib\net462\System.Reflection.Metadata.dll + + ..\packages\System.Reflection.Metadata.9.0.1\lib\net462\System.Reflection.Metadata.dll - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + ..\packages\System.Threading.Tasks.Extensions.4.6.0\lib\net462\System.Threading.Tasks.Extensions.dll ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll @@ -166,6 +167,15 @@ + + + + + + + + + @@ -243,18 +253,26 @@ SafeExamBrowser.WindowsApi.Contracts + + + + + + + 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.Client.UnitTests/app.config b/SafeExamBrowser.Client.UnitTests/app.config index 7bb557d..fd46d39 100644 --- a/SafeExamBrowser.Client.UnitTests/app.config +++ b/SafeExamBrowser.Client.UnitTests/app.config @@ -4,7 +4,7 @@ - + @@ -12,7 +12,7 @@ - + @@ -28,7 +28,7 @@ - + @@ -36,15 +36,27 @@ - + - + - + + + + + + + + + + + + + diff --git a/SafeExamBrowser.Client.UnitTests/packages.config b/SafeExamBrowser.Client.UnitTests/packages.config index ad1c678..580576b 100644 --- a/SafeExamBrowser.Client.UnitTests/packages.config +++ b/SafeExamBrowser.Client.UnitTests/packages.config @@ -2,25 +2,26 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - + + + + + + \ No newline at end of file diff --git a/SafeExamBrowser.Client/App.config b/SafeExamBrowser.Client/App.config index 75c3c9a..5dba9a7 100644 --- a/SafeExamBrowser.Client/App.config +++ b/SafeExamBrowser.Client/App.config @@ -13,6 +13,14 @@ + + + + + + + + diff --git a/SafeExamBrowser.Client/App.cs b/SafeExamBrowser.Client/App.cs index 170b71d..71f2c6b 100644 --- a/SafeExamBrowser.Client/App.cs +++ b/SafeExamBrowser.Client/App.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client/ClientContext.cs b/SafeExamBrowser.Client/ClientContext.cs index 6b7f027..45a2f25 100644 --- a/SafeExamBrowser.Client/ClientContext.cs +++ b/SafeExamBrowser.Client/ClientContext.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -10,13 +10,20 @@ using System; using System.Collections.Generic; using SafeExamBrowser.Applications.Contracts; using SafeExamBrowser.Browser.Contracts; +using SafeExamBrowser.Client.Responsibilities; using SafeExamBrowser.Communication.Contracts.Hosts; +using SafeExamBrowser.Communication.Contracts.Proxies; using SafeExamBrowser.Configuration.Contracts; +using SafeExamBrowser.Configuration.Contracts.Cryptography; using SafeExamBrowser.Configuration.Contracts.Integrity; +using SafeExamBrowser.Core.Contracts.ResponsibilityModel; using SafeExamBrowser.Proctoring.Contracts; using SafeExamBrowser.Server.Contracts; using SafeExamBrowser.Settings; +using SafeExamBrowser.UserInterface.Contracts; +using SafeExamBrowser.UserInterface.Contracts.MessageBox; using SafeExamBrowser.UserInterface.Contracts.Shell; +using SafeExamBrowser.UserInterface.Contracts.Windows; namespace SafeExamBrowser.Client { @@ -50,16 +57,41 @@ namespace SafeExamBrowser.Client /// internal IClientHost ClientHost { get; set; } + /// + /// The hash algorithm. + /// + internal IHashAlgorithm HashAlgorithm { get; set; } + /// /// The integrity module. /// internal IIntegrityModule IntegrityModule { get; set; } + /// + /// The currently active lock screen, or default if no lock screen is active. + /// + internal ILockScreen LockScreen { get; set; } + + /// + /// The message box. + /// + internal IMessageBox MessageBox { get; set; } + /// /// The proctoring controller to be used if the current session has proctoring enabled. /// internal IProctoringController Proctoring { get; set; } + /// + /// The client responsibilities. + /// + internal IResponsibilityCollection Responsibilities { get; set; } + + /// + /// The runtime communication proxy. + /// + internal IRuntimeProxy Runtime { get; set; } + /// /// The server proxy to be used if the current session mode is . /// @@ -75,6 +107,11 @@ namespace SafeExamBrowser.Client /// internal AppSettings Settings { get; set; } + /// + /// The user interface factory. + /// + internal IUserInterfaceFactory UserInterfaceFactory { get; set; } + internal ClientContext() { Activators = new List(); diff --git a/SafeExamBrowser.Client/ClientController.cs b/SafeExamBrowser.Client/ClientController.cs index 24a2996..bdc1c2d 100644 --- a/SafeExamBrowser.Client/ClientController.cs +++ b/SafeExamBrowser.Client/ClientController.cs @@ -1,172 +1,77 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text.RegularExpressions; -using System.Threading; -using System.Threading.Tasks; -using SafeExamBrowser.Applications.Contracts; -using SafeExamBrowser.Browser.Contracts; -using SafeExamBrowser.Browser.Contracts.Events; -using SafeExamBrowser.Client.Contracts; -using SafeExamBrowser.Client.Operations.Events; -using SafeExamBrowser.Communication.Contracts.Data; -using SafeExamBrowser.Communication.Contracts.Events; -using SafeExamBrowser.Communication.Contracts.Hosts; +using SafeExamBrowser.Client.Responsibilities; using SafeExamBrowser.Communication.Contracts.Proxies; -using SafeExamBrowser.Configuration.Contracts.Cryptography; -using SafeExamBrowser.Configuration.Contracts.Integrity; using SafeExamBrowser.Core.Contracts.OperationModel; -using SafeExamBrowser.Core.Contracts.OperationModel.Events; -using SafeExamBrowser.I18n.Contracts; +using SafeExamBrowser.Core.Contracts.ResponsibilityModel; using SafeExamBrowser.Logging.Contracts; -using SafeExamBrowser.Monitoring.Contracts.Applications; -using SafeExamBrowser.Monitoring.Contracts.Display; -using SafeExamBrowser.Monitoring.Contracts.System; -using SafeExamBrowser.Monitoring.Contracts.System.Events; -using SafeExamBrowser.Proctoring.Contracts; -using SafeExamBrowser.Proctoring.Contracts.Events; -using SafeExamBrowser.Server.Contracts; -using SafeExamBrowser.Server.Contracts.Data; -using SafeExamBrowser.Settings; -using SafeExamBrowser.SystemComponents.Contracts.Network; -using SafeExamBrowser.SystemComponents.Contracts.Network.Events; -using SafeExamBrowser.UserInterface.Contracts; -using SafeExamBrowser.UserInterface.Contracts.FileSystemDialog; -using SafeExamBrowser.UserInterface.Contracts.MessageBox; -using SafeExamBrowser.UserInterface.Contracts.Shell; using SafeExamBrowser.UserInterface.Contracts.Windows; -using SafeExamBrowser.UserInterface.Contracts.Windows.Data; -using SafeExamBrowser.WindowsApi.Contracts; namespace SafeExamBrowser.Client { internal class ClientController { - private readonly IActionCenter actionCenter; - private readonly IApplicationMonitor applicationMonitor; private readonly ClientContext context; - private readonly ICoordinator coordinator; - private readonly IDisplayMonitor displayMonitor; - private readonly IExplorerShell explorerShell; - private readonly IFileSystemDialog fileSystemDialog; - private readonly IHashAlgorithm hashAlgorithm; private readonly ILogger logger; - private readonly IMessageBox messageBox; - private readonly INetworkAdapter networkAdapter; private readonly IOperationSequence operations; + private readonly IResponsibilityCollection responsibilities; private readonly IRuntimeProxy runtime; - private readonly Action shutdown; private readonly ISplashScreen splashScreen; - private readonly ISystemSentinel sentinel; - private readonly ITaskbar taskbar; - private readonly IText text; - private readonly IUserInterfaceFactory uiFactory; - - private IBrowserApplication Browser => context.Browser; - private IClientHost ClientHost => context.ClientHost; - private IIntegrityModule IntegrityModule => context.IntegrityModule; - private IProctoringController Proctoring => context.Proctoring; - private IServerProxy Server => context.Server; - private AppSettings Settings => context.Settings; - - private ILockScreen lockScreen; internal ClientController( - IActionCenter actionCenter, - IApplicationMonitor applicationMonitor, ClientContext context, - ICoordinator coordinator, - IDisplayMonitor displayMonitor, - IExplorerShell explorerShell, - IFileSystemDialog fileSystemDialog, - IHashAlgorithm hashAlgorithm, ILogger logger, - IMessageBox messageBox, - INetworkAdapter networkAdapter, IOperationSequence operations, + IResponsibilityCollection responsibilities, IRuntimeProxy runtime, - Action shutdown, - ISplashScreen splashScreen, - ISystemSentinel sentinel, - ITaskbar taskbar, - IText text, - IUserInterfaceFactory uiFactory) + ISplashScreen splashScreen) { - this.actionCenter = actionCenter; - this.applicationMonitor = applicationMonitor; this.context = context; - this.coordinator = coordinator; - this.displayMonitor = displayMonitor; - this.explorerShell = explorerShell; - this.fileSystemDialog = fileSystemDialog; - this.hashAlgorithm = hashAlgorithm; this.logger = logger; - this.messageBox = messageBox; - this.networkAdapter = networkAdapter; this.operations = operations; + this.responsibilities = responsibilities; this.runtime = runtime; - this.shutdown = shutdown; this.splashScreen = splashScreen; - this.sentinel = sentinel; - this.taskbar = taskbar; - this.text = text; - this.uiFactory = uiFactory; } internal bool TryStart() { logger.Info("Initiating startup procedure..."); - operations.ActionRequired += Operations_ActionRequired; - operations.ProgressChanged += Operations_ProgressChanged; - operations.StatusChanged += Operations_StatusChanged; - splashScreen.Show(); splashScreen.BringToForeground(); - var success = operations.TryPerform() == OperationResult.Success; + var initialized = false; + var result = operations.TryPerform(); - if (success) + if (result == OperationResult.Success) { - RegisterEvents(); - ShowShell(); - AutoStartApplications(); - ScheduleIntegrityVerification(); - //StartMonitoring(); - - var communication = runtime.InformClientReady(); - - if (communication.Success) - { - logger.Info("Application successfully initialized."); - logger.Log(string.Empty); - - VerifySessionIntegrity(); - } - else - { - success = false; - logger.Error("Failed to inform runtime that client is ready!"); - } + DelegateStartupResponsibilities(); + initialized = TryInformRuntime(); } else { - logger.Info("Application startup aborted!"); + logger.Info($"Application startup {(result == OperationResult.Aborted ? "aborted" : "failed")}!"); logger.Log(string.Empty); } + if (initialized) + { + logger.Info("Application successfully initialized."); + logger.Log(string.Empty); + + DelegateClientReadyResponsibilities(); + } + splashScreen.Hide(); - return success; + return initialized; } internal void Terminate() @@ -177,9 +82,7 @@ namespace SafeExamBrowser.Client splashScreen.Show(); splashScreen.BringToForeground(); - CloseShell(); - DeregisterEvents(); - UpdateSessionIntegrity(); + DelegateShutdownResponsibilities(); var success = operations.TryRevert() == OperationResult.Success; @@ -190,7 +93,7 @@ namespace SafeExamBrowser.Client } else { - logger.Info("Shutdown procedure failed!"); + logger.Info("Application shutdown failed!"); logger.Log(string.Empty); } @@ -202,988 +105,34 @@ namespace SafeExamBrowser.Client splashScreen.AppConfig = context.AppConfig; } - private void RegisterEvents() + private void DelegateStartupResponsibilities() { - actionCenter.QuitButtonClicked += Shell_QuitButtonClicked; - applicationMonitor.ExplorerStarted += ApplicationMonitor_ExplorerStarted; - applicationMonitor.TerminationFailed += ApplicationMonitor_TerminationFailed; - Browser.ConfigurationDownloadRequested += Browser_ConfigurationDownloadRequested; - Browser.LoseFocusRequested += Browser_LoseFocusRequested; - Browser.TerminationRequested += Browser_TerminationRequested; - Browser.UserIdentifierDetected += Browser_UserIdentifierDetected; - ClientHost.ExamSelectionRequested += ClientHost_ExamSelectionRequested; - ClientHost.MessageBoxRequested += ClientHost_MessageBoxRequested; - ClientHost.PasswordRequested += ClientHost_PasswordRequested; - ClientHost.ReconfigurationAborted += ClientHost_ReconfigurationAborted; - ClientHost.ReconfigurationDenied += ClientHost_ReconfigurationDenied; - ClientHost.ServerFailureActionRequested += ClientHost_ServerFailureActionRequested; - ClientHost.Shutdown += ClientHost_Shutdown; - displayMonitor.DisplayChanged += DisplayMonitor_DisplaySettingsChanged; - networkAdapter.CredentialsRequired += NetworkAdapter_CredentialsRequired; - runtime.ConnectionLost += Runtime_ConnectionLost; - sentinel.CursorChanged += Sentinel_CursorChanged; - sentinel.EaseOfAccessChanged += Sentinel_EaseOfAccessChanged; - sentinel.SessionChanged += Sentinel_SessionChanged; - sentinel.StickyKeysChanged += Sentinel_StickyKeysChanged; - taskbar.LoseFocusRequested += Taskbar_LoseFocusRequested; - taskbar.QuitButtonClicked += Shell_QuitButtonClicked; - - foreach (var activator in context.Activators.OfType()) - { - activator.Activated += TerminationActivator_Activated; - } - - if (Server != null) - { - Server.LockScreenConfirmed += Server_LockScreenConfirmed; - Server.LockScreenRequested += Server_LockScreenRequested; - Server.TerminationRequested += Server_TerminationRequested; - } + responsibilities.Delegate(ClientTask.RegisterEvents); + responsibilities.Delegate(ClientTask.ShowShell); + responsibilities.Delegate(ClientTask.AutoStartApplications); + //responsibilities.Delegate(ClientTask.ScheduleIntegrityVerification); + //responsibilities.Delegate(ClientTask.StartMonitoring); } - private void DeregisterEvents() + private void DelegateClientReadyResponsibilities() { - actionCenter.QuitButtonClicked -= Shell_QuitButtonClicked; - applicationMonitor.ExplorerStarted -= ApplicationMonitor_ExplorerStarted; - applicationMonitor.TerminationFailed -= ApplicationMonitor_TerminationFailed; - displayMonitor.DisplayChanged -= DisplayMonitor_DisplaySettingsChanged; - runtime.ConnectionLost -= Runtime_ConnectionLost; - sentinel.CursorChanged -= Sentinel_CursorChanged; - sentinel.EaseOfAccessChanged -= Sentinel_EaseOfAccessChanged; - sentinel.SessionChanged -= Sentinel_SessionChanged; - sentinel.StickyKeysChanged -= Sentinel_StickyKeysChanged; - taskbar.LoseFocusRequested -= Taskbar_LoseFocusRequested; - taskbar.QuitButtonClicked -= Shell_QuitButtonClicked; - - if (Browser != null) - { - Browser.ConfigurationDownloadRequested -= Browser_ConfigurationDownloadRequested; - Browser.LoseFocusRequested -= Browser_LoseFocusRequested; - Browser.TerminationRequested -= Browser_TerminationRequested; - Browser.UserIdentifierDetected -= Browser_UserIdentifierDetected; - } - - if (ClientHost != null) - { - ClientHost.ExamSelectionRequested -= ClientHost_ExamSelectionRequested; - ClientHost.MessageBoxRequested -= ClientHost_MessageBoxRequested; - ClientHost.PasswordRequested -= ClientHost_PasswordRequested; - ClientHost.ReconfigurationAborted -= ClientHost_ReconfigurationAborted; - ClientHost.ReconfigurationDenied -= ClientHost_ReconfigurationDenied; - ClientHost.ServerFailureActionRequested -= ClientHost_ServerFailureActionRequested; - ClientHost.Shutdown -= ClientHost_Shutdown; - } - - if (Server != null) - { - Server.LockScreenConfirmed -= Server_LockScreenConfirmed; - Server.LockScreenRequested -= Server_LockScreenRequested; - Server.TerminationRequested -= Server_TerminationRequested; - } - - foreach (var activator in context.Activators.OfType()) - { - activator.Activated -= TerminationActivator_Activated; - } + //responsibilities.Delegate(ClientTask.VerifySessionIntegrity); } - private void CloseShell() + private void DelegateShutdownResponsibilities() { - if (Settings?.UserInterface.ActionCenter.EnableActionCenter == true) - { - //actionCenter.Close(); - } - - if (Settings?.UserInterface.Taskbar.EnableTaskbar == true) - { - //taskbar.Close(); - } + responsibilities.Delegate(ClientTask.CloseShell); + responsibilities.Delegate(ClientTask.DeregisterEvents); + //responsibilities.Delegate(ClientTask.UpdateSessionIntegrity); } - private void ShowShell() + private bool TryInformRuntime() { - if (Settings.UserInterface.ActionCenter.EnableActionCenter) - { - //actionCenter.Promote(); - } - - if (Settings.UserInterface.Taskbar.EnableTaskbar) - { - //taskbar.Show(); - } - } - - private void AutoStartApplications() - { - if (Settings.Browser.EnableBrowser && Browser.AutoStart) - { - logger.Info("Auto-starting browser..."); - Browser.Start(); - } - - foreach (var application in context.Applications) - { - if (application.AutoStart) - { - logger.Info($"Auto-starting '{application.Name}'..."); - application.Start(); - } - } - } - - private void PrepareShutdown() - { - FinalizeProctoring(); - StopMonitoring(); - } - - private void FinalizeProctoring() - { - if (Proctoring != default && Proctoring.HasRemainingWork()) - { - var dialog = uiFactory.CreateProctoringFinalizationDialog(); - var handler = new RemainingWorkUpdatedEventHandler((args) => dialog.Update(args)); - - Task.Run(() => - { - Proctoring.RemainingWorkUpdated += handler; - Proctoring.ExecuteRemainingWork(); - Proctoring.RemainingWorkUpdated -= handler; - }); - - dialog.Show(); - } - } - - private void ScheduleIntegrityVerification() - { - const int FIVE_MINUTES = 300000; - const int TEN_MINUTES = 600000; - - var timer = new System.Timers.Timer(); - - timer.AutoReset = false; - timer.Elapsed += (o, args) => VerifyApplicationIntegrity(); - timer.Interval = TEN_MINUTES + (new Random().NextDouble() * FIVE_MINUTES); - timer.Start(); - } - - private void StartMonitoring() - { - sentinel.StartMonitoringSystemEvents(); - - if (!Settings.Security.AllowStickyKeys) - { - sentinel.StartMonitoringStickyKeys(); - } - - if (Settings.Security.VerifyCursorConfiguration) - { - sentinel.StartMonitoringCursors(); - } - - if (Settings.Service.IgnoreService) - { - sentinel.StartMonitoringEaseOfAccess(); - } - } - - private void StopMonitoring() - { - sentinel.StopMonitoring(); - } - - private void VerifyApplicationIntegrity() - { - logger.Info($"Attempting to verify application integrity..."); - - if (IntegrityModule.TryVerifyCodeSignature(out var isValid)) - { - if (isValid) - { - logger.Info("Application integrity successfully verified."); - } - else - { - logger.Warn("Application integrity is compromised!"); - ShowLockScreen(text.Get(TextKey.LockScreen_ApplicationIntegrityMessage), text.Get(TextKey.LockScreen_Title), Enumerable.Empty()); - } - } - else - { - logger.Warn("Failed to verify application integrity!"); - } - } - - private void VerifySessionIntegrity() - { - var hasQuitPassword = !string.IsNullOrEmpty(Settings.Security.QuitPasswordHash); - - if (hasQuitPassword && Settings.Security.VerifySessionIntegrity) - { - logger.Info($"Attempting to verify session integrity..."); - - if (IntegrityModule.TryVerifySessionIntegrity(Settings.Browser.ConfigurationKey, Settings.Browser.StartUrl, out var isValid)) - { - if (isValid) - { - logger.Info("Session integrity successfully verified."); - IntegrityModule.CacheSession(Settings.Browser.ConfigurationKey, Settings.Browser.StartUrl); - } - else - { - logger.Warn("Session integrity is compromised!"); - Task.Delay(1000).ContinueWith(_ => - { - ShowLockScreen(text.Get(TextKey.LockScreen_SessionIntegrityMessage), text.Get(TextKey.LockScreen_Title), Enumerable.Empty()); - }); - } - } - else - { - logger.Warn("Failed to verify session integrity!"); - } - } - } - - private void UpdateSessionIntegrity() - { - var hasQuitPassword = !string.IsNullOrEmpty(Settings?.Security.QuitPasswordHash); - - if (hasQuitPassword) - { - IntegrityModule?.ClearSession(Settings.Browser.ConfigurationKey, Settings.Browser.StartUrl); - } - } - - private void ApplicationMonitor_ExplorerStarted() - { - logger.Info("Trying to terminate Windows explorer..."); - explorerShell.Terminate(); - logger.Info("Re-initializing working area..."); - displayMonitor.InitializePrimaryDisplay(Settings.UserInterface.Taskbar.EnableTaskbar ? taskbar.GetAbsoluteHeight() : 0); - logger.Info("Re-initializing shell..."); - actionCenter.InitializeBounds(); - taskbar.InitializeBounds(); - logger.Info("Desktop successfully restored."); - } - - private void ApplicationMonitor_TerminationFailed(IEnumerable applications) - { - var applicationList = string.Join(Environment.NewLine, applications.Select(a => $"- {a.Name}")); - var message = $"{text.Get(TextKey.LockScreen_ApplicationsMessage)}{Environment.NewLine}{Environment.NewLine}{applicationList}"; - var title = text.Get(TextKey.LockScreen_Title); - var allowOption = new LockScreenOption { Text = text.Get(TextKey.LockScreen_ApplicationsAllowOption) }; - var terminateOption = new LockScreenOption { Text = text.Get(TextKey.LockScreen_ApplicationsTerminateOption) }; - - logger.Warn("Detected termination failure of blacklisted application(s)!"); - - var result = ShowLockScreen(message, title, new[] { allowOption, terminateOption }); - - if (result.OptionId == allowOption.Id) - { - logger.Info($"The blacklisted application(s) {string.Join(", ", applications.Select(a => $"'{a.Name}'"))} will be temporarily allowed."); - } - else if (result.OptionId == terminateOption.Id) - { - logger.Info("Attempting to shutdown as requested by the user..."); - TryRequestShutdown(); - } - } - - private void Browser_ConfigurationDownloadRequested(string fileName, DownloadEventArgs args) - { - args.AllowDownload = false; - - if (IsAllowedToReconfigure(args.Url)) - { - if (coordinator.RequestReconfigurationLock()) - { - args.AllowDownload = true; - args.Callback = Browser_ConfigurationDownloadFinished; - args.DownloadPath = Path.Combine(context.AppConfig.TemporaryDirectory, fileName); - - splashScreen.Show(); - splashScreen.BringToForeground(); - splashScreen.SetIndeterminate(); - splashScreen.UpdateStatus(TextKey.OperationStatus_InitializeSession, true); - - logger.Info($"Allowed download request for configuration file '{fileName}'."); - } - else - { - logger.Warn($"A reconfiguration is already in progress, denied download request for configuration file '{fileName}'!"); - } - } - else - { - logger.Info($"Reconfiguration is not allowed, denied download request for configuration file '{fileName}'."); - } - } - - private bool IsAllowedToReconfigure(string url) - { - var allow = false; - var hasQuitPassword = !string.IsNullOrWhiteSpace(Settings.Security.QuitPasswordHash); - var hasUrl = !string.IsNullOrWhiteSpace(Settings.Security.ReconfigurationUrl); - - if (hasQuitPassword) - { - if (hasUrl) - { - var expression = Regex.Escape(Settings.Security.ReconfigurationUrl).Replace(@"\*", ".*"); - var regex = new Regex($"^{expression}$", RegexOptions.IgnoreCase); - var sebUrl = url.Replace(Uri.UriSchemeHttps, context.AppConfig.SebUriSchemeSecure).Replace(Uri.UriSchemeHttp, context.AppConfig.SebUriScheme); - - allow = Settings.Security.AllowReconfiguration && (regex.IsMatch(url) || regex.IsMatch(sebUrl)); - } - else - { - logger.Warn("The active configuration does not contain a valid reconfiguration URL!"); - } - } - else - { - allow = Settings.ConfigurationMode == ConfigurationMode.ConfigureClient || Settings.Security.AllowReconfiguration; - } - - return allow; - } - - private void Browser_ConfigurationDownloadFinished(bool success, string url, string filePath = null) - { - if (success) - { - PrepareShutdown(); - - var communication = runtime.RequestReconfiguration(filePath, url); - - if (communication.Success) - { - logger.Info($"Sent reconfiguration request for '{filePath}' to the runtime."); - } - else - { - logger.Error($"Failed to communicate reconfiguration request for '{filePath}'!"); - - messageBox.Show(TextKey.MessageBox_ReconfigurationError, TextKey.MessageBox_ReconfigurationErrorTitle, icon: MessageBoxIcon.Error, parent: splashScreen); - splashScreen.Hide(); - coordinator.ReleaseReconfigurationLock(); - } - } - else - { - logger.Error($"Failed to download configuration file '{filePath}'!"); - - messageBox.Show(TextKey.MessageBox_ConfigurationDownloadError, TextKey.MessageBox_ConfigurationDownloadErrorTitle, icon: MessageBoxIcon.Error, parent: splashScreen); - splashScreen.Hide(); - coordinator.ReleaseReconfigurationLock(); - } - } - - private void Browser_LoseFocusRequested(bool forward) - { - taskbar.Focus(forward); - } - - private void Browser_UserIdentifierDetected(string identifier) - { - if (Settings.SessionMode == SessionMode.Server) - { - var response = Server.SendUserIdentifier(identifier); - - while (!response.Success) - { - logger.Error($"Failed to communicate user identifier with server! {response.Message}"); - Thread.Sleep(Settings.Server.RequestAttemptInterval); - response = Server.SendUserIdentifier(identifier); - } - } - } - - private void Browser_TerminationRequested() - { - logger.Info("Attempting to shutdown as requested by the browser..."); - TryRequestShutdown(); - } - - private void ClientHost_ExamSelectionRequested(ExamSelectionRequestEventArgs args) - { - logger.Info($"Received exam selection request with id '{args.RequestId}'."); - - var exams = args.Exams.Select(e => new Exam { Id = e.id, LmsName = e.lms, Name = e.name, Url = e.url }); - var dialog = uiFactory.CreateExamSelectionDialog(exams); - var result = dialog.Show(); - - runtime.SubmitExamSelectionResult(args.RequestId, result.Success, result.SelectedExam?.Id); - logger.Info($"Exam selection request with id '{args.RequestId}' is complete."); - } - - private void ClientHost_MessageBoxRequested(MessageBoxRequestEventArgs args) - { - logger.Info($"Received message box request with id '{args.RequestId}'."); - - var action = (MessageBoxAction) args.Action; - var icon = (MessageBoxIcon) args.Icon; - var result = messageBox.Show(args.Message, args.Title, action, icon, parent: splashScreen); - - runtime.SubmitMessageBoxResult(args.RequestId, (int) result); - logger.Info($"Message box request with id '{args.RequestId}' yielded result '{result}'."); - } - - private void ClientHost_PasswordRequested(PasswordRequestEventArgs args) - { - var message = default(TextKey); - var title = default(TextKey); - - logger.Info($"Received input request with id '{args.RequestId}' for the {args.Purpose.ToString().ToLower()} password."); - - switch (args.Purpose) - { - case PasswordRequestPurpose.LocalAdministrator: - message = TextKey.PasswordDialog_LocalAdminPasswordRequired; - title = TextKey.PasswordDialog_LocalAdminPasswordRequiredTitle; - break; - case PasswordRequestPurpose.LocalSettings: - message = TextKey.PasswordDialog_LocalSettingsPasswordRequired; - title = TextKey.PasswordDialog_LocalSettingsPasswordRequiredTitle; - break; - case PasswordRequestPurpose.Settings: - message = TextKey.PasswordDialog_SettingsPasswordRequired; - title = TextKey.PasswordDialog_SettingsPasswordRequiredTitle; - break; - } - - var dialog = uiFactory.CreatePasswordDialog(text.Get(message), text.Get(title)); - var result = dialog.Show(); - - runtime.SubmitPassword(args.RequestId, result.Success, result.Password); - logger.Info($"Password request with id '{args.RequestId}' was {(result.Success ? "successful" : "aborted by the user")}."); - } - - private void ClientHost_ReconfigurationAborted() - { - logger.Info("The reconfiguration was aborted by the runtime."); - splashScreen.Hide(); - coordinator.ReleaseReconfigurationLock(); - } - - private void ClientHost_ReconfigurationDenied(ReconfigurationEventArgs args) - { - logger.Info($"The reconfiguration request for '{args.ConfigurationPath}' was denied by the runtime!"); - messageBox.Show(TextKey.MessageBox_ReconfigurationDenied, TextKey.MessageBox_ReconfigurationDeniedTitle, parent: splashScreen); - splashScreen.Hide(); - coordinator.ReleaseReconfigurationLock(); - } - - private void ClientHost_ServerFailureActionRequested(ServerFailureActionRequestEventArgs args) - { - logger.Info($"Received server failure action request with id '{args.RequestId}'."); - - var dialog = uiFactory.CreateServerFailureDialog(args.Message, args.ShowFallback); - var result = dialog.Show(); - - runtime.SubmitServerFailureActionResult(args.RequestId, result.Abort, result.Fallback, result.Retry); - logger.Info($"Server failure action request with id '{args.RequestId}' is complete, the user chose to {(result.Abort ? "abort" : (result.Fallback ? "fallback" : "retry"))}."); - } - - private void ClientHost_Shutdown() - { - shutdown.Invoke(); - } - - private void DisplayMonitor_DisplaySettingsChanged() - { - logger.Info("Re-initializing working area..."); - displayMonitor.InitializePrimaryDisplay(Settings.UserInterface.Taskbar.EnableTaskbar ? taskbar.GetAbsoluteHeight() : 0); - - logger.Info("Re-initializing shell..."); - actionCenter.InitializeBounds(); - lockScreen?.InitializeBounds(); - taskbar.InitializeBounds(); - - logger.Info("Desktop successfully restored."); - - if (!displayMonitor.ValidateConfiguration(Settings.Display).IsAllowed) - { - var continueOption = new LockScreenOption { Text = text.Get(TextKey.LockScreen_DisplayConfigurationContinueOption) }; - var terminateOption = new LockScreenOption { Text = text.Get(TextKey.LockScreen_DisplayConfigurationTerminateOption) }; - var message = text.Get(TextKey.LockScreen_DisplayConfigurationMessage); - var title = text.Get(TextKey.LockScreen_Title); - var result = ShowLockScreen(message, title, new[] { continueOption, terminateOption }); - - if (result.OptionId == terminateOption.Id) - { - logger.Info("Attempting to shutdown as requested by the user..."); - TryRequestShutdown(); - } - } - } - - private void NetworkAdapter_CredentialsRequired(CredentialsRequiredEventArgs args) - { - var message = text.Get(TextKey.CredentialsDialog_WirelessNetworkMessage).Replace("%%_NAME_%%", args.NetworkName); - var title = text.Get(TextKey.CredentialsDialog_WirelessNetworkTitle); - var dialog = uiFactory.CreateCredentialsDialog(CredentialsDialogPurpose.WirelessNetwork, message, title); - var result = dialog.Show(); - - args.Password = result.Password; - args.Success = result.Success; - args.Username = result.Username; - } - - private void Operations_ActionRequired(ActionRequiredEventArgs args) - { - switch (args) - { - case ApplicationNotFoundEventArgs a: - AskForApplicationPath(a); - break; - case ApplicationInitializationFailedEventArgs a: - InformAboutFailedApplicationInitialization(a); - break; - case ApplicationTerminationEventArgs a: - AskForAutomaticApplicationTermination(a); - break; - case ApplicationTerminationFailedEventArgs a: - InformAboutFailedApplicationTermination(a); - break; - } - } - - private void Operations_ProgressChanged(ProgressChangedEventArgs args) - { - if (args.CurrentValue.HasValue) - { - splashScreen.SetValue(args.CurrentValue.Value); - } - - if (args.IsIndeterminate == true) - { - splashScreen.SetIndeterminate(); - } - - if (args.MaxValue.HasValue) - { - splashScreen.SetMaxValue(args.MaxValue.Value); - } - - if (args.Progress == true) - { - splashScreen.Progress(); - } - - if (args.Regress == true) - { - splashScreen.Regress(); - } - } - - private void Operations_StatusChanged(TextKey status) - { - splashScreen.UpdateStatus(status, true); - } - - private void Runtime_ConnectionLost() - { - logger.Error("Lost connection to the runtime!"); - - messageBox.Show(TextKey.MessageBox_ApplicationError, TextKey.MessageBox_ApplicationErrorTitle, icon: MessageBoxIcon.Error); - shutdown.Invoke(); - } - - private void Sentinel_CursorChanged(SentinelEventArgs args) - { - if (coordinator.RequestSessionLock()) - { - var message = text.Get(TextKey.LockScreen_CursorMessage); - var title = text.Get(TextKey.LockScreen_Title); - var continueOption = new LockScreenOption { Text = text.Get(TextKey.LockScreen_CursorContinueOption) }; - var terminateOption = new LockScreenOption { Text = text.Get(TextKey.LockScreen_CursorTerminateOption) }; - - args.Allow = true; - logger.Info("Cursor changed! Attempting to show lock screen..."); - - var result = ShowLockScreen(message, title, new[] { continueOption, terminateOption }); - - if (result.OptionId == continueOption.Id) - { - logger.Info("The session will be allowed to resume as requested by the user..."); - } - else if (result.OptionId == terminateOption.Id) - { - logger.Info("Attempting to shutdown as requested by the user..."); - TryRequestShutdown(); - } - - coordinator.ReleaseSessionLock(); - } - else - { - logger.Info("Cursor changed but lock screen is already active."); - } - } - - private void Sentinel_EaseOfAccessChanged(SentinelEventArgs args) - { - if (coordinator.RequestSessionLock()) - { - var message = text.Get(TextKey.LockScreen_EaseOfAccessMessage); - var title = text.Get(TextKey.LockScreen_Title); - var continueOption = new LockScreenOption { Text = text.Get(TextKey.LockScreen_EaseOfAccessContinueOption) }; - var terminateOption = new LockScreenOption { Text = text.Get(TextKey.LockScreen_EaseOfAccessTerminateOption) }; - - args.Allow = true; - logger.Info("Ease of access changed! Attempting to show lock screen..."); - - var result = ShowLockScreen(message, title, new[] { continueOption, terminateOption }); - - if (result.OptionId == continueOption.Id) - { - logger.Info("The session will be allowed to resume as requested by the user..."); - } - else if (result.OptionId == terminateOption.Id) - { - logger.Info("Attempting to shutdown as requested by the user..."); - TryRequestShutdown(); - } - - coordinator.ReleaseSessionLock(); - } - else - { - logger.Info("Ease of access changed but lock screen is already active."); - } - } - - private void Sentinel_SessionChanged() - { - var allow = !Settings.Service.IgnoreService && (!Settings.Service.DisableUserLock || !Settings.Service.DisableUserSwitch); - var disable = Settings.Security.DisableSessionChangeLockScreen; - - if (allow || disable) - { - logger.Info($"Detected user session change, but {(allow ? "session locking and/or switching is allowed" : "lock screen is deactivated")}."); - } - else - { - var message = text.Get(TextKey.LockScreen_UserSessionMessage); - var title = text.Get(TextKey.LockScreen_Title); - var continueOption = new LockScreenOption { Text = text.Get(TextKey.LockScreen_UserSessionContinueOption) }; - var terminateOption = new LockScreenOption { Text = text.Get(TextKey.LockScreen_UserSessionTerminateOption) }; - - logger.Warn("User session changed! Attempting to show lock screen..."); - - if (coordinator.RequestSessionLock()) - { - var result = ShowLockScreen(message, title, new[] { continueOption, terminateOption }); - - if (result.OptionId == continueOption.Id) - { - logger.Info("The session will be allowed to resume as requested by the user..."); - } - else if (result.OptionId == terminateOption.Id) - { - logger.Info("Attempting to shutdown as requested by the user..."); - TryRequestShutdown(); - } - - coordinator.ReleaseSessionLock(); - } - else - { - logger.Warn("User session changed but lock screen is already active."); - } - } - } - - private void Sentinel_StickyKeysChanged(SentinelEventArgs args) - { - if (coordinator.RequestSessionLock()) - { - var message = text.Get(TextKey.LockScreen_StickyKeysMessage); - var title = text.Get(TextKey.LockScreen_Title); - var continueOption = new LockScreenOption { Text = text.Get(TextKey.LockScreen_StickyKeysContinueOption) }; - var terminateOption = new LockScreenOption { Text = text.Get(TextKey.LockScreen_StickyKeysTerminateOption) }; - - args.Allow = true; - logger.Info("Sticky keys changed! Attempting to show lock screen..."); - - var result = ShowLockScreen(message, title, new[] { continueOption, terminateOption }); - - if (result.OptionId == continueOption.Id) - { - logger.Info("The session will be allowed to resume as requested by the user..."); - } - else if (result.OptionId == terminateOption.Id) - { - logger.Info("Attempting to shutdown as requested by the user..."); - TryRequestShutdown(); - } - - coordinator.ReleaseSessionLock(); - } - else - { - logger.Info("Sticky keys changed but lock screen is already active."); - } - } - - private void Server_LockScreenConfirmed() - { - logger.Info("Closing lock screen as requested by the server..."); - lockScreen?.Cancel(); - } - - private void Server_LockScreenRequested(string message) - { - logger.Info("Attempting to show lock screen as requested by the server..."); - - if (coordinator.RequestSessionLock()) - { - ShowLockScreen(message, text.Get(TextKey.LockScreen_Title), Enumerable.Empty()); - coordinator.ReleaseSessionLock(); - } - else - { - logger.Info("Lock screen is already active."); - } - } - - private void Server_TerminationRequested() - { - logger.Info("Attempting to shutdown as requested by the server..."); - TryRequestShutdown(); - } - - private void Shell_QuitButtonClicked(System.ComponentModel.CancelEventArgs args) - { - PauseActivators(); - args.Cancel = !TryInitiateShutdown(); - ResumeActivators(); - } - - private void Taskbar_LoseFocusRequested(bool forward) - { - Browser.Focus(forward); - } - - private void TerminationActivator_Activated() - { - PauseActivators(); - TryInitiateShutdown(); - ResumeActivators(); - } - - private void AskForAutomaticApplicationTermination(ApplicationTerminationEventArgs args) - { - var nl = Environment.NewLine; - var applicationList = string.Join(Environment.NewLine, args.RunningApplications.Select(a => a.Name)); - var warning = text.Get(TextKey.MessageBox_ApplicationAutoTerminationDataLossWarning); - var message = $"{text.Get(TextKey.MessageBox_ApplicationAutoTerminationQuestion)}{nl}{nl}{warning}{nl}{nl}{applicationList}"; - var title = text.Get(TextKey.MessageBox_ApplicationAutoTerminationQuestionTitle); - var result = messageBox.Show(message, title, MessageBoxAction.YesNo, MessageBoxIcon.Question, parent: splashScreen); - - args.TerminateProcesses = result == MessageBoxResult.Yes; - } - - private void AskForApplicationPath(ApplicationNotFoundEventArgs args) - { - var message = text.Get(TextKey.FolderDialog_ApplicationLocation).Replace("%%NAME%%", args.DisplayName).Replace("%%EXECUTABLE%%", args.ExecutableName); - var result = fileSystemDialog.Show(FileSystemElement.Folder, FileSystemOperation.Open, message: message, parent: splashScreen); - - if (result.Success) - { - args.CustomPath = result.FullPath; - args.Success = true; - } - } - - private void InformAboutFailedApplicationInitialization(ApplicationInitializationFailedEventArgs args) - { - var messageKey = TextKey.MessageBox_ApplicationInitializationFailure; - var titleKey = TextKey.MessageBox_ApplicationInitializationFailureTitle; - - switch (args.Result) - { - case FactoryResult.NotFound: - messageKey = TextKey.MessageBox_ApplicationNotFound; - titleKey = TextKey.MessageBox_ApplicationNotFoundTitle; - break; - } - - var message = text.Get(messageKey).Replace("%%NAME%%", $"'{args.DisplayName}' ({args.ExecutableName})"); - var title = text.Get(titleKey); - - messageBox.Show(message, title, icon: MessageBoxIcon.Error, parent: splashScreen); - } - - private void InformAboutFailedApplicationTermination(ApplicationTerminationFailedEventArgs args) - { - var applicationList = string.Join(Environment.NewLine, args.Applications.Select(a => a.Name)); - var message = $"{text.Get(TextKey.MessageBox_ApplicationTerminationFailure)}{Environment.NewLine}{Environment.NewLine}{applicationList}"; - var title = text.Get(TextKey.MessageBox_ApplicationTerminationFailureTitle); - - messageBox.Show(message, title, icon: MessageBoxIcon.Error, parent: splashScreen); - } - - private void PauseActivators() - { - foreach (var activator in context.Activators) - { - activator.Pause(); - } - } - - private void ResumeActivators() - { - foreach (var activator in context.Activators) - { - activator.Resume(); - } - } - - private LockScreenResult ShowLockScreen(string message, string title, IEnumerable options) - { - var hasQuitPassword = !string.IsNullOrEmpty(Settings.Security.QuitPasswordHash); - var result = default(LockScreenResult); - - logger.Info("Showing lock screen..."); - PauseActivators(); - lockScreen = uiFactory.CreateLockScreen(message, title, options, Settings.UserInterface.LockScreen); - lockScreen.Show(); - - if (Settings.SessionMode == SessionMode.Server) - { - var response = Server.LockScreen(message); - - if (!response.Success) - { - logger.Error($"Failed to send lock screen notification to server! Message: {response.Message}."); - } - } - - for (var unlocked = false; !unlocked;) - { - result = lockScreen.WaitForResult(); - - if (result.Canceled) - { - logger.Info("The lock screen has been automaticaly canceled."); - unlocked = true; - } - else if (hasQuitPassword) - { - var passwordHash = hashAlgorithm.GenerateHashFor(result.Password); - var isCorrect = Settings.Security.QuitPasswordHash.Equals(passwordHash, StringComparison.OrdinalIgnoreCase); - - if (isCorrect) - { - logger.Info("The user entered the correct unlock password."); - unlocked = true; - } - else - { - logger.Info("The user entered the wrong unlock password."); - messageBox.Show(TextKey.MessageBox_InvalidUnlockPassword, TextKey.MessageBox_InvalidUnlockPasswordTitle, icon: MessageBoxIcon.Warning, parent: lockScreen); - } - } - else - { - logger.Warn($"No unlock password is defined, allowing user to resume session!"); - unlocked = true; - } - } - - lockScreen.Close(); - ResumeActivators(); - logger.Info("Closed lock screen."); - - if (Settings.SessionMode == SessionMode.Server) - { - var response = Server.ConfirmLockScreen(); - - if (!response.Success) - { - logger.Error($"Failed to send lock screen confirm notification to server! Message: {response.Message}."); - } - } - - return result; - } - - private bool TryInitiateShutdown() - { - var hasQuitPassword = !string.IsNullOrEmpty(Settings.Security.QuitPasswordHash); - var initiateShutdown = false; - var succes = false; - - if (hasQuitPassword) - { - initiateShutdown = TryValidateQuitPassword(); - } - else - { - initiateShutdown = TryConfirmShutdown(); - } - - if (initiateShutdown) - { - succes = TryRequestShutdown(); - } - - return succes; - } - - private bool TryConfirmShutdown() - { - var result = messageBox.Show(TextKey.MessageBox_Quit, TextKey.MessageBox_QuitTitle, MessageBoxAction.YesNo, MessageBoxIcon.Question); - var quit = result == MessageBoxResult.Yes; - - if (quit) - { - logger.Info("The user chose to terminate the application."); - } - - return quit; - } - - private bool TryValidateQuitPassword() - { - var dialog = uiFactory.CreatePasswordDialog(TextKey.PasswordDialog_QuitPasswordRequired, TextKey.PasswordDialog_QuitPasswordRequiredTitle); - var result = dialog.Show(); - - if (result.Success) - { - var passwordHash = hashAlgorithm.GenerateHashFor(result.Password); - var isCorrect = Settings.Security.QuitPasswordHash.Equals(passwordHash, StringComparison.OrdinalIgnoreCase); - - if (isCorrect) - { - logger.Info("The user entered the correct quit password, the application will now terminate."); - } - else - { - logger.Info("The user entered the wrong quit password."); - messageBox.Show(TextKey.MessageBox_InvalidQuitPassword, TextKey.MessageBox_InvalidQuitPasswordTitle, icon: MessageBoxIcon.Warning); - } - - return isCorrect; - } - - return false; - } - - private bool TryRequestShutdown() - { - PrepareShutdown(); - - var communication = runtime.RequestShutdown(); + var communication = runtime.InformClientReady(); if (!communication.Success) { - logger.Error("Failed to communicate shutdown request to the runtime!"); - messageBox.Show(TextKey.MessageBox_QuitError, TextKey.MessageBox_QuitErrorTitle, icon: MessageBoxIcon.Error); + logger.Error("Failed to inform runtime that client is ready!"); } return communication.Success; diff --git a/SafeExamBrowser.Client/Communication/ClientHost.cs b/SafeExamBrowser.Client/Communication/ClientHost.cs index c6bbced..340e6df 100644 --- a/SafeExamBrowser.Client/Communication/ClientHost.cs +++ b/SafeExamBrowser.Client/Communication/ClientHost.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client/CompositionRoot.cs b/SafeExamBrowser.Client/CompositionRoot.cs index b9ad0d4..8a6f818 100644 --- a/SafeExamBrowser.Client/CompositionRoot.cs +++ b/SafeExamBrowser.Client/CompositionRoot.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -11,10 +11,13 @@ using System.Collections.Generic; using System.Diagnostics; using System.Text; using SafeExamBrowser.Applications; +using SafeExamBrowser.Applications.Contracts; using SafeExamBrowser.Browser; using SafeExamBrowser.Client.Communication; +using SafeExamBrowser.Client.Contracts; using SafeExamBrowser.Client.Notifications; using SafeExamBrowser.Client.Operations; +using SafeExamBrowser.Client.Responsibilities; using SafeExamBrowser.Communication.Contracts; using SafeExamBrowser.Communication.Contracts.Proxies; using SafeExamBrowser.Communication.Hosts; @@ -22,14 +25,17 @@ using SafeExamBrowser.Communication.Proxies; using SafeExamBrowser.Configuration.Cryptography; using SafeExamBrowser.Configuration.Integrity; using SafeExamBrowser.Core.Contracts.OperationModel; -using SafeExamBrowser.Core.OperationModel; using SafeExamBrowser.Core.Operations; +using SafeExamBrowser.Core.ResponsibilityModel; using SafeExamBrowser.I18n; using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.Logging; using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Monitoring; using SafeExamBrowser.Monitoring.Applications; +using SafeExamBrowser.Monitoring.Contracts; +using SafeExamBrowser.Monitoring.Contracts.Display; +using SafeExamBrowser.Monitoring.Contracts.System; using SafeExamBrowser.Monitoring.Display; using SafeExamBrowser.Monitoring.Keyboard; using SafeExamBrowser.Monitoring.Mouse; @@ -51,6 +57,7 @@ using SafeExamBrowser.UserInterface.Contracts; using SafeExamBrowser.UserInterface.Contracts.FileSystemDialog; using SafeExamBrowser.UserInterface.Contracts.MessageBox; using SafeExamBrowser.UserInterface.Contracts.Shell; +using SafeExamBrowser.UserInterface.Contracts.Windows; using SafeExamBrowser.UserInterface.Shared.Activators; using SafeExamBrowser.WindowsApi; using SafeExamBrowser.WindowsApi.Contracts; @@ -78,8 +85,8 @@ namespace SafeExamBrowser.Client private IMessageBox messageBox; private INativeMethods nativeMethods; private INetworkAdapter networkAdapter; + private ISplashScreen splashScreen; private IPowerSupply powerSupply; - private IRuntimeProxy runtimeProxy; private ISystemInfo systemInfo; private ITaskbar taskbar; private ITaskview taskview; @@ -97,7 +104,6 @@ namespace SafeExamBrowser.Client InitializeText(); var processFactory = new ProcessFactory(ModuleLogger(nameof(ProcessFactory))); - var registry = new Registry(ModuleLogger(nameof(Registry))); uiFactory = BuildUserInterfaceFactory(); actionCenter = uiFactory.CreateActionCenter(); @@ -106,8 +112,8 @@ namespace SafeExamBrowser.Client nativeMethods = new NativeMethods(); applicationMonitor = new ApplicationMonitor(TWO_SECONDS, ModuleLogger(nameof(ApplicationMonitor)), nativeMethods, processFactory); networkAdapter = new NetworkAdapter(ModuleLogger(nameof(NetworkAdapter)), nativeMethods); - runtimeProxy = new RuntimeProxy(runtimeHostUri, new ProxyObjectFactory(), ModuleLogger(nameof(RuntimeProxy)), Interlocutor.Client); - systemInfo = new SystemInfo(registry); + splashScreen = uiFactory.CreateSplashScreen(); + systemInfo = new SystemInfo(new Registry(ModuleLogger(nameof(Registry)))); taskbar = uiFactory.CreateTaskbar(ModuleLogger("Taskbar")); taskview = uiFactory.CreateTaskview(); userInfo = new UserInfo(ModuleLogger(nameof(UserInfo))); @@ -118,10 +124,39 @@ namespace SafeExamBrowser.Client var displayMonitor = new DisplayMonitor(ModuleLogger(nameof(DisplayMonitor)), nativeMethods, systemInfo); var explorerShell = new ExplorerShell(ModuleLogger(nameof(ExplorerShell)), nativeMethods); var fileSystemDialog = BuildFileSystemDialog(); - var hashAlgorithm = new HashAlgorithm(); - var sentinel = new SystemSentinel(ModuleLogger(nameof(SystemSentinel)), nativeMethods, registry); - var splashScreen = uiFactory.CreateSplashScreen(); + var runtimeProxy = new RuntimeProxy(runtimeHostUri, new ProxyObjectFactory(), ModuleLogger(nameof(RuntimeProxy)), Interlocutor.Client); + var sentinel = new SystemSentinel(ModuleLogger(nameof(SystemSentinel)), nativeMethods, new Registry(ModuleLogger(nameof(Registry)))); + var operations = BuildOperations(applicationFactory, clipboard, displayMonitor, fileSystemDialog, runtimeProxy); + var responsibilities = BuildResponsibilities(coordinator, displayMonitor, explorerShell, runtimeProxy, sentinel, shutdown); + + context.HashAlgorithm = new HashAlgorithm(); + context.MessageBox = messageBox; + context.Responsibilities = responsibilities; + context.Runtime = runtimeProxy; + context.UserInterfaceFactory = uiFactory; + + ClientController = new ClientController(context, logger, operations, responsibilities, runtimeProxy, splashScreen); + } + + internal void LogStartupInformation() + { + logger.Log($"# New client instance started at {DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}"); + logger.Log(string.Empty); + } + + internal void LogShutdownInformation() + { + logger?.Log($"# Client instance terminated at {DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}"); + } + + private ClientOperationSequence BuildOperations( + IApplicationFactory applicationFactory, + IClipboard clipboard, + IDisplayMonitor displayMonitor, + IFileSystemDialog fileSystemDialog, + IRuntimeProxy runtimeProxy) + { var operations = new Queue(); operations.Enqueue(new I18nOperation(logger, text)); @@ -134,7 +169,7 @@ namespace SafeExamBrowser.Client operations.Enqueue(new ClientHostDisconnectionOperation(context, logger, FIVE_SECONDS)); operations.Enqueue(new LazyInitializationOperation(BuildKeyboardInterceptorOperation)); operations.Enqueue(new LazyInitializationOperation(BuildMouseInterceptorOperation)); - operations.Enqueue(new ApplicationOperation(context, applicationFactory, applicationMonitor, logger, text)); + operations.Enqueue(new ApplicationOperation(context, applicationFactory, fileSystemDialog, logger, messageBox, applicationMonitor, splashScreen, text)); operations.Enqueue(new DisplayMonitorOperation(context, displayMonitor, logger, taskbar)); operations.Enqueue(new LazyInitializationOperation(BuildShellOperation)); operations.Enqueue(new LazyInitializationOperation(BuildBrowserOperation)); @@ -142,39 +177,30 @@ namespace SafeExamBrowser.Client operations.Enqueue(new LazyInitializationOperation(BuildProctoringOperation)); operations.Enqueue(new ClipboardOperation(context, clipboard, logger)); - var sequence = new OperationSequence(logger, operations); - - ClientController = new ClientController( - actionCenter, - applicationMonitor, - context, - coordinator, - displayMonitor, - explorerShell, - fileSystemDialog, - hashAlgorithm, - logger, - messageBox, - networkAdapter, - sequence, - runtimeProxy, - shutdown, - splashScreen, - sentinel, - taskbar, - text, - uiFactory); + return new ClientOperationSequence(logger, operations, splashScreen); } - internal void LogStartupInformation() + private ResponsibilityCollection BuildResponsibilities( + ICoordinator coordinator, + IDisplayMonitor displayMonitor, + IExplorerShell explorerShell, + IRuntimeProxy runtimeProxy, + ISystemSentinel sentinel, + Action shutdown) { - logger.Log($"# New client instance started at {DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}"); - logger.Log(string.Empty); - } + var responsibilities = new Queue(); - internal void LogShutdownInformation() - { - logger?.Log($"# Client instance terminated at {DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}"); + responsibilities.Enqueue(new ApplicationsResponsibility(context, ModuleLogger(nameof(ApplicationsResponsibility)))); + responsibilities.Enqueue(new BrowserResponsibility(context, coordinator, ModuleLogger(nameof(BrowserResponsibility)), messageBox, runtimeProxy, splashScreen, taskbar)); + responsibilities.Enqueue(new CommunicationResponsibility(context, coordinator, ModuleLogger(nameof(CommunicationResponsibility)), messageBox, runtimeProxy, shutdown, splashScreen, text, uiFactory)); + responsibilities.Enqueue(new IntegrityResponsibility(context, ModuleLogger(nameof(IntegrityResponsibility)), text)); + responsibilities.Enqueue(new MonitoringResponsibility(actionCenter, applicationMonitor, context, coordinator, displayMonitor, explorerShell, ModuleLogger(nameof(MonitoringResponsibility)), sentinel, taskbar, text)); + responsibilities.Enqueue(new NetworkResponsibility(context, ModuleLogger(nameof(NetworkResponsibility)), networkAdapter, text, uiFactory)); + responsibilities.Enqueue(new ProctoringResponsibility(context, ModuleLogger(nameof(ProctoringResponsibility)), uiFactory)); + responsibilities.Enqueue(new ServerResponsibility(context, coordinator, ModuleLogger(nameof(ServerResponsibility)), text)); + responsibilities.Enqueue(new ShellResponsibility(actionCenter, context, new HashAlgorithm(), ModuleLogger(nameof(ShellResponsibility)), messageBox, taskbar, uiFactory)); + + return new ResponsibilityCollection(logger, responsibilities); } private void ValidateCommandLineArguments() diff --git a/SafeExamBrowser.Client/Contracts/ICoordinator.cs b/SafeExamBrowser.Client/Contracts/ICoordinator.cs index d96eecd..83fea89 100644 --- a/SafeExamBrowser.Client/Contracts/ICoordinator.cs +++ b/SafeExamBrowser.Client/Contracts/ICoordinator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client/Coordinator.cs b/SafeExamBrowser.Client/Coordinator.cs index 50e5274..96bbcc3 100644 --- a/SafeExamBrowser.Client/Coordinator.cs +++ b/SafeExamBrowser.Client/Coordinator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client/Notifications/AboutNotification.cs b/SafeExamBrowser.Client/Notifications/AboutNotification.cs index 140b199..49b7251 100644 --- a/SafeExamBrowser.Client/Notifications/AboutNotification.cs +++ b/SafeExamBrowser.Client/Notifications/AboutNotification.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client/Notifications/LogNotification.cs b/SafeExamBrowser.Client/Notifications/LogNotification.cs index 664cf91..00e7dd9 100644 --- a/SafeExamBrowser.Client/Notifications/LogNotification.cs +++ b/SafeExamBrowser.Client/Notifications/LogNotification.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Client/Operations/ApplicationOperation.cs b/SafeExamBrowser.Client/Operations/ApplicationOperation.cs index 145bed3..88ccc58 100644 --- a/SafeExamBrowser.Client/Operations/ApplicationOperation.cs +++ b/SafeExamBrowser.Client/Operations/ApplicationOperation.cs @@ -1,15 +1,15 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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.Collections.Generic; using System.Linq; using SafeExamBrowser.Applications.Contracts; -using SafeExamBrowser.Client.Operations.Events; using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.I18n.Contracts; @@ -17,29 +17,40 @@ using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Monitoring.Contracts.Applications; using SafeExamBrowser.Settings.Applications; using SafeExamBrowser.Settings.Security; +using SafeExamBrowser.UserInterface.Contracts.FileSystemDialog; +using SafeExamBrowser.UserInterface.Contracts.MessageBox; +using SafeExamBrowser.UserInterface.Contracts.Windows; namespace SafeExamBrowser.Client.Operations { internal class ApplicationOperation : ClientOperation { - private IApplicationFactory factory; - private ILogger logger; - private IApplicationMonitor monitor; - private IText text; + private readonly IApplicationFactory factory; + private readonly IFileSystemDialog fileSystemDialog; + private readonly ILogger logger; + private readonly IMessageBox messageBox; + private readonly IApplicationMonitor monitor; + private readonly ISplashScreen splashScreen; + private readonly IText text; - public override event ActionRequiredEventHandler ActionRequired; public override event StatusChangedEventHandler StatusChanged; public ApplicationOperation( ClientContext context, IApplicationFactory factory, - IApplicationMonitor monitor, + IFileSystemDialog fileSystemDialog, ILogger logger, + IMessageBox messageBox, + IApplicationMonitor monitor, + ISplashScreen splashScreen, IText text) : base(context) { this.factory = factory; - this.monitor = monitor; + this.fileSystemDialog = fileSystemDialog; this.logger = logger; + this.messageBox = messageBox; + this.monitor = monitor; + this.splashScreen = splashScreen; this.text = text; } @@ -100,13 +111,9 @@ namespace SafeExamBrowser.Client.Operations while (result == FactoryResult.NotFound && settings.AllowCustomPath) { - var args = new ApplicationNotFoundEventArgs(settings.DisplayName, settings.ExecutableName); - - ActionRequired?.Invoke(args); - - if (args.Success) + if (TryAskForApplicationPath(settings.DisplayName, settings.ExecutableName, out var customPath)) { - settings.ExecutablePath = args.CustomPath; + settings.ExecutablePath = customPath; result = factory.TryCreate(settings, out application); } else @@ -122,7 +129,7 @@ namespace SafeExamBrowser.Client.Operations else { logger.Error($"Failed to initialize application '{settings.DisplayName}' ({settings.ExecutableName}). Reason: {result}."); - ActionRequired?.Invoke(new ApplicationInitializationFailedEventArgs(settings.DisplayName, settings.ExecutableName, result)); + InformAboutFailedApplicationInitialization(settings.DisplayName, settings.ExecutableName, result); } } @@ -137,7 +144,7 @@ namespace SafeExamBrowser.Client.Operations private OperationResult HandleAutoTerminationFailure(IList applications) { logger.Error($"{applications.Count} application(s) could not be automatically terminated: {string.Join(", ", applications.Select(a => a.Name))}"); - ActionRequired?.Invoke(new ApplicationTerminationFailedEventArgs(applications)); + InformAboutFailedApplicationTermination(applications); return OperationResult.Failed; } @@ -158,20 +165,18 @@ namespace SafeExamBrowser.Client.Operations } } - private OperationResult TryTerminate(IEnumerable runningApplications) + private OperationResult TryTerminate(IEnumerable applications) { - var args = new ApplicationTerminationEventArgs(runningApplications); var failed = new List(); var result = OperationResult.Success; - logger.Info($"The following applications need to be terminated: {string.Join(", ", runningApplications.Select(a => a.Name))}."); - ActionRequired?.Invoke(args); + logger.Info($"The following applications need to be terminated: {string.Join(", ", applications.Select(a => a.Name))}."); - if (args.TerminateProcesses) + if (TryAskForAutomaticApplicationTermination(applications)) { logger.Info($"The user chose to automatically terminate all running applications."); - foreach (var application in runningApplications) + foreach (var application in applications) { var success = monitor.TryTerminate(application); @@ -195,10 +200,58 @@ namespace SafeExamBrowser.Client.Operations if (failed.Any()) { - ActionRequired?.Invoke(new ApplicationTerminationFailedEventArgs(failed)); + InformAboutFailedApplicationTermination(failed); } return result; } + + private void InformAboutFailedApplicationInitialization(string displayName, string executableName, FactoryResult result) + { + var messageKey = TextKey.MessageBox_ApplicationInitializationFailure; + var titleKey = TextKey.MessageBox_ApplicationInitializationFailureTitle; + + if (result == FactoryResult.NotFound) + { + messageKey = TextKey.MessageBox_ApplicationNotFound; + titleKey = TextKey.MessageBox_ApplicationNotFoundTitle; + } + + var message = text.Get(messageKey).Replace("%%NAME%%", $"'{displayName}' ({executableName})"); + var title = text.Get(titleKey); + + messageBox.Show(message, title, icon: MessageBoxIcon.Error, parent: splashScreen); + } + + private void InformAboutFailedApplicationTermination(IEnumerable applications) + { + var applicationList = string.Join(Environment.NewLine, applications.Select(a => a.Name)); + var message = $"{text.Get(TextKey.MessageBox_ApplicationTerminationFailure)}{Environment.NewLine}{Environment.NewLine}{applicationList}"; + var title = text.Get(TextKey.MessageBox_ApplicationTerminationFailureTitle); + + messageBox.Show(message, title, icon: MessageBoxIcon.Error, parent: splashScreen); + } + + private bool TryAskForApplicationPath(string displayName, string executableName, out string customPath) + { + var message = text.Get(TextKey.FolderDialog_ApplicationLocation).Replace("%%NAME%%", displayName).Replace("%%EXECUTABLE%%", executableName); + var result = fileSystemDialog.Show(FileSystemElement.Folder, FileSystemOperation.Open, message: message, parent: splashScreen); + + customPath = result.FullPath; + + return result.Success; + } + + private bool TryAskForAutomaticApplicationTermination(IEnumerable applications) + { + var nl = Environment.NewLine; + var applicationList = string.Join(Environment.NewLine, applications.Select(a => a.Name)); + var warning = text.Get(TextKey.MessageBox_ApplicationAutoTerminationDataLossWarning); + var message = $"{text.Get(TextKey.MessageBox_ApplicationAutoTerminationQuestion)}{nl}{nl}{warning}{nl}{nl}{applicationList}"; + var title = text.Get(TextKey.MessageBox_ApplicationAutoTerminationQuestionTitle); + var result = messageBox.Show(message, title, MessageBoxAction.YesNo, MessageBoxIcon.Question, parent: splashScreen); + + return result == MessageBoxResult.Yes; + } } } diff --git a/SafeExamBrowser.Client/Operations/BrowserOperation.cs b/SafeExamBrowser.Client/Operations/BrowserOperation.cs index 02cda8e..60c97b6 100644 --- a/SafeExamBrowser.Client/Operations/BrowserOperation.cs +++ b/SafeExamBrowser.Client/Operations/BrowserOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -23,7 +23,6 @@ namespace SafeExamBrowser.Client.Operations private readonly ITaskview taskview; private readonly IUserInterfaceFactory uiFactory; - public override event ActionRequiredEventHandler ActionRequired { add { } remove { } } public override event StatusChangedEventHandler StatusChanged; public BrowserOperation( diff --git a/SafeExamBrowser.Client/Operations/ClientHostDisconnectionOperation.cs b/SafeExamBrowser.Client/Operations/ClientHostDisconnectionOperation.cs index 71a3407..d2ab368 100644 --- a/SafeExamBrowser.Client/Operations/ClientHostDisconnectionOperation.cs +++ b/SafeExamBrowser.Client/Operations/ClientHostDisconnectionOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -21,10 +21,9 @@ namespace SafeExamBrowser.Client.Operations /// internal class ClientHostDisconnectionOperation : ClientOperation { - private ILogger logger; - private int timeout_ms; + private readonly ILogger logger; + private readonly int timeout_ms; - public override event ActionRequiredEventHandler ActionRequired { add { } remove { } } public override event StatusChangedEventHandler StatusChanged; public ClientHostDisconnectionOperation(ClientContext context, ILogger logger, int timeout_ms) : base(context) diff --git a/SafeExamBrowser.Client/Operations/ClientOperation.cs b/SafeExamBrowser.Client/Operations/ClientOperation.cs index a5743bc..fa862c3 100644 --- a/SafeExamBrowser.Client/Operations/ClientOperation.cs +++ b/SafeExamBrowser.Client/Operations/ClientOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -18,7 +18,11 @@ namespace SafeExamBrowser.Client.Operations { protected ClientContext Context { get; private set; } - public abstract event ActionRequiredEventHandler ActionRequired; + /// + /// TODO: In case this event is neither used by the runtime, either remove it completely or then move it to a separate interface! + /// + public event ActionRequiredEventHandler ActionRequired { add { } remove { } } + public abstract event StatusChangedEventHandler StatusChanged; public ClientOperation(ClientContext context) diff --git a/SafeExamBrowser.Client/Operations/ClipboardOperation.cs b/SafeExamBrowser.Client/Operations/ClipboardOperation.cs index c46578e..77cf832 100644 --- a/SafeExamBrowser.Client/Operations/ClipboardOperation.cs +++ b/SafeExamBrowser.Client/Operations/ClipboardOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -19,7 +19,6 @@ namespace SafeExamBrowser.Client.Operations private readonly IClipboard clipboard; private readonly ILogger logger; - public override event ActionRequiredEventHandler ActionRequired { add { } remove { } } public override event StatusChangedEventHandler StatusChanged; public ClipboardOperation(ClientContext context, IClipboard clipboard, ILogger logger) : base(context) diff --git a/SafeExamBrowser.Client/Operations/ConfigurationOperation.cs b/SafeExamBrowser.Client/Operations/ConfigurationOperation.cs index 18cdb4d..34d5bc9 100644 --- a/SafeExamBrowser.Client/Operations/ConfigurationOperation.cs +++ b/SafeExamBrowser.Client/Operations/ConfigurationOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -19,7 +19,6 @@ namespace SafeExamBrowser.Client.Operations private readonly ILogger logger; private readonly IRuntimeProxy runtime; - public override event ActionRequiredEventHandler ActionRequired { add { } remove { } } public override event StatusChangedEventHandler StatusChanged; public ConfigurationOperation(ClientContext context, ILogger logger, IRuntimeProxy runtime) : base(context) diff --git a/SafeExamBrowser.Client/Operations/DisplayMonitorOperation.cs b/SafeExamBrowser.Client/Operations/DisplayMonitorOperation.cs index fe37415..b36ab3e 100644 --- a/SafeExamBrowser.Client/Operations/DisplayMonitorOperation.cs +++ b/SafeExamBrowser.Client/Operations/DisplayMonitorOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -21,7 +21,6 @@ namespace SafeExamBrowser.Client.Operations private readonly ILogger logger; private readonly ITaskbar taskbar; - public override event ActionRequiredEventHandler ActionRequired { add { } remove { } } public override event StatusChangedEventHandler StatusChanged; public DisplayMonitorOperation(ClientContext context, IDisplayMonitor displayMonitor, ILogger logger, ITaskbar taskbar) : base(context) diff --git a/SafeExamBrowser.Client/Operations/Events/ApplicationInitializationFailedEventArgs.cs b/SafeExamBrowser.Client/Operations/Events/ApplicationInitializationFailedEventArgs.cs deleted file mode 100644 index b3dd4cf..0000000 --- a/SafeExamBrowser.Client/Operations/Events/ApplicationInitializationFailedEventArgs.cs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2024 ETH Zürich, IT Services - * - * 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.Applications.Contracts; -using SafeExamBrowser.Core.Contracts.OperationModel.Events; - -namespace SafeExamBrowser.Client.Operations.Events -{ - internal class ApplicationInitializationFailedEventArgs : ActionRequiredEventArgs - { - internal string DisplayName { get; } - internal string ExecutableName { get; } - internal FactoryResult Result { get; } - - internal ApplicationInitializationFailedEventArgs(string displayName, string executableName, FactoryResult result) - { - DisplayName = displayName; - ExecutableName = executableName; - Result = result; - } - } -} diff --git a/SafeExamBrowser.Client/Operations/Events/ApplicationNotFoundEventArgs.cs b/SafeExamBrowser.Client/Operations/Events/ApplicationNotFoundEventArgs.cs deleted file mode 100644 index e8cb2e6..0000000 --- a/SafeExamBrowser.Client/Operations/Events/ApplicationNotFoundEventArgs.cs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2024 ETH Zürich, IT Services - * - * 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.Core.Contracts.OperationModel.Events; - -namespace SafeExamBrowser.Client.Operations.Events -{ - internal class ApplicationNotFoundEventArgs : ActionRequiredEventArgs - { - internal string CustomPath { get; set; } - internal string DisplayName { get; } - internal string ExecutableName { get; } - internal bool Success { get; set; } - - internal ApplicationNotFoundEventArgs(string displayName, string executableName) - { - DisplayName = displayName; - ExecutableName = executableName; - } - } -} diff --git a/SafeExamBrowser.Client/Operations/Events/ApplicationTerminationEventArgs.cs b/SafeExamBrowser.Client/Operations/Events/ApplicationTerminationEventArgs.cs deleted file mode 100644 index a7caa03..0000000 --- a/SafeExamBrowser.Client/Operations/Events/ApplicationTerminationEventArgs.cs +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2024 ETH Zürich, IT Services - * - * 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.Core.Contracts.OperationModel.Events; -using SafeExamBrowser.Monitoring.Contracts.Applications; - -namespace SafeExamBrowser.Client.Operations.Events -{ - internal class ApplicationTerminationEventArgs : ActionRequiredEventArgs - { - internal IEnumerable RunningApplications { get; } - internal bool TerminateProcesses { get; set; } - - internal ApplicationTerminationEventArgs(IEnumerable runningApplications) - { - RunningApplications = runningApplications; - } - } -} diff --git a/SafeExamBrowser.Client/Operations/Events/ApplicationTerminationFailedEventArgs.cs b/SafeExamBrowser.Client/Operations/Events/ApplicationTerminationFailedEventArgs.cs deleted file mode 100644 index 3bfa201..0000000 --- a/SafeExamBrowser.Client/Operations/Events/ApplicationTerminationFailedEventArgs.cs +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2024 ETH Zürich, IT Services - * - * 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.Core.Contracts.OperationModel.Events; -using SafeExamBrowser.Monitoring.Contracts.Applications; - -namespace SafeExamBrowser.Client.Operations.Events -{ - internal class ApplicationTerminationFailedEventArgs : ActionRequiredEventArgs - { - internal IEnumerable Applications { get; } - - internal ApplicationTerminationFailedEventArgs(IEnumerable applications) - { - Applications = applications; - } - } -} diff --git a/SafeExamBrowser.Client/Operations/KeyboardInterceptorOperation.cs b/SafeExamBrowser.Client/Operations/KeyboardInterceptorOperation.cs index dd626cf..fe9ed52 100644 --- a/SafeExamBrowser.Client/Operations/KeyboardInterceptorOperation.cs +++ b/SafeExamBrowser.Client/Operations/KeyboardInterceptorOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -16,10 +16,9 @@ namespace SafeExamBrowser.Client.Operations { internal class KeyboardInterceptorOperation : ClientOperation { - private IKeyboardInterceptor keyboardInterceptor; - private ILogger logger; + private readonly IKeyboardInterceptor keyboardInterceptor; + private readonly ILogger logger; - public override event ActionRequiredEventHandler ActionRequired { add { } remove { } } public override event StatusChangedEventHandler StatusChanged; public KeyboardInterceptorOperation(ClientContext context, IKeyboardInterceptor keyboardInterceptor, ILogger logger) : base(context) diff --git a/SafeExamBrowser.Client/Operations/MouseInterceptorOperation.cs b/SafeExamBrowser.Client/Operations/MouseInterceptorOperation.cs index 22a7239..790f4d2 100644 --- a/SafeExamBrowser.Client/Operations/MouseInterceptorOperation.cs +++ b/SafeExamBrowser.Client/Operations/MouseInterceptorOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -16,10 +16,9 @@ namespace SafeExamBrowser.Client.Operations { internal class MouseInterceptorOperation : ClientOperation { - private ILogger logger; - private IMouseInterceptor mouseInterceptor; + private readonly ILogger logger; + private readonly IMouseInterceptor mouseInterceptor; - public override event ActionRequiredEventHandler ActionRequired { add { } remove { } } public override event StatusChangedEventHandler StatusChanged; public MouseInterceptorOperation(ClientContext context, ILogger logger, IMouseInterceptor mouseInterceptor) : base(context) diff --git a/SafeExamBrowser.Client/Operations/ProctoringOperation.cs b/SafeExamBrowser.Client/Operations/ProctoringOperation.cs index e17bd5e..17b0607 100644 --- a/SafeExamBrowser.Client/Operations/ProctoringOperation.cs +++ b/SafeExamBrowser.Client/Operations/ProctoringOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -25,7 +25,6 @@ namespace SafeExamBrowser.Client.Operations private readonly ITaskbar taskbar; private readonly IUserInterfaceFactory uiFactory; - public override event ActionRequiredEventHandler ActionRequired { add { } remove { } } public override event StatusChangedEventHandler StatusChanged; public ProctoringOperation( diff --git a/SafeExamBrowser.Client/Operations/RuntimeConnectionOperation.cs b/SafeExamBrowser.Client/Operations/RuntimeConnectionOperation.cs index 55011fa..511ce84 100644 --- a/SafeExamBrowser.Client/Operations/RuntimeConnectionOperation.cs +++ b/SafeExamBrowser.Client/Operations/RuntimeConnectionOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -17,11 +17,10 @@ namespace SafeExamBrowser.Client.Operations { internal class RuntimeConnectionOperation : ClientOperation { - private ILogger logger; - private IRuntimeProxy runtime; + private readonly ILogger logger; + private readonly IRuntimeProxy runtime; private Guid token; - public override event ActionRequiredEventHandler ActionRequired { add { } remove { } } public override event StatusChangedEventHandler StatusChanged; public RuntimeConnectionOperation(ClientContext context, ILogger logger, IRuntimeProxy runtime, Guid token) : base(context) diff --git a/SafeExamBrowser.Client/Operations/ServerOperation.cs b/SafeExamBrowser.Client/Operations/ServerOperation.cs index 74eac87..26d9eef 100644 --- a/SafeExamBrowser.Client/Operations/ServerOperation.cs +++ b/SafeExamBrowser.Client/Operations/ServerOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -20,7 +20,6 @@ namespace SafeExamBrowser.Client.Operations private readonly ILogger logger; private readonly IServerProxy server; - public override event ActionRequiredEventHandler ActionRequired { add { } remove { } } public override event StatusChangedEventHandler StatusChanged; public ServerOperation(ClientContext context, ILogger logger, IServerProxy server) : base(context) diff --git a/SafeExamBrowser.Client/Operations/ShellOperation.cs b/SafeExamBrowser.Client/Operations/ShellOperation.cs index f1b741f..96be4a2 100644 --- a/SafeExamBrowser.Client/Operations/ShellOperation.cs +++ b/SafeExamBrowser.Client/Operations/ShellOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -40,7 +40,6 @@ namespace SafeExamBrowser.Client.Operations private readonly IText text; private readonly IUserInterfaceFactory uiFactory; - public override event ActionRequiredEventHandler ActionRequired { add { } remove { } } public override event StatusChangedEventHandler StatusChanged; public ShellOperation( diff --git a/SafeExamBrowser.Client/Properties/AssemblyInfo.cs b/SafeExamBrowser.Client/Properties/AssemblyInfo.cs index 8668c11..fd787d9 100644 --- a/SafeExamBrowser.Client/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Client/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Windows; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Client")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 @@ -51,6 +51,6 @@ using System.Windows; // 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("3.8.0.742")] -[assembly: AssemblyFileVersion("3.8.0.742")] -[assembly: AssemblyInformationalVersion("3.8.0.742")] +[assembly: AssemblyVersion("3.9.0.787")] +[assembly: AssemblyFileVersion("3.9.0.787")] +[assembly: AssemblyInformationalVersion("1.0.0.0")] diff --git a/SafeExamBrowser.Client/SafeExamBrowser.Client.csproj b/SafeExamBrowser.Client/SafeExamBrowser.Client.csproj index f602656..620ed5f 100644 --- a/SafeExamBrowser.Client/SafeExamBrowser.Client.csproj +++ b/SafeExamBrowser.Client/SafeExamBrowser.Client.csproj @@ -78,11 +78,8 @@ + - - - - @@ -110,6 +107,17 @@ Settings.settings True + + + + + + + + + + + ResXFileCodeGenerator Resources.Designer.cs diff --git a/SafeExamBrowser.Communication.Contracts/Data/AuthenticationResponse.cs b/SafeExamBrowser.Communication.Contracts/Data/AuthenticationResponse.cs index 26785c4..f9644a0 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/AuthenticationResponse.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/AuthenticationResponse.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/ConfigurationResponse.cs b/SafeExamBrowser.Communication.Contracts/Data/ConfigurationResponse.cs index db5e9db..6e084e0 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/ConfigurationResponse.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/ConfigurationResponse.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/ConnectionResponse.cs b/SafeExamBrowser.Communication.Contracts/Data/ConnectionResponse.cs index 2ab2b15..f2a50fd 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/ConnectionResponse.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/ConnectionResponse.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/DisconnectionMessage.cs b/SafeExamBrowser.Communication.Contracts/Data/DisconnectionMessage.cs index 1f2eb79..1d166b8 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/DisconnectionMessage.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/DisconnectionMessage.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/DisconnectionResponse.cs b/SafeExamBrowser.Communication.Contracts/Data/DisconnectionResponse.cs index d1c0acd..1b7a85e 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/DisconnectionResponse.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/DisconnectionResponse.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/ExamSelectionReplyMessage.cs b/SafeExamBrowser.Communication.Contracts/Data/ExamSelectionReplyMessage.cs index ae170d0..d278e3d 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/ExamSelectionReplyMessage.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/ExamSelectionReplyMessage.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/ExamSelectionRequestMessage.cs b/SafeExamBrowser.Communication.Contracts/Data/ExamSelectionRequestMessage.cs index b32426e..f5e3202 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/ExamSelectionRequestMessage.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/ExamSelectionRequestMessage.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/Message.cs b/SafeExamBrowser.Communication.Contracts/Data/Message.cs index 0509d6b..4f906dc 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/Message.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/Message.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/MessageBoxReplyMessage.cs b/SafeExamBrowser.Communication.Contracts/Data/MessageBoxReplyMessage.cs index e800cad..29af2da 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/MessageBoxReplyMessage.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/MessageBoxReplyMessage.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/MessageBoxRequestMessage.cs b/SafeExamBrowser.Communication.Contracts/Data/MessageBoxRequestMessage.cs index b02066e..e303a21 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/MessageBoxRequestMessage.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/MessageBoxRequestMessage.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/PasswordReplyMessage.cs b/SafeExamBrowser.Communication.Contracts/Data/PasswordReplyMessage.cs index aa9e39a..618f100 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/PasswordReplyMessage.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/PasswordReplyMessage.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/PasswordRequestMessage.cs b/SafeExamBrowser.Communication.Contracts/Data/PasswordRequestMessage.cs index cbf6522..0dbc7fb 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/PasswordRequestMessage.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/PasswordRequestMessage.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/PasswordRequestPurpose.cs b/SafeExamBrowser.Communication.Contracts/Data/PasswordRequestPurpose.cs index 946010a..df6f45c 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/PasswordRequestPurpose.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/PasswordRequestPurpose.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/ReconfigurationDeniedMessage.cs b/SafeExamBrowser.Communication.Contracts/Data/ReconfigurationDeniedMessage.cs index 3d8ee97..3535095 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/ReconfigurationDeniedMessage.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/ReconfigurationDeniedMessage.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/ReconfigurationMessage.cs b/SafeExamBrowser.Communication.Contracts/Data/ReconfigurationMessage.cs index 22f3509..2f27c75 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/ReconfigurationMessage.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/ReconfigurationMessage.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/Response.cs b/SafeExamBrowser.Communication.Contracts/Data/Response.cs index f25b951..66546ac 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/Response.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/Response.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/ServerFailureActionReplyMessage.cs b/SafeExamBrowser.Communication.Contracts/Data/ServerFailureActionReplyMessage.cs index fa2f9bf..6fe1449 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/ServerFailureActionReplyMessage.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/ServerFailureActionReplyMessage.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/ServerFailureActionRequestMessage.cs b/SafeExamBrowser.Communication.Contracts/Data/ServerFailureActionRequestMessage.cs index 2955816..c35298e 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/ServerFailureActionRequestMessage.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/ServerFailureActionRequestMessage.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/SessionStartMessage.cs b/SafeExamBrowser.Communication.Contracts/Data/SessionStartMessage.cs index 88d211a..8bb46ed 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/SessionStartMessage.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/SessionStartMessage.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/SessionStopMessage.cs b/SafeExamBrowser.Communication.Contracts/Data/SessionStopMessage.cs index 11e5be1..83726e7 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/SessionStopMessage.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/SessionStopMessage.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/SimpleMessage.cs b/SafeExamBrowser.Communication.Contracts/Data/SimpleMessage.cs index 26bf392..84d1ab0 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/SimpleMessage.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/SimpleMessage.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/SimpleMessagePurport.cs b/SafeExamBrowser.Communication.Contracts/Data/SimpleMessagePurport.cs index 6d2f189..f202c30 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/SimpleMessagePurport.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/SimpleMessagePurport.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/SimpleResponse.cs b/SafeExamBrowser.Communication.Contracts/Data/SimpleResponse.cs index b1d053c..3b2f71d 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/SimpleResponse.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/SimpleResponse.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Data/SimpleResponsePurport.cs b/SafeExamBrowser.Communication.Contracts/Data/SimpleResponsePurport.cs index 3b81fc8..d28dbf7 100644 --- a/SafeExamBrowser.Communication.Contracts/Data/SimpleResponsePurport.cs +++ b/SafeExamBrowser.Communication.Contracts/Data/SimpleResponsePurport.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Events/ClientConfigurationEventArgs.cs b/SafeExamBrowser.Communication.Contracts/Events/ClientConfigurationEventArgs.cs index fb82fd5..38c546b 100644 --- a/SafeExamBrowser.Communication.Contracts/Events/ClientConfigurationEventArgs.cs +++ b/SafeExamBrowser.Communication.Contracts/Events/ClientConfigurationEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Events/CommunicationEventArgs.cs b/SafeExamBrowser.Communication.Contracts/Events/CommunicationEventArgs.cs index d808eae..1401613 100644 --- a/SafeExamBrowser.Communication.Contracts/Events/CommunicationEventArgs.cs +++ b/SafeExamBrowser.Communication.Contracts/Events/CommunicationEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Events/CommunicationEventHandler.cs b/SafeExamBrowser.Communication.Contracts/Events/CommunicationEventHandler.cs index 4883e34..0d0578d 100644 --- a/SafeExamBrowser.Communication.Contracts/Events/CommunicationEventHandler.cs +++ b/SafeExamBrowser.Communication.Contracts/Events/CommunicationEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Events/ExamSelectionReplyEventArgs.cs b/SafeExamBrowser.Communication.Contracts/Events/ExamSelectionReplyEventArgs.cs index 5ca7e3a..ef6a778 100644 --- a/SafeExamBrowser.Communication.Contracts/Events/ExamSelectionReplyEventArgs.cs +++ b/SafeExamBrowser.Communication.Contracts/Events/ExamSelectionReplyEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Events/ExamSelectionRequestEventArgs.cs b/SafeExamBrowser.Communication.Contracts/Events/ExamSelectionRequestEventArgs.cs index d6f0234..96bbede 100644 --- a/SafeExamBrowser.Communication.Contracts/Events/ExamSelectionRequestEventArgs.cs +++ b/SafeExamBrowser.Communication.Contracts/Events/ExamSelectionRequestEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Events/MessageBoxReplyEventArgs.cs b/SafeExamBrowser.Communication.Contracts/Events/MessageBoxReplyEventArgs.cs index 905be84..2f4acc0 100644 --- a/SafeExamBrowser.Communication.Contracts/Events/MessageBoxReplyEventArgs.cs +++ b/SafeExamBrowser.Communication.Contracts/Events/MessageBoxReplyEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Events/MessageBoxRequestEventArgs.cs b/SafeExamBrowser.Communication.Contracts/Events/MessageBoxRequestEventArgs.cs index b8ca175..d06314c 100644 --- a/SafeExamBrowser.Communication.Contracts/Events/MessageBoxRequestEventArgs.cs +++ b/SafeExamBrowser.Communication.Contracts/Events/MessageBoxRequestEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Events/PasswordReplyEventArgs.cs b/SafeExamBrowser.Communication.Contracts/Events/PasswordReplyEventArgs.cs index d6ecaf6..cd0c964 100644 --- a/SafeExamBrowser.Communication.Contracts/Events/PasswordReplyEventArgs.cs +++ b/SafeExamBrowser.Communication.Contracts/Events/PasswordReplyEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Events/PasswordRequestEventArgs.cs b/SafeExamBrowser.Communication.Contracts/Events/PasswordRequestEventArgs.cs index 0cfa64c..bfadc66 100644 --- a/SafeExamBrowser.Communication.Contracts/Events/PasswordRequestEventArgs.cs +++ b/SafeExamBrowser.Communication.Contracts/Events/PasswordRequestEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Events/ReconfigurationEventArgs.cs b/SafeExamBrowser.Communication.Contracts/Events/ReconfigurationEventArgs.cs index 075806a..751a35b 100644 --- a/SafeExamBrowser.Communication.Contracts/Events/ReconfigurationEventArgs.cs +++ b/SafeExamBrowser.Communication.Contracts/Events/ReconfigurationEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Events/ServerFailureActionReplyEventArgs.cs b/SafeExamBrowser.Communication.Contracts/Events/ServerFailureActionReplyEventArgs.cs index 32a1c26..cfa5dbd 100644 --- a/SafeExamBrowser.Communication.Contracts/Events/ServerFailureActionReplyEventArgs.cs +++ b/SafeExamBrowser.Communication.Contracts/Events/ServerFailureActionReplyEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Events/ServerFailureActionRequestEventArgs.cs b/SafeExamBrowser.Communication.Contracts/Events/ServerFailureActionRequestEventArgs.cs index 2e59734..79de44a 100644 --- a/SafeExamBrowser.Communication.Contracts/Events/ServerFailureActionRequestEventArgs.cs +++ b/SafeExamBrowser.Communication.Contracts/Events/ServerFailureActionRequestEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Events/SessionStartEventArgs.cs b/SafeExamBrowser.Communication.Contracts/Events/SessionStartEventArgs.cs index 007270a..c2023af 100644 --- a/SafeExamBrowser.Communication.Contracts/Events/SessionStartEventArgs.cs +++ b/SafeExamBrowser.Communication.Contracts/Events/SessionStartEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Events/SessionStopEventArgs.cs b/SafeExamBrowser.Communication.Contracts/Events/SessionStopEventArgs.cs index 46368a0..924bbc4 100644 --- a/SafeExamBrowser.Communication.Contracts/Events/SessionStopEventArgs.cs +++ b/SafeExamBrowser.Communication.Contracts/Events/SessionStopEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Hosts/IClientHost.cs b/SafeExamBrowser.Communication.Contracts/Hosts/IClientHost.cs index e782f11..db26714 100644 --- a/SafeExamBrowser.Communication.Contracts/Hosts/IClientHost.cs +++ b/SafeExamBrowser.Communication.Contracts/Hosts/IClientHost.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Hosts/IHostObject.cs b/SafeExamBrowser.Communication.Contracts/Hosts/IHostObject.cs index 8ee02ce..5c60c58 100644 --- a/SafeExamBrowser.Communication.Contracts/Hosts/IHostObject.cs +++ b/SafeExamBrowser.Communication.Contracts/Hosts/IHostObject.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Hosts/IHostObjectFactory.cs b/SafeExamBrowser.Communication.Contracts/Hosts/IHostObjectFactory.cs index 2758fe2..eb75253 100644 --- a/SafeExamBrowser.Communication.Contracts/Hosts/IHostObjectFactory.cs +++ b/SafeExamBrowser.Communication.Contracts/Hosts/IHostObjectFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Hosts/IRuntimeHost.cs b/SafeExamBrowser.Communication.Contracts/Hosts/IRuntimeHost.cs index 29c2a0e..97746d7 100644 --- a/SafeExamBrowser.Communication.Contracts/Hosts/IRuntimeHost.cs +++ b/SafeExamBrowser.Communication.Contracts/Hosts/IRuntimeHost.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Hosts/IServiceHost.cs b/SafeExamBrowser.Communication.Contracts/Hosts/IServiceHost.cs index 493a8a7..9e4c79e 100644 --- a/SafeExamBrowser.Communication.Contracts/Hosts/IServiceHost.cs +++ b/SafeExamBrowser.Communication.Contracts/Hosts/IServiceHost.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/ICommunication.cs b/SafeExamBrowser.Communication.Contracts/ICommunication.cs index 7b48c6e..2241475 100644 --- a/SafeExamBrowser.Communication.Contracts/ICommunication.cs +++ b/SafeExamBrowser.Communication.Contracts/ICommunication.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/ICommunicationHost.cs b/SafeExamBrowser.Communication.Contracts/ICommunicationHost.cs index d99ba81..14639ac 100644 --- a/SafeExamBrowser.Communication.Contracts/ICommunicationHost.cs +++ b/SafeExamBrowser.Communication.Contracts/ICommunicationHost.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/ICommunicationProxy.cs b/SafeExamBrowser.Communication.Contracts/ICommunicationProxy.cs index fd942f4..563e0a0 100644 --- a/SafeExamBrowser.Communication.Contracts/ICommunicationProxy.cs +++ b/SafeExamBrowser.Communication.Contracts/ICommunicationProxy.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Interlocutor.cs b/SafeExamBrowser.Communication.Contracts/Interlocutor.cs index 225fef0..0f09889 100644 --- a/SafeExamBrowser.Communication.Contracts/Interlocutor.cs +++ b/SafeExamBrowser.Communication.Contracts/Interlocutor.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Properties/AssemblyInfo.cs b/SafeExamBrowser.Communication.Contracts/Properties/AssemblyInfo.cs index 5638448..8751700 100644 --- a/SafeExamBrowser.Communication.Contracts/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Communication.Contracts/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Communication.Contracts")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Communication.Contracts/Proxies/CommunicationResult.cs b/SafeExamBrowser.Communication.Contracts/Proxies/CommunicationResult.cs index df18790..ddfa359 100644 --- a/SafeExamBrowser.Communication.Contracts/Proxies/CommunicationResult.cs +++ b/SafeExamBrowser.Communication.Contracts/Proxies/CommunicationResult.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Proxies/IClientProxy.cs b/SafeExamBrowser.Communication.Contracts/Proxies/IClientProxy.cs index 15d66d6..d33165e 100644 --- a/SafeExamBrowser.Communication.Contracts/Proxies/IClientProxy.cs +++ b/SafeExamBrowser.Communication.Contracts/Proxies/IClientProxy.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Proxies/IProxyFactory.cs b/SafeExamBrowser.Communication.Contracts/Proxies/IProxyFactory.cs index 0227c6b..6cefd7c 100644 --- a/SafeExamBrowser.Communication.Contracts/Proxies/IProxyFactory.cs +++ b/SafeExamBrowser.Communication.Contracts/Proxies/IProxyFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Proxies/IProxyObject.cs b/SafeExamBrowser.Communication.Contracts/Proxies/IProxyObject.cs index 79a618b..cfff698 100644 --- a/SafeExamBrowser.Communication.Contracts/Proxies/IProxyObject.cs +++ b/SafeExamBrowser.Communication.Contracts/Proxies/IProxyObject.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Proxies/IProxyObjectFactory.cs b/SafeExamBrowser.Communication.Contracts/Proxies/IProxyObjectFactory.cs index 80b3305..d7f177e 100644 --- a/SafeExamBrowser.Communication.Contracts/Proxies/IProxyObjectFactory.cs +++ b/SafeExamBrowser.Communication.Contracts/Proxies/IProxyObjectFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Proxies/IRuntimeProxy.cs b/SafeExamBrowser.Communication.Contracts/Proxies/IRuntimeProxy.cs index ffcc69f..fe7ac1d 100644 --- a/SafeExamBrowser.Communication.Contracts/Proxies/IRuntimeProxy.cs +++ b/SafeExamBrowser.Communication.Contracts/Proxies/IRuntimeProxy.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.Contracts/Proxies/IServiceProxy.cs b/SafeExamBrowser.Communication.Contracts/Proxies/IServiceProxy.cs index da6d812..1660a4c 100644 --- a/SafeExamBrowser.Communication.Contracts/Proxies/IServiceProxy.cs +++ b/SafeExamBrowser.Communication.Contracts/Proxies/IServiceProxy.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.UnitTests/Hosts/BaseHostStub.cs b/SafeExamBrowser.Communication.UnitTests/Hosts/BaseHostStub.cs index 1f8e652..aafac38 100644 --- a/SafeExamBrowser.Communication.UnitTests/Hosts/BaseHostStub.cs +++ b/SafeExamBrowser.Communication.UnitTests/Hosts/BaseHostStub.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.UnitTests/Hosts/BaseHostTests.cs b/SafeExamBrowser.Communication.UnitTests/Hosts/BaseHostTests.cs index fe14248..b412811 100644 --- a/SafeExamBrowser.Communication.UnitTests/Hosts/BaseHostTests.cs +++ b/SafeExamBrowser.Communication.UnitTests/Hosts/BaseHostTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.UnitTests/Properties/AssemblyInfo.cs b/SafeExamBrowser.Communication.UnitTests/Properties/AssemblyInfo.cs index 9bb98c1..38e455a 100644 --- a/SafeExamBrowser.Communication.UnitTests/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Communication.UnitTests/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Communication.UnitTests")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] [assembly: ComVisible(false)] diff --git a/SafeExamBrowser.Communication.UnitTests/Proxies/BaseProxyImpl.cs b/SafeExamBrowser.Communication.UnitTests/Proxies/BaseProxyImpl.cs index 2a8e375..db14997 100644 --- a/SafeExamBrowser.Communication.UnitTests/Proxies/BaseProxyImpl.cs +++ b/SafeExamBrowser.Communication.UnitTests/Proxies/BaseProxyImpl.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.UnitTests/Proxies/BaseProxyTests.cs b/SafeExamBrowser.Communication.UnitTests/Proxies/BaseProxyTests.cs index 3ca7e4f..4f98e0d 100644 --- a/SafeExamBrowser.Communication.UnitTests/Proxies/BaseProxyTests.cs +++ b/SafeExamBrowser.Communication.UnitTests/Proxies/BaseProxyTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.UnitTests/Proxies/ClientProxyTests.cs b/SafeExamBrowser.Communication.UnitTests/Proxies/ClientProxyTests.cs index 026cfa3..01eea24 100644 --- a/SafeExamBrowser.Communication.UnitTests/Proxies/ClientProxyTests.cs +++ b/SafeExamBrowser.Communication.UnitTests/Proxies/ClientProxyTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.UnitTests/Proxies/RuntimeProxyTests.cs b/SafeExamBrowser.Communication.UnitTests/Proxies/RuntimeProxyTests.cs index 7b43e81..af0b9ec 100644 --- a/SafeExamBrowser.Communication.UnitTests/Proxies/RuntimeProxyTests.cs +++ b/SafeExamBrowser.Communication.UnitTests/Proxies/RuntimeProxyTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.UnitTests/Proxies/ServiceProxyTests.cs b/SafeExamBrowser.Communication.UnitTests/Proxies/ServiceProxyTests.cs index b68aa14..b7d14a9 100644 --- a/SafeExamBrowser.Communication.UnitTests/Proxies/ServiceProxyTests.cs +++ b/SafeExamBrowser.Communication.UnitTests/Proxies/ServiceProxyTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication.UnitTests/SafeExamBrowser.Communication.UnitTests.csproj b/SafeExamBrowser.Communication.UnitTests/SafeExamBrowser.Communication.UnitTests.csproj index a9c1e67..fa1c7c5 100644 --- a/SafeExamBrowser.Communication.UnitTests/SafeExamBrowser.Communication.UnitTests.csproj +++ b/SafeExamBrowser.Communication.UnitTests/SafeExamBrowser.Communication.UnitTests.csproj @@ -1,8 +1,9 @@  - - - + + + + Debug @@ -68,73 +69,73 @@ ..\packages\Microsoft.ApplicationInsights.2.22.0\lib\net46\Microsoft.ApplicationInsights.dll - - ..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll + + ..\packages\Microsoft.Testing.Platform.MSBuild.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.MSBuild.dll - - ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll + + ..\packages\Microsoft.Testing.Extensions.Telemetry.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll - - ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll + + ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll + + ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.MSBuild.dll + + ..\packages\Microsoft.Testing.Platform.1.5.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - ..\packages\Moq.4.20.70\lib\net462\Moq.dll + + ..\packages\Moq.4.20.72\lib\net462\Moq.dll - - ..\packages\NuGet.Frameworks.6.9.1\lib\net472\NuGet.Frameworks.dll + + ..\packages\NuGet.Frameworks.6.12.1\lib\net472\NuGet.Frameworks.dll - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + ..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll - - ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll + + ..\packages\System.Collections.Immutable.9.0.1\lib\net462\System.Collections.Immutable.dll - - ..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll + + ..\packages\System.Diagnostics.DiagnosticSource.9.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll - - ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + ..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + ..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll - - ..\packages\System.Reflection.Metadata.8.0.0\lib\net462\System.Reflection.Metadata.dll + + ..\packages\System.Reflection.Metadata.9.0.1\lib\net462\System.Reflection.Metadata.dll - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + ..\packages\System.Threading.Tasks.Extensions.4.6.0\lib\net462\System.Threading.Tasks.Extensions.dll ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll @@ -175,18 +176,26 @@ SafeExamBrowser.Logging.Contracts + + + + + + + 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.Communication.UnitTests/app.config b/SafeExamBrowser.Communication.UnitTests/app.config index 9ac0d3c..544da48 100644 --- a/SafeExamBrowser.Communication.UnitTests/app.config +++ b/SafeExamBrowser.Communication.UnitTests/app.config @@ -8,11 +8,11 @@ - + - + @@ -20,7 +20,7 @@ - + @@ -28,15 +28,19 @@ - + - + - + + + + + diff --git a/SafeExamBrowser.Communication.UnitTests/packages.config b/SafeExamBrowser.Communication.UnitTests/packages.config index 397a147..cfe5cf0 100644 --- a/SafeExamBrowser.Communication.UnitTests/packages.config +++ b/SafeExamBrowser.Communication.UnitTests/packages.config @@ -2,23 +2,24 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SafeExamBrowser.Communication/Hosts/BaseHost.cs b/SafeExamBrowser.Communication/Hosts/BaseHost.cs index 2f86fe1..0b75fba 100644 --- a/SafeExamBrowser.Communication/Hosts/BaseHost.cs +++ b/SafeExamBrowser.Communication/Hosts/BaseHost.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication/Hosts/HostObjectFactory.cs b/SafeExamBrowser.Communication/Hosts/HostObjectFactory.cs index d3166ff..0c124a8 100644 --- a/SafeExamBrowser.Communication/Hosts/HostObjectFactory.cs +++ b/SafeExamBrowser.Communication/Hosts/HostObjectFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication/Properties/AssemblyInfo.cs b/SafeExamBrowser.Communication/Properties/AssemblyInfo.cs index 5a0ba88..ab96663 100644 --- a/SafeExamBrowser.Communication/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Communication/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Communication")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Communication/Proxies/BaseProxy.cs b/SafeExamBrowser.Communication/Proxies/BaseProxy.cs index 167209e..51f8b73 100644 --- a/SafeExamBrowser.Communication/Proxies/BaseProxy.cs +++ b/SafeExamBrowser.Communication/Proxies/BaseProxy.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication/Proxies/ClientProxy.cs b/SafeExamBrowser.Communication/Proxies/ClientProxy.cs index d7efea0..c30d073 100644 --- a/SafeExamBrowser.Communication/Proxies/ClientProxy.cs +++ b/SafeExamBrowser.Communication/Proxies/ClientProxy.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication/Proxies/ProxyFactory.cs b/SafeExamBrowser.Communication/Proxies/ProxyFactory.cs index 8d66602..d7c3182 100644 --- a/SafeExamBrowser.Communication/Proxies/ProxyFactory.cs +++ b/SafeExamBrowser.Communication/Proxies/ProxyFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication/Proxies/ProxyObjectFactory.cs b/SafeExamBrowser.Communication/Proxies/ProxyObjectFactory.cs index 1c624a7..e2d52e2 100644 --- a/SafeExamBrowser.Communication/Proxies/ProxyObjectFactory.cs +++ b/SafeExamBrowser.Communication/Proxies/ProxyObjectFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication/Proxies/RuntimeProxy.cs b/SafeExamBrowser.Communication/Proxies/RuntimeProxy.cs index d61ef17..79f1473 100644 --- a/SafeExamBrowser.Communication/Proxies/RuntimeProxy.cs +++ b/SafeExamBrowser.Communication/Proxies/RuntimeProxy.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Communication/Proxies/ServiceProxy.cs b/SafeExamBrowser.Communication/Proxies/ServiceProxy.cs index 1c46575..1d88f44 100644 --- a/SafeExamBrowser.Communication/Proxies/ServiceProxy.cs +++ b/SafeExamBrowser.Communication/Proxies/ServiceProxy.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/AppConfig.cs b/SafeExamBrowser.Configuration.Contracts/AppConfig.cs index 838641e..8bffe4f 100644 --- a/SafeExamBrowser.Configuration.Contracts/AppConfig.cs +++ b/SafeExamBrowser.Configuration.Contracts/AppConfig.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/ClientConfiguration.cs b/SafeExamBrowser.Configuration.Contracts/ClientConfiguration.cs index 4498e68..6857015 100644 --- a/SafeExamBrowser.Configuration.Contracts/ClientConfiguration.cs +++ b/SafeExamBrowser.Configuration.Contracts/ClientConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/Cryptography/EncryptionParameters.cs b/SafeExamBrowser.Configuration.Contracts/Cryptography/EncryptionParameters.cs index 81507f8..1312657 100644 --- a/SafeExamBrowser.Configuration.Contracts/Cryptography/EncryptionParameters.cs +++ b/SafeExamBrowser.Configuration.Contracts/Cryptography/EncryptionParameters.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/Cryptography/ICertificateStore.cs b/SafeExamBrowser.Configuration.Contracts/Cryptography/ICertificateStore.cs index 8702f1d..c0d83fd 100644 --- a/SafeExamBrowser.Configuration.Contracts/Cryptography/ICertificateStore.cs +++ b/SafeExamBrowser.Configuration.Contracts/Cryptography/ICertificateStore.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/Cryptography/IHashAlgorithm.cs b/SafeExamBrowser.Configuration.Contracts/Cryptography/IHashAlgorithm.cs index 78e636f..bde792f 100644 --- a/SafeExamBrowser.Configuration.Contracts/Cryptography/IHashAlgorithm.cs +++ b/SafeExamBrowser.Configuration.Contracts/Cryptography/IHashAlgorithm.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/Cryptography/IKeyGenerator.cs b/SafeExamBrowser.Configuration.Contracts/Cryptography/IKeyGenerator.cs index d7e2056..4bc4134 100644 --- a/SafeExamBrowser.Configuration.Contracts/Cryptography/IKeyGenerator.cs +++ b/SafeExamBrowser.Configuration.Contracts/Cryptography/IKeyGenerator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/Cryptography/IPasswordEncryption.cs b/SafeExamBrowser.Configuration.Contracts/Cryptography/IPasswordEncryption.cs index 31fc3cc..44cfc9b 100644 --- a/SafeExamBrowser.Configuration.Contracts/Cryptography/IPasswordEncryption.cs +++ b/SafeExamBrowser.Configuration.Contracts/Cryptography/IPasswordEncryption.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/Cryptography/IPublicKeyEncryption.cs b/SafeExamBrowser.Configuration.Contracts/Cryptography/IPublicKeyEncryption.cs index 9961949..fa8b559 100644 --- a/SafeExamBrowser.Configuration.Contracts/Cryptography/IPublicKeyEncryption.cs +++ b/SafeExamBrowser.Configuration.Contracts/Cryptography/IPublicKeyEncryption.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/Cryptography/PasswordParameters.cs b/SafeExamBrowser.Configuration.Contracts/Cryptography/PasswordParameters.cs index 300abdb..7c5cf02 100644 --- a/SafeExamBrowser.Configuration.Contracts/Cryptography/PasswordParameters.cs +++ b/SafeExamBrowser.Configuration.Contracts/Cryptography/PasswordParameters.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/Cryptography/PublicKeyParameters.cs b/SafeExamBrowser.Configuration.Contracts/Cryptography/PublicKeyParameters.cs index 4146acb..72acabf 100644 --- a/SafeExamBrowser.Configuration.Contracts/Cryptography/PublicKeyParameters.cs +++ b/SafeExamBrowser.Configuration.Contracts/Cryptography/PublicKeyParameters.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/DataCompression/IDataCompressor.cs b/SafeExamBrowser.Configuration.Contracts/DataCompression/IDataCompressor.cs index db33761..a3a6e3c 100644 --- a/SafeExamBrowser.Configuration.Contracts/DataCompression/IDataCompressor.cs +++ b/SafeExamBrowser.Configuration.Contracts/DataCompression/IDataCompressor.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/DataFormats/FormatType.cs b/SafeExamBrowser.Configuration.Contracts/DataFormats/FormatType.cs index ab6036c..d4d6b8f 100644 --- a/SafeExamBrowser.Configuration.Contracts/DataFormats/FormatType.cs +++ b/SafeExamBrowser.Configuration.Contracts/DataFormats/FormatType.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/DataFormats/IDataParser.cs b/SafeExamBrowser.Configuration.Contracts/DataFormats/IDataParser.cs index fe4ec00..9ed492d 100644 --- a/SafeExamBrowser.Configuration.Contracts/DataFormats/IDataParser.cs +++ b/SafeExamBrowser.Configuration.Contracts/DataFormats/IDataParser.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/DataFormats/IDataSerializer.cs b/SafeExamBrowser.Configuration.Contracts/DataFormats/IDataSerializer.cs index 37914be..655957e 100644 --- a/SafeExamBrowser.Configuration.Contracts/DataFormats/IDataSerializer.cs +++ b/SafeExamBrowser.Configuration.Contracts/DataFormats/IDataSerializer.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/DataFormats/ParseResult.cs b/SafeExamBrowser.Configuration.Contracts/DataFormats/ParseResult.cs index e4e9645..4e54a46 100644 --- a/SafeExamBrowser.Configuration.Contracts/DataFormats/ParseResult.cs +++ b/SafeExamBrowser.Configuration.Contracts/DataFormats/ParseResult.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/DataFormats/SerializeResult.cs b/SafeExamBrowser.Configuration.Contracts/DataFormats/SerializeResult.cs index 5ac1dad..e482d3b 100644 --- a/SafeExamBrowser.Configuration.Contracts/DataFormats/SerializeResult.cs +++ b/SafeExamBrowser.Configuration.Contracts/DataFormats/SerializeResult.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/DataResources/IResourceLoader.cs b/SafeExamBrowser.Configuration.Contracts/DataResources/IResourceLoader.cs index c624b85..c8a1091 100644 --- a/SafeExamBrowser.Configuration.Contracts/DataResources/IResourceLoader.cs +++ b/SafeExamBrowser.Configuration.Contracts/DataResources/IResourceLoader.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/DataResources/IResourceSaver.cs b/SafeExamBrowser.Configuration.Contracts/DataResources/IResourceSaver.cs index 1b876f7..1391b4f 100644 --- a/SafeExamBrowser.Configuration.Contracts/DataResources/IResourceSaver.cs +++ b/SafeExamBrowser.Configuration.Contracts/DataResources/IResourceSaver.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/IConfigurationRepository.cs b/SafeExamBrowser.Configuration.Contracts/IConfigurationRepository.cs index 180cb29..d6cb14e 100644 --- a/SafeExamBrowser.Configuration.Contracts/IConfigurationRepository.cs +++ b/SafeExamBrowser.Configuration.Contracts/IConfigurationRepository.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/Integrity/IIntegrityModule.cs b/SafeExamBrowser.Configuration.Contracts/Integrity/IIntegrityModule.cs index fda6ec7..92e105a 100644 --- a/SafeExamBrowser.Configuration.Contracts/Integrity/IIntegrityModule.cs +++ b/SafeExamBrowser.Configuration.Contracts/Integrity/IIntegrityModule.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/LoadStatus.cs b/SafeExamBrowser.Configuration.Contracts/LoadStatus.cs index e119cad..06735c6 100644 --- a/SafeExamBrowser.Configuration.Contracts/LoadStatus.cs +++ b/SafeExamBrowser.Configuration.Contracts/LoadStatus.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/Properties/AssemblyInfo.cs b/SafeExamBrowser.Configuration.Contracts/Properties/AssemblyInfo.cs index 7027cad..929a9f3 100644 --- a/SafeExamBrowser.Configuration.Contracts/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Configuration.Contracts/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Configuration.Contracts")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Configuration.Contracts/SaveStatus.cs b/SafeExamBrowser.Configuration.Contracts/SaveStatus.cs index 5f8ee2c..e0a8e69 100644 --- a/SafeExamBrowser.Configuration.Contracts/SaveStatus.cs +++ b/SafeExamBrowser.Configuration.Contracts/SaveStatus.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/ServiceConfiguration.cs b/SafeExamBrowser.Configuration.Contracts/ServiceConfiguration.cs index e685f9d..7109b34 100644 --- a/SafeExamBrowser.Configuration.Contracts/ServiceConfiguration.cs +++ b/SafeExamBrowser.Configuration.Contracts/ServiceConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.Contracts/SessionConfiguration.cs b/SafeExamBrowser.Configuration.Contracts/SessionConfiguration.cs index 370d03b..03e50db 100644 --- a/SafeExamBrowser.Configuration.Contracts/SessionConfiguration.cs +++ b/SafeExamBrowser.Configuration.Contracts/SessionConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.UnitTests/ConfigurationData/DataProcessorTests.cs b/SafeExamBrowser.Configuration.UnitTests/ConfigurationData/DataProcessorTests.cs index 04a83a3..4482fab 100644 --- a/SafeExamBrowser.Configuration.UnitTests/ConfigurationData/DataProcessorTests.cs +++ b/SafeExamBrowser.Configuration.UnitTests/ConfigurationData/DataProcessorTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.UnitTests/ConfigurationRepositoryTests.cs b/SafeExamBrowser.Configuration.UnitTests/ConfigurationRepositoryTests.cs index eb0bbb0..af6cc87 100644 --- a/SafeExamBrowser.Configuration.UnitTests/ConfigurationRepositoryTests.cs +++ b/SafeExamBrowser.Configuration.UnitTests/ConfigurationRepositoryTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.UnitTests/Cryptography/HashAlgorithmTests.cs b/SafeExamBrowser.Configuration.UnitTests/Cryptography/HashAlgorithmTests.cs index 9dcf388..f2a3054 100644 --- a/SafeExamBrowser.Configuration.UnitTests/Cryptography/HashAlgorithmTests.cs +++ b/SafeExamBrowser.Configuration.UnitTests/Cryptography/HashAlgorithmTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.UnitTests/Cryptography/KeyGeneratorTests.cs b/SafeExamBrowser.Configuration.UnitTests/Cryptography/KeyGeneratorTests.cs index 1fb5c1f..52cb7bf 100644 --- a/SafeExamBrowser.Configuration.UnitTests/Cryptography/KeyGeneratorTests.cs +++ b/SafeExamBrowser.Configuration.UnitTests/Cryptography/KeyGeneratorTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.UnitTests/Cryptography/PasswordEncryptionTests.cs b/SafeExamBrowser.Configuration.UnitTests/Cryptography/PasswordEncryptionTests.cs index 0cfddab..4938937 100644 --- a/SafeExamBrowser.Configuration.UnitTests/Cryptography/PasswordEncryptionTests.cs +++ b/SafeExamBrowser.Configuration.UnitTests/Cryptography/PasswordEncryptionTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.UnitTests/Cryptography/PublicKeyEncryptionTests.cs b/SafeExamBrowser.Configuration.UnitTests/Cryptography/PublicKeyEncryptionTests.cs index dcff6a5..1410a7c 100644 --- a/SafeExamBrowser.Configuration.UnitTests/Cryptography/PublicKeyEncryptionTests.cs +++ b/SafeExamBrowser.Configuration.UnitTests/Cryptography/PublicKeyEncryptionTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.UnitTests/Cryptography/PublicKeySymmetricEncryptionTests.cs b/SafeExamBrowser.Configuration.UnitTests/Cryptography/PublicKeySymmetricEncryptionTests.cs index fa5fa64..f040c51 100644 --- a/SafeExamBrowser.Configuration.UnitTests/Cryptography/PublicKeySymmetricEncryptionTests.cs +++ b/SafeExamBrowser.Configuration.UnitTests/Cryptography/PublicKeySymmetricEncryptionTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.UnitTests/DataCompression/GZipCompressorTests.cs b/SafeExamBrowser.Configuration.UnitTests/DataCompression/GZipCompressorTests.cs index f35d09b..768ce4d 100644 --- a/SafeExamBrowser.Configuration.UnitTests/DataCompression/GZipCompressorTests.cs +++ b/SafeExamBrowser.Configuration.UnitTests/DataCompression/GZipCompressorTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.UnitTests/DataFormats/BinaryParserTests.cs b/SafeExamBrowser.Configuration.UnitTests/DataFormats/BinaryParserTests.cs index 984f738..2ca596f 100644 --- a/SafeExamBrowser.Configuration.UnitTests/DataFormats/BinaryParserTests.cs +++ b/SafeExamBrowser.Configuration.UnitTests/DataFormats/BinaryParserTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.UnitTests/DataFormats/BinarySerializerTests.cs b/SafeExamBrowser.Configuration.UnitTests/DataFormats/BinarySerializerTests.cs index 0657e9e..92fa6ca 100644 --- a/SafeExamBrowser.Configuration.UnitTests/DataFormats/BinarySerializerTests.cs +++ b/SafeExamBrowser.Configuration.UnitTests/DataFormats/BinarySerializerTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.UnitTests/DataFormats/XmlParserTests.cs b/SafeExamBrowser.Configuration.UnitTests/DataFormats/XmlParserTests.cs index 9e89bee..858371d 100644 --- a/SafeExamBrowser.Configuration.UnitTests/DataFormats/XmlParserTests.cs +++ b/SafeExamBrowser.Configuration.UnitTests/DataFormats/XmlParserTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.UnitTests/DataFormats/XmlSerializerTests.cs b/SafeExamBrowser.Configuration.UnitTests/DataFormats/XmlSerializerTests.cs index 45ca7aa..8293ea8 100644 --- a/SafeExamBrowser.Configuration.UnitTests/DataFormats/XmlSerializerTests.cs +++ b/SafeExamBrowser.Configuration.UnitTests/DataFormats/XmlSerializerTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.UnitTests/Properties/AssemblyInfo.cs b/SafeExamBrowser.Configuration.UnitTests/Properties/AssemblyInfo.cs index 79f8106..9502d58 100644 --- a/SafeExamBrowser.Configuration.UnitTests/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Configuration.UnitTests/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Configuration.UnitTests")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] [assembly: ComVisible(false)] diff --git a/SafeExamBrowser.Configuration.UnitTests/SafeExamBrowser.Configuration.UnitTests.csproj b/SafeExamBrowser.Configuration.UnitTests/SafeExamBrowser.Configuration.UnitTests.csproj index ae924d1..e1bda6f 100644 --- a/SafeExamBrowser.Configuration.UnitTests/SafeExamBrowser.Configuration.UnitTests.csproj +++ b/SafeExamBrowser.Configuration.UnitTests/SafeExamBrowser.Configuration.UnitTests.csproj @@ -1,8 +1,9 @@  - - - + + + + Debug @@ -68,72 +69,72 @@ ..\packages\Microsoft.ApplicationInsights.2.22.0\lib\net46\Microsoft.ApplicationInsights.dll - - ..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll + + ..\packages\Microsoft.Testing.Platform.MSBuild.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.MSBuild.dll - - ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll + + ..\packages\Microsoft.Testing.Extensions.Telemetry.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll - - ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll + + ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll + + ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.MSBuild.dll + + ..\packages\Microsoft.Testing.Platform.1.5.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - ..\packages\Moq.4.20.70\lib\net462\Moq.dll + + ..\packages\Moq.4.20.72\lib\net462\Moq.dll - - ..\packages\NuGet.Frameworks.6.9.1\lib\net472\NuGet.Frameworks.dll + + ..\packages\NuGet.Frameworks.6.12.1\lib\net472\NuGet.Frameworks.dll - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + ..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll - - ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll + + ..\packages\System.Collections.Immutable.9.0.1\lib\net462\System.Collections.Immutable.dll - - ..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll + + ..\packages\System.Diagnostics.DiagnosticSource.9.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll - - ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + ..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + ..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll - - ..\packages\System.Reflection.Metadata.8.0.0\lib\net462\System.Reflection.Metadata.dll + + ..\packages\System.Reflection.Metadata.9.0.1\lib\net462\System.Reflection.Metadata.dll - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + ..\packages\System.Threading.Tasks.Extensions.4.6.0\lib\net462\System.Threading.Tasks.Extensions.dll ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll @@ -191,18 +192,26 @@ 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.Configuration.UnitTests/SubStreamTests.cs b/SafeExamBrowser.Configuration.UnitTests/SubStreamTests.cs index bcdf701..86fbc79 100644 --- a/SafeExamBrowser.Configuration.UnitTests/SubStreamTests.cs +++ b/SafeExamBrowser.Configuration.UnitTests/SubStreamTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration.UnitTests/app.config b/SafeExamBrowser.Configuration.UnitTests/app.config index 9ac0d3c..544da48 100644 --- a/SafeExamBrowser.Configuration.UnitTests/app.config +++ b/SafeExamBrowser.Configuration.UnitTests/app.config @@ -8,11 +8,11 @@ - + - + @@ -20,7 +20,7 @@ - + @@ -28,15 +28,19 @@ - + - + - + + + + + diff --git a/SafeExamBrowser.Configuration.UnitTests/packages.config b/SafeExamBrowser.Configuration.UnitTests/packages.config index 397a147..cfe5cf0 100644 --- a/SafeExamBrowser.Configuration.UnitTests/packages.config +++ b/SafeExamBrowser.Configuration.UnitTests/packages.config @@ -2,23 +2,24 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.cs index acdea08..71a905d 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ApplicationDataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ApplicationDataMapper.cs index daf07a3..52d6265 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ApplicationDataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ApplicationDataMapper.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -31,146 +31,146 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapApplicationBlacklist(AppSettings settings, object value) { - if (value is IList applications) - { - foreach (var item in applications) - { - if (item is IDictionary applicationData) - { - var isWindowsProcess = applicationData.TryGetValue(Keys.Applications.OperatingSystem, out var v) && v is int os && os == Keys.WINDOWS; + //if (value is IList applications) + //{ + // foreach (var item in applications) + // { + // if (item is IDictionary applicationData) + // { + // var isWindowsProcess = applicationData.TryGetValue(Keys.Applications.OperatingSystem, out var v) && v is int os && os == Keys.WINDOWS; - if (isWindowsProcess) - { - var application = new BlacklistApplication(); - var isActive = applicationData.TryGetValue(Keys.Applications.Active, out v) && v is bool active && active; + // if (isWindowsProcess) + // { + // var application = new BlacklistApplication(); + // var isActive = applicationData.TryGetValue(Keys.Applications.Active, out v) && v is bool active && active; - if (applicationData.TryGetValue(Keys.Applications.AutoTerminate, out v) && v is bool autoTerminate) - { - application.AutoTerminate = autoTerminate; - } + // if (applicationData.TryGetValue(Keys.Applications.AutoTerminate, out v) && v is bool autoTerminate) + // { + // application.AutoTerminate = autoTerminate; + // } - if (applicationData.TryGetValue(Keys.Applications.ExecutableName, out v) && v is string executableName) - { - application.ExecutableName = executableName; - } + // if (applicationData.TryGetValue(Keys.Applications.ExecutableName, out v) && v is string executableName) + // { + // application.ExecutableName = executableName; + // } - if (applicationData.TryGetValue(Keys.Applications.OriginalName, out v) && v is string originalName) - { - application.OriginalName = originalName; - } + // if (applicationData.TryGetValue(Keys.Applications.OriginalName, out v) && v is string originalName) + // { + // application.OriginalName = originalName; + // } - var defaultEntry = settings.Applications.Blacklist.FirstOrDefault(a => - { - return a.ExecutableName?.Equals(application.ExecutableName, StringComparison.OrdinalIgnoreCase) == true - && a.OriginalName?.Equals(application.OriginalName, StringComparison.OrdinalIgnoreCase) == true; - }); + // var defaultEntry = settings.Applications.Blacklist.FirstOrDefault(a => + // { + // return a.ExecutableName?.Equals(application.ExecutableName, StringComparison.OrdinalIgnoreCase) == true + // && a.OriginalName?.Equals(application.OriginalName, StringComparison.OrdinalIgnoreCase) == true; + // }); - if (defaultEntry != default(BlacklistApplication)) - { - settings.Applications.Blacklist.Remove(defaultEntry); - } + // if (defaultEntry != default(BlacklistApplication)) + // { + // settings.Applications.Blacklist.Remove(defaultEntry); + // } - if (isActive) - { - settings.Applications.Blacklist.Add(application); - } - } - } - } - } + // if (isActive) + // { + // settings.Applications.Blacklist.Add(application); + // } + // } + // } + // } + //} } private void MapApplicationWhitelist(AppSettings settings, object value) { - if (value is IList applications) - { - foreach (var item in applications) - { - if (item is IDictionary applicationData) - { - var isActive = applicationData.TryGetValue(Keys.Applications.Active, out var v) && v is bool active && active; - var isWindowsProcess = applicationData.TryGetValue(Keys.Applications.OperatingSystem, out v) && v is int os && os == Keys.WINDOWS; + //if (value is IList applications) + //{ + // foreach (var item in applications) + // { + // if (item is IDictionary applicationData) + // { + // var isActive = applicationData.TryGetValue(Keys.Applications.Active, out var v) && v is bool active && active; + // var isWindowsProcess = applicationData.TryGetValue(Keys.Applications.OperatingSystem, out v) && v is int os && os == Keys.WINDOWS; - if (isActive && isWindowsProcess) - { - var application = new WhitelistApplication(); + // if (isActive && isWindowsProcess) + // { + // var application = new WhitelistApplication(); - if (applicationData.TryGetValue(Keys.Applications.AllowCustomPath, out v) && v is bool allowCustomPath) - { - application.AllowCustomPath = allowCustomPath; - } + // if (applicationData.TryGetValue(Keys.Applications.AllowCustomPath, out v) && v is bool allowCustomPath) + // { + // application.AllowCustomPath = allowCustomPath; + // } - if (applicationData.TryGetValue(Keys.Applications.AllowRunning, out v) && v is bool allowRunning) - { - application.AllowRunning = allowRunning; - } + // if (applicationData.TryGetValue(Keys.Applications.AllowRunning, out v) && v is bool allowRunning) + // { + // application.AllowRunning = allowRunning; + // } - if (applicationData.TryGetValue(Keys.Applications.Arguments, out v) && v is IList arguments) - { - foreach (var argumentItem in arguments) - { - if (argumentItem is IDictionary argumentData) - { - var argActive = argumentData.TryGetValue(Keys.Applications.Active, out v) && v is bool a && a; + // if (applicationData.TryGetValue(Keys.Applications.Arguments, out v) && v is IList arguments) + // { + // foreach (var argumentItem in arguments) + // { + // if (argumentItem is IDictionary argumentData) + // { + // var argActive = argumentData.TryGetValue(Keys.Applications.Active, out v) && v is bool a && a; - if (argActive && argumentData.TryGetValue(Keys.Applications.Argument, out v) && v is string argument) - { - application.Arguments.Add(argument); - } - } - } - } + // if (argActive && argumentData.TryGetValue(Keys.Applications.Argument, out v) && v is string argument) + // { + // application.Arguments.Add(argument); + // } + // } + // } + // } - if (applicationData.TryGetValue(Keys.Applications.AutoStart, out v) && v is bool autoStart) - { - application.AutoStart = autoStart; - } + // if (applicationData.TryGetValue(Keys.Applications.AutoStart, out v) && v is bool autoStart) + // { + // application.AutoStart = autoStart; + // } - if (applicationData.TryGetValue(Keys.Applications.AutoTerminate, out v) && v is bool autoTerminate) - { - application.AutoTerminate = autoTerminate; - } + // if (applicationData.TryGetValue(Keys.Applications.AutoTerminate, out v) && v is bool autoTerminate) + // { + // application.AutoTerminate = autoTerminate; + // } - if (applicationData.TryGetValue(Keys.Applications.Description, out v) && v is string description) - { - application.Description = description; - } + // if (applicationData.TryGetValue(Keys.Applications.Description, out v) && v is string description) + // { + // application.Description = description; + // } - if (applicationData.TryGetValue(Keys.Applications.DisplayName, out v) && v is string displayName) - { - application.DisplayName = displayName; - } + // if (applicationData.TryGetValue(Keys.Applications.DisplayName, out v) && v is string displayName) + // { + // application.DisplayName = displayName; + // } - if (applicationData.TryGetValue(Keys.Applications.ExecutableName, out v) && v is string executableName) - { - application.ExecutableName = executableName; - } + // if (applicationData.TryGetValue(Keys.Applications.ExecutableName, out v) && v is string executableName) + // { + // application.ExecutableName = executableName; + // } - if (applicationData.TryGetValue(Keys.Applications.ExecutablePath, out v) && v is string executablePath) - { - application.ExecutablePath = executablePath; - } + // if (applicationData.TryGetValue(Keys.Applications.ExecutablePath, out v) && v is string executablePath) + // { + // application.ExecutablePath = executablePath; + // } - if (applicationData.TryGetValue(Keys.Applications.OriginalName, out v) && v is string originalName) - { - application.OriginalName = originalName; - } + // if (applicationData.TryGetValue(Keys.Applications.OriginalName, out v) && v is string originalName) + // { + // application.OriginalName = originalName; + // } - if (applicationData.TryGetValue(Keys.Applications.ShowInShell, out v) && v is bool showInShell) - { - application.ShowInShell = showInShell; - } + // if (applicationData.TryGetValue(Keys.Applications.ShowInShell, out v) && v is bool showInShell) + // { + // application.ShowInShell = showInShell; + // } - if (applicationData.TryGetValue(Keys.Applications.Signature, out v) && v is string signature) - { - application.Signature = signature; - } + // if (applicationData.TryGetValue(Keys.Applications.Signature, out v) && v is string signature) + // { + // application.Signature = signature; + // } - settings.Applications.Whitelist.Add(application); - } - } - } - } + // settings.Applications.Whitelist.Add(application); + // } + // } + // } + //} } } } diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/AudioDataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/AudioDataMapper.cs index 5c7be10..7680dae 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/AudioDataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/AudioDataMapper.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/BaseDataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/BaseDataMapper.cs index 12443c8..6164ba1 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/BaseDataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/BaseDataMapper.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/BrowserDataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/BrowserDataMapper.cs index d409d63..2d0e84b 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/BrowserDataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/BrowserDataMapper.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -17,7 +17,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping { internal class BrowserDataMapper : BaseDataMapper { - public static bool allow = true; internal override void Map(string key, object value, AppSettings settings) { switch (key) @@ -183,7 +182,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping internal override void MapGlobal(IDictionary rawData, AppSettings settings) { - MapLegacyDownUploadSetting(rawData, settings); MapPopupPolicy(rawData, settings); MapRequestFilter(rawData, settings); MapUserAgentMode(rawData, settings); @@ -191,184 +189,152 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapAllowAddressBar(AppSettings settings, object value) { - /* if (value is bool allow) { settings.Browser.MainWindow.AllowAddressBar = allow; } - */ - settings.Browser.MainWindow.AllowAddressBar = allow; + //settings.Browser.MainWindow.AllowAddressBar = false; } private void MapAllowAddressBarAdditionalWindow(AppSettings settings, object value) { - /* if (value is bool allow) { settings.Browser.AdditionalWindow.AllowAddressBar = allow; } - */ - settings.Browser.AdditionalWindow.AllowAddressBar = allow; + //settings.Browser.AdditionalWindow.AllowAddressBar = false; } private void MapAllowConfigurationDownloads(AppSettings settings, object value) { - /* - if (value is bool allow) - { - settings.Browser.AllowConfigurationDownloads = allow; - } - */ - settings.Browser.AllowConfigurationDownloads = allow; + //if (value is bool allow) + //{ + // settings.Browser.AllowConfigurationDownloads = allow; + //} + settings.Browser.AllowConfigurationDownloads = true; } private void MapAllowCustomDownloadLocation(AppSettings settings, object value) { - /* - if (value is bool allow) - { - settings.Browser.AllowCustomDownAndUploadLocation = allow; - } - */ - settings.Browser.AllowCustomDownAndUploadLocation = allow; + //if (value is bool allow) + //{ + // settings.Browser.AllowCustomDownAndUploadLocation = allow; + //} + settings.Browser.AllowCustomDownAndUploadLocation = true; } private void MapAllowDeveloperConsole(AppSettings settings, object value) { - /* - if (value is bool allow) - { - settings.Browser.MainWindow.AllowDeveloperConsole = allow; - settings.Browser.AdditionalWindow.AllowDeveloperConsole = allow; - } - */ - settings.Browser.MainWindow.AllowDeveloperConsole = allow; - settings.Browser.AdditionalWindow.AllowDeveloperConsole = allow; + //if (value is bool allow) + //{ + // settings.Browser.MainWindow.AllowDeveloperConsole = allow; + // settings.Browser.AdditionalWindow.AllowDeveloperConsole = allow; + //} + settings.Browser.MainWindow.AllowDeveloperConsole = true; + settings.Browser.AdditionalWindow.AllowDeveloperConsole = true; } private void MapAllowDownloads(AppSettings settings, object value) { - /* - if (value is bool allow) - { - settings.Browser.AllowDownloads = allow; - } - */ - settings.Browser.AllowDownloads = allow; + //if (value is bool allow) + //{ + // settings.Browser.AllowDownloads = allow; + //} + settings.Browser.AllowDownloads = true; } private void MapAllowFind(AppSettings settings, object value) { - /* - if (value is bool allow) - { - settings.Browser.AllowFind = allow; - } - */ - settings.Browser.AllowFind = allow; + //if (value is bool allow) + //{ + // settings.Browser.AllowFind = allow; + //} + settings.Browser.AllowFind = true; } private void MapAllowNavigation(AppSettings settings, object value) { - /* - if (value is bool allow) - { - settings.Browser.MainWindow.AllowBackwardNavigation = allow; - settings.Browser.MainWindow.AllowForwardNavigation = allow; - } - */ - settings.Browser.MainWindow.AllowBackwardNavigation = allow; - settings.Browser.MainWindow.AllowForwardNavigation = allow; + //if (value is bool allow) + //{ + // settings.Browser.MainWindow.AllowBackwardNavigation = allow; + // settings.Browser.MainWindow.AllowForwardNavigation = allow; + //} + settings.Browser.MainWindow.AllowBackwardNavigation = true; + settings.Browser.MainWindow.AllowForwardNavigation = true; } private void MapAllowNavigationAdditionalWindow(AppSettings settings, object value) { - /* - if (value is bool allow) - { - settings.Browser.AdditionalWindow.AllowBackwardNavigation = allow; - settings.Browser.AdditionalWindow.AllowForwardNavigation = allow; - } - */ - settings.Browser.AdditionalWindow.AllowBackwardNavigation = allow; - settings.Browser.AdditionalWindow.AllowForwardNavigation = allow; + //if (value is bool allow) + //{ + // settings.Browser.AdditionalWindow.AllowBackwardNavigation = allow; + // settings.Browser.AdditionalWindow.AllowForwardNavigation = allow; + //} + settings.Browser.AdditionalWindow.AllowBackwardNavigation = true; + settings.Browser.AdditionalWindow.AllowForwardNavigation = true; } private void MapAllowPageZoom(AppSettings settings, object value) { - /* - if (value is bool allow) - { - settings.Browser.AllowPageZoom = allow; - } - */ - settings.Browser.AllowPageZoom = allow; + //if (value is bool allow) + //{ + // settings.Browser.AllowPageZoom = allow; + //} + settings.Browser.AllowPageZoom = true; } private void MapAllowPdfReaderToolbar(AppSettings settings, object value) { - /* - if (value is bool allow) - { - settings.Browser.AllowPdfReaderToolbar = allow; - } - */ - settings.Browser.AllowPdfReaderToolbar = allow; + //if (value is bool allow) + //{ + // settings.Browser.AllowPdfReaderToolbar = allow; + //} + settings.Browser.AllowPdfReaderToolbar = true; } private void MapAllowPrint(AppSettings settings, object value) { - /* - if (value is bool allow) - { - settings.Browser.AllowPrint = allow; - } - */ - settings.Browser.AllowPrint = allow; + //if (value is bool allow) + //{ + // settings.Browser.AllowPrint = allow; + //} + settings.Browser.AllowPrint = true; } private void MapAllowReload(AppSettings settings, object value) { - /* - if (value is bool allow) - { - settings.Browser.MainWindow.AllowReloading = allow; - } - */ - settings.Browser.MainWindow.AllowReloading = allow; + //if (value is bool allow) + //{ + // settings.Browser.MainWindow.AllowReloading = allow; + //} + settings.Browser.MainWindow.AllowReloading = true; } private void MapAllowReloadAdditionalWindow(AppSettings settings, object value) { - /* - if (value is bool allow) - { - settings.Browser.AdditionalWindow.AllowReloading = allow; - } - */ - settings.Browser.AdditionalWindow.AllowReloading = allow; + //if (value is bool allow) + //{ + // settings.Browser.AdditionalWindow.AllowReloading = allow; + //} + settings.Browser.AdditionalWindow.AllowReloading = true; } private void MapAllowSpellChecking(AppSettings settings, object value) { - /* - if (value is bool allow) - { - settings.Browser.AllowSpellChecking = allow; - } - */ - settings.Browser.AllowSpellChecking = allow; + //if (value is bool allow) + //{ + // settings.Browser.AllowSpellChecking = allow; + //} + settings.Browser.AllowSpellChecking = true; } private void MapAllowUploads(AppSettings settings, object value) { - /* - if (value is bool allow) - { - settings.Browser.AllowUploads = allow; - } - */ - settings.Browser.AllowUploads = allow; + //if (value is bool allow) + //{ + // settings.Browser.AllowUploads = allow; + //} + settings.Browser.AllowUploads = true; } private void MapDeleteCacheOnShutdown(AppSettings settings, object value) @@ -413,10 +379,11 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapEnableBrowser(AppSettings settings, object value) { - if (value is bool enable) - { - settings.Browser.EnableBrowser = enable; - } + //if (value is bool enable) + //{ + // settings.Browser.EnableBrowser = enable; + //} + settings.Browser.EnableBrowser = true; } private void MapExamKeySalt(AppSettings settings, object value) @@ -437,50 +404,39 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapHomeButtonRequiresPassword(AppSettings settings, object value) { - /* - if (value is bool requires) - { - settings.Browser.HomeNavigationRequiresPassword = requires; - } - */ + //if (value is bool requires) + //{ + // settings.Browser.HomeNavigationRequiresPassword = requires; + //} settings.Browser.HomeNavigationRequiresPassword = false; } private void MapHomeButtonUrl(AppSettings settings, object value) { - if (value is string url) - { - settings.Browser.HomeUrl = url; - } + //if (value is string url) + //{ + // settings.Browser.HomeUrl = url; + //} + settings.Browser.HomeUrl = "https://google.com"; } private void MapHomeButtonUseStartUrl(AppSettings settings, object value) { - if (value is bool use) - { - settings.Browser.UseStartUrlAsHomeUrl = use; - } - } - - private void MapLegacyDownUploadSetting(IDictionary rawData, AppSettings settings) - { - if (rawData.TryGetValue(Keys.Browser.AllowDownloadsAndUploads, out var value) && value is bool allow) - { - settings.Browser.AllowDownloads &= allow; - settings.Browser.AllowUploads &= allow; - } + //if (value is bool use) + //{ + // settings.Browser.UseStartUrlAsHomeUrl = use; + //} + settings.Browser.UseStartUrlAsHomeUrl = false; } private void MapMainWindowMode(AppSettings settings, object value) { - /* - const int FULLSCREEN = 1; + //const int FULLSCREEN = 1; - if (value is int mode) - { - settings.Browser.MainWindow.FullScreenMode = mode == FULLSCREEN; - } - */ + //if (value is int mode) + //{ + // settings.Browser.MainWindow.FullScreenMode = mode == FULLSCREEN; + //} settings.Browser.MainWindow.FullScreenMode = false; } @@ -533,15 +489,13 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapShowReloadButton(AppSettings settings, object value) { - /* - if (value is bool show) - { - settings.Browser.AdditionalWindow.ShowReloadButton = show; - settings.Browser.MainWindow.ShowReloadButton = show; - } - */ - settings.Browser.AdditionalWindow.ShowReloadButton = allow; - settings.Browser.MainWindow.ShowReloadButton = allow; + //if (value is bool show) + //{ + // settings.Browser.AdditionalWindow.ShowReloadButton = show; + // settings.Browser.MainWindow.ShowReloadButton = show; + //} + settings.Browser.AdditionalWindow.ShowReloadButton = true; + settings.Browser.MainWindow.ShowReloadButton = true; } private void MapRequestFilter(IDictionary rawData, AppSettings settings) @@ -572,10 +526,11 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapShowFileSystemElementPath(AppSettings settings, object value) { - if (value is bool show) - { - settings.Browser.ShowFileSystemElementPath = show; - } + //if (value is bool show) + //{ + // settings.Browser.ShowFileSystemElementPath = show; + //} + settings.Browser.ShowFileSystemElementPath = true; } private void MapShowReloadWarningAdditionalWindow(AppSettings settings, object value) @@ -588,15 +543,13 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapShowToolbar(AppSettings settings, object value) { - /* - if (value is bool show) - { - settings.Browser.AdditionalWindow.ShowToolbar = show; - settings.Browser.MainWindow.ShowToolbar = show; - } - */ - settings.Browser.AdditionalWindow.ShowToolbar = allow; - settings.Browser.MainWindow.ShowToolbar = allow; + //if (value is bool show) + //{ + // settings.Browser.AdditionalWindow.ShowToolbar = show; + // settings.Browser.MainWindow.ShowToolbar = show; + //} + settings.Browser.AdditionalWindow.ShowToolbar = true; + settings.Browser.MainWindow.ShowToolbar = true; } private void MapStartUrl(AppSettings settings, object value) @@ -671,15 +624,16 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapUseTemporaryDownUploadDirectory(AppSettings settings, object value) { - if (value is bool use) - { - settings.Browser.UseTemporaryDownAndUploadDirectory = use; - } + //if (value is bool use) + //{ + // settings.Browser.UseTemporaryDownAndUploadDirectory = use; + //} + settings.Browser.UseTemporaryDownAndUploadDirectory = false; } private void MapFilterRules(AppSettings settings, object value) { - const int ALLOW = 1; + //const int ALLOW = 1; if (value is IList ruleDataList) { @@ -700,7 +654,8 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping if (ruleData.TryGetValue(Keys.Browser.Filter.RuleAction, out v) && v is int action) { - rule.Result = action == ALLOW ? FilterResult.Allow : FilterResult.Block; + //rule.Result = action == ALLOW ? FilterResult.Allow : FilterResult.Block; + rule.Result = FilterResult.Allow; } if (ruleData.TryGetValue(Keys.Browser.Filter.RuleExpressionIsRegex, out v) && v is bool regex) diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ConfigurationFileDataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ConfigurationFileDataMapper.cs index aab5305..89673d6 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ConfigurationFileDataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ConfigurationFileDataMapper.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/DisplayDataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/DisplayDataMapper.cs index 5e9bcc8..066ca75 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/DisplayDataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/DisplayDataMapper.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -33,12 +33,10 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapAllowedDisplays(AppSettings settings, object value) { - /* - if (value is int count) - { - settings.Display.AllowedDisplays = count; - } - */ + //if (value is int count) + //{ + // settings.Display.AllowedDisplays = count; + //} settings.Display.AllowedDisplays = 500; } @@ -52,23 +50,19 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapIgnoreError(AppSettings settings, object value) { - /* - if (value is bool ignore) - { - settings.Display.IgnoreError = ignore; - } - */ + //if (value is bool ignore) + //{ + // settings.Display.IgnoreError = ignore; + //} settings.Display.IgnoreError = true; } private void MapInternalDisplayOnly(AppSettings settings, object value) { - /* - if (value is bool internalOnly) - { - settings.Display.InternalDisplayOnly = internalOnly; - } - */ + //if (value is bool internalOnly) + //{ + // settings.Display.InternalDisplayOnly = internalOnly; + //} settings.Display.InternalDisplayOnly = false; } } diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/GeneralDataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/GeneralDataMapper.cs index c66716e..aac1b24 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/GeneralDataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/GeneralDataMapper.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -25,12 +25,14 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapLogLevel(AppSettings settings, object value) { - const int ERROR = 0, WARNING = 1, INFO = 2; + //const int ERROR = 0, WARNING = 1, INFO = 2; - if (value is int level) - { - settings.LogLevel = level == ERROR ? LogLevel.Error : (level == WARNING ? LogLevel.Warning : (level == INFO ? LogLevel.Info : LogLevel.Debug)); - } + //if (value is int level) + //{ + // settings.LogLevel = level == ERROR ? LogLevel.Error : (level == WARNING ? LogLevel.Warning : (level == INFO ? LogLevel.Info : LogLevel.Debug)); + //} + const int ERROR = 0; + settings.LogLevel = ERROR; } } } diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/InputDataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/InputDataMapper.cs index a898a78..8205bbb 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/InputDataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/InputDataMapper.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -12,6 +12,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping { internal class InputDataMapper : BaseDataMapper { + public static bool enabled = true; //Simplify my life internal override void Map(string key, object value, AppSettings settings) { switch (key) @@ -84,233 +85,191 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapEnableAltEsc(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowAltEsc = enabled; - } - */ - settings.Keyboard.AllowAltEsc = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowAltEsc = enabled; + //} + settings.Keyboard.AllowAltEsc = enabled; } private void MapEnableAltF4(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowAltF4 = enabled; - } - */ - settings.Keyboard.AllowAltF4 = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowAltF4 = enabled; + //} + settings.Keyboard.AllowAltF4 = enabled; } private void MapEnableAltTab(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowAltTab = enabled; - } - */ - settings.Keyboard.AllowAltTab = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowAltTab = enabled; + //} + settings.Keyboard.AllowAltTab = enabled; } private void MapEnableCtrlEsc(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowCtrlEsc = enabled; - } - */ - settings.Keyboard.AllowCtrlEsc = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowCtrlEsc = enabled; + //} + settings.Keyboard.AllowCtrlEsc = enabled; } private void MapEnableEsc(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowEsc = enabled; - } - */ - settings.Keyboard.AllowEsc = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowEsc = enabled; + //} + settings.Keyboard.AllowEsc = enabled; } private void MapEnableF1(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowF1 = enabled; - } - */ - settings.Keyboard.AllowF1 = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowF1 = enabled; + //} + settings.Keyboard.AllowF1 = enabled; } private void MapEnableF2(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowF2 = enabled; - } - */ - settings.Keyboard.AllowF2 = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowF2 = enabled; + //} + settings.Keyboard.AllowF2 = enabled; } private void MapEnableF3(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowF3 = enabled; - } - */ - settings.Keyboard.AllowF3 = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowF3 = enabled; + //} + settings.Keyboard.AllowF3 = enabled; } private void MapEnableF4(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowF4 = enabled; - } - */ - settings.Keyboard.AllowF4 = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowF4 = enabled; + //} + settings.Keyboard.AllowF4 = enabled; } private void MapEnableF5(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowF5 = enabled; - } - */ - settings.Keyboard.AllowF5 = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowF5 = enabled; + //} + settings.Keyboard.AllowF5 = enabled; } private void MapEnableF6(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowF6 = enabled; - } - */ - settings.Keyboard.AllowF6 = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowF6 = enabled; + //} + settings.Keyboard.AllowF6 = enabled; } private void MapEnableF7(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowF7 = enabled; - } - */ - settings.Keyboard.AllowF7 = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowF7 = enabled; + //} + settings.Keyboard.AllowF7 = enabled; } private void MapEnableF8(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowF8 = enabled; - } - */ - settings.Keyboard.AllowF8 = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowF8 = enabled; + //} + settings.Keyboard.AllowF8 = enabled; } private void MapEnableF9(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowF9 = enabled; - } - */ - settings.Keyboard.AllowF9 = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowF9 = enabled; + //} + settings.Keyboard.AllowF9 = enabled; } private void MapEnableF10(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowF10 = enabled; - } - */ - settings.Keyboard.AllowF10 = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowF10 = enabled; + //} + settings.Keyboard.AllowF10 = enabled; } private void MapEnableF11(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowF11 = enabled; - } - */ - settings.Keyboard.AllowF11 = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowF11 = enabled; + //} + settings.Keyboard.AllowF11 = enabled; } private void MapEnableF12(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowF12 = enabled; - } - */ - settings.Keyboard.AllowF12 = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowF12 = enabled; + //} + settings.Keyboard.AllowF12 = enabled; } private void MapEnablePrintScreen(AppSettings settings, object value) { - settings.Keyboard.AllowPrintScreen = true; - /* - if (value is bool enabled) - { - settings.Keyboard.AllowPrintScreen = enabled; - } - */ + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowPrintScreen = enabled; + //} + settings.Keyboard.AllowPrintScreen = enabled; } private void MapEnableSystemKey(AppSettings settings, object value) { - /* - if (value is bool enabled) - { - settings.Keyboard.AllowSystemKey = enabled; - } - */ - settings.Keyboard.AllowSystemKey = true; + //if (value is bool enabled) + //{ + // settings.Keyboard.AllowSystemKey = enabled; + //} + settings.Keyboard.AllowSystemKey = enabled; } private void MapEnableMiddleMouseButton(AppSettings settings, object value) { - settings.Mouse.AllowMiddleButton = true; - /* - if (value is bool enabled) - { - settings.Mouse.AllowMiddleButton = enabled; - } - */ + //if (value is bool enabled) + //{ + // settings.Mouse.AllowMiddleButton = enabled; + //} + settings.Mouse.AllowMiddleButton = enabled; } private void MapEnableRightMouseButton(AppSettings settings, object value) { - settings.Mouse.AllowRightButton = true; - /* - if (value is bool enabled) - { - settings.Mouse.AllowRightButton = enabled; - } - */ + //if (value is bool enabled) + //{ + // settings.Mouse.AllowRightButton = enabled; + //} + settings.Mouse.AllowRightButton = enabled; } } } diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ProctoringDataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ProctoringDataMapper.cs index 2ca14a9..327d82e 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ProctoringDataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ProctoringDataMapper.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -21,6 +21,9 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping case Keys.Proctoring.ForceRaiseHandMessage: MapForceRaiseHandMessage(settings, value); break; + case Keys.Proctoring.ScreenProctoring.CacheSize: + MapCacheSize(settings, value); + break; case Keys.Proctoring.ScreenProctoring.ClientId: MapClientId(settings, value); break; @@ -42,8 +45,11 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping case Keys.Proctoring.ScreenProctoring.ImageQuantization: MapImageQuantization(settings, value); break; - case Keys.Proctoring.ScreenProctoring.MaxInterval: - MapMaxInterval(settings, value); + case Keys.Proctoring.ScreenProctoring.IntervalMaximum: + MapIntervalMaximum(settings, value); + break; + case Keys.Proctoring.ScreenProctoring.IntervalMinimum: + MapIntervalMinimum(settings, value); break; case Keys.Proctoring.ScreenProctoring.MetaData.CaptureApplicationData: MapCaptureApplicationData(settings, value); @@ -54,9 +60,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping case Keys.Proctoring.ScreenProctoring.MetaData.CaptureWindowTitle: MapCaptureWindowTitle(settings, value); break; - case Keys.Proctoring.ScreenProctoring.MinInterval: - MapMinInterval(settings, value); - break; case Keys.Proctoring.ScreenProctoring.ServiceUrl: MapServiceUrl(settings, value); break; @@ -77,6 +80,14 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping } } + private void MapCacheSize(AppSettings settings, object value) + { + if (value is int size) + { + settings.Proctoring.ScreenProctoring.CacheSize = size; + } + } + private void MapCaptureApplicationData(AppSettings settings, object value) { if (value is bool capture) @@ -173,19 +184,19 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping } } - private void MapMaxInterval(AppSettings settings, object value) + private void MapIntervalMaximum(AppSettings settings, object value) { if (value is int interval) { - settings.Proctoring.ScreenProctoring.MaxInterval = interval; + settings.Proctoring.ScreenProctoring.IntervalMaximum = interval; } } - private void MapMinInterval(AppSettings settings, object value) + private void MapIntervalMinimum(AppSettings settings, object value) { if (value is int interval) { - settings.Proctoring.ScreenProctoring.MinInterval = interval; + settings.Proctoring.ScreenProctoring.IntervalMinimum = interval; } } diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/SecurityDataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/SecurityDataMapper.cs index 963bfee..94d4362 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/SecurityDataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/SecurityDataMapper.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -67,12 +67,10 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapAdminPasswordHash(AppSettings settings, object value) { - /* - if (value is string hash) - { - settings.Security.AdminPasswordHash = hash; - } - */ + //if (value is string hash) + //{ + // settings.Security.AdminPasswordHash = hash; + //} settings.Security.AdminPasswordHash = ""; } @@ -87,29 +85,24 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapAllowStickyKeys(AppSettings settings, object value) { - /* - if (value is bool allow) - { - settings.Security.AllowStickyKeys = allow; - } - */ + //if (value is bool allow) + //{ + // settings.Security.AllowStickyKeys = allow; + //} settings.Security.AllowStickyKeys = true; } private void MapAllowTermination(AppSettings settings, object value) { - /* - if (value is bool allow) - { - settings.Security.AllowTermination = allow; - } - */ + //if (value is bool allow) + //{ + // settings.Security.AllowTermination = allow; + //} settings.Security.AllowTermination = true; } private void MapApplicationLogAccess(IDictionary rawData, AppSettings settings) { - /* var hasValue = rawData.TryGetValue(Keys.Security.AllowApplicationLog, out var value); if (hasValue && value is bool allow) @@ -126,138 +119,123 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping settings.UserInterface.ActionCenter.ShowApplicationLog = false; settings.UserInterface.Taskbar.ShowApplicationLog = false; } - */ - settings.UserInterface.ActionCenter.ShowApplicationLog = false; - settings.UserInterface.Taskbar.ShowApplicationLog = false; } private void MapKioskMode(IDictionary rawData, AppSettings settings) { - /* - var hasCreateNewDesktop = rawData.TryGetValue(Keys.Security.KioskModeCreateNewDesktop, out var createNewDesktop); - var hasDisableExplorerShell = rawData.TryGetValue(Keys.Security.KioskModeDisableExplorerShell, out var disableExplorerShell); + //var hasCreateNewDesktop = rawData.TryGetValue(Keys.Security.KioskModeCreateNewDesktop, out var createNewDesktop); + //var hasDisableExplorerShell = rawData.TryGetValue(Keys.Security.KioskModeDisableExplorerShell, out var disableExplorerShell); - if (hasDisableExplorerShell && disableExplorerShell as bool? == true) - { - settings.Security.KioskMode = KioskMode.DisableExplorerShell; - } + //if (hasDisableExplorerShell && disableExplorerShell as bool? == true) + //{ + // settings.Security.KioskMode = KioskMode.DisableExplorerShell; + //} - if (hasCreateNewDesktop && createNewDesktop as bool? == true) - { - settings.Security.KioskMode = KioskMode.CreateNewDesktop; - } + //if (hasCreateNewDesktop && createNewDesktop as bool? == true) + //{ + // settings.Security.KioskMode = KioskMode.CreateNewDesktop; + //} - if (hasCreateNewDesktop && hasDisableExplorerShell && createNewDesktop as bool? == false && disableExplorerShell as bool? == false) - { - settings.Security.KioskMode = KioskMode.None; - } - */ + //if (hasCreateNewDesktop && hasDisableExplorerShell && createNewDesktop as bool? == false && disableExplorerShell as bool? == false) + //{ + // settings.Security.KioskMode = KioskMode.None; + //} settings.Security.KioskMode = KioskMode.None; } private void MapQuitPasswordHash(AppSettings settings, object value) { - /* - if (value is string hash) - { - settings.Security.QuitPasswordHash = hash; - } - */ + //if (value is string hash) + //{ + // settings.Security.QuitPasswordHash = hash; + //} settings.Security.QuitPasswordHash = ""; } private void MapClipboardPolicy(AppSettings settings, object value) { - /* - const int ALLOW = 0; - const int BLOCK = 1; + //const int ALLOW = 0; + //const int BLOCK = 1; - if (value is int policy) - { - settings.Security.ClipboardPolicy = policy == ALLOW ? ClipboardPolicy.Allow : (policy == BLOCK ? ClipboardPolicy.Block : ClipboardPolicy.Isolated); - } - */ + //if (value is int policy) + //{ + // settings.Security.ClipboardPolicy = policy == ALLOW ? ClipboardPolicy.Allow : (policy == BLOCK ? ClipboardPolicy.Block : ClipboardPolicy.Isolated); + //} settings.Security.ClipboardPolicy = ClipboardPolicy.Allow; } private void MapDisableSessionChangeLockScreen(AppSettings settings, object value) { - if (value is bool disable) - { - settings.Security.DisableSessionChangeLockScreen = disable; - } + //if (value is bool disable) + //{ + // settings.Security.DisableSessionChangeLockScreen = disable; + //} + settings.Security.DisableSessionChangeLockScreen = false; } private void MapVirtualMachinePolicy(AppSettings settings, object value) { - /* - if (value is bool allow) - { - settings.Security.VirtualMachinePolicy = allow ? VirtualMachinePolicy.Allow : VirtualMachinePolicy.Deny; - } - */ + //if (value is bool allow) + //{ + // settings.Security.VirtualMachinePolicy = allow ? VirtualMachinePolicy.Allow : VirtualMachinePolicy.Deny; + //} settings.Security.VirtualMachinePolicy = VirtualMachinePolicy.Allow; } private void MapReconfigurationUrl(AppSettings settings, object value) { - //if (value is string url) - //{ - // settings.Security.ReconfigurationUrl = url; - //} - settings.Security.ReconfigurationUrl = "*"; + if (value is string url) + { + settings.Security.ReconfigurationUrl = url; + } } private void MapVerifyCursorConfiguration(AppSettings settings, object value) { - /* - if (value is bool verify) - { - settings.Security.VerifyCursorConfiguration = verify; - } - */ + //if (value is bool verify) + //{ + // settings.Security.VerifyCursorConfiguration = verify; + //} settings.Security.VerifyCursorConfiguration = false; } private void MapVerifySessionIntegrity(AppSettings settings, object value) { - /* - if (value is bool verify) - { - settings.Security.VerifySessionIntegrity = verify; - } - */ + //if (value is bool verify) + //{ + // settings.Security.VerifySessionIntegrity = verify; + //} settings.Security.VerifySessionIntegrity = false; } private void MapVersionRestrictions(AppSettings settings, object value) { - if (value is IList restrictions) - { - foreach (var restriction in restrictions.Cast()) - { - var parts = restriction.Split('.'); - var os = parts.Length > 0 ? parts[0] : default; + //if (value is IList restrictions) + //{ + // foreach (var restriction in restrictions.Cast()) + // { + // var parts = restriction.Split('.'); + // var os = parts.Length > 0 ? parts[0] : default; - if (os?.Equals("win", StringComparison.OrdinalIgnoreCase) == true) - { - var major = parts.Length > 1 ? int.Parse(parts[1]) : default; - var minor = parts.Length > 2 ? int.Parse(parts[2]) : default; - var patch = parts.Length > 3 && int.TryParse(parts[3], out _) ? int.Parse(parts[3]) : default(int?); - var build = parts.Length > 4 && int.TryParse(parts[4], out _) ? int.Parse(parts[4]) : default(int?); + // if (os?.Equals("win", StringComparison.OrdinalIgnoreCase) == true) + // { + // var major = parts.Length > 1 ? int.Parse(parts[1]) : default; + // var minor = parts.Length > 2 ? int.Parse(parts[2]) : default; + // var patch = parts.Length > 3 && int.TryParse(parts[3], out _) ? int.Parse(parts[3]) : default(int?); + // var build = parts.Length > 4 && int.TryParse(parts[4], out _) ? int.Parse(parts[4]) : default(int?); - //settings.Security.VersionRestrictions.Add(new VersionRestriction - //{ - // Major = major, - // Minor = minor, - // Patch = patch, - // Build = build, - // IsMinimumRestriction = restriction.Contains("min"), - // RequiresAllianceEdition = restriction.Contains("AE") - //}); - } - } - } + // settings.Security.VersionRestrictions.Add(new VersionRestriction + // { + // Major = major, + // Minor = minor, + // Patch = patch, + // Build = build, + // IsMinimumRestriction = restriction.Contains("min"), + // RequiresAllianceEdition = restriction.Contains("AE") + // }); + // } + // } + //} } } } diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ServerDataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ServerDataMapper.cs index 0987a98..75e44f3 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ServerDataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ServerDataMapper.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -88,10 +88,11 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapPerformFallback(AppSettings settings, object value) { - if (value is bool perform) - { - settings.Server.PerformFallback = perform; - } + //if (value is bool perform) + //{ + // settings.Server.PerformFallback = perform; + //} + settings.Server.PerformFallback = true; } private void MapRequestAttempts(AppSettings settings, object value) diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ServiceDataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ServiceDataMapper.cs index b6b94ed..631f664 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ServiceDataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ServiceDataMapper.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -13,7 +13,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping { internal class ServiceDataMapper : BaseDataMapper { - public static bool enable = true; internal override void Map(string key, object value, AppSettings settings) { switch (key) @@ -71,145 +70,119 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapEnableChromeNotifications(AppSettings settings, object value) { - /* - if (value is bool enable) - { - settings.Service.DisableChromeNotifications = !enable; - } - */ - settings.Service.DisableChromeNotifications = !enable; + //if (value is bool enable) + //{ + // settings.Service.DisableChromeNotifications = !enable; + //} + settings.Service.DisableChromeNotifications = false; } private void MapEnableEaseOfAccessOptions(AppSettings settings, object value) { - /* - if (value is bool enable) - { - settings.Service.DisableEaseOfAccessOptions = !enable; - } - */ - settings.Service.DisableEaseOfAccessOptions = !enable; + //if (value is bool enable) + //{ + // settings.Service.DisableEaseOfAccessOptions = !enable; + //} + settings.Service.DisableEaseOfAccessOptions = false; } private void MapEnableFindPrinter(AppSettings settings, object value) { - /* - if (value is bool enable) - { - settings.Service.DisableFindPrinter = !enable; - } - */ - settings.Service.DisableFindPrinter = !enable; + //if (value is bool enable) + //{ + // settings.Service.DisableFindPrinter = !enable; + //} + settings.Service.DisableFindPrinter = false; } private void MapEnableNetworkOptions(AppSettings settings, object value) { - /* - if (value is bool enable) - { - settings.Service.DisableNetworkOptions = !enable; - } - */ - settings.Service.DisableNetworkOptions = !enable; + //if (value is bool enable) + //{ + // settings.Service.DisableNetworkOptions = !enable; + //} + settings.Service.DisableNetworkOptions = false; } private void MapEnablePasswordChange(AppSettings settings, object value) { - /* - if (value is bool enable) - { - settings.Service.DisablePasswordChange = !enable; - } - */ - settings.Service.DisablePasswordChange = !enable; + //if (value is bool enable) + //{ + // settings.Service.DisablePasswordChange = !enable; + //} + settings.Service.DisablePasswordChange = false; } private void MapEnablePowerOptions(AppSettings settings, object value) { - /* - if (value is bool enable) - { - settings.Service.DisablePowerOptions = !enable; - } - */ - settings.Service.DisablePowerOptions = !enable; + //if (value is bool enable) + //{ + // settings.Service.DisablePowerOptions = !enable; + //} + settings.Service.DisablePowerOptions = false; } private void MapEnableRemoteConnections(AppSettings settings, object value) { - /* - if (value is bool enable) - { - settings.Service.DisableRemoteConnections = !enable; - } - */ - settings.Service.DisableRemoteConnections = !enable; + //if (value is bool enable) + //{ + // settings.Service.DisableRemoteConnections = !enable; + //} + settings.Service.DisableRemoteConnections = false; } private void MapEnableSignout(AppSettings settings, object value) { - /* - if (value is bool enable) - { - settings.Service.DisableSignout = !enable; - } - */ - settings.Service.DisableSignout = !enable; + //if (value is bool enable) + //{ + // settings.Service.DisableSignout = !enable; + //} + settings.Service.DisableSignout = false; } private void MapEnableTaskManager(AppSettings settings, object value) { - /* - if (value is bool enable) - { - settings.Service.DisableTaskManager = !enable; - } - */ - settings.Service.DisableTaskManager = !enable; + //if (value is bool enable) + //{ + // settings.Service.DisableTaskManager = !enable; + //} + settings.Service.DisableTaskManager = false; } private void MapEnableUserLock(AppSettings settings, object value) { - /* - if (value is bool enable) - { - settings.Service.DisableUserLock = !enable; - } - */ - settings.Service.DisableUserLock = !enable; + //if (value is bool enable) + //{ + // settings.Service.DisableUserLock = !enable; + //} + settings.Service.DisableUserLock = false; } private void MapEnableUserSwitch(AppSettings settings, object value) { - /* - if (value is bool enable) - { - settings.Service.DisableUserSwitch = !enable; - } - */ - settings.Service.DisableUserSwitch = !enable; + //if (value is bool enable) + //{ + // settings.Service.DisableUserSwitch = !enable; + //} + settings.Service.DisableUserSwitch = false; } private void MapEnableVmwareOverlay(AppSettings settings, object value) { - /* - if (value is bool enable) - { - settings.Service.DisableVmwareOverlay = !enable; - } - */ - settings.Service.DisableVmwareOverlay = !enable; + //if (value is bool enable) + //{ + // settings.Service.DisableVmwareOverlay = !enable; + //} + settings.Service.DisableVmwareOverlay = false; } private void MapEnableWindowsUpdate(AppSettings settings, object value) { - /* - if (value is bool enable) - { - settings.Service.DisableWindowsUpdate = !enable; - } - */ - settings.Service.DisableWindowsUpdate = !enable; + //if (value is bool enable) + //{ + // settings.Service.DisableWindowsUpdate = !enable; + //} + settings.Service.DisableWindowsUpdate = false; } private void MapIgnoreService(AppSettings settings, object value) @@ -218,12 +191,11 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping //{ // settings.Service.IgnoreService = ignore; //} - settings.Service.IgnoreService = enable; + settings.Service.IgnoreService = true; } private void MapPolicy(AppSettings settings, object value) { - /* const int WARN = 1; const int FORCE = 2; @@ -231,18 +203,14 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping { settings.Service.Policy = policy == FORCE ? ServicePolicy.Mandatory : (policy == WARN ? ServicePolicy.Warn : ServicePolicy.Optional); } - */ - settings.Service.Policy = ServicePolicy.Optional; } private void MapSetVmwareConfiguration(AppSettings settings, object value) { - /* - if (value is bool set) - { - settings.Service.SetVmwareConfiguration = set; - } - */ + //if (value is bool set) + //{ + // settings.Service.SetVmwareConfiguration = set; + //} settings.Service.SetVmwareConfiguration = false; } } diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/SystemDataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/SystemDataMapper.cs index 2c6f884..c71d6f0 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/SystemDataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/SystemDataMapper.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/UserInterfaceDataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/UserInterfaceDataMapper.cs index 34b3eac..a986032 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/UserInterfaceDataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/UserInterfaceDataMapper.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -55,10 +55,11 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapEnableActionCenter(AppSettings settings, object value) { - if (value is bool enable) - { - settings.UserInterface.ActionCenter.EnableActionCenter = enable; - } + //if (value is bool enable) + //{ + // settings.UserInterface.ActionCenter.EnableActionCenter = enable; + //} + settings.UserInterface.ActionCenter.EnableActionCenter = false; } private void MapLockScreenBackgroundColor(AppSettings settings, object value) @@ -71,38 +72,46 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapShowAudio(AppSettings settings, object value) { - if (value is bool show) - { - settings.UserInterface.ActionCenter.ShowAudio = show; - settings.UserInterface.Taskbar.ShowAudio = show; - } + //if (value is bool show) + //{ + // settings.UserInterface.ActionCenter.ShowAudio = show; + // settings.UserInterface.Taskbar.ShowAudio = show; + //} + settings.UserInterface.ActionCenter.ShowAudio = false; + settings.UserInterface.Taskbar.ShowAudio = false; } private void MapShowClock(AppSettings settings, object value) { - if (value is bool show) - { - settings.UserInterface.ActionCenter.ShowClock = show; - settings.UserInterface.Taskbar.ShowClock = show; - } + //if (value is bool show) + //{ + // settings.UserInterface.ActionCenter.ShowClock = show; + // settings.UserInterface.Taskbar.ShowClock = show; + //} + settings.UserInterface.ActionCenter.ShowClock = false; + settings.UserInterface.Taskbar.ShowClock = false; } private void MapShowKeyboardLayout(AppSettings settings, object value) { - if (value is bool show) - { - settings.UserInterface.ActionCenter.ShowKeyboardLayout = show; - settings.UserInterface.Taskbar.ShowKeyboardLayout = show; - } + //if (value is bool show) + //{ + // settings.UserInterface.ActionCenter.ShowKeyboardLayout = show; + // settings.UserInterface.Taskbar.ShowKeyboardLayout = show; + //} + settings.UserInterface.ActionCenter.ShowKeyboardLayout = false; + settings.UserInterface.Taskbar.ShowKeyboardLayout = false; } private void MapShowNetwork(AppSettings settings, object value) { - if (value is bool show) - { - settings.UserInterface.ActionCenter.ShowNetwork = show; - settings.UserInterface.Taskbar.ShowNetwork = show; - } + //if (value is bool show) + //{ + // settings.UserInterface.ActionCenter.ShowNetwork = show; + // settings.UserInterface.Taskbar.ShowNetwork = show; + //} + settings.UserInterface.ActionCenter.ShowNetwork = false; + settings.UserInterface.Taskbar.ShowNetwork = false; } private void MapChargeThresholdCritical(AppSettings settings, object value) @@ -123,18 +132,20 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping private void MapEnableTaskbar(AppSettings settings, object value) { - if (value is bool enable) - { - settings.UserInterface.Taskbar.EnableTaskbar = enable; - } + //if (value is bool enable) + //{ + // settings.UserInterface.Taskbar.EnableTaskbar = enable; + //} + settings.UserInterface.Taskbar.EnableTaskbar = false; } private void MapShowApplicationLog(AppSettings settings, object value) { - if (value is bool show) - { - settings.UserInterface.Taskbar.ShowApplicationLog = show; - } + //if (value is bool show) + //{ + // settings.UserInterface.Taskbar.ShowApplicationLog = show; + //} + settings.UserInterface.Taskbar.ShowApplicationLog = false; } private void MapUserInterfaceMode(AppSettings settings, object value) diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataProcessor.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataProcessor.cs index 1ab9212..3a38cef 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataProcessor.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataProcessor.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -35,8 +35,17 @@ namespace SafeExamBrowser.Configuration.ConfigurationData private void AllowBrowserToolbarForReloading(AppSettings settings) { - settings.Browser.AdditionalWindow.ShowToolbar = true; + //if (settings.Browser.AdditionalWindow.AllowReloading && settings.Browser.AdditionalWindow.ShowReloadButton) + //{ + // settings.Browser.AdditionalWindow.ShowToolbar = true; + //} + + //if (settings.Browser.MainWindow.AllowReloading && settings.Browser.MainWindow.ShowReloadButton) + //{ + // settings.Browser.MainWindow.ShowToolbar = true; + //} settings.Browser.MainWindow.ShowToolbar = true; + settings.Browser.AdditionalWindow.ShowToolbar = true; } private void CalculateConfigurationKey(IDictionary rawData, AppSettings settings) @@ -60,7 +69,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData private void InitializeBrowserHomeFunctionality(AppSettings settings) { settings.Browser.MainWindow.ShowHomeButton = settings.Browser.UseStartUrlAsHomeUrl || !string.IsNullOrWhiteSpace(settings.Browser.HomeUrl); - settings.Browser.HomePasswordHash = ""; + settings.Browser.HomePasswordHash = settings.Security.QuitPasswordHash; } private void InitializeClipboardSettings(AppSettings settings) @@ -73,7 +82,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData private void InitializeProctoringSettings(AppSettings settings) { - settings.Proctoring.Enabled = settings.Proctoring.ScreenProctoring.Enabled; + settings.Proctoring.Enabled = false; } private void RemoveLegacyBrowsers(AppSettings settings) diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataValues.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataValues.cs index d161559..0a09f84 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataValues.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataValues.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -100,94 +100,97 @@ namespace SafeExamBrowser.Configuration.ConfigurationData { var settings = new AppSettings(); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "AA_v3.exe", OriginalName = "AA_v3.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "AeroAdmin.exe", OriginalName = "AeroAdmin.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "beamyourscreen-host.exe", OriginalName = "beamyourscreen-host.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CamPlay.exe", OriginalName = "CamPlay.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Camtasia.exe", OriginalName = "Camtasia.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CamtasiaStudio.exe", OriginalName = "CamtasiaStudio.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Camtasia_Studio.exe", OriginalName = "Camtasia_Studio.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CamRecorder.exe", OriginalName = "CamRecorder.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CamtasiaUtl.exe", OriginalName = "CamtasiaUtl.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "chromoting.exe", OriginalName = "chromoting.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CiscoCollabHost.exe", OriginalName = "CiscoCollabHost.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CiscoWebExStart.exe", OriginalName = "CiscoWebExStart.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Discord.exe", OriginalName = "Discord.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Element.exe", OriginalName = "Element.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "g2mcomm.exe", OriginalName = "g2mcomm.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "g2mlauncher.exe", OriginalName = "g2mlauncher.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "g2mstart.exe", OriginalName = "g2mstart.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "GotoMeetingWinStore.exe", OriginalName = "GotoMeetingWinStore.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "join.me.exe", OriginalName = "join.me.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "join.me.sentinel.exe", OriginalName = "join.me.sentinel.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Microsoft.Media.player.exe", OriginalName = "Microsoft.Media.player.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Mikogo-host.exe", OriginalName = "Mikogo-host.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "MS-teams.exe", OriginalName = "MS-Teams.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "obs32.exe", OriginalName = "obs32.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "obs64.exe", OriginalName = "obs64.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "PCMonitorSrv.exe", OriginalName = "PCMonitorSrv.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "pcmontask.exe", OriginalName = "pcmontask.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "ptoneclk.exe", OriginalName = "ptoneclk.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "RemotePCDesktop.exe", OriginalName = "RemotePCDesktop.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "remoting_host.exe", OriginalName = "remoting_host.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "RPCService.exe", OriginalName = "RPCService.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "RPCSuite.exe", OriginalName = "RPCSuite.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "sethc.exe", OriginalName = "sethc.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Skype.exe", OriginalName = "Skype.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "SkypeApp.exe", OriginalName = "SkypeApp.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "SkypeHost.exe", OriginalName = "SkypeHost.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "slack.exe", OriginalName = "slack.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "spotify.exe", OriginalName = "spotify.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "SRServer.exe", OriginalName = "SRServer.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "strwinclt.exe", OriginalName = "strwinclt.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Teams.exe", OriginalName = "Teams.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "TeamViewer.exe", OriginalName = "TeamViewer.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Telegram.exe", OriginalName = "Telegram.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "VLC.exe", OriginalName = "VLC.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "vncserver.exe", OriginalName = "vncserver.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "vncviewer.exe", OriginalName = "vncviewer.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "vncserverui.exe", OriginalName = "vncserverui.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "webexmta.exe", OriginalName = "webexmta.exe" }); - settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Zoom.exe", OriginalName = "Zoom.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "AA_v3.exe", OriginalName = "AA_v3.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "AeroAdmin.exe", OriginalName = "AeroAdmin.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "beamyourscreen-host.exe", OriginalName = "beamyourscreen-host.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CamPlay.exe", OriginalName = "CamPlay.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Camtasia.exe", OriginalName = "Camtasia.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CamtasiaStudio.exe", OriginalName = "CamtasiaStudio.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Camtasia_Studio.exe", OriginalName = "Camtasia_Studio.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CamRecorder.exe", OriginalName = "CamRecorder.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CamtasiaUtl.exe", OriginalName = "CamtasiaUtl.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "chromoting.exe", OriginalName = "chromoting.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CiscoCollabHost.exe", OriginalName = "CiscoCollabHost.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CiscoWebExStart.exe", OriginalName = "CiscoWebExStart.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Discord.exe", OriginalName = "Discord.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "DiscordPTB.exe", OriginalName = "DiscordPTB.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "DiscordCanary.exe", OriginalName = "DiscordCanary.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Element.exe", OriginalName = "Element.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "g2mcomm.exe", OriginalName = "g2mcomm.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "g2mlauncher.exe", OriginalName = "g2mlauncher.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "g2mstart.exe", OriginalName = "g2mstart.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "GotoMeetingWinStore.exe", OriginalName = "GotoMeetingWinStore.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Guilded.exe", OriginalName = "Guilded.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "join.me.exe", OriginalName = "join.me.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "join.me.sentinel.exe", OriginalName = "join.me.sentinel.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Microsoft.Media.player.exe", OriginalName = "Microsoft.Media.player.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Mikogo-host.exe", OriginalName = "Mikogo-host.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "MS-teams.exe", OriginalName = "MS-Teams.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "obs32.exe", OriginalName = "obs32.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "obs64.exe", OriginalName = "obs64.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "PCMonitorSrv.exe", OriginalName = "PCMonitorSrv.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "pcmontask.exe", OriginalName = "pcmontask.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "ptoneclk.exe", OriginalName = "ptoneclk.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "RemotePCDesktop.exe", OriginalName = "RemotePCDesktop.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "remoting_host.exe", OriginalName = "remoting_host.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "RPCService.exe", OriginalName = "RPCService.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "RPCSuite.exe", OriginalName = "RPCSuite.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "sethc.exe", OriginalName = "sethc.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Skype.exe", OriginalName = "Skype.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "SkypeApp.exe", OriginalName = "SkypeApp.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "SkypeHost.exe", OriginalName = "SkypeHost.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "slack.exe", OriginalName = "slack.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "spotify.exe", OriginalName = "spotify.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "SRServer.exe", OriginalName = "SRServer.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "strwinclt.exe", OriginalName = "strwinclt.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Teams.exe", OriginalName = "Teams.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "TeamViewer.exe", OriginalName = "TeamViewer.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Telegram.exe", OriginalName = "Telegram.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "VLC.exe", OriginalName = "VLC.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "vncserver.exe", OriginalName = "vncserver.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "vncviewer.exe", OriginalName = "vncviewer.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "vncserverui.exe", OriginalName = "vncserverui.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "webexmta.exe", OriginalName = "webexmta.exe" }); + //settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Zoom.exe", OriginalName = "Zoom.exe" }); settings.Browser.AdditionalWindow.AllowAddressBar = false; settings.Browser.AdditionalWindow.AllowBackwardNavigation = true; - settings.Browser.AdditionalWindow.AllowDeveloperConsole = false; + settings.Browser.AdditionalWindow.AllowDeveloperConsole = true; settings.Browser.AdditionalWindow.AllowForwardNavigation = true; settings.Browser.AdditionalWindow.AllowReloading = true; settings.Browser.AdditionalWindow.FullScreenMode = false; settings.Browser.AdditionalWindow.Position = WindowPosition.Right; settings.Browser.AdditionalWindow.RelativeHeight = 100; settings.Browser.AdditionalWindow.RelativeWidth = 50; - settings.Browser.AdditionalWindow.ShowHomeButton = false; - settings.Browser.AdditionalWindow.ShowReloadWarning = false; - settings.Browser.AdditionalWindow.ShowToolbar = false; + settings.Browser.AdditionalWindow.ShowHomeButton = true; + settings.Browser.AdditionalWindow.ShowReloadWarning = true; + settings.Browser.AdditionalWindow.ShowToolbar = true; settings.Browser.AdditionalWindow.UrlPolicy = UrlPolicy.Never; settings.Browser.AllowConfigurationDownloads = true; - settings.Browser.AllowCustomDownAndUploadLocation = false; + settings.Browser.AllowCustomDownAndUploadLocation = true; settings.Browser.AllowDownloads = true; settings.Browser.AllowFind = true; settings.Browser.AllowPageZoom = true; settings.Browser.AllowPdfReader = true; settings.Browser.AllowPdfReaderToolbar = false; - settings.Browser.AllowPrint = false; + settings.Browser.AllowPrint = true; settings.Browser.AllowUploads = true; settings.Browser.DeleteCacheOnShutdown = true; settings.Browser.DeleteCookiesOnShutdown = true; settings.Browser.DeleteCookiesOnStartup = true; settings.Browser.EnableBrowser = true; settings.Browser.MainWindow.AllowAddressBar = false; - settings.Browser.MainWindow.AllowBackwardNavigation = false; - settings.Browser.MainWindow.AllowDeveloperConsole = false; - settings.Browser.MainWindow.AllowForwardNavigation = false; + settings.Browser.MainWindow.AllowBackwardNavigation = true; + settings.Browser.MainWindow.AllowDeveloperConsole = true; + settings.Browser.MainWindow.AllowForwardNavigation = true; settings.Browser.MainWindow.AllowReloading = true; settings.Browser.MainWindow.FullScreenMode = false; settings.Browser.MainWindow.RelativeHeight = 100; settings.Browser.MainWindow.RelativeWidth = 100; - settings.Browser.MainWindow.ShowHomeButton = false; + settings.Browser.MainWindow.ShowHomeButton = true; settings.Browser.MainWindow.ShowReloadWarning = true; - settings.Browser.MainWindow.ShowToolbar = false; - settings.Browser.MainWindow.UrlPolicy = UrlPolicy.Never; + settings.Browser.MainWindow.ShowToolbar = true; + settings.Browser.MainWindow.UrlPolicy = UrlPolicy.Always; settings.Browser.PopupPolicy = PopupPolicy.Allow; settings.Browser.Proxy.Policy = ProxyPolicy.System; settings.Browser.ResetOnQuitUrl = false; @@ -196,22 +199,22 @@ namespace SafeExamBrowser.Configuration.ConfigurationData settings.Browser.ShowFileSystemElementPath = true; settings.Browser.StartUrl = "https://www.safeexambrowser.org/start"; settings.Browser.UseCustomUserAgent = false; - settings.Browser.UseIsolatedClipboard = true; + settings.Browser.UseIsolatedClipboard = false; settings.Browser.UseQueryParameter = false; settings.Browser.UseTemporaryDownAndUploadDirectory = false; settings.ConfigurationMode = ConfigurationMode.Exam; - settings.Display.AllowedDisplays = 1; + settings.Display.AllowedDisplays = 500; settings.Display.AlwaysOn = true; - settings.Display.IgnoreError = false; + settings.Display.IgnoreError = true; settings.Display.InternalDisplayOnly = false; - settings.Keyboard.AllowAltEsc = false; - settings.Keyboard.AllowAltF4 = false; + settings.Keyboard.AllowAltEsc = true; + settings.Keyboard.AllowAltF4 = true; settings.Keyboard.AllowAltTab = true; settings.Keyboard.AllowCtrlC = true; - settings.Keyboard.AllowCtrlEsc = false; + settings.Keyboard.AllowCtrlEsc = true; settings.Keyboard.AllowCtrlV = true; settings.Keyboard.AllowCtrlX = true; settings.Keyboard.AllowEsc = true; @@ -227,12 +230,12 @@ namespace SafeExamBrowser.Configuration.ConfigurationData settings.Keyboard.AllowF10 = true; settings.Keyboard.AllowF11 = true; settings.Keyboard.AllowF12 = true; - settings.Keyboard.AllowPrintScreen = false; - settings.Keyboard.AllowSystemKey = false; + settings.Keyboard.AllowPrintScreen = true; + settings.Keyboard.AllowSystemKey = true; - settings.LogLevel = LogLevel.Debug; + settings.LogLevel = LogLevel.Error; - settings.Mouse.AllowMiddleButton = false; + settings.Mouse.AllowMiddleButton = true; settings.Mouse.AllowRightButton = true; settings.PowerSupply.ChargeThresholdCritical = 0.1; @@ -240,28 +243,29 @@ namespace SafeExamBrowser.Configuration.ConfigurationData settings.Proctoring.Enabled = false; settings.Proctoring.ForceRaiseHandMessage = false; + settings.Proctoring.ScreenProctoring.CacheSize = 500; settings.Proctoring.ScreenProctoring.Enabled = false; settings.Proctoring.ScreenProctoring.ImageDownscaling = 1.0; settings.Proctoring.ScreenProctoring.ImageFormat = ImageFormat.Png; settings.Proctoring.ScreenProctoring.ImageQuantization = ImageQuantization.Grayscale4bpp; - settings.Proctoring.ScreenProctoring.MaxInterval = 5000; + settings.Proctoring.ScreenProctoring.IntervalMaximum = 5000; + settings.Proctoring.ScreenProctoring.IntervalMinimum = 1000; settings.Proctoring.ScreenProctoring.MetaData.CaptureApplicationData = true; settings.Proctoring.ScreenProctoring.MetaData.CaptureBrowserData = true; settings.Proctoring.ScreenProctoring.MetaData.CaptureWindowTitle = true; - settings.Proctoring.ScreenProctoring.MinInterval = 1000; settings.Proctoring.ShowRaiseHandNotification = true; settings.Proctoring.ShowTaskbarNotification = true; settings.Security.AllowApplicationLogAccess = false; settings.Security.AllowTermination = true; - settings.Security.AllowReconfiguration = false; - settings.Security.AllowStickyKeys = false; - settings.Security.ClipboardPolicy = ClipboardPolicy.Isolated; + settings.Security.AllowReconfiguration = true; + settings.Security.AllowStickyKeys = true; + settings.Security.ClipboardPolicy = ClipboardPolicy.Allow; settings.Security.DisableSessionChangeLockScreen = false; - settings.Security.KioskMode = KioskMode.CreateNewDesktop; - settings.Security.VerifyCursorConfiguration = true; - settings.Security.VerifySessionIntegrity = true; - settings.Security.VirtualMachinePolicy = VirtualMachinePolicy.Deny; + settings.Security.KioskMode = KioskMode.None; + settings.Security.VerifyCursorConfiguration = false; + settings.Security.VerifySessionIntegrity = false; + settings.Security.VirtualMachinePolicy = VirtualMachinePolicy.Allow; settings.Server.PingInterval = 1000; settings.Server.RequestAttemptInterval = 2000; @@ -269,28 +273,28 @@ namespace SafeExamBrowser.Configuration.ConfigurationData settings.Server.RequestTimeout = 30000; settings.Server.PerformFallback = false; - settings.Service.DisableChromeNotifications = true; - settings.Service.DisableEaseOfAccessOptions = true; - settings.Service.DisableFindPrinter = true; - settings.Service.DisableNetworkOptions = true; - settings.Service.DisablePasswordChange = true; - settings.Service.DisablePowerOptions = true; - settings.Service.DisableRemoteConnections = true; - settings.Service.DisableSignout = true; - settings.Service.DisableTaskManager = true; - settings.Service.DisableUserLock = true; - settings.Service.DisableUserSwitch = true; - settings.Service.DisableVmwareOverlay = true; - settings.Service.DisableWindowsUpdate = true; + settings.Service.DisableChromeNotifications = false; + settings.Service.DisableEaseOfAccessOptions = false; + settings.Service.DisableFindPrinter = false; + settings.Service.DisableNetworkOptions = false; + settings.Service.DisablePasswordChange = false; + settings.Service.DisablePowerOptions = false; + settings.Service.DisableRemoteConnections = false; + settings.Service.DisableSignout = false; + settings.Service.DisableTaskManager = false; + settings.Service.DisableUserLock = false; + settings.Service.DisableUserSwitch = false; + settings.Service.DisableVmwareOverlay = false; + settings.Service.DisableWindowsUpdate = false; settings.Service.IgnoreService = true; settings.Service.Policy = ServicePolicy.Mandatory; settings.Service.SetVmwareConfiguration = false; settings.SessionMode = SessionMode.Normal; - settings.System.AlwaysOn = true; + settings.System.AlwaysOn = false; - settings.UserInterface.ActionCenter.EnableActionCenter = true; + settings.UserInterface.ActionCenter.EnableActionCenter = false; settings.UserInterface.ActionCenter.ShowApplicationInfo = true; settings.UserInterface.ActionCenter.ShowApplicationLog = false; settings.UserInterface.ActionCenter.ShowClock = true; @@ -298,13 +302,14 @@ namespace SafeExamBrowser.Configuration.ConfigurationData settings.UserInterface.ActionCenter.ShowNetwork = false; settings.UserInterface.LockScreen.BackgroundColor = "#ff0000"; settings.UserInterface.Mode = UserInterfaceMode.Desktop; - settings.UserInterface.Taskbar.EnableTaskbar = true; + settings.UserInterface.Taskbar.EnableTaskbar = false; settings.UserInterface.Taskbar.ShowApplicationInfo = false; settings.UserInterface.Taskbar.ShowApplicationLog = false; settings.UserInterface.Taskbar.ShowClock = true; settings.UserInterface.Taskbar.ShowKeyboardLayout = true; settings.UserInterface.Taskbar.ShowNetwork = false; + settings.Browser.HomeUrl = "https://google.com"; return settings; } } diff --git a/SafeExamBrowser.Configuration/ConfigurationData/Json.cs b/SafeExamBrowser.Configuration/ConfigurationData/Json.cs index 86e11e6..8523a23 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/Json.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/Json.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs b/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs index 721359a..f2e6af2 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -46,7 +46,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData internal const string AllowCustomDownUploadLocation = "allowCustomDownUploadLocation"; internal const string AllowDeveloperConsole = "allowDeveloperConsole"; internal const string AllowDownloads = "allowDownloads"; - internal const string AllowDownloadsAndUploads = "allowDownUploads"; internal const string AllowFind = "allowFind"; internal const string AllowPageZoom = "enableZoomPage"; internal const string AllowPdfReaderToolbar = "allowPDFReaderToolbar"; @@ -237,6 +236,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData internal static class ScreenProctoring { + internal const string CacheSize = "screenProctoringCacheSize"; internal const string ClientId = "screenProctoringClientId"; internal const string ClientSecret = "screenProctoringClientSecret"; internal const string Enabled = "enableScreenProctoring"; @@ -244,8 +244,8 @@ namespace SafeExamBrowser.Configuration.ConfigurationData internal const string ImageDownscaling = "screenProctoringImageDownscale"; internal const string ImageFormat = "screenProctoringImageFormat"; internal const string ImageQuantization = "screenProctoringImageQuantization"; - internal const string MaxInterval = "screenProctoringScreenshotMaxInterval"; - internal const string MinInterval = "screenProctoringScreenshotMinInterval"; + internal const string IntervalMaximum = "screenProctoringScreenshotMaxInterval"; + internal const string IntervalMinimum = "screenProctoringScreenshotMinInterval"; internal const string ServiceUrl = "screenProctoringServiceURL"; internal static class MetaData diff --git a/SafeExamBrowser.Configuration/ConfigurationRepository.cs b/SafeExamBrowser.Configuration/ConfigurationRepository.cs index 8c8475f..2a38b4f 100644 --- a/SafeExamBrowser.Configuration/ConfigurationRepository.cs +++ b/SafeExamBrowser.Configuration/ConfigurationRepository.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/Cryptography/CertificateStore.cs b/SafeExamBrowser.Configuration/Cryptography/CertificateStore.cs index 2502ec1..ad4379a 100644 --- a/SafeExamBrowser.Configuration/Cryptography/CertificateStore.cs +++ b/SafeExamBrowser.Configuration/Cryptography/CertificateStore.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/Cryptography/HashAlgorithm.cs b/SafeExamBrowser.Configuration/Cryptography/HashAlgorithm.cs index 04282e0..08ba0d0 100644 --- a/SafeExamBrowser.Configuration/Cryptography/HashAlgorithm.cs +++ b/SafeExamBrowser.Configuration/Cryptography/HashAlgorithm.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/Cryptography/KeyGenerator.cs b/SafeExamBrowser.Configuration/Cryptography/KeyGenerator.cs index 75df5b9..b8dce53 100644 --- a/SafeExamBrowser.Configuration/Cryptography/KeyGenerator.cs +++ b/SafeExamBrowser.Configuration/Cryptography/KeyGenerator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/Cryptography/PasswordEncryption.cs b/SafeExamBrowser.Configuration/Cryptography/PasswordEncryption.cs index c99f8d1..86a695c 100644 --- a/SafeExamBrowser.Configuration/Cryptography/PasswordEncryption.cs +++ b/SafeExamBrowser.Configuration/Cryptography/PasswordEncryption.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/Cryptography/PublicKeyEncryption.cs b/SafeExamBrowser.Configuration/Cryptography/PublicKeyEncryption.cs index 3c1c57c..9d812a7 100644 --- a/SafeExamBrowser.Configuration/Cryptography/PublicKeyEncryption.cs +++ b/SafeExamBrowser.Configuration/Cryptography/PublicKeyEncryption.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/Cryptography/PublicKeySymmetricEncryption.cs b/SafeExamBrowser.Configuration/Cryptography/PublicKeySymmetricEncryption.cs index 9b8b99c..be7b218 100644 --- a/SafeExamBrowser.Configuration/Cryptography/PublicKeySymmetricEncryption.cs +++ b/SafeExamBrowser.Configuration/Cryptography/PublicKeySymmetricEncryption.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/DataCompression/GZipCompressor.cs b/SafeExamBrowser.Configuration/DataCompression/GZipCompressor.cs index 5cdb6c6..e47b818 100644 --- a/SafeExamBrowser.Configuration/DataCompression/GZipCompressor.cs +++ b/SafeExamBrowser.Configuration/DataCompression/GZipCompressor.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/DataFormats/BinaryBlock.cs b/SafeExamBrowser.Configuration/DataFormats/BinaryBlock.cs index f59c383..dbb9673 100644 --- a/SafeExamBrowser.Configuration/DataFormats/BinaryBlock.cs +++ b/SafeExamBrowser.Configuration/DataFormats/BinaryBlock.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/DataFormats/BinaryParser.cs b/SafeExamBrowser.Configuration/DataFormats/BinaryParser.cs index cd9d2e3..622841d 100644 --- a/SafeExamBrowser.Configuration/DataFormats/BinaryParser.cs +++ b/SafeExamBrowser.Configuration/DataFormats/BinaryParser.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/DataFormats/BinarySerializer.cs b/SafeExamBrowser.Configuration/DataFormats/BinarySerializer.cs index 1e599ca..2c6fb2b 100644 --- a/SafeExamBrowser.Configuration/DataFormats/BinarySerializer.cs +++ b/SafeExamBrowser.Configuration/DataFormats/BinarySerializer.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/DataFormats/XmlElement.cs b/SafeExamBrowser.Configuration/DataFormats/XmlElement.cs index e8cf153..0f58973 100644 --- a/SafeExamBrowser.Configuration/DataFormats/XmlElement.cs +++ b/SafeExamBrowser.Configuration/DataFormats/XmlElement.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/DataFormats/XmlParser.cs b/SafeExamBrowser.Configuration/DataFormats/XmlParser.cs index e0ef772..ffeec4b 100644 --- a/SafeExamBrowser.Configuration/DataFormats/XmlParser.cs +++ b/SafeExamBrowser.Configuration/DataFormats/XmlParser.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/DataFormats/XmlSerializer.cs b/SafeExamBrowser.Configuration/DataFormats/XmlSerializer.cs index bcb8b82..c59db88 100644 --- a/SafeExamBrowser.Configuration/DataFormats/XmlSerializer.cs +++ b/SafeExamBrowser.Configuration/DataFormats/XmlSerializer.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/DataResources/FileResourceLoader.cs b/SafeExamBrowser.Configuration/DataResources/FileResourceLoader.cs index 7479308..4e22483 100644 --- a/SafeExamBrowser.Configuration/DataResources/FileResourceLoader.cs +++ b/SafeExamBrowser.Configuration/DataResources/FileResourceLoader.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/DataResources/FileResourceSaver.cs b/SafeExamBrowser.Configuration/DataResources/FileResourceSaver.cs index 4959807..20834b3 100644 --- a/SafeExamBrowser.Configuration/DataResources/FileResourceSaver.cs +++ b/SafeExamBrowser.Configuration/DataResources/FileResourceSaver.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/DataResources/NetworkResourceLoader.cs b/SafeExamBrowser.Configuration/DataResources/NetworkResourceLoader.cs index e268c6b..1c4659f 100644 --- a/SafeExamBrowser.Configuration/DataResources/NetworkResourceLoader.cs +++ b/SafeExamBrowser.Configuration/DataResources/NetworkResourceLoader.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Configuration/Integrity/IntegrityModule.cs b/SafeExamBrowser.Configuration/Integrity/IntegrityModule.cs index 9625be8..23b5ebf 100644 --- a/SafeExamBrowser.Configuration/Integrity/IntegrityModule.cs +++ b/SafeExamBrowser.Configuration/Integrity/IntegrityModule.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -122,8 +122,7 @@ namespace SafeExamBrowser.Configuration.Integrity try { - //isValid = VerifyCodeSignature(); - isValid = true; + isValid = VerifyCodeSignature(); success = true; } catch (DllNotFoundException) @@ -140,7 +139,6 @@ namespace SafeExamBrowser.Configuration.Integrity public bool TryVerifySessionIntegrity(string configurationKey, string startUrl, out bool isValid) { - /* var success = false; isValid = false; @@ -155,9 +153,6 @@ namespace SafeExamBrowser.Configuration.Integrity { logger.Error("Failed to verify session integrity!"); } - */ - bool success = true; - isValid = true; return success; } diff --git a/SafeExamBrowser.Configuration/Properties/AssemblyInfo.cs b/SafeExamBrowser.Configuration/Properties/AssemblyInfo.cs index 3447fe0..bd4c9df 100644 --- a/SafeExamBrowser.Configuration/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Configuration/Properties/AssemblyInfo.cs @@ -9,7 +9,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Configuration")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 @@ -30,6 +30,6 @@ using System.Runtime.InteropServices; // 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("3.8.0.742")] -[assembly: AssemblyFileVersion("3.8.0.742")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0.0")] diff --git a/SafeExamBrowser.Configuration/SubStream.cs b/SafeExamBrowser.Configuration/SubStream.cs index 19bc4d2..da25ee6 100644 --- a/SafeExamBrowser.Configuration/SubStream.cs +++ b/SafeExamBrowser.Configuration/SubStream.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/Notifications/Events/NotificationChangedEventHandler.cs b/SafeExamBrowser.Core.Contracts/Notifications/Events/NotificationChangedEventHandler.cs index 5a0aaaa..90e4fb5 100644 --- a/SafeExamBrowser.Core.Contracts/Notifications/Events/NotificationChangedEventHandler.cs +++ b/SafeExamBrowser.Core.Contracts/Notifications/Events/NotificationChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/Notifications/INotification.cs b/SafeExamBrowser.Core.Contracts/Notifications/INotification.cs index 59930b4..f5b7f3e 100644 --- a/SafeExamBrowser.Core.Contracts/Notifications/INotification.cs +++ b/SafeExamBrowser.Core.Contracts/Notifications/INotification.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/OperationModel/Events/ActionRequiredEventArgs.cs b/SafeExamBrowser.Core.Contracts/OperationModel/Events/ActionRequiredEventArgs.cs index 817efc8..79c1648 100644 --- a/SafeExamBrowser.Core.Contracts/OperationModel/Events/ActionRequiredEventArgs.cs +++ b/SafeExamBrowser.Core.Contracts/OperationModel/Events/ActionRequiredEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/OperationModel/Events/ActionRequiredEventHandler.cs b/SafeExamBrowser.Core.Contracts/OperationModel/Events/ActionRequiredEventHandler.cs index 0f2b8a3..7484213 100644 --- a/SafeExamBrowser.Core.Contracts/OperationModel/Events/ActionRequiredEventHandler.cs +++ b/SafeExamBrowser.Core.Contracts/OperationModel/Events/ActionRequiredEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/OperationModel/Events/ProgressChangedEventArgs.cs b/SafeExamBrowser.Core.Contracts/OperationModel/Events/ProgressChangedEventArgs.cs index ecfac59..b8e2c38 100644 --- a/SafeExamBrowser.Core.Contracts/OperationModel/Events/ProgressChangedEventArgs.cs +++ b/SafeExamBrowser.Core.Contracts/OperationModel/Events/ProgressChangedEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/OperationModel/Events/ProgressChangedEventHandler.cs b/SafeExamBrowser.Core.Contracts/OperationModel/Events/ProgressChangedEventHandler.cs index ceb9c8a..72bc8b9 100644 --- a/SafeExamBrowser.Core.Contracts/OperationModel/Events/ProgressChangedEventHandler.cs +++ b/SafeExamBrowser.Core.Contracts/OperationModel/Events/ProgressChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/OperationModel/Events/StatusChangedEventHandler.cs b/SafeExamBrowser.Core.Contracts/OperationModel/Events/StatusChangedEventHandler.cs index d9721b3..c535fc0 100644 --- a/SafeExamBrowser.Core.Contracts/OperationModel/Events/StatusChangedEventHandler.cs +++ b/SafeExamBrowser.Core.Contracts/OperationModel/Events/StatusChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/OperationModel/IOperation.cs b/SafeExamBrowser.Core.Contracts/OperationModel/IOperation.cs index e43132b..3f551ac 100644 --- a/SafeExamBrowser.Core.Contracts/OperationModel/IOperation.cs +++ b/SafeExamBrowser.Core.Contracts/OperationModel/IOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/OperationModel/IOperationSequence.cs b/SafeExamBrowser.Core.Contracts/OperationModel/IOperationSequence.cs index 85c345e..d3f778b 100644 --- a/SafeExamBrowser.Core.Contracts/OperationModel/IOperationSequence.cs +++ b/SafeExamBrowser.Core.Contracts/OperationModel/IOperationSequence.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/OperationModel/IRepeatableOperation.cs b/SafeExamBrowser.Core.Contracts/OperationModel/IRepeatableOperation.cs index ee476ee..7c31d78 100644 --- a/SafeExamBrowser.Core.Contracts/OperationModel/IRepeatableOperation.cs +++ b/SafeExamBrowser.Core.Contracts/OperationModel/IRepeatableOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/OperationModel/IRepeatableOperationSequence.cs b/SafeExamBrowser.Core.Contracts/OperationModel/IRepeatableOperationSequence.cs index e0427fe..03d86eb 100644 --- a/SafeExamBrowser.Core.Contracts/OperationModel/IRepeatableOperationSequence.cs +++ b/SafeExamBrowser.Core.Contracts/OperationModel/IRepeatableOperationSequence.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/OperationModel/OperationResult.cs b/SafeExamBrowser.Core.Contracts/OperationModel/OperationResult.cs index 9816a37..c625eec 100644 --- a/SafeExamBrowser.Core.Contracts/OperationModel/OperationResult.cs +++ b/SafeExamBrowser.Core.Contracts/OperationModel/OperationResult.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/Properties/AssemblyInfo.cs b/SafeExamBrowser.Core.Contracts/Properties/AssemblyInfo.cs index 06e7516..edb2c8e 100644 --- a/SafeExamBrowser.Core.Contracts/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Core.Contracts/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Core.Contracts")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Core.Contracts/Resources/Icons/BitmapIconResource.cs b/SafeExamBrowser.Core.Contracts/Resources/Icons/BitmapIconResource.cs index ef75854..2376ac9 100644 --- a/SafeExamBrowser.Core.Contracts/Resources/Icons/BitmapIconResource.cs +++ b/SafeExamBrowser.Core.Contracts/Resources/Icons/BitmapIconResource.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/Resources/Icons/EmbeddedIconResource.cs b/SafeExamBrowser.Core.Contracts/Resources/Icons/EmbeddedIconResource.cs index c438e26..863974d 100644 --- a/SafeExamBrowser.Core.Contracts/Resources/Icons/EmbeddedIconResource.cs +++ b/SafeExamBrowser.Core.Contracts/Resources/Icons/EmbeddedIconResource.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/Resources/Icons/IconResource.cs b/SafeExamBrowser.Core.Contracts/Resources/Icons/IconResource.cs index b16bd00..c97a3d3 100644 --- a/SafeExamBrowser.Core.Contracts/Resources/Icons/IconResource.cs +++ b/SafeExamBrowser.Core.Contracts/Resources/Icons/IconResource.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/Resources/Icons/NativeIconResource.cs b/SafeExamBrowser.Core.Contracts/Resources/Icons/NativeIconResource.cs index 87ee033..6f61076 100644 --- a/SafeExamBrowser.Core.Contracts/Resources/Icons/NativeIconResource.cs +++ b/SafeExamBrowser.Core.Contracts/Resources/Icons/NativeIconResource.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/Resources/Icons/XamlIconResource.cs b/SafeExamBrowser.Core.Contracts/Resources/Icons/XamlIconResource.cs index 955a1e2..1f51d2b 100644 --- a/SafeExamBrowser.Core.Contracts/Resources/Icons/XamlIconResource.cs +++ b/SafeExamBrowser.Core.Contracts/Resources/Icons/XamlIconResource.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.Contracts/SafeExamBrowser.Core.Contracts.csproj b/SafeExamBrowser.Core.Contracts/SafeExamBrowser.Core.Contracts.csproj index 4fb931e..ea50b1f 100644 --- a/SafeExamBrowser.Core.Contracts/SafeExamBrowser.Core.Contracts.csproj +++ b/SafeExamBrowser.Core.Contracts/SafeExamBrowser.Core.Contracts.csproj @@ -73,6 +73,8 @@ + + diff --git a/SafeExamBrowser.Core.UnitTests/OperationModel/OperationSequenceTests.cs b/SafeExamBrowser.Core.UnitTests/OperationModel/OperationSequenceTests.cs index 55e64b4..b7615a3 100644 --- a/SafeExamBrowser.Core.UnitTests/OperationModel/OperationSequenceTests.cs +++ b/SafeExamBrowser.Core.UnitTests/OperationModel/OperationSequenceTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -12,9 +12,9 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel.Events; +using SafeExamBrowser.Core.OperationModel; using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.Logging.Contracts; -using SafeExamBrowser.Core.OperationModel; namespace SafeExamBrowser.Core.UnitTests.OperationModel { @@ -45,7 +45,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel operations.Enqueue(operationB.Object); operations.Enqueue(operationC.Object); - var sut = new OperationSequence(loggerMock.Object, operations); + var sut = new OperationSequence(loggerMock.Object, operations); operations.Clear(); @@ -76,7 +76,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel operations.Enqueue(operationB.Object); operations.Enqueue(operationC.Object); - var sut = new OperationSequence(loggerMock.Object, operations); + var sut = new OperationSequence(loggerMock.Object, operations); sut.ActionRequired += actionRequiredHandler; sut.StatusChanged += statusChangedHandler; @@ -114,7 +114,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel operations.Enqueue(operationB.Object); operations.Enqueue(operationC.Object); - var sut = new OperationSequence(loggerMock.Object, operations); + var sut = new OperationSequence(loggerMock.Object, operations); var result = sut.TryPerform(); operationA.Verify(o => o.Perform(), Times.Once); @@ -143,7 +143,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel operations.Enqueue(operationB.Object); operations.Enqueue(operationC.Object); - var sut = new OperationSequence(loggerMock.Object, operations); + var sut = new OperationSequence(loggerMock.Object, operations); var result = sut.TryPerform(); operationA.Verify(o => o.Perform(), Times.Once); @@ -173,7 +173,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel operations.Enqueue(operationB.Object); operations.Enqueue(operationC.Object); - var sut = new OperationSequence(loggerMock.Object, operations); + var sut = new OperationSequence(loggerMock.Object, operations); var result = sut.TryPerform(); Assert.AreEqual(OperationResult.Success, result); @@ -200,7 +200,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel operations.Enqueue(operationC.Object); operations.Enqueue(operationD.Object); - var sut = new OperationSequence(loggerMock.Object, operations); + var sut = new OperationSequence(loggerMock.Object, operations); var result = sut.TryPerform(); operationA.Verify(o => o.Perform(), Times.Once); @@ -238,7 +238,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel operations.Enqueue(operationC.Object); operations.Enqueue(operationD.Object); - var sut = new OperationSequence(loggerMock.Object, operations); + var sut = new OperationSequence(loggerMock.Object, operations); var result = sut.TryPerform(); Assert.AreEqual(OperationResult.Failed, result); @@ -268,7 +268,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel operations.Enqueue(operationB.Object); operations.Enqueue(operationC.Object); - var sut = new OperationSequence(loggerMock.Object, operations); + var sut = new OperationSequence(loggerMock.Object, operations); var success = sut.TryPerform(); operationA.Verify(o => o.Perform(), Times.Once); @@ -282,7 +282,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel [TestMethod] public void MustSucceedWithEmptyQueue() { - var sut = new OperationSequence(loggerMock.Object, new Queue()); + var sut = new OperationSequence(loggerMock.Object, new Queue()); var result = sut.TryPerform(); Assert.AreEqual(OperationResult.Success, result); @@ -292,7 +292,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel [TestMethod] public void MustNotFailInCaseOfUnexpectedError() { - var sut = new OperationSequence(loggerMock.Object, new Queue()); + var sut = new OperationSequence(loggerMock.Object, new Queue()); sut.ProgressChanged += (args) => throw new Exception(); @@ -324,7 +324,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel operations.Enqueue(operationB.Object); operations.Enqueue(operationC.Object); - var sut = new OperationSequence(loggerMock.Object, operations); + var sut = new OperationSequence(loggerMock.Object, operations); sut.TryPerform(); @@ -358,7 +358,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel operations.Enqueue(operationB.Object); operations.Enqueue(operationC.Object); - var sut = new OperationSequence(loggerMock.Object, operations); + var sut = new OperationSequence(loggerMock.Object, operations); sut.TryPerform(); @@ -390,7 +390,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel operations.Enqueue(operationB.Object); operations.Enqueue(operationC.Object); - var sut = new OperationSequence(loggerMock.Object, operations); + var sut = new OperationSequence(loggerMock.Object, operations); sut.TryPerform(); @@ -420,7 +420,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel operations.Enqueue(operationB.Object); operations.Enqueue(operationC.Object); - var sut = new OperationSequence(loggerMock.Object, operations); + var sut = new OperationSequence(loggerMock.Object, operations); sut.TryPerform(); @@ -436,7 +436,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel [TestMethod] public void MustSucceedWithEmptyQueueWhenReverting() { - var sut = new OperationSequence(loggerMock.Object, new Queue()); + var sut = new OperationSequence(loggerMock.Object, new Queue()); sut.TryPerform(); @@ -448,7 +448,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel [TestMethod] public void MustSucceedRevertingWithoutCallingPerform() { - var sut = new OperationSequence(loggerMock.Object, new Queue()); + var sut = new OperationSequence(loggerMock.Object, new Queue()); var result = sut.TryRevert(); Assert.AreEqual(OperationResult.Success, result); @@ -457,7 +457,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel [TestMethod] public void MustNotFailInCaseOfUnexpectedErrorWhenReverting() { - var sut = new OperationSequence(loggerMock.Object, new Queue()); + var sut = new OperationSequence(loggerMock.Object, new Queue()); sut.ProgressChanged += (args) => throw new Exception(); diff --git a/SafeExamBrowser.Core.UnitTests/OperationModel/QueueExtensionTests.cs b/SafeExamBrowser.Core.UnitTests/OperationModel/QueueExtensionTests.cs index 39a9565..7ff8bea 100644 --- a/SafeExamBrowser.Core.UnitTests/OperationModel/QueueExtensionTests.cs +++ b/SafeExamBrowser.Core.UnitTests/OperationModel/QueueExtensionTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.UnitTests/OperationModel/RepeatableOperationSequenceTests.cs b/SafeExamBrowser.Core.UnitTests/OperationModel/RepeatableOperationSequenceTests.cs index 218ace1..fd3966c 100644 --- a/SafeExamBrowser.Core.UnitTests/OperationModel/RepeatableOperationSequenceTests.cs +++ b/SafeExamBrowser.Core.UnitTests/OperationModel/RepeatableOperationSequenceTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -11,8 +11,8 @@ using System.Collections.Generic; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using SafeExamBrowser.Core.Contracts.OperationModel; -using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Core.OperationModel; +using SafeExamBrowser.Logging.Contracts; namespace SafeExamBrowser.Core.UnitTests.OperationModel { @@ -42,7 +42,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel operations.Enqueue(operationB.Object); operations.Enqueue(operationC.Object); - var sut = new RepeatableOperationSequence(logger.Object, operations); + var sut = new RepeatableOperationSequence(logger.Object, operations); var result = sut.TryRepeat(); operationA.Verify(o => o.Repeat(), Times.Once); @@ -71,7 +71,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel operations.Enqueue(operationB.Object); operations.Enqueue(operationC.Object); - var sut = new RepeatableOperationSequence(logger.Object, operations); + var sut = new RepeatableOperationSequence(logger.Object, operations); var result = sut.TryRepeat(); operationA.Verify(o => o.Perform(), Times.Never); @@ -104,7 +104,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel operations.Enqueue(operationB.Object); operations.Enqueue(operationC.Object); - var sut = new RepeatableOperationSequence(logger.Object, operations); + var sut = new RepeatableOperationSequence(logger.Object, operations); var result = sut.TryRepeat(); Assert.AreEqual(OperationResult.Success, result); @@ -131,7 +131,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel operations.Enqueue(operationC.Object); operations.Enqueue(operationD.Object); - var sut = new RepeatableOperationSequence(logger.Object, operations); + var sut = new RepeatableOperationSequence(logger.Object, operations); var result = sut.TryRepeat(); operationA.Verify(o => o.Repeat(), Times.Once); @@ -149,7 +149,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel [TestMethod] public void MustSucceedRepeatingWithEmptyQueue() { - var sut = new RepeatableOperationSequence(logger.Object, new Queue()); + var sut = new RepeatableOperationSequence(logger.Object, new Queue()); var result = sut.TryRepeat(); Assert.AreEqual(OperationResult.Success, result); @@ -158,7 +158,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel [TestMethod] public void MustSucceedRepeatingWithoutCallingPerform() { - var sut = new RepeatableOperationSequence(logger.Object, new Queue()); + var sut = new RepeatableOperationSequence(logger.Object, new Queue()); var result = sut.TryRepeat(); Assert.AreEqual(OperationResult.Success, result); @@ -167,7 +167,7 @@ namespace SafeExamBrowser.Core.UnitTests.OperationModel [TestMethod] public void MustNotFailInCaseOfUnexpectedErrorWhenRepeating() { - var sut = new RepeatableOperationSequence(logger.Object, new Queue()); + var sut = new RepeatableOperationSequence(logger.Object, new Queue()); sut.ProgressChanged += (args) => throw new Exception(); diff --git a/SafeExamBrowser.Core.UnitTests/Operations/CommunicationHostOperationTests.cs b/SafeExamBrowser.Core.UnitTests/Operations/CommunicationHostOperationTests.cs index 27058b2..a67d578 100644 --- a/SafeExamBrowser.Core.UnitTests/Operations/CommunicationHostOperationTests.cs +++ b/SafeExamBrowser.Core.UnitTests/Operations/CommunicationHostOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.UnitTests/Operations/DelegateOperationTests.cs b/SafeExamBrowser.Core.UnitTests/Operations/DelegateOperationTests.cs index b18d719..169036b 100644 --- a/SafeExamBrowser.Core.UnitTests/Operations/DelegateOperationTests.cs +++ b/SafeExamBrowser.Core.UnitTests/Operations/DelegateOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.UnitTests/Operations/I18nOperationTests.cs b/SafeExamBrowser.Core.UnitTests/Operations/I18nOperationTests.cs index 0d54b1e..df74c9c 100644 --- a/SafeExamBrowser.Core.UnitTests/Operations/I18nOperationTests.cs +++ b/SafeExamBrowser.Core.UnitTests/Operations/I18nOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.UnitTests/Operations/LazyInitializationOperationTests.cs b/SafeExamBrowser.Core.UnitTests/Operations/LazyInitializationOperationTests.cs index 14681cb..823b193 100644 --- a/SafeExamBrowser.Core.UnitTests/Operations/LazyInitializationOperationTests.cs +++ b/SafeExamBrowser.Core.UnitTests/Operations/LazyInitializationOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core.UnitTests/Properties/AssemblyInfo.cs b/SafeExamBrowser.Core.UnitTests/Properties/AssemblyInfo.cs index b129f7f..2ab966b 100644 --- a/SafeExamBrowser.Core.UnitTests/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Core.UnitTests/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Core.UnitTests")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] [assembly: ComVisible(false)] diff --git a/SafeExamBrowser.Core.UnitTests/SafeExamBrowser.Core.UnitTests.csproj b/SafeExamBrowser.Core.UnitTests/SafeExamBrowser.Core.UnitTests.csproj index 36c1b81..c3cecb6 100644 --- a/SafeExamBrowser.Core.UnitTests/SafeExamBrowser.Core.UnitTests.csproj +++ b/SafeExamBrowser.Core.UnitTests/SafeExamBrowser.Core.UnitTests.csproj @@ -1,8 +1,9 @@  - - - + + + + Debug AnyCPU @@ -66,72 +67,72 @@ ..\packages\Microsoft.ApplicationInsights.2.22.0\lib\net46\Microsoft.ApplicationInsights.dll - - ..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll + + ..\packages\Microsoft.Testing.Platform.MSBuild.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.MSBuild.dll - - ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll + + ..\packages\Microsoft.Testing.Extensions.Telemetry.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll - - ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll + + ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll + + ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.MSBuild.dll + + ..\packages\Microsoft.Testing.Platform.1.5.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - ..\packages\Moq.4.20.70\lib\net462\Moq.dll + + ..\packages\Moq.4.20.72\lib\net462\Moq.dll - - ..\packages\NuGet.Frameworks.6.9.1\lib\net472\NuGet.Frameworks.dll + + ..\packages\NuGet.Frameworks.6.12.1\lib\net472\NuGet.Frameworks.dll - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + ..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll - - ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll + + ..\packages\System.Collections.Immutable.9.0.1\lib\net462\System.Collections.Immutable.dll - - ..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll + + ..\packages\System.Diagnostics.DiagnosticSource.9.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll - - ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + ..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + ..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll - - ..\packages\System.Reflection.Metadata.8.0.0\lib\net462\System.Reflection.Metadata.dll + + ..\packages\System.Reflection.Metadata.9.0.1\lib\net462\System.Reflection.Metadata.dll - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + ..\packages\System.Threading.Tasks.Extensions.4.6.0\lib\net462\System.Threading.Tasks.Extensions.dll ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll @@ -180,18 +181,26 @@ + + + + + + + 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.Core.UnitTests/app.config b/SafeExamBrowser.Core.UnitTests/app.config index 9ac0d3c..544da48 100644 --- a/SafeExamBrowser.Core.UnitTests/app.config +++ b/SafeExamBrowser.Core.UnitTests/app.config @@ -8,11 +8,11 @@ - + - + @@ -20,7 +20,7 @@ - + @@ -28,15 +28,19 @@ - + - + - + + + + + diff --git a/SafeExamBrowser.Core.UnitTests/packages.config b/SafeExamBrowser.Core.UnitTests/packages.config index 397a147..cfe5cf0 100644 --- a/SafeExamBrowser.Core.UnitTests/packages.config +++ b/SafeExamBrowser.Core.UnitTests/packages.config @@ -2,23 +2,24 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SafeExamBrowser.Core/OperationModel/OperationSequence.cs b/SafeExamBrowser.Core/OperationModel/OperationSequence.cs index 5096bac..4d32bb3 100644 --- a/SafeExamBrowser.Core/OperationModel/OperationSequence.cs +++ b/SafeExamBrowser.Core/OperationModel/OperationSequence.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -18,11 +18,11 @@ namespace SafeExamBrowser.Core.OperationModel /// /// Default implementation of the . /// - public class OperationSequence : IOperationSequence + public class OperationSequence : IOperationSequence where T : IOperation { protected ILogger logger; - protected Queue operations = new Queue(); - protected Stack stack = new Stack(); + protected Queue operations = new Queue(); + protected Stack stack = new Stack(); public event ActionRequiredEventHandler ActionRequired { @@ -38,10 +38,10 @@ namespace SafeExamBrowser.Core.OperationModel remove { operations.ForEach(o => o.StatusChanged -= value); } } - public OperationSequence(ILogger logger, Queue operations) + public OperationSequence(ILogger logger, IEnumerable operations) { this.logger = logger; - this.operations = new Queue(operations); + this.operations = new Queue(operations); } public virtual OperationResult TryPerform() diff --git a/SafeExamBrowser.Core/OperationModel/QueueExtensions.cs b/SafeExamBrowser.Core/OperationModel/QueueExtensions.cs index 335ae0d..ec9212d 100644 --- a/SafeExamBrowser.Core/OperationModel/QueueExtensions.cs +++ b/SafeExamBrowser.Core/OperationModel/QueueExtensions.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core/OperationModel/RepeatableOperationSequence.cs b/SafeExamBrowser.Core/OperationModel/RepeatableOperationSequence.cs index f77ffd7..ce68e49 100644 --- a/SafeExamBrowser.Core/OperationModel/RepeatableOperationSequence.cs +++ b/SafeExamBrowser.Core/OperationModel/RepeatableOperationSequence.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -17,13 +17,10 @@ namespace SafeExamBrowser.Core.OperationModel /// /// Default implementation of the . /// - public class RepeatableOperationSequence : OperationSequence, IRepeatableOperationSequence + public class RepeatableOperationSequence : OperationSequence, IRepeatableOperationSequence where T : IRepeatableOperation { - private new Queue operations; - - public RepeatableOperationSequence(ILogger logger, Queue operations) : base(logger, new Queue(operations)) + public RepeatableOperationSequence(ILogger logger, IEnumerable operations) : base(logger, operations) { - this.operations = new Queue(operations); } public OperationResult TryRepeat() diff --git a/SafeExamBrowser.Core/Operations/CommunicationHostOperation.cs b/SafeExamBrowser.Core/Operations/CommunicationHostOperation.cs index ce6944a..e56392d 100644 --- a/SafeExamBrowser.Core/Operations/CommunicationHostOperation.cs +++ b/SafeExamBrowser.Core/Operations/CommunicationHostOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core/Operations/DelegateOperation.cs b/SafeExamBrowser.Core/Operations/DelegateOperation.cs index 313dc02..bc09d1d 100644 --- a/SafeExamBrowser.Core/Operations/DelegateOperation.cs +++ b/SafeExamBrowser.Core/Operations/DelegateOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core/Operations/I18nOperation.cs b/SafeExamBrowser.Core/Operations/I18nOperation.cs index 15e0460..105dcf7 100644 --- a/SafeExamBrowser.Core/Operations/I18nOperation.cs +++ b/SafeExamBrowser.Core/Operations/I18nOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core/Operations/LazyInitializationOperation.cs b/SafeExamBrowser.Core/Operations/LazyInitializationOperation.cs index 5d41467..03d63bc 100644 --- a/SafeExamBrowser.Core/Operations/LazyInitializationOperation.cs +++ b/SafeExamBrowser.Core/Operations/LazyInitializationOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Core/Properties/AssemblyInfo.cs b/SafeExamBrowser.Core/Properties/AssemblyInfo.cs index 31d8e30..897596d 100644 --- a/SafeExamBrowser.Core/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Core/Properties/AssemblyInfo.cs @@ -9,7 +9,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Core")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Core/SafeExamBrowser.Core.csproj b/SafeExamBrowser.Core/SafeExamBrowser.Core.csproj index 3592f20..72c24ca 100644 --- a/SafeExamBrowser.Core/SafeExamBrowser.Core.csproj +++ b/SafeExamBrowser.Core/SafeExamBrowser.Core.csproj @@ -64,6 +64,7 @@ + diff --git a/SafeExamBrowser.I18n.Contracts/IText.cs b/SafeExamBrowser.I18n.Contracts/IText.cs index 4117e3a..e202a15 100644 --- a/SafeExamBrowser.I18n.Contracts/IText.cs +++ b/SafeExamBrowser.I18n.Contracts/IText.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.I18n.Contracts/ITextResource.cs b/SafeExamBrowser.I18n.Contracts/ITextResource.cs index 523b2ee..8c15b4b 100644 --- a/SafeExamBrowser.I18n.Contracts/ITextResource.cs +++ b/SafeExamBrowser.I18n.Contracts/ITextResource.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.I18n.Contracts/Properties/AssemblyInfo.cs b/SafeExamBrowser.I18n.Contracts/Properties/AssemblyInfo.cs index b0030be..afb5653 100644 --- a/SafeExamBrowser.I18n.Contracts/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.I18n.Contracts/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.I18n.Contracts")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.I18n.Contracts/TextKey.cs b/SafeExamBrowser.I18n.Contracts/TextKey.cs index 0272400..2c0a8fd 100644 --- a/SafeExamBrowser.I18n.Contracts/TextKey.cs +++ b/SafeExamBrowser.I18n.Contracts/TextKey.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -138,6 +138,10 @@ namespace SafeExamBrowser.I18n.Contracts MessageBox_NotSupportedConfigurationResource, MessageBox_NotSupportedConfigurationResourceTitle, MessageBox_OkButton, + MessageBox_PageLeaveConfirmation, + MessageBox_PageLeaveConfirmationTitle, + MessageBox_PageReloadConfirmation, + MessageBox_PageReloadConfirmationTitle, MessageBox_Quit, MessageBox_QuitTitle, MessageBox_QuitError, @@ -146,8 +150,6 @@ namespace SafeExamBrowser.I18n.Contracts MessageBox_ReconfigurationDeniedTitle, MessageBox_ReconfigurationError, MessageBox_ReconfigurationErrorTitle, - MessageBox_ReloadConfirmation, - MessageBox_ReloadConfirmationTitle, MessageBox_RemoteSessionNotAllowed, MessageBox_RemoteSessionNotAllowedTitle, MessageBox_ScreenProctoringDisclaimer, @@ -242,12 +244,14 @@ namespace SafeExamBrowser.I18n.Contracts PasswordDialog_QuitPasswordRequiredTitle, PasswordDialog_SettingsPasswordRequired, PasswordDialog_SettingsPasswordRequiredTitle, + ProctoringFinalizationDialog_Abort, ProctoringFinalizationDialog_Confirm, ProctoringFinalizationDialog_FailureMessage, ProctoringFinalizationDialog_InfoMessage, ProctoringFinalizationDialog_Status, ProctoringFinalizationDialog_StatusAndTime, ProctoringFinalizationDialog_StatusWaiting, + ProctoringFinalizationDialog_StatusWaitingAndTime, ProctoringFinalizationDialog_Title, RuntimeWindow_ApplicationRunning, ServerFailureDialog_Abort, diff --git a/SafeExamBrowser.I18n.UnitTests/Properties/AssemblyInfo.cs b/SafeExamBrowser.I18n.UnitTests/Properties/AssemblyInfo.cs index 3c2b9ac..c9fd9a3 100644 --- a/SafeExamBrowser.I18n.UnitTests/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.I18n.UnitTests/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.I18n.UnitTests")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] [assembly: ComVisible(false)] diff --git a/SafeExamBrowser.I18n.UnitTests/SafeExamBrowser.I18n.UnitTests.csproj b/SafeExamBrowser.I18n.UnitTests/SafeExamBrowser.I18n.UnitTests.csproj index b1c75ee..3c14a13 100644 --- a/SafeExamBrowser.I18n.UnitTests/SafeExamBrowser.I18n.UnitTests.csproj +++ b/SafeExamBrowser.I18n.UnitTests/SafeExamBrowser.I18n.UnitTests.csproj @@ -1,8 +1,9 @@  - - - + + + + Debug @@ -68,72 +69,72 @@ ..\packages\Microsoft.ApplicationInsights.2.22.0\lib\net46\Microsoft.ApplicationInsights.dll - - ..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll + + ..\packages\Microsoft.Testing.Platform.MSBuild.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.MSBuild.dll - - ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll + + ..\packages\Microsoft.Testing.Extensions.Telemetry.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll - - ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll + + ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll + + ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.MSBuild.dll + + ..\packages\Microsoft.Testing.Platform.1.5.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - ..\packages\Moq.4.20.70\lib\net462\Moq.dll + + ..\packages\Moq.4.20.72\lib\net462\Moq.dll - - ..\packages\NuGet.Frameworks.6.9.1\lib\net472\NuGet.Frameworks.dll + + ..\packages\NuGet.Frameworks.6.12.1\lib\net472\NuGet.Frameworks.dll - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + ..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll - - ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll + + ..\packages\System.Collections.Immutable.9.0.1\lib\net462\System.Collections.Immutable.dll - - ..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll + + ..\packages\System.Diagnostics.DiagnosticSource.9.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll - - ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + ..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + ..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll - - ..\packages\System.Reflection.Metadata.8.0.0\lib\net462\System.Reflection.Metadata.dll + + ..\packages\System.Reflection.Metadata.9.0.1\lib\net462\System.Reflection.Metadata.dll - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + ..\packages\System.Threading.Tasks.Extensions.4.6.0\lib\net462\System.Threading.Tasks.Extensions.dll ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll @@ -152,6 +153,7 @@ + Always @@ -176,18 +178,23 @@ SafeExamBrowser.Logging.Contracts + + + + 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.I18n.UnitTests/TextTests.cs b/SafeExamBrowser.I18n.UnitTests/TextTests.cs index a89003f..303293c 100644 --- a/SafeExamBrowser.I18n.UnitTests/TextTests.cs +++ b/SafeExamBrowser.I18n.UnitTests/TextTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.I18n.UnitTests/XmlTextResourceTests.cs b/SafeExamBrowser.I18n.UnitTests/XmlTextResourceTests.cs index 187767e..ac88516 100644 --- a/SafeExamBrowser.I18n.UnitTests/XmlTextResourceTests.cs +++ b/SafeExamBrowser.I18n.UnitTests/XmlTextResourceTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.I18n.UnitTests/app.config b/SafeExamBrowser.I18n.UnitTests/app.config index 9ac0d3c..544da48 100644 --- a/SafeExamBrowser.I18n.UnitTests/app.config +++ b/SafeExamBrowser.I18n.UnitTests/app.config @@ -8,11 +8,11 @@ - + - + @@ -20,7 +20,7 @@ - + @@ -28,15 +28,19 @@ - + - + - + + + + + diff --git a/SafeExamBrowser.I18n.UnitTests/packages.config b/SafeExamBrowser.I18n.UnitTests/packages.config index 397a147..cfe5cf0 100644 --- a/SafeExamBrowser.I18n.UnitTests/packages.config +++ b/SafeExamBrowser.I18n.UnitTests/packages.config @@ -2,23 +2,24 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SafeExamBrowser.I18n/Data/de.xml b/SafeExamBrowser.I18n/Data/de.xml index a15e602..8c60fb1 100644 --- a/SafeExamBrowser.I18n/Data/de.xml +++ b/SafeExamBrowser.I18n/Data/de.xml @@ -372,6 +372,18 @@ OK + + Möchten Sie die aktuelle Seite verlassen? + + + Verlassen? + + + Möchten Sie die aktuelle Seite neu laden? + + + Neu laden? + Möchten Sie SEB beenden? @@ -396,12 +408,6 @@ Fehler bei der Rekonfiguration - - Möchten Sie die aktuelle Seite neu laden? - - - Neu laden? - Das System scheint in einer Remote-Sitzung zu laufen. Die ausgewählte Konfiguration erlaubt es nicht, SEB in einer Remote-Sitzung auszuführen. @@ -684,6 +690,9 @@ Passwort erforderlich + + Abbrechen + Bestätigen @@ -700,6 +709,9 @@ Warten auf die Ausführung der Übertragungsoperation %%_COUNT_%% von %%_TOTAL_%% um %%_TIME_%%... + Warten auf die Wiederaufnahme von %%_COUNT_%% Übertragungsoperationen... + + Warten auf die Wiederaufnahme von %%_COUNT_%% Übertragungsoperationen um %%_TIME_%%... diff --git a/SafeExamBrowser.I18n/Data/en.xml b/SafeExamBrowser.I18n/Data/en.xml index 51cac1a..4cacd8e 100644 --- a/SafeExamBrowser.I18n/Data/en.xml +++ b/SafeExamBrowser.I18n/Data/en.xml @@ -372,6 +372,18 @@ OK + + Would you like to leave the current page? + + + Leave? + + + Would you like to reload the current page? + + + Reload? + Do you want to quit SEB? @@ -396,12 +408,6 @@ Reconfiguration Error - - Would you like to reload the current page? - - - Reload? - The system appears to be running in a remote session. The selected configuration does not allow SEB to be run in a remote session. @@ -684,6 +690,9 @@ Password Required + + Abort + Confirm @@ -700,6 +709,9 @@ Waiting to execute transmission operation %%_COUNT_%% of %%_TOTAL_%% at %%_TIME_%%... + Waiting to resume %%_COUNT_%% transmission operations... + + Waiting to resume %%_COUNT_%% transmission operations at %%_TIME_%%... diff --git a/SafeExamBrowser.I18n/Data/es.xml b/SafeExamBrowser.I18n/Data/es.xml index 9861d50..8f0813f 100644 --- a/SafeExamBrowser.I18n/Data/es.xml +++ b/SafeExamBrowser.I18n/Data/es.xml @@ -372,6 +372,18 @@ OK + + ¿Desea abandonar la página actual? + + + ¿Abandonar? + + + ¿Desea recargar la página actual? + + + ¿Recargar? + ¿Quiere terminar SEB? @@ -396,12 +408,6 @@ Error de reconfiguración - - ¿Desea recargar la página actual? - - - ¿Recargar? - El sistema parece estar ejecutándose en una sesión remota. La configuración seleccionada no permite que SEB se ejecute en una sesión remota. @@ -684,6 +690,9 @@ Contraseña requerida + + Abortar + Confirmar @@ -700,7 +709,10 @@ Esperando para ejecutar operación de transmisión %%_COUNT_%% de %%_TOTAL_%% en %%_TIME_%%... - Esperando para reanudar %%_COUNT_%% las operaciones de transmisión en %%_TIME_%%... + Esperando para reanudar %%_COUNT_%% operaciones de transmisión... + + + Esperando para reanudar %%_COUNT_%% operaciones de transmisión en %%_TIME_%%... Finalización del proctoring de pantalla diff --git a/SafeExamBrowser.I18n/Data/et.xml b/SafeExamBrowser.I18n/Data/et.xml index b0ebc5d..322a13e 100644 --- a/SafeExamBrowser.I18n/Data/et.xml +++ b/SafeExamBrowser.I18n/Data/et.xml @@ -372,6 +372,18 @@ OK + + Kas soovite lahkuda praeguselt leheküljelt? + + + Lahkuda? + + + Kas soovid praeguse lehe uuesti laadida? + + + Kas laadida uuesti? + Kas soovid SEB'ist väljuda? @@ -396,12 +408,6 @@ Ümberseadistamise viga - - Kas soovid praeguse lehe uuesti laadida? - - - Kas laadida uuesti? - Süsteem näib töötavat kaugseansil. Valitud seadistus ei luba SEB'i kaugseansis käivitada. @@ -684,6 +690,9 @@ Parool nõutav + + Katkesta + Kinnitage @@ -700,6 +709,9 @@ Ootab ülekandeoperatsiooni %%_COUNT_%% of %%_TOTAL_%% kell %%_TIME_%% täitmist... + Ootab, et jätkata %%_COUNT_%% edastamist... + + Ootab, et jätkata %%_COUNT_%% edastamistoiminguid kell %%_TIME_%%... diff --git a/SafeExamBrowser.I18n/Data/fr.xml b/SafeExamBrowser.I18n/Data/fr.xml index b879072..33a33ab 100644 --- a/SafeExamBrowser.I18n/Data/fr.xml +++ b/SafeExamBrowser.I18n/Data/fr.xml @@ -372,11 +372,23 @@ OK + + Souhaitez-vous quitter la page actuelle? + + + Quitter? + + + Souhaitez-vous recharger la page actuelle? + + + Recharger? + Voulez-vous quitter SEB? - Quitter ? + Quitter? Le client n'a pas réussi à communiquer la demande d'arrêt au serveur d'exécution! @@ -396,12 +408,6 @@ Erreur de reconfiguration - - Souhaitez-vous recharger la page actuelle? - - - Recharger ? - Le système semble s'exécuter dans une session à distance. La configuration sélectionnée ne permet pas l'exécution de SEB dans une session à distance. @@ -684,6 +690,9 @@ Mot de passe requis + + Abandonner + Confirmer @@ -700,7 +709,10 @@ En attente d'exécution de l'opération de transmission %%_COUNT_%% de %%_TOTAL_%% à %%_TIME_%%... - En attente de reprise des opérations de transmission %%_COUNT_%% à %%_TIME_%%... + En attente de reprise des %%_COUNT_%% opérations de transmission... + + + En attente de reprise des %%_COUNT_%% opérations de transmission à %%_TIME_%%... Finalisation de l'inspection de l'écran diff --git a/SafeExamBrowser.I18n/Data/id.xml b/SafeExamBrowser.I18n/Data/id.xml index d753e4c..8fb896b 100644 --- a/SafeExamBrowser.I18n/Data/id.xml +++ b/SafeExamBrowser.I18n/Data/id.xml @@ -372,6 +372,18 @@ OK + + Apakah Anda ingin meninggalkan halaman saat ini? + + + Pergi? + + + Apakah Anda ingin memuat ulang halaman saat ini? + + + Muat Ulang? + Apakah Anda ingin keluar dari SEB? @@ -396,12 +408,6 @@ Kesalahan Konfigurasi Ulang - - Apakah Anda ingin memuat ulang halaman saat ini? - - - Muat Ulang? - Sistem tampaknya sedang berjalan dalam sesi jarak jauh. Konfigurasi yang dipilih tidak mengizinkan SEB untuk dijalankan dalam sesi jarak jauh. @@ -684,6 +690,9 @@ Kata Sandi Diperlukan + + Batalkan + Konfirmasi @@ -700,7 +709,10 @@ Menunggu untuk mengeksekusi operasi transmisi %%_COUNT_%% dari %%_TOTAL_%% pada %%_TIME_%%... - Menunggu untuk melanjutkan operasi transmisi %%_COUNT_%% pada %%_TIME_%%... + Menunggu untuk melanjutkan %%_COUNT_%% operasi transmisi... + + + Menunggu untuk melanjutkan %%_COUNT_%% operasi transmisi pada %%_TIME_%%... Finalisasi Pemeriksaan Layar diff --git a/SafeExamBrowser.I18n/Data/it.xml b/SafeExamBrowser.I18n/Data/it.xml index 75a9897..dc188cc 100644 --- a/SafeExamBrowser.I18n/Data/it.xml +++ b/SafeExamBrowser.I18n/Data/it.xml @@ -372,6 +372,18 @@ OK + + Vuoi lasciare la pagina attuale? + + + Lasciare? + + + Vuoi ricaricare la pagina corrente? + + + Ricaricare? + Vuoi uscire da SEB? @@ -396,12 +408,6 @@ Errore di riconfigurazione - - Vuoi ricaricare la pagina corrente? - - - Ricaricare? - Il sistema sembra essere in esecuzione in una sessione remota. La configurazione selezionata non consente l'esecuzione di SEB in una sessione remota. @@ -684,6 +690,9 @@ Password richiesta + + Interrompere + Conferma @@ -700,7 +709,10 @@ In attesa di eseguire l'operazione di trasmissione %%_COUNT_%% di %%_TOTAL_%% a %%_TIME_%%... - In attesa di riprendere le operazioni di trasmissione di %%_COUNT_% a %%_TIME_%%... + In attesa di riprendere le %%_COUNT_%% operazioni di trasmissione... + + + In attesa di riprendere le %%_COUNT_%% operazioni di trasmissione a %%_TIME_%%... Finalizzazione della correzione dello schermo diff --git a/SafeExamBrowser.I18n/Data/nl.xml b/SafeExamBrowser.I18n/Data/nl.xml index dec3ca7..b7ac956 100644 --- a/SafeExamBrowser.I18n/Data/nl.xml +++ b/SafeExamBrowser.I18n/Data/nl.xml @@ -10,7 +10,7 @@ Inhoud geblokkeerd - Terug naar vorige pagina + Ga terug naar de vorige pagina Toegang tot deze pagina is niet toegestaan volgens de huidige configuratie. @@ -22,7 +22,7 @@ Er is een fout opgetreden tijdens het laden van de pagina "%%URL%%": - Pagina laden fout + Fout bij het laden van de pagina Browser @@ -43,13 +43,13 @@ Geannuleerd. - Gedownloaded. + Gedownload. - Zoeken op hoofdletters en kleine letters + Hoofdlettergevoelig zoeken - Zoek pagina... + Zoeken op deze pagina... Herladen @@ -82,19 +82,19 @@ Paginazoom - Paginazoom vergroten + Inzoomen - Paginazoom verlagen + Uitzoomen Voer tekst in om te zoeken - Volgend zoekresultaat + Volgende zoekresultaat - Volgend zoekresultaat + Vorige zoekresultaat Build @@ -298,7 +298,7 @@ De lokale clientconfiguratie is mislukt! Raadpleeg de logbestanden voor meer informatie. SEB zal nu afsluiten... - Configuratie fout + Er is een fout in je configuratie De clientconfiguratie is opgeslagen en zal worden gebruikt wanneer je SEB de volgende keer opstart. Wil je nu stoppen? @@ -307,7 +307,7 @@ Configuratie succesvol - De clientconfiguratie is opgeslagen en zal worden gebruikt wanneer je SEB de volgende keer opstart. Wil je nu stoppen? + Fout bij het downloaden van de configuratie Download fout @@ -352,7 +352,7 @@ SEB kan alleen worden beëindigd door het juiste wachtwoord voor afsluiten in te voeren. - Ongeldig verlaat wachtwoord + Ongeldig afsluitwachtwoord SEB kan alleen worden ontgrendeld door het juiste wachtwoord in te voeren. @@ -372,17 +372,29 @@ OK - - Wil je SEB verlaten? + + Wil je de huidige pagina verlaten? - + Verlaten? + + Wil je de huidige pagina opnieuw laden? + + + Herladen? + + + Wil je SEB sluiten? + + + Sluiten? + - De client is er niet in geslaagd het uitschakelverzoek door te geven aan de runtime! + De client kon het afsluitverzoek niet doorgeven aan de runtime! - Verlaten fout + Sluitfout U mag SEB niet herconfigureren. @@ -396,12 +408,6 @@ Herconfiguratie fout - - Wilt u de huidige pagina opnieuw laden? - - - Herladen? - Het systeem lijkt in een sessie op afstand te draaien. De geselecteerde configuratie staat niet toe dat SEB wordt uitgevoerd in een sessie op afstand. @@ -460,10 +466,10 @@ Het uploaden van bestanden is niet toegestaan in de huidige SEB-instellingen. Meld dit aan je examenprovider. - Uploading wordt niet toegestaan! + Uploaden is niet toegestaan! - De geïnstalleerde SEB-versie %%_VERSIE_%% kan niet worden gebruikt omdat de geselecteerde configuratie een specifieke versie vereist:%%_REQUIRED_VERSIONS_%% Download en installeer de vereiste versie van de officiële website (safeexambrowser.org/download) of van de repository van SEB voor Windows op GitHub (github.com/safeexambrowser). + De geïnstalleerde SEB-versie %%_VERSIE_%% kan niet worden gebruikt omdat de geselecteerde configuratie een specifieke versie vereist:%%_REQUIRED_VERSIONS_%% Download en installeer de vereiste versie van de officiële website (safeexambrowser.org/download) of van de repository van SEB op GitHub (github.com/safeexambrowser). Ongeldige SEB versie @@ -499,16 +505,16 @@ Applicatielog - Proctoreren op afstand is actief + Examenbewaking op afstand is actief - Hand wordt neergelaten + Hand is neergelaten - Hand wordt omhooggestoken + Hand is opgestoken - Proctoreren op afstand is inactief + Examenbewaking op afstand is inactief Hand omlaag @@ -607,7 +613,7 @@ Het onderscheppen van muizen aan het stoppen - Browser aan het afsluiten + Browser aan het sluiten Proctoraat op afstand aan het afsluiten @@ -673,7 +679,7 @@ Wachtwoord vereist - Voer het wachtwoord voor afsluiten in om SEB te beëindigen: + Voer het wachtwoord in om SEB te af te sluiten: Wachtwoord vereist @@ -684,6 +690,9 @@ Wachtwoord vereist + + Afbreken + Bevestigen @@ -691,7 +700,7 @@ De resterende bewerkingen konden niet worden voltooid omdat er een probleem is met het netwerk en/of de schermproctoringservice. - Gelieve te wachten terwijl de schermprootoring zijn resterende operaties uitvoert. Dit kan even duren, afhankelijk van het netwerk en de status van de screen proctoring service. + Gelieve te wachten terwijl de schermproctoring zijn resterende operaties uitvoert. Dit kan even duren, afhankelijk van het netwerk en de status van de screen proctoring service. Uitvoeren van overdrachtsoperatie %%_COUNT_%% van %%_TOTAL_%%. @@ -700,6 +709,9 @@ Wachten om overdrachtsoperatie %%_COUNT_%% van %%_TOTAL_%% uit te voeren op %%_TIME_%%... + Wachten om %%_COUNT_%% transmissiebewerkingen te hervatten... + + Wachten om %%_COUNT_%% transmissiebewerkingen te hervatten op %%_TIME_%%... @@ -748,16 +760,16 @@ Volledig opgeladen (%%CHARGE%%%) - De batterij is bijna leeg. Sluit uw computer aan op een stroomvoorziening! + De batterij is bijna leeg. Sluit de computer meteen aan op de oplader! - De batterij raakt leeg. Overweeg om de computer op tijd op een stroomvoorziening aan te sluiten... + De batterij is bijna leeg. Sluit de computer op tijd aan op de oplader. %%HOURS%%h %%MINUTES%%min resterend (%%CHARGE%%%) - De huidige lay-out is "%%LAYOUT%%" + De huidige indeling van het toetsenbord is "%%LAYOUT%%" Verbinding verbroken diff --git a/SafeExamBrowser.I18n/Data/ru.xml b/SafeExamBrowser.I18n/Data/ru.xml index 9b3e917..98823a8 100644 --- a/SafeExamBrowser.I18n/Data/ru.xml +++ b/SafeExamBrowser.I18n/Data/ru.xml @@ -372,6 +372,18 @@ ОК + + Вы хотите покинуть текущую страницу? + + + Уехать? + + + Хотели бы вы перезагрузить текущую страницу? + + + Перезарядить? + Вы хотите выйти из SEB? @@ -396,12 +408,6 @@ Ошибка реконфигурации - - Хотели бы вы перезагрузить текущую страницу? - - - Перезарядить? - Система, по-видимому, запущена в удаленном сеансе. Выбранная конфигурация не позволяет запускать SEB в удаленном сеансе. @@ -685,6 +691,9 @@ Требуется пароль + + Выкинуть + Подтвердить @@ -701,7 +710,10 @@ Ожидание выполнения операции передачи %%_COUNT_%% из %%_TOTAL_%% в %%_TIME_%%... - Ожидание возобновления операций передачи %%_COUNT_%% в %%_TIME_%%... + Ожидание возобновления %%_COUNT_%% операций передачи... + + + Ожидание возобновления %%_COUNT_%% операций передачи в %%_TIME_%%... Финализация прокторинга экрана diff --git a/SafeExamBrowser.I18n/Data/zh.xml b/SafeExamBrowser.I18n/Data/zh.xml index 917c1de..c904f90 100644 --- a/SafeExamBrowser.I18n/Data/zh.xml +++ b/SafeExamBrowser.I18n/Data/zh.xml @@ -375,6 +375,18 @@ 您想要退出防作弊考试专用浏览器吗? + + 您想离开当前页面吗? + + + 离开? + + + 您想要刷新当前页面吗? + + + 刷新? + 退出? @@ -396,12 +408,6 @@ 重置错误 - - 您想要刷新当前页面吗? - - - 刷新? - 系统似乎正在远程会话中运行。所选的配置不允许SEB在远程会话中运行。 @@ -684,6 +690,9 @@ 需要密码 + + 中止 + 确认 @@ -700,6 +709,9 @@ 等待在 %%_TIME_%% 执行 %%_TOTAL_%% 的 %%_COUNT_%% 传输操作... + 等待恢复 %%_COUNT_%% 传输操作... + + 等待在 %%_TIME_%% 恢复 %%_COUNT_%% 传输操作... diff --git a/SafeExamBrowser.I18n/Properties/AssemblyInfo.cs b/SafeExamBrowser.I18n/Properties/AssemblyInfo.cs index dfc378a..ff17437 100644 --- a/SafeExamBrowser.I18n/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.I18n/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.I18n")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.I18n/SafeExamBrowser.I18n.csproj b/SafeExamBrowser.I18n/SafeExamBrowser.I18n.csproj index a76c03b..57f342b 100644 --- a/SafeExamBrowser.I18n/SafeExamBrowser.I18n.csproj +++ b/SafeExamBrowser.I18n/SafeExamBrowser.I18n.csproj @@ -105,5 +105,8 @@ + + + \ No newline at end of file diff --git a/SafeExamBrowser.I18n/Text.cs b/SafeExamBrowser.I18n/Text.cs index 1bb433b..643b598 100644 --- a/SafeExamBrowser.I18n/Text.cs +++ b/SafeExamBrowser.I18n/Text.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.I18n/XmlTextResource.cs b/SafeExamBrowser.I18n/XmlTextResource.cs index 28582d8..351ce1b 100644 --- a/SafeExamBrowser.I18n/XmlTextResource.cs +++ b/SafeExamBrowser.I18n/XmlTextResource.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown.Contracts/FeatureConfigurationStatus.cs b/SafeExamBrowser.Lockdown.Contracts/FeatureConfigurationStatus.cs index dda74be..60631a7 100644 --- a/SafeExamBrowser.Lockdown.Contracts/FeatureConfigurationStatus.cs +++ b/SafeExamBrowser.Lockdown.Contracts/FeatureConfigurationStatus.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown.Contracts/IAutoRestoreMechanism.cs b/SafeExamBrowser.Lockdown.Contracts/IAutoRestoreMechanism.cs index 89c617d..90a9ff6 100644 --- a/SafeExamBrowser.Lockdown.Contracts/IAutoRestoreMechanism.cs +++ b/SafeExamBrowser.Lockdown.Contracts/IAutoRestoreMechanism.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown.Contracts/IFeatureConfiguration.cs b/SafeExamBrowser.Lockdown.Contracts/IFeatureConfiguration.cs index db098ac..996165e 100644 --- a/SafeExamBrowser.Lockdown.Contracts/IFeatureConfiguration.cs +++ b/SafeExamBrowser.Lockdown.Contracts/IFeatureConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown.Contracts/IFeatureConfigurationBackup.cs b/SafeExamBrowser.Lockdown.Contracts/IFeatureConfigurationBackup.cs index f7d6a2e..25d0209 100644 --- a/SafeExamBrowser.Lockdown.Contracts/IFeatureConfigurationBackup.cs +++ b/SafeExamBrowser.Lockdown.Contracts/IFeatureConfigurationBackup.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown.Contracts/IFeatureConfigurationFactory.cs b/SafeExamBrowser.Lockdown.Contracts/IFeatureConfigurationFactory.cs index 134de8f..029520f 100644 --- a/SafeExamBrowser.Lockdown.Contracts/IFeatureConfigurationFactory.cs +++ b/SafeExamBrowser.Lockdown.Contracts/IFeatureConfigurationFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown.Contracts/IFeatureConfigurationMonitor.cs b/SafeExamBrowser.Lockdown.Contracts/IFeatureConfigurationMonitor.cs index 0fb8db8..7e87eb8 100644 --- a/SafeExamBrowser.Lockdown.Contracts/IFeatureConfigurationMonitor.cs +++ b/SafeExamBrowser.Lockdown.Contracts/IFeatureConfigurationMonitor.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown.Contracts/ISystemConfigurationUpdate.cs b/SafeExamBrowser.Lockdown.Contracts/ISystemConfigurationUpdate.cs index f54a41b..9964d39 100644 --- a/SafeExamBrowser.Lockdown.Contracts/ISystemConfigurationUpdate.cs +++ b/SafeExamBrowser.Lockdown.Contracts/ISystemConfigurationUpdate.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown.Contracts/Properties/AssemblyInfo.cs b/SafeExamBrowser.Lockdown.Contracts/Properties/AssemblyInfo.cs index 5f6d8f5..6810b7c 100644 --- a/SafeExamBrowser.Lockdown.Contracts/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Lockdown.Contracts/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Lockdown.Contracts")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Lockdown.UnitTests/AutoRestoreMechanismTests.cs b/SafeExamBrowser.Lockdown.UnitTests/AutoRestoreMechanismTests.cs index 2aaa54a..2bad2d2 100644 --- a/SafeExamBrowser.Lockdown.UnitTests/AutoRestoreMechanismTests.cs +++ b/SafeExamBrowser.Lockdown.UnitTests/AutoRestoreMechanismTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown.UnitTests/FeatureConfigurationBackupTests.cs b/SafeExamBrowser.Lockdown.UnitTests/FeatureConfigurationBackupTests.cs index c881067..82aebbe 100644 --- a/SafeExamBrowser.Lockdown.UnitTests/FeatureConfigurationBackupTests.cs +++ b/SafeExamBrowser.Lockdown.UnitTests/FeatureConfigurationBackupTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown.UnitTests/FeatureConfigurationMonitorTests.cs b/SafeExamBrowser.Lockdown.UnitTests/FeatureConfigurationMonitorTests.cs index 113b446..53d2de7 100644 --- a/SafeExamBrowser.Lockdown.UnitTests/FeatureConfigurationMonitorTests.cs +++ b/SafeExamBrowser.Lockdown.UnitTests/FeatureConfigurationMonitorTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown.UnitTests/FeatureConfigurationStub.cs b/SafeExamBrowser.Lockdown.UnitTests/FeatureConfigurationStub.cs index b52c007..a9e1ca6 100644 --- a/SafeExamBrowser.Lockdown.UnitTests/FeatureConfigurationStub.cs +++ b/SafeExamBrowser.Lockdown.UnitTests/FeatureConfigurationStub.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown.UnitTests/Properties/AssemblyInfo.cs b/SafeExamBrowser.Lockdown.UnitTests/Properties/AssemblyInfo.cs index 7a2e5fd..d095886 100644 --- a/SafeExamBrowser.Lockdown.UnitTests/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Lockdown.UnitTests/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Lockdown.UnitTests")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] [assembly: ComVisible(false)] diff --git a/SafeExamBrowser.Lockdown.UnitTests/SafeExamBrowser.Lockdown.UnitTests.csproj b/SafeExamBrowser.Lockdown.UnitTests/SafeExamBrowser.Lockdown.UnitTests.csproj index 3094fa9..9ade23f 100644 --- a/SafeExamBrowser.Lockdown.UnitTests/SafeExamBrowser.Lockdown.UnitTests.csproj +++ b/SafeExamBrowser.Lockdown.UnitTests/SafeExamBrowser.Lockdown.UnitTests.csproj @@ -1,8 +1,9 @@  - - - + + + + Debug @@ -68,72 +69,72 @@ ..\packages\Microsoft.ApplicationInsights.2.22.0\lib\net46\Microsoft.ApplicationInsights.dll - - ..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll + + ..\packages\Microsoft.Testing.Platform.MSBuild.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.MSBuild.dll - - ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll + + ..\packages\Microsoft.Testing.Extensions.Telemetry.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll - - ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll + + ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll + + ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.MSBuild.dll + + ..\packages\Microsoft.Testing.Platform.1.5.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - ..\packages\Moq.4.20.70\lib\net462\Moq.dll + + ..\packages\Moq.4.20.72\lib\net462\Moq.dll - - ..\packages\NuGet.Frameworks.6.9.1\lib\net472\NuGet.Frameworks.dll + + ..\packages\NuGet.Frameworks.6.12.1\lib\net472\NuGet.Frameworks.dll - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + ..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll - - ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll + + ..\packages\System.Collections.Immutable.9.0.1\lib\net462\System.Collections.Immutable.dll - - ..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll + + ..\packages\System.Diagnostics.DiagnosticSource.9.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll - - ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + ..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + ..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll - - ..\packages\System.Reflection.Metadata.8.0.0\lib\net462\System.Reflection.Metadata.dll + + ..\packages\System.Reflection.Metadata.9.0.1\lib\net462\System.Reflection.Metadata.dll - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + ..\packages\System.Threading.Tasks.Extensions.4.6.0\lib\net462\System.Threading.Tasks.Extensions.dll @@ -162,18 +163,26 @@ SafeExamBrowser.Logging.Contracts + + + + + + + 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.Lockdown.UnitTests/app.config b/SafeExamBrowser.Lockdown.UnitTests/app.config index f6140c1..b7d13bc 100644 --- a/SafeExamBrowser.Lockdown.UnitTests/app.config +++ b/SafeExamBrowser.Lockdown.UnitTests/app.config @@ -4,11 +4,11 @@ - + - + @@ -16,7 +16,7 @@ - + @@ -24,15 +24,19 @@ - + - + - + + + + + diff --git a/SafeExamBrowser.Lockdown.UnitTests/packages.config b/SafeExamBrowser.Lockdown.UnitTests/packages.config index f170b50..da1800f 100644 --- a/SafeExamBrowser.Lockdown.UnitTests/packages.config +++ b/SafeExamBrowser.Lockdown.UnitTests/packages.config @@ -2,22 +2,23 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SafeExamBrowser.Lockdown/AutoRestoreMechanism.cs b/SafeExamBrowser.Lockdown/AutoRestoreMechanism.cs index c2ebe20..9ca01c4 100644 --- a/SafeExamBrowser.Lockdown/AutoRestoreMechanism.cs +++ b/SafeExamBrowser.Lockdown/AutoRestoreMechanism.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurationBackup.cs b/SafeExamBrowser.Lockdown/FeatureConfigurationBackup.cs index 4e835dd..1078166 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurationBackup.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurationBackup.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurationFactory.cs b/SafeExamBrowser.Lockdown/FeatureConfigurationFactory.cs index 1a075e5..cc5a214 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurationFactory.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurationFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurationMonitor.cs b/SafeExamBrowser.Lockdown/FeatureConfigurationMonitor.cs index 90a27b8..1c32e6b 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurationMonitor.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurationMonitor.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/FeatureConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/FeatureConfiguration.cs index 73b5dcc..a9196f9 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/FeatureConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/FeatureConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/EaseOfAccessConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/EaseOfAccessConfiguration.cs index 068def0..ba29b38 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/EaseOfAccessConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/EaseOfAccessConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/MachineHiveConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/MachineHiveConfiguration.cs index 95da0bd..4ec1972 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/MachineHiveConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/MachineHiveConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/MachinePowerOptionsConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/MachinePowerOptionsConfiguration.cs index fc3ae90..c76fafe 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/MachinePowerOptionsConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/MachinePowerOptionsConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/NetworkOptionsConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/NetworkOptionsConfiguration.cs index 453c0b9..2aa71c1 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/NetworkOptionsConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/NetworkOptionsConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/RemoteConnectionConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/RemoteConnectionConfiguration.cs index fd9c8a4..592b8c6 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/RemoteConnectionConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/RemoteConnectionConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/SwitchUserConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/SwitchUserConfiguration.cs index e804e65..ed43f72 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/SwitchUserConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/MachineHive/SwitchUserConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/RegistryConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/RegistryConfiguration.cs index e9cfcc9..1c96f8c 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/RegistryConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/RegistryConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/RegistryConfigurationItem.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/RegistryConfigurationItem.cs index 97cb13b..9c8715e 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/RegistryConfigurationItem.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/RegistryConfigurationItem.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/RegistryDataItem.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/RegistryDataItem.cs index 282ddb5..7fdde92 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/RegistryDataItem.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/RegistryDataItem.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/ChangePasswordConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/ChangePasswordConfiguration.cs index bd7053a..0d4e44d 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/ChangePasswordConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/ChangePasswordConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/ChromeNotificationConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/ChromeNotificationConfiguration.cs index 5094ad6..c18c767 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/ChromeNotificationConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/ChromeNotificationConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/FindPrinterConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/FindPrinterConfiguration.cs index 75d9be3..0504beb 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/FindPrinterConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/FindPrinterConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/LockWorkstationConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/LockWorkstationConfiguration.cs index 089f79f..797d787 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/LockWorkstationConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/LockWorkstationConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/SignoutConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/SignoutConfiguration.cs index 2eba7cd..be9234c 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/SignoutConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/SignoutConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/TaskManagerConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/TaskManagerConfiguration.cs index 9e165e0..d7aadf4 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/TaskManagerConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/TaskManagerConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/UserHiveConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/UserHiveConfiguration.cs index 61cc5a9..5aa222b 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/UserHiveConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/UserHiveConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/UserPowerOptionsConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/UserPowerOptionsConfiguration.cs index 0ad9f65..a3741be 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/UserPowerOptionsConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/UserPowerOptionsConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/VmwareOverlayConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/VmwareOverlayConfiguration.cs index 938ad27..d26c96c 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/VmwareOverlayConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/RegistryConfigurations/UserHive/VmwareOverlayConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceConfiguration.cs index 801d862..0c54704 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceConfigurationItem.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceConfigurationItem.cs index 5220dd4..3d07d34 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceConfigurationItem.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceConfigurationItem.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceDataItem.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceDataItem.cs index 6f49154..fea13de 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceDataItem.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceDataItem.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceStatus.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceStatus.cs index 532e7db..cc35fa2 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceStatus.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/ServiceStatus.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/WindowsUpdateConfiguration.cs b/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/WindowsUpdateConfiguration.cs index 3fa1643..067512e 100644 --- a/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/WindowsUpdateConfiguration.cs +++ b/SafeExamBrowser.Lockdown/FeatureConfigurations/ServiceConfigurations/WindowsUpdateConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Lockdown/Properties/AssemblyInfo.cs b/SafeExamBrowser.Lockdown/Properties/AssemblyInfo.cs index ffa32e1..d0c7e99 100644 --- a/SafeExamBrowser.Lockdown/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Lockdown/Properties/AssemblyInfo.cs @@ -9,7 +9,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Lockdown")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Lockdown/SystemConfigurationUpdate.cs b/SafeExamBrowser.Lockdown/SystemConfigurationUpdate.cs index 49c33f0..e0a7764 100644 --- a/SafeExamBrowser.Lockdown/SystemConfigurationUpdate.cs +++ b/SafeExamBrowser.Lockdown/SystemConfigurationUpdate.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging.Contracts/ILogContent.cs b/SafeExamBrowser.Logging.Contracts/ILogContent.cs index 0c5549a..670b4c4 100644 --- a/SafeExamBrowser.Logging.Contracts/ILogContent.cs +++ b/SafeExamBrowser.Logging.Contracts/ILogContent.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging.Contracts/ILogContentFormatter.cs b/SafeExamBrowser.Logging.Contracts/ILogContentFormatter.cs index 6f811c7..313d135 100644 --- a/SafeExamBrowser.Logging.Contracts/ILogContentFormatter.cs +++ b/SafeExamBrowser.Logging.Contracts/ILogContentFormatter.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging.Contracts/ILogMessage.cs b/SafeExamBrowser.Logging.Contracts/ILogMessage.cs index 620b5df..2428978 100644 --- a/SafeExamBrowser.Logging.Contracts/ILogMessage.cs +++ b/SafeExamBrowser.Logging.Contracts/ILogMessage.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging.Contracts/ILogObserver.cs b/SafeExamBrowser.Logging.Contracts/ILogObserver.cs index 543ef96..bfd11ed 100644 --- a/SafeExamBrowser.Logging.Contracts/ILogObserver.cs +++ b/SafeExamBrowser.Logging.Contracts/ILogObserver.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging.Contracts/ILogText.cs b/SafeExamBrowser.Logging.Contracts/ILogText.cs index 27e65d8..9a96ef0 100644 --- a/SafeExamBrowser.Logging.Contracts/ILogText.cs +++ b/SafeExamBrowser.Logging.Contracts/ILogText.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging.Contracts/ILogger.cs b/SafeExamBrowser.Logging.Contracts/ILogger.cs index 2a48eaa..7719ae0 100644 --- a/SafeExamBrowser.Logging.Contracts/ILogger.cs +++ b/SafeExamBrowser.Logging.Contracts/ILogger.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging.Contracts/IModuleLogger.cs b/SafeExamBrowser.Logging.Contracts/IModuleLogger.cs index 497a887..4603f2a 100644 --- a/SafeExamBrowser.Logging.Contracts/IModuleLogger.cs +++ b/SafeExamBrowser.Logging.Contracts/IModuleLogger.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging.Contracts/IThreadInfo.cs b/SafeExamBrowser.Logging.Contracts/IThreadInfo.cs index 7c9ecb0..db7827f 100644 --- a/SafeExamBrowser.Logging.Contracts/IThreadInfo.cs +++ b/SafeExamBrowser.Logging.Contracts/IThreadInfo.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging.Contracts/Properties/AssemblyInfo.cs b/SafeExamBrowser.Logging.Contracts/Properties/AssemblyInfo.cs index 24c8206..a77a193 100644 --- a/SafeExamBrowser.Logging.Contracts/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Logging.Contracts/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Logging.Contracts")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Logging.UnitTests/DefaultLogFormatterTests.cs b/SafeExamBrowser.Logging.UnitTests/DefaultLogFormatterTests.cs index b39657b..5fea387 100644 --- a/SafeExamBrowser.Logging.UnitTests/DefaultLogFormatterTests.cs +++ b/SafeExamBrowser.Logging.UnitTests/DefaultLogFormatterTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging.UnitTests/LoggerTests.cs b/SafeExamBrowser.Logging.UnitTests/LoggerTests.cs index dc2d015..a3e9a8d 100644 --- a/SafeExamBrowser.Logging.UnitTests/LoggerTests.cs +++ b/SafeExamBrowser.Logging.UnitTests/LoggerTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging.UnitTests/ModuleLoggerTests.cs b/SafeExamBrowser.Logging.UnitTests/ModuleLoggerTests.cs index daebd2f..146d481 100644 --- a/SafeExamBrowser.Logging.UnitTests/ModuleLoggerTests.cs +++ b/SafeExamBrowser.Logging.UnitTests/ModuleLoggerTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging.UnitTests/NewLogContentType.cs b/SafeExamBrowser.Logging.UnitTests/NewLogContentType.cs index f6e510d..60b95d1 100644 --- a/SafeExamBrowser.Logging.UnitTests/NewLogContentType.cs +++ b/SafeExamBrowser.Logging.UnitTests/NewLogContentType.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging.UnitTests/Properties/AssemblyInfo.cs b/SafeExamBrowser.Logging.UnitTests/Properties/AssemblyInfo.cs index 88d4de8..e20c380 100644 --- a/SafeExamBrowser.Logging.UnitTests/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Logging.UnitTests/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Logging.UnitTests")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] [assembly: ComVisible(false)] diff --git a/SafeExamBrowser.Logging.UnitTests/SafeExamBrowser.Logging.UnitTests.csproj b/SafeExamBrowser.Logging.UnitTests/SafeExamBrowser.Logging.UnitTests.csproj index e4e9873..df22e27 100644 --- a/SafeExamBrowser.Logging.UnitTests/SafeExamBrowser.Logging.UnitTests.csproj +++ b/SafeExamBrowser.Logging.UnitTests/SafeExamBrowser.Logging.UnitTests.csproj @@ -1,8 +1,9 @@  - - - + + + + Debug @@ -68,72 +69,72 @@ ..\packages\Microsoft.ApplicationInsights.2.22.0\lib\net46\Microsoft.ApplicationInsights.dll - - ..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll + + ..\packages\Microsoft.Testing.Platform.MSBuild.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.MSBuild.dll - - ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll + + ..\packages\Microsoft.Testing.Extensions.Telemetry.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll - - ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll + + ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll + + ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.MSBuild.dll + + ..\packages\Microsoft.Testing.Platform.1.5.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - ..\packages\Moq.4.20.70\lib\net462\Moq.dll + + ..\packages\Moq.4.20.72\lib\net462\Moq.dll - - ..\packages\NuGet.Frameworks.6.9.1\lib\net472\NuGet.Frameworks.dll + + ..\packages\NuGet.Frameworks.6.12.1\lib\net472\NuGet.Frameworks.dll - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + ..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll - - ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll + + ..\packages\System.Collections.Immutable.9.0.1\lib\net462\System.Collections.Immutable.dll - - ..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll + + ..\packages\System.Diagnostics.DiagnosticSource.9.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll - - ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + ..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + ..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll - - ..\packages\System.Reflection.Metadata.8.0.0\lib\net462\System.Reflection.Metadata.dll + + ..\packages\System.Reflection.Metadata.9.0.1\lib\net462\System.Reflection.Metadata.dll - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + ..\packages\System.Threading.Tasks.Extensions.4.6.0\lib\net462\System.Threading.Tasks.Extensions.dll ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll @@ -167,18 +168,26 @@ SafeExamBrowser.Settings + + + + + + + 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.Logging.UnitTests/app.config b/SafeExamBrowser.Logging.UnitTests/app.config index 9ac0d3c..544da48 100644 --- a/SafeExamBrowser.Logging.UnitTests/app.config +++ b/SafeExamBrowser.Logging.UnitTests/app.config @@ -8,11 +8,11 @@ - + - + @@ -20,7 +20,7 @@ - + @@ -28,15 +28,19 @@ - + - + - + + + + + diff --git a/SafeExamBrowser.Logging.UnitTests/packages.config b/SafeExamBrowser.Logging.UnitTests/packages.config index 397a147..cfe5cf0 100644 --- a/SafeExamBrowser.Logging.UnitTests/packages.config +++ b/SafeExamBrowser.Logging.UnitTests/packages.config @@ -2,23 +2,24 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SafeExamBrowser.Logging/DefaultLogFormatter.cs b/SafeExamBrowser.Logging/DefaultLogFormatter.cs index 81d34a3..5c01d67 100644 --- a/SafeExamBrowser.Logging/DefaultLogFormatter.cs +++ b/SafeExamBrowser.Logging/DefaultLogFormatter.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging/LogFileWriter.cs b/SafeExamBrowser.Logging/LogFileWriter.cs index 1069262..7ea4a1a 100644 --- a/SafeExamBrowser.Logging/LogFileWriter.cs +++ b/SafeExamBrowser.Logging/LogFileWriter.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging/LogMessage.cs b/SafeExamBrowser.Logging/LogMessage.cs index 4d3e993..9d7f380 100644 --- a/SafeExamBrowser.Logging/LogMessage.cs +++ b/SafeExamBrowser.Logging/LogMessage.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging/LogText.cs b/SafeExamBrowser.Logging/LogText.cs index e926c1f..008ae7d 100644 --- a/SafeExamBrowser.Logging/LogText.cs +++ b/SafeExamBrowser.Logging/LogText.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging/Logger.cs b/SafeExamBrowser.Logging/Logger.cs index 728b07a..f5919ba 100644 --- a/SafeExamBrowser.Logging/Logger.cs +++ b/SafeExamBrowser.Logging/Logger.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging/ModuleLogger.cs b/SafeExamBrowser.Logging/ModuleLogger.cs index c7652b1..6d48b43 100644 --- a/SafeExamBrowser.Logging/ModuleLogger.cs +++ b/SafeExamBrowser.Logging/ModuleLogger.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Logging/Properties/AssemblyInfo.cs b/SafeExamBrowser.Logging/Properties/AssemblyInfo.cs index 30337bc..20c4e6b 100644 --- a/SafeExamBrowser.Logging/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Logging/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Logging")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Logging/ThreadInfo.cs b/SafeExamBrowser.Logging/ThreadInfo.cs index ff7a844..de90a6c 100644 --- a/SafeExamBrowser.Logging/ThreadInfo.cs +++ b/SafeExamBrowser.Logging/ThreadInfo.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/Applications/ActiveApplication.cs b/SafeExamBrowser.Monitoring.Contracts/Applications/ActiveApplication.cs index 9d18411..fd55601 100644 --- a/SafeExamBrowser.Monitoring.Contracts/Applications/ActiveApplication.cs +++ b/SafeExamBrowser.Monitoring.Contracts/Applications/ActiveApplication.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/Applications/Events/ExplorerStartedEventHandler.cs b/SafeExamBrowser.Monitoring.Contracts/Applications/Events/ExplorerStartedEventHandler.cs index fb3ae43..3187c3b 100644 --- a/SafeExamBrowser.Monitoring.Contracts/Applications/Events/ExplorerStartedEventHandler.cs +++ b/SafeExamBrowser.Monitoring.Contracts/Applications/Events/ExplorerStartedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/Applications/Events/InstanceStartedEventHandler.cs b/SafeExamBrowser.Monitoring.Contracts/Applications/Events/InstanceStartedEventHandler.cs index 208743e..0643b0c 100644 --- a/SafeExamBrowser.Monitoring.Contracts/Applications/Events/InstanceStartedEventHandler.cs +++ b/SafeExamBrowser.Monitoring.Contracts/Applications/Events/InstanceStartedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/Applications/Events/TerminationFailedEventHandler.cs b/SafeExamBrowser.Monitoring.Contracts/Applications/Events/TerminationFailedEventHandler.cs index 52ecb38..8217c66 100644 --- a/SafeExamBrowser.Monitoring.Contracts/Applications/Events/TerminationFailedEventHandler.cs +++ b/SafeExamBrowser.Monitoring.Contracts/Applications/Events/TerminationFailedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/Applications/IApplicationMonitor.cs b/SafeExamBrowser.Monitoring.Contracts/Applications/IApplicationMonitor.cs index 10d3799..63b613d 100644 --- a/SafeExamBrowser.Monitoring.Contracts/Applications/IApplicationMonitor.cs +++ b/SafeExamBrowser.Monitoring.Contracts/Applications/IApplicationMonitor.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/Applications/IWindow.cs b/SafeExamBrowser.Monitoring.Contracts/Applications/IWindow.cs index 530cf1e..56db747 100644 --- a/SafeExamBrowser.Monitoring.Contracts/Applications/IWindow.cs +++ b/SafeExamBrowser.Monitoring.Contracts/Applications/IWindow.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/Applications/InitializationResult.cs b/SafeExamBrowser.Monitoring.Contracts/Applications/InitializationResult.cs index 1522b7d..2ff740d 100644 --- a/SafeExamBrowser.Monitoring.Contracts/Applications/InitializationResult.cs +++ b/SafeExamBrowser.Monitoring.Contracts/Applications/InitializationResult.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/Applications/RunningApplication.cs b/SafeExamBrowser.Monitoring.Contracts/Applications/RunningApplication.cs index 5c8f6f2..6a3be7c 100644 --- a/SafeExamBrowser.Monitoring.Contracts/Applications/RunningApplication.cs +++ b/SafeExamBrowser.Monitoring.Contracts/Applications/RunningApplication.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/Display/Events/DisplayChangedEventHandler.cs b/SafeExamBrowser.Monitoring.Contracts/Display/Events/DisplayChangedEventHandler.cs index 77a072f..802f497 100644 --- a/SafeExamBrowser.Monitoring.Contracts/Display/Events/DisplayChangedEventHandler.cs +++ b/SafeExamBrowser.Monitoring.Contracts/Display/Events/DisplayChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/Display/IDisplayMonitor.cs b/SafeExamBrowser.Monitoring.Contracts/Display/IDisplayMonitor.cs index e2e3e03..db460c9 100644 --- a/SafeExamBrowser.Monitoring.Contracts/Display/IDisplayMonitor.cs +++ b/SafeExamBrowser.Monitoring.Contracts/Display/IDisplayMonitor.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/Display/ValidationResult.cs b/SafeExamBrowser.Monitoring.Contracts/Display/ValidationResult.cs index 748bb67..0778502 100644 --- a/SafeExamBrowser.Monitoring.Contracts/Display/ValidationResult.cs +++ b/SafeExamBrowser.Monitoring.Contracts/Display/ValidationResult.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/IClipboard.cs b/SafeExamBrowser.Monitoring.Contracts/IClipboard.cs index b5f192a..b7fdf84 100644 --- a/SafeExamBrowser.Monitoring.Contracts/IClipboard.cs +++ b/SafeExamBrowser.Monitoring.Contracts/IClipboard.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/IRemoteSessionDetector.cs b/SafeExamBrowser.Monitoring.Contracts/IRemoteSessionDetector.cs index 0db0c4e..fe2d6e5 100644 --- a/SafeExamBrowser.Monitoring.Contracts/IRemoteSessionDetector.cs +++ b/SafeExamBrowser.Monitoring.Contracts/IRemoteSessionDetector.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/IVirtualMachineDetector.cs b/SafeExamBrowser.Monitoring.Contracts/IVirtualMachineDetector.cs index 6a10251..b0c9c7b 100644 --- a/SafeExamBrowser.Monitoring.Contracts/IVirtualMachineDetector.cs +++ b/SafeExamBrowser.Monitoring.Contracts/IVirtualMachineDetector.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/Keyboard/IKeyboardInterceptor.cs b/SafeExamBrowser.Monitoring.Contracts/Keyboard/IKeyboardInterceptor.cs index a772dcb..9dd2645 100644 --- a/SafeExamBrowser.Monitoring.Contracts/Keyboard/IKeyboardInterceptor.cs +++ b/SafeExamBrowser.Monitoring.Contracts/Keyboard/IKeyboardInterceptor.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/Mouse/IMouseInterceptor.cs b/SafeExamBrowser.Monitoring.Contracts/Mouse/IMouseInterceptor.cs index 4955134..3d79a93 100644 --- a/SafeExamBrowser.Monitoring.Contracts/Mouse/IMouseInterceptor.cs +++ b/SafeExamBrowser.Monitoring.Contracts/Mouse/IMouseInterceptor.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/Properties/AssemblyInfo.cs b/SafeExamBrowser.Monitoring.Contracts/Properties/AssemblyInfo.cs index 28cfd2b..1f4acac 100644 --- a/SafeExamBrowser.Monitoring.Contracts/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Monitoring.Contracts/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Monitoring.Contracts")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/System/Events/SentinelEventArgs.cs b/SafeExamBrowser.Monitoring.Contracts/System/Events/SentinelEventArgs.cs index 5e9a950..2cb59fd 100644 --- a/SafeExamBrowser.Monitoring.Contracts/System/Events/SentinelEventArgs.cs +++ b/SafeExamBrowser.Monitoring.Contracts/System/Events/SentinelEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/System/Events/SentinelEventHandler.cs b/SafeExamBrowser.Monitoring.Contracts/System/Events/SentinelEventHandler.cs index f1efb67..f59640d 100644 --- a/SafeExamBrowser.Monitoring.Contracts/System/Events/SentinelEventHandler.cs +++ b/SafeExamBrowser.Monitoring.Contracts/System/Events/SentinelEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/System/Events/SessionChangedEventHandler.cs b/SafeExamBrowser.Monitoring.Contracts/System/Events/SessionChangedEventHandler.cs index 252aa15..2882277 100644 --- a/SafeExamBrowser.Monitoring.Contracts/System/Events/SessionChangedEventHandler.cs +++ b/SafeExamBrowser.Monitoring.Contracts/System/Events/SessionChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring.Contracts/System/ISystemSentinel.cs b/SafeExamBrowser.Monitoring.Contracts/System/ISystemSentinel.cs index 4a4036f..5851abe 100644 --- a/SafeExamBrowser.Monitoring.Contracts/System/ISystemSentinel.cs +++ b/SafeExamBrowser.Monitoring.Contracts/System/ISystemSentinel.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring/Applications/ApplicationMonitor.cs b/SafeExamBrowser.Monitoring/Applications/ApplicationMonitor.cs index 3b30443..60db509 100644 --- a/SafeExamBrowser.Monitoring/Applications/ApplicationMonitor.cs +++ b/SafeExamBrowser.Monitoring/Applications/ApplicationMonitor.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -52,40 +52,44 @@ namespace SafeExamBrowser.Monitoring.Applications { var result = new InitializationResult(); + InitializeProcesses(); + //InitializeBlacklist(settings, result); + //InitializeWhitelist(settings, result); + return result; } public void Start() { - timer.AutoReset = false; - timer.Elapsed += Timer_Elapsed; - timer.Start(); + //timer.AutoReset = false; + //timer.Elapsed += Timer_Elapsed; + //timer.Start(); logger.Info("Started monitoring applications."); - captureHookId = nativeMethods.RegisterSystemCaptureStartEvent(SystemEvent_WindowChanged); - logger.Info($"Registered system capture start event with ID = {captureHookId}."); + //captureHookId = nativeMethods.RegisterSystemCaptureStartEvent(SystemEvent_WindowChanged); + //logger.Info($"Registered system capture start event with ID = {captureHookId}."); - foregroundHookId = nativeMethods.RegisterSystemForegroundEvent(SystemEvent_WindowChanged); - logger.Info($"Registered system foreground event with ID = {foregroundHookId}."); + //foregroundHookId = nativeMethods.RegisterSystemForegroundEvent(SystemEvent_WindowChanged); + //logger.Info($"Registered system foreground event with ID = {foregroundHookId}."); } public void Stop() { - timer.Stop(); - timer.Elapsed -= Timer_Elapsed; + //timer.Stop(); + //timer.Elapsed -= Timer_Elapsed; logger.Info("Stopped monitoring applications."); - if (captureHookId.HasValue) - { - nativeMethods.DeregisterSystemEventHook(captureHookId.Value); - logger.Info($"Unregistered system capture start event with ID = {captureHookId}."); - } + //if (captureHookId.HasValue) + //{ + // nativeMethods.DeregisterSystemEventHook(captureHookId.Value); + // logger.Info($"Unregistered system capture start event with ID = {captureHookId}."); + //} - if (foregroundHookId.HasValue) - { - nativeMethods.DeregisterSystemEventHook(foregroundHookId.Value); - logger.Info($"Unregistered system foreground event with ID = {foregroundHookId}."); - } + //if (foregroundHookId.HasValue) + //{ + // nativeMethods.DeregisterSystemEventHook(foregroundHookId.Value); + // logger.Info($"Unregistered system foreground event with ID = {foregroundHookId}."); + //} } public bool TryGetActiveApplication(out ActiveApplication application) @@ -110,19 +114,73 @@ namespace SafeExamBrowser.Monitoring.Applications { var success = true; - + foreach (var process in application.Processes) + { + success &= TryTerminate(process); + } return success; } private void SystemEvent_WindowChanged(IntPtr handle) { - + if (handle != IntPtr.Zero && activeWindow?.Handle != handle) + { + var title = nativeMethods.GetWindowTitle(handle); + var window = new Window { Handle = handle, Title = title }; + + logger.Debug($"Window has changed from {activeWindow} to {window}."); + activeWindow = window; + + Task.Run(() => + { + if (!IsAllowed(window) && !TryHide(window)) + { + Close(window); + } + }); + } } private void Timer_Elapsed(object sender, ElapsedEventArgs e) { - + var failed = new List(); + var running = processFactory.GetAllRunning(); + var started = running.Where(r => processes.All(p => p.Id != r.Id)).ToList(); + var terminated = processes.Where(p => running.All(r => r.Id != p.Id)).ToList(); + + foreach (var process in started) + { + logger.Debug($"Process {process} has been started [{process.GetAdditionalInfo()}]."); + processes.Add(process); + + if (process.Name == "explorer.exe") + { + HandleExplorerStart(process); + } + else if (!IsAllowed(process) && !TryTerminate(process)) + { + AddFailed(process, failed); + } + else if (IsWhitelisted(process, out var applicationId)) + { + HandleInstanceStart(applicationId.Value, process); + } + } + + foreach (var process in terminated) + { + logger.Debug($"Process {process} has been terminated."); + processes.Remove(process); + } + + if (failed.Any()) + { + logger.Warn($"Failed to terminate these blacklisted applications: {string.Join(", ", failed.Select(a => a.Name))}."); + TerminationFailed?.Invoke(failed); + } + + timer.Start(); } private void AddFailed(IProcess process, List failed) @@ -197,10 +255,10 @@ namespace SafeExamBrowser.Monitoring.Applications isRuntime &= process.Name == "SafeExamBrowser.exe"; isRuntime &= process.OriginalName == "SafeExamBrowser.exe"; -#if !DEBUG - isClient &= process.Signature == "2bc82fe8e56a39f96bc6c4b91d6703a0379b76a2"; - isRuntime &= process.Signature == "2bc82fe8e56a39f96bc6c4b91d6703a0379b76a2"; -#endif +//#if !DEBUG +// isClient &= process.Signature == "2bc82fe8e56a39f96bc6c4b91d6703a0379b76a2"; +// isRuntime &= process.Signature == "2bc82fe8e56a39f96bc6c4b91d6703a0379b76a2"; +//#endif return isClient || isRuntime; } diff --git a/SafeExamBrowser.Monitoring/Applications/Window.cs b/SafeExamBrowser.Monitoring/Applications/Window.cs index cb22f4d..0e54018 100644 --- a/SafeExamBrowser.Monitoring/Applications/Window.cs +++ b/SafeExamBrowser.Monitoring/Applications/Window.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring/Clipboard.cs b/SafeExamBrowser.Monitoring/Clipboard.cs index dac27c1..79b706d 100644 --- a/SafeExamBrowser.Monitoring/Clipboard.cs +++ b/SafeExamBrowser.Monitoring/Clipboard.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -32,6 +32,8 @@ namespace SafeExamBrowser.Monitoring public void Initialize(ClipboardPolicy policy) { this.policy = policy; + + nativeMethods.EmptyClipboard(); logger.Debug("Cleared clipboard."); if (policy != ClipboardPolicy.Allow) @@ -51,6 +53,7 @@ namespace SafeExamBrowser.Monitoring public void Terminate() { + nativeMethods.EmptyClipboard(); logger.Debug("Cleared clipboard."); if (policy != ClipboardPolicy.Allow) @@ -68,7 +71,7 @@ namespace SafeExamBrowser.Monitoring private void Timer_Elapsed(object sender, ElapsedEventArgs e) { - + nativeMethods.EmptyClipboard(); } } } diff --git a/SafeExamBrowser.Monitoring/Display/Bounds.cs b/SafeExamBrowser.Monitoring/Display/Bounds.cs index 62efd70..587c1e7 100644 --- a/SafeExamBrowser.Monitoring/Display/Bounds.cs +++ b/SafeExamBrowser.Monitoring/Display/Bounds.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring/Display/Display.cs b/SafeExamBrowser.Monitoring/Display/Display.cs index 6fe6926..3d0ab04 100644 --- a/SafeExamBrowser.Monitoring/Display/Display.cs +++ b/SafeExamBrowser.Monitoring/Display/Display.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring/Display/DisplayMonitor.cs b/SafeExamBrowser.Monitoring/Display/DisplayMonitor.cs index d853ed9..40b52bb 100644 --- a/SafeExamBrowser.Monitoring/Display/DisplayMonitor.cs +++ b/SafeExamBrowser.Monitoring/Display/DisplayMonitor.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -42,12 +42,14 @@ namespace SafeExamBrowser.Monitoring.Display public void InitializePrimaryDisplay(int taskbarHeight) { - + InitializeWorkingArea(taskbarHeight); + InitializeWallpaper(); } public void ResetPrimaryDisplay() { - + ResetWorkingArea(); + ResetWallpaper(); } public void StartMonitoringDisplayChanges() @@ -73,15 +75,21 @@ namespace SafeExamBrowser.Monitoring.Display result.ExternalDisplays = active.Count(d => !d.IsInternal); result.InternalDisplays = active.Count(d => d.IsInternal); - result.IsAllowed = true; + result.IsAllowed = count <= settings.AllowedDisplays; if (result.IsAllowed) { - logger.Info($"Detected 1 active displays, 1 are allowed."); + logger.Info($"Detected {count} active displays, {settings.AllowedDisplays} are allowed."); } else { - logger.Info($"Detected 1 active displays, 1 are allowed!"); + logger.Warn($"Detected {count} active displays but only {settings.AllowedDisplays} are allowed!"); + } + + if (settings.InternalDisplayOnly && active.Any(d => !d.IsInternal)) + { + result.IsAllowed = false; + logger.Warn("Detected external display but only internal displays are allowed!"); } } else @@ -95,7 +103,8 @@ namespace SafeExamBrowser.Monitoring.Display private void SystemEvents_DisplaySettingsChanged(object sender, EventArgs e) { - + logger.Info("Display change detected!"); + Task.Run(() => DisplayChanged?.Invoke()); } private void InitializeWorkingArea(int taskbarHeight) @@ -198,8 +207,7 @@ namespace SafeExamBrowser.Monitoring.Display logger.Info($"Detected {(display.IsActive ? "active" : "inactive")}, {(display.IsInternal ? "internal" : "external")} display '{display.Identifier}' connected via '{display.Technology}'."); } - //return success; - return true; + return success; } private void ResetWorkingArea() diff --git a/SafeExamBrowser.Monitoring/Display/VideoOutputTechnology.cs b/SafeExamBrowser.Monitoring/Display/VideoOutputTechnology.cs index b1789ab..45cf1f4 100644 --- a/SafeExamBrowser.Monitoring/Display/VideoOutputTechnology.cs +++ b/SafeExamBrowser.Monitoring/Display/VideoOutputTechnology.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring/Keyboard/KeyboardInterceptor.cs b/SafeExamBrowser.Monitoring/Keyboard/KeyboardInterceptor.cs index 52c74a1..deaad40 100644 --- a/SafeExamBrowser.Monitoring/Keyboard/KeyboardInterceptor.cs +++ b/SafeExamBrowser.Monitoring/Keyboard/KeyboardInterceptor.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -47,6 +47,40 @@ namespace SafeExamBrowser.Monitoring.Keyboard private bool KeyboardHookCallback(int keyCode, KeyModifier modifier, KeyState state) { var block = false; + var key = KeyInterop.KeyFromVirtualKey(keyCode); + + block |= key == Key.Apps; + block |= key == Key.Escape && modifier == KeyModifier.None && !settings.AllowEsc; + block |= key == Key.F1 && !settings.AllowF1; + block |= key == Key.F2 && !settings.AllowF2; + block |= key == Key.F3 && !settings.AllowF3; + block |= key == Key.F4 && !settings.AllowF4; + block |= key == Key.F5 && !settings.AllowF5; + block |= key == Key.F6 && !settings.AllowF6; + block |= key == Key.F7 && !settings.AllowF7; + block |= key == Key.F8 && !settings.AllowF8; + block |= key == Key.F9 && !settings.AllowF9; + block |= key == Key.F10 && !settings.AllowF10; + block |= key == Key.F11 && !settings.AllowF11; + block |= key == Key.F12 && !settings.AllowF12; + block |= key == Key.LWin && !settings.AllowSystemKey; + block |= key == Key.PrintScreen && !settings.AllowPrintScreen; + block |= key == Key.RWin && !settings.AllowSystemKey; + + block |= modifier.HasFlag(KeyModifier.Alt) && key == Key.Escape && !settings.AllowAltEsc; + block |= modifier.HasFlag(KeyModifier.Alt) && key == Key.F4 && !settings.AllowAltF4; + block |= modifier.HasFlag(KeyModifier.Alt) && key == Key.Space; + block |= modifier.HasFlag(KeyModifier.Alt) && key == Key.Tab; + + block |= modifier.HasFlag(KeyModifier.Ctrl) && key == Key.C && !settings.AllowCtrlC; + block |= modifier.HasFlag(KeyModifier.Ctrl) && key == Key.Escape && !settings.AllowCtrlEsc; + block |= modifier.HasFlag(KeyModifier.Ctrl) && key == Key.V && !settings.AllowCtrlV; + block |= modifier.HasFlag(KeyModifier.Ctrl) && key == Key.X && !settings.AllowCtrlX; + + if (block) + { + Log(key, keyCode, modifier, state); + } return block; } diff --git a/SafeExamBrowser.Monitoring/Mouse/MouseInterceptor.cs b/SafeExamBrowser.Monitoring/Mouse/MouseInterceptor.cs index b503fac..90c5a67 100644 --- a/SafeExamBrowser.Monitoring/Mouse/MouseInterceptor.cs +++ b/SafeExamBrowser.Monitoring/Mouse/MouseInterceptor.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -46,6 +46,15 @@ namespace SafeExamBrowser.Monitoring.Mouse { var block = false; + block |= button == MouseButton.Auxiliary; + block |= button == MouseButton.Middle && !settings.AllowMiddleButton; + block |= button == MouseButton.Right && !settings.AllowRightButton; + + if (block) + { + logger.Info($"Blocked {button.ToString().ToLower()} mouse button when {state.ToString().ToLower()}."); + } + return block; } } diff --git a/SafeExamBrowser.Monitoring/Properties/AssemblyInfo.cs b/SafeExamBrowser.Monitoring/Properties/AssemblyInfo.cs index c175134..0161ef2 100644 --- a/SafeExamBrowser.Monitoring/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Monitoring/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Monitoring")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 @@ -28,6 +28,6 @@ using System.Runtime.InteropServices; // 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("3.8.0.742")] -[assembly: AssemblyFileVersion("3.8.0.742")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0.0")] diff --git a/SafeExamBrowser.Monitoring/RemoteSessionDetector.cs b/SafeExamBrowser.Monitoring/RemoteSessionDetector.cs index 69408fe..915ce6a 100644 --- a/SafeExamBrowser.Monitoring/RemoteSessionDetector.cs +++ b/SafeExamBrowser.Monitoring/RemoteSessionDetector.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -23,11 +23,12 @@ namespace SafeExamBrowser.Monitoring public bool IsRemoteSession() { - var isRemoteSession = false; + //var isRemoteSession = SystemInformation.TerminalServerSession; - logger.Debug($"System appears {(isRemoteSession ? "" : "not ")}to be running in a remote session."); + //logger.Debug($"System appears {(isRemoteSession ? "" : "not ")}to be running in a remote session."); - return isRemoteSession; + //return isRemoteSession; + return false; } } } diff --git a/SafeExamBrowser.Monitoring/System/Components/Cursors.cs b/SafeExamBrowser.Monitoring/System/Components/Cursors.cs index 7e515c5..e19a8fa 100644 --- a/SafeExamBrowser.Monitoring/System/Components/Cursors.cs +++ b/SafeExamBrowser.Monitoring/System/Components/Cursors.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -34,27 +34,77 @@ namespace SafeExamBrowser.Monitoring.System.Components internal void StartMonitoring() { registry.ValueChanged += Registry_ValueChanged; - logger.Info("Started monitoring cursors."); + + if (registry.TryGetNames(RegistryValue.UserHive.Cursors_Key, out var names)) + { + foreach (var name in names) + { + registry.StartMonitoring(RegistryValue.UserHive.Cursors_Key, name); + } + + logger.Info("Started monitoring cursors."); + } + else + { + logger.Warn("Failed to start monitoring cursor registry values!"); + } } internal void StopMonitoring() { registry.ValueChanged -= Registry_ValueChanged; - logger.Info("Stopped monitoring cursors."); + + if (registry.TryGetNames(RegistryValue.UserHive.Cursors_Key, out var names)) + { + foreach (var name in names) + { + registry.StopMonitoring(RegistryValue.UserHive.Cursors_Key, name); + } + + logger.Info("Stopped monitoring cursors."); + } + else + { + logger.Warn("Failed to stop monitoring cursor registry values!"); + } } internal bool Verify() { logger.Info($"Starting cursor verification..."); - logger.Info("Cursor configuration successfully verified."); - var success = true; + var success = registry.TryGetNames(RegistryValue.UserHive.Cursors_Key, out var cursors); + + if (success) + { + foreach (var cursor in cursors.Where(c => !string.IsNullOrWhiteSpace(c))) + { + success &= VerifyCursor(cursor); + } + + if (success) + { + logger.Info("Cursor configuration successfully verified."); + } + else + { + logger.Warn("Cursor configuration is compromised!"); + } + } + else + { + logger.Error("Failed to verify cursor configuration!"); + } + return success; } private void Registry_ValueChanged(string key, string name, object oldValue, object newValue) { - + if (key == RegistryValue.UserHive.Cursors_Key) + { + HandleCursorChange(key, name, oldValue, newValue); + } } private void HandleCursorChange(string key, string name, object oldValue, object newValue) diff --git a/SafeExamBrowser.Monitoring/System/Components/EaseOfAccess.cs b/SafeExamBrowser.Monitoring/System/Components/EaseOfAccess.cs index 86c18d3..e5067bc 100644 --- a/SafeExamBrowser.Monitoring/System/Components/EaseOfAccess.cs +++ b/SafeExamBrowser.Monitoring/System/Components/EaseOfAccess.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -29,6 +29,7 @@ namespace SafeExamBrowser.Monitoring.System.Components internal void StartMonitoring() { registry.ValueChanged += Registry_ValueChanged; + registry.StartMonitoring(RegistryValue.MachineHive.EaseOfAccess_Key, RegistryValue.MachineHive.EaseOfAccess_Name); logger.Info("Started monitoring ease of access."); } @@ -36,6 +37,7 @@ namespace SafeExamBrowser.Monitoring.System.Components internal void StopMonitoring() { registry.ValueChanged -= Registry_ValueChanged; + registry.StopMonitoring(RegistryValue.MachineHive.EaseOfAccess_Key, RegistryValue.MachineHive.EaseOfAccess_Name); logger.Info("Stopped monitoring ease of access."); } @@ -43,14 +45,36 @@ namespace SafeExamBrowser.Monitoring.System.Components internal bool Verify() { logger.Info($"Starting ease of access verification..."); - logger.Info("Ease of access configuration successfully verified."); - return true; + var success = registry.TryRead(RegistryValue.MachineHive.EaseOfAccess_Key, RegistryValue.MachineHive.EaseOfAccess_Name, out var value); + + if (success) + { + if (value is string s && string.IsNullOrWhiteSpace(s)) + { + logger.Info("Ease of access configuration successfully verified."); + } + else + { + logger.Warn($"Ease of access configuration is compromised: '{value}'!"); + success = false; + } + } + else + { + success = true; + logger.Info("Ease of access configuration successfully verified (value does not exist)."); + } + + return success; } private void Registry_ValueChanged(string key, string name, object oldValue, object newValue) { - + if (key == RegistryValue.MachineHive.EaseOfAccess_Key) + { + HandleEaseOfAccessChange(key, name, oldValue, newValue); + } } private void HandleEaseOfAccessChange(string key, string name, object oldValue, object newValue) diff --git a/SafeExamBrowser.Monitoring/System/Components/StickyKeys.cs b/SafeExamBrowser.Monitoring/System/Components/StickyKeys.cs index 7a90265..d88efc1 100644 --- a/SafeExamBrowser.Monitoring/System/Components/StickyKeys.cs +++ b/SafeExamBrowser.Monitoring/System/Components/StickyKeys.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -33,13 +33,54 @@ namespace SafeExamBrowser.Monitoring.System.Components internal bool Disable() { + var success = nativeMethods.TryGetStickyKeys(out var state); - return true; + if (success) + { + success = nativeMethods.DisableStickyKeys(); + + if (success) + { + original = state; + logger.Info($"Disabled sticky keys (original state: {ToString(state)})."); + } + else + { + logger.Error($"Failed to disable sticky keys (original state: {ToString(state)})!"); + } + } + else + { + logger.Error("Failed to retrieve sticky keys state!"); + } + + return success; } internal bool Enable() { - return true; + var success = nativeMethods.TryGetStickyKeys(out var state); + + if (success) + { + success = nativeMethods.EnableStickyKeys(); + + if (success) + { + original = state; + logger.Info($"Enabled sticky keys (original state: {ToString(state)})."); + } + else + { + logger.Error($"Failed to enable sticky keys (original state: {ToString(state)})!"); + } + } + else + { + logger.Error("Failed to retrieve sticky keys state!"); + } + + return success; } internal bool Revert() @@ -85,7 +126,17 @@ namespace SafeExamBrowser.Monitoring.System.Components private void Timer_Elapsed(object sender, ElapsedEventArgs e) { - + if (nativeMethods.TryGetStickyKeys(out var state)) + { + if (state.IsEnabled || state.IsHotkeyActive) + { + HandleStickyKeysChange(state); + } + } + else + { + logger.Error("Failed to monitor sticky keys state!"); + } } private void HandleStickyKeysChange(IStickyKeysState state) diff --git a/SafeExamBrowser.Monitoring/System/Components/SystemEvents.cs b/SafeExamBrowser.Monitoring/System/Components/SystemEvents.cs index 040f510..c3d3cee 100644 --- a/SafeExamBrowser.Monitoring/System/Components/SystemEvents.cs +++ b/SafeExamBrowser.Monitoring/System/Components/SystemEvents.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -55,42 +55,43 @@ namespace SafeExamBrowser.Monitoring.System.Components private void SystemEvents_EventsThreadShutdown(object sender, EventArgs e) { - + logger.Warn("System event thread is about to be terminated!"); } private void SystemEvents_InstalledFontsChanged(object sender, EventArgs e) { - + logger.Info("Installed fonts changed."); } private void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e) { - + logger.Info($"Power mode changed: {e.Mode}."); } private void SystemEvents_SessionEnded(object sender, SessionEndedEventArgs e) { - + logger.Warn($"User session ended! Reason: {e.Reason}."); } private void SystemEvents_SessionEnding(object sender, SessionEndingEventArgs e) { - + logger.Warn($"User session is ending! Reason: {e.Reason}."); } private void SystemEvents_SessionChanged(object sender, SessionSwitchEventArgs e) { - + logger.Info($"User session change detected: {e.Reason}."); + Task.Run(() => SessionChanged?.Invoke()); } private void SystemEvents_TimeChanged(object sender, EventArgs e) { - + logger.Info("Time changed."); } private void SystemEvents_UserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e) { - + logger.Info($"User preference changed. Category: {e.Category}."); } } } diff --git a/SafeExamBrowser.Monitoring/System/SystemSentinel.cs b/SafeExamBrowser.Monitoring/System/SystemSentinel.cs index 6a823bd..155181a 100644 --- a/SafeExamBrowser.Monitoring/System/SystemSentinel.cs +++ b/SafeExamBrowser.Monitoring/System/SystemSentinel.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Monitoring/VirtualMachineDetector.cs b/SafeExamBrowser.Monitoring/VirtualMachineDetector.cs index dcaf489..00bd389 100644 --- a/SafeExamBrowser.Monitoring/VirtualMachineDetector.cs +++ b/SafeExamBrowser.Monitoring/VirtualMachineDetector.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -54,11 +54,117 @@ namespace SafeExamBrowser.Monitoring public bool IsVirtualMachine() { + /* var isVirtualMachine = false; - logger.Debug($"Computer '{systemInfo.Name}' appears {(isVirtualMachine ? "" : "not ")}to be a virtual machine."); + isVirtualMachine |= HasVirtualDevice(); + isVirtualMachine |= HasVirtualMacAddress(); + isVirtualMachine |= IsVirtualCpu(); + isVirtualMachine |= IsVirtualRegistry(); + isVirtualMachine |= IsVirtualSystem(systemInfo.BiosInfo, systemInfo.Manufacturer, systemInfo.Model); + */ + logger.Debug($"Computer '{systemInfo.Name}' appears not to be a virtual machine."); - return isVirtualMachine; + return false; + } + + private bool HasVirtualDevice() + { + var hasVirtualDevice = false; + + foreach (var device in systemInfo.PlugAndPlayDeviceIds) + { + hasVirtualDevice |= DeviceBlacklist.Any(d => device.ToLower().Contains(d.ToLower())) && DeviceWhitelist.All(d => !device.ToLower().Contains(d.ToLower())); + } + + return hasVirtualDevice; + } + + private bool HasVirtualMacAddress() + { + var hasVirtualMacAddress = false; + var macAddress = systemInfo.MacAddress; + + if (macAddress != null && macAddress.Length > 2) + { + hasVirtualMacAddress |= macAddress.StartsWith(MANIPULATED); + hasVirtualMacAddress |= macAddress.StartsWith(QEMU_MAC_PREFIX); + hasVirtualMacAddress |= macAddress.StartsWith(VIRTUALBOX_MAC_PREFIX); + } + + return hasVirtualMacAddress; + } + + private bool IsVirtualCpu() + { + var isVirtualCpu = false; + + isVirtualCpu |= systemInfo.CpuName.ToLower().Contains(" kvm "); + + return isVirtualCpu; + } + + private bool IsVirtualRegistry() + { + var isVirtualRegistry = false; + + isVirtualRegistry |= HasLocalVirtualMachineDeviceCache(); + + return isVirtualRegistry; + } + + private bool IsVirtualSystem(string biosInfo, string manufacturer, string model) + { + var isVirtualSystem = false; + + biosInfo = biosInfo.ToLower(); + manufacturer = manufacturer.ToLower(); + model = model.ToLower(); + + isVirtualSystem |= biosInfo.Contains("hyper-v"); + isVirtualSystem |= biosInfo.Contains("virtualbox"); + isVirtualSystem |= biosInfo.Contains("vmware"); + isVirtualSystem |= biosInfo.Contains("ovmf"); + isVirtualSystem |= biosInfo.Contains("edk ii unknown"); + isVirtualSystem |= manufacturer.Contains("microsoft corporation") && !model.Contains("surface"); + isVirtualSystem |= manufacturer.Contains("parallels software"); + isVirtualSystem |= manufacturer.Contains("qemu"); + isVirtualSystem |= manufacturer.Contains("vmware"); + isVirtualSystem |= model.Contains("virtualbox"); + isVirtualSystem |= model.Contains("Q35 +"); + + return isVirtualSystem; + } + + private bool HasLocalVirtualMachineDeviceCache() + { + var deviceName = Environment.GetEnvironmentVariable("COMPUTERNAME"); + var hasDeviceCache = false; + var hasDeviceCacheKeys = registry.TryGetSubKeys(RegistryValue.UserHive.DeviceCache_Key, out var deviceCacheKeys); + + if (deviceName != default && hasDeviceCacheKeys) + { + foreach (var cacheId in deviceCacheKeys) + { + var cacheIdKey = $@"{RegistryValue.UserHive.DeviceCache_Key}\{cacheId}"; + var didReadKeys = true; + + didReadKeys &= registry.TryRead(cacheIdKey, "DeviceName", out var cacheDeviceName); + + if (didReadKeys && deviceName.ToLower() == ((string) cacheDeviceName).ToLower()) + { + didReadKeys &= registry.TryRead(cacheIdKey, "DeviceMake", out var cacheDeviceManufacturer); + didReadKeys &= registry.TryRead(cacheIdKey, "DeviceModel", out var cacheDeviceModel); + + if (didReadKeys) + { + hasDeviceCache |= IsVirtualSystem("", (string) cacheDeviceManufacturer, (string) cacheDeviceModel); + } + } + } + } + + return hasDeviceCache; } } } diff --git a/SafeExamBrowser.Proctoring.Contracts/Events/ProctoringEventHandler.cs b/SafeExamBrowser.Proctoring.Contracts/Events/ProctoringEventHandler.cs index 053b426..8d9e43e 100644 --- a/SafeExamBrowser.Proctoring.Contracts/Events/ProctoringEventHandler.cs +++ b/SafeExamBrowser.Proctoring.Contracts/Events/ProctoringEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring.Contracts/Events/RemainingWorkUpdatedEventArgs.cs b/SafeExamBrowser.Proctoring.Contracts/Events/RemainingWorkUpdatedEventArgs.cs index 6de7523..954e5a3 100644 --- a/SafeExamBrowser.Proctoring.Contracts/Events/RemainingWorkUpdatedEventArgs.cs +++ b/SafeExamBrowser.Proctoring.Contracts/Events/RemainingWorkUpdatedEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -15,11 +15,21 @@ namespace SafeExamBrowser.Proctoring.Contracts.Events /// public class RemainingWorkUpdatedEventArgs { + /// + /// Determines whether the execution of the remaining work may be cancelled. + /// + public bool AllowCancellation { get; set; } + /// /// The path of the local cache, if is true. /// public string CachePath { get; set; } + /// + /// Indicates that the cancellation of the remaining work has been requested. + /// + public bool CancellationRequested { get; set; } + /// /// Indicates that the execution of the remaining work has failed. /// @@ -46,9 +56,9 @@ namespace SafeExamBrowser.Proctoring.Contracts.Events public int Progress { get; set; } /// - /// The point in time when the execution will resume, if is true. + /// The point in time when the execution will resume, if available. /// - public DateTime Resume { get; set; } + public DateTime? Resume { get; set; } /// /// The total number of work items to be executed. diff --git a/SafeExamBrowser.Proctoring.Contracts/Events/RemainingWorkUpdatedEventHandler.cs b/SafeExamBrowser.Proctoring.Contracts/Events/RemainingWorkUpdatedEventHandler.cs index 2c8b649..c5a7f5a 100644 --- a/SafeExamBrowser.Proctoring.Contracts/Events/RemainingWorkUpdatedEventHandler.cs +++ b/SafeExamBrowser.Proctoring.Contracts/Events/RemainingWorkUpdatedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring.Contracts/IProctoringController.cs b/SafeExamBrowser.Proctoring.Contracts/IProctoringController.cs index 218f217..feeb9d9 100644 --- a/SafeExamBrowser.Proctoring.Contracts/IProctoringController.cs +++ b/SafeExamBrowser.Proctoring.Contracts/IProctoringController.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring.Contracts/Properties/AssemblyInfo.cs b/SafeExamBrowser.Proctoring.Contracts/Properties/AssemblyInfo.cs index 73b9d20..5d5e027 100644 --- a/SafeExamBrowser.Proctoring.Contracts/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Proctoring.Contracts/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Proctoring.Contracts")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Proctoring/ProctoringController.cs b/SafeExamBrowser.Proctoring/ProctoringController.cs index a83663e..2fdcafc 100644 --- a/SafeExamBrowser.Proctoring/ProctoringController.cs +++ b/SafeExamBrowser.Proctoring/ProctoringController.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ProctoringFactory.cs b/SafeExamBrowser.Proctoring/ProctoringFactory.cs index e9c670f..b75b212 100644 --- a/SafeExamBrowser.Proctoring/ProctoringFactory.cs +++ b/SafeExamBrowser.Proctoring/ProctoringFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/Properties/AssemblyInfo.cs b/SafeExamBrowser.Proctoring/Properties/AssemblyInfo.cs index f5a9664..e6ebe0d 100644 --- a/SafeExamBrowser.Proctoring/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Proctoring/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Proctoring")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Proctoring/SafeExamBrowser.Proctoring.csproj b/SafeExamBrowser.Proctoring/SafeExamBrowser.Proctoring.csproj index 4dcabf2..ece65c1 100644 --- a/SafeExamBrowser.Proctoring/SafeExamBrowser.Proctoring.csproj +++ b/SafeExamBrowser.Proctoring/SafeExamBrowser.Proctoring.csproj @@ -53,14 +53,17 @@ MinimumRecommendedRules.ruleset - - ..\packages\KGySoft.CoreLibraries.8.1.0\lib\net472\KGySoft.CoreLibraries.dll + + ..\packages\BouncyCastle.Cryptography.2.5.0\lib\net461\BouncyCastle.Cryptography.dll - - ..\packages\KGySoft.Drawing.8.1.0\lib\net46\KGySoft.Drawing.dll + + ..\packages\KGySoft.CoreLibraries.9.0.0\lib\net472\KGySoft.CoreLibraries.dll - - ..\packages\KGySoft.Drawing.Core.8.1.0\lib\net46\KGySoft.Drawing.Core.dll + + ..\packages\KGySoft.Drawing.9.0.0\lib\net46\KGySoft.Drawing.dll + + + ..\packages\KGySoft.Drawing.Core.9.0.0\lib\net46\KGySoft.Drawing.Core.dll ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll @@ -88,6 +91,7 @@ + @@ -107,6 +111,7 @@ + @@ -166,6 +171,7 @@ + diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Buffer.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Buffer.cs index 030331e..45472ab 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Buffer.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Buffer.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -47,6 +47,15 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring } } + internal void Clear() + { + lock (@lock) + { + list.Clear(); + logger.Debug("Cleared all data."); + } + } + internal void Dequeue() { lock (@lock) diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Cache.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Cache.cs index bc2aa07..6d80def 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Cache.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Cache.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -23,19 +23,27 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring { internal class Cache { - private const string DATA_FILE_EXTENSION = "xml"; + private const string DATA_FILE_EXTENSION = "spsdat"; + private const string IMAGE_FILE_EXTENSION = "spsimg"; private readonly AppConfig appConfig; + private readonly Lazy directory; + private readonly Encryptor encryptor; private readonly ILogger logger; + private readonly ScreenProctoringSettings settings; private readonly ConcurrentQueue<(string fileName, int checksum, string hash)> queue; internal int Count => queue.Count; - internal string Directory { get; private set; } + internal string Directory => directory.Value; + internal long Size { get; private set; } - public Cache(AppConfig appConfig, ILogger logger) + public Cache(AppConfig appConfig, ILogger logger, ScreenProctoringSettings settings) { this.appConfig = appConfig; + this.directory = new Lazy(InitializeDirectory); + this.encryptor = new Encryptor(settings); this.logger = logger; + this.settings = settings; this.queue = new ConcurrentQueue<(string, int, string)>(); } @@ -44,6 +52,24 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring return queue.Any(); } + internal void Clear() + { + while (queue.Any()) + { + if (queue.TryDequeue(out var item)) + { + var (dataPath, imagePath) = BuildPathsFor(item.fileName); + + File.Delete(dataPath); + File.Delete(imagePath); + } + } + + Size = 0; + + logger.Debug("Cleared all data."); + } + internal bool TryEnqueue(MetaData metaData, ScreenShot screenShot) { var fileName = $"{screenShot.CaptureTime:yyyy-MM-dd HH\\hmm\\mss\\sfff\\m\\s}"; @@ -51,14 +77,22 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring try { - InitializeDirectory(); - SaveData(fileName, metaData, screenShot); - SaveImage(fileName, screenShot); - Enqueue(fileName, metaData, screenShot); + var (dataPath, imagePath) = BuildPathsFor(fileName); + + if (Size <= settings.CacheSize * 1000000) + { + SaveData(dataPath, metaData, screenShot); + SaveImage(imagePath, screenShot); + Enqueue(fileName, metaData, screenShot); + + logger.Debug($"Cached data for '{fileName}', now holding {Count} item(s) counting {Size / 1000000.0:N1} MB."); + } + else + { + logger.Debug($"The maximum cache size of {settings.CacheSize:N1} MB has been reached, dropping data for '{fileName}'!"); + } success = true; - - logger.Debug($"Cached data for '{fileName}', now holding {Count} item(s)."); } catch (Exception e) { @@ -79,13 +113,15 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring { try { - LoadData(item.fileName, out metaData, out screenShot); - LoadImage(item.fileName, screenShot); - Dequeue(item.fileName, item.checksum, item.hash, metaData, screenShot); + var (dataPath, imagePath) = BuildPathsFor(item.fileName); + + LoadData(dataPath, out metaData, out screenShot); + LoadImage(imagePath, screenShot); + Dequeue(item.checksum, dataPath, item.fileName, item.hash, imagePath, metaData, screenShot); success = true; - logger.Debug($"Removed data for '{item.fileName}', {Count} item(s) remaining."); + logger.Debug($"Removed data for '{item.fileName}', {Count} item(s) counting {Size / 1000000.0:N1} MB remaining."); } catch (Exception e) { @@ -96,12 +132,16 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring return success; } - private void Dequeue(string fileName, int checksum, string hash, MetaData metaData, ScreenShot screenShot) + private (string dataPath, string imagePath) BuildPathsFor(string fileName) { var dataPath = Path.Combine(Directory, $"{fileName}.{DATA_FILE_EXTENSION}"); - var extension = screenShot.Format.ToString().ToLower(); - var imagePath = Path.Combine(Directory, $"{fileName}.{extension}"); + var imagePath = Path.Combine(Directory, $"{fileName}.{IMAGE_FILE_EXTENSION}"); + return (dataPath, imagePath); + } + + private void Dequeue(int checksum, string dataPath, string fileName, string hash, string imagePath, MetaData metaData, ScreenShot screenShot) + { if (checksum != GenerateChecksum(screenShot)) { logger.Warn($"The checksum for '{fileName}' does not match, the image data may be manipulated!"); @@ -157,24 +197,25 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring return hash; } - private void InitializeDirectory() + private string InitializeDirectory() { - if (Directory == default) + var path = Path.Combine(appConfig.TemporaryDirectory, nameof(ScreenProctoring)); + + if (!System.IO.Directory.Exists(path)) { - Directory = Path.Combine(appConfig.TemporaryDirectory, nameof(ScreenProctoring)); + System.IO.Directory.CreateDirectory(path); + logger.Debug($"Created caching directory '{path}'."); } - if (!System.IO.Directory.Exists(Directory)) - { - System.IO.Directory.CreateDirectory(Directory); - logger.Debug($"Created caching directory '{Directory}'."); - } + return path; } - private void LoadData(string fileName, out MetaData metaData, out ScreenShot screenShot) + private void LoadData(string filePath, out MetaData metaData, out ScreenShot screenShot) { - var dataPath = Path.Combine(Directory, $"{fileName}.{DATA_FILE_EXTENSION}"); - var document = XDocument.Load(dataPath); + var encrypted = File.ReadAllBytes(filePath); + var data = encryptor.Decrypt(encrypted); + var text = Encoding.UTF8.GetString(data); + var document = XDocument.Parse(text); var xml = document.Descendants(nameof(MetaData)).First(); metaData = new MetaData(); @@ -193,22 +234,24 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring screenShot.Format = (ImageFormat) Enum.Parse(typeof(ImageFormat), xml.Descendants(nameof(ScreenShot.Format)).First().Value); screenShot.Height = int.Parse(xml.Descendants(nameof(ScreenShot.Height)).First().Value); screenShot.Width = int.Parse(xml.Descendants(nameof(ScreenShot.Width)).First().Value); + + Size -= encrypted.Length; } - private void LoadImage(string fileName, ScreenShot screenShot) + private void LoadImage(string filePath, ScreenShot screenShot) { - var extension = screenShot.Format.ToString().ToLower(); - var imagePath = Path.Combine(Directory, $"{fileName}.{extension}"); + var encrypted = File.ReadAllBytes(filePath); + var image = encryptor.Decrypt(encrypted); - screenShot.Data = File.ReadAllBytes(imagePath); + screenShot.Data = image; + Size -= encrypted.Length; } - private void SaveData(string fileName, MetaData metaData, ScreenShot screenShot) + private void SaveData(string filePath, MetaData metaData, ScreenShot screenShot) { - var data = new XDocument(new XDeclaration("1.0", "utf-8", "yes")); - var dataPath = Path.Combine(Directory, $"{fileName}.{DATA_FILE_EXTENSION}"); + var xml = new XDocument(new XDeclaration("1.0", "utf-8", "yes")); - data.Add( + xml.Add( new XElement("Data", new XElement(nameof(MetaData), new XElement(nameof(MetaData.ApplicationInfo), metaData.ApplicationInfo), @@ -227,15 +270,25 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring ) ); - data.Save(dataPath); + using (var stream = new MemoryStream()) + using (var writer = new StreamWriter(stream, new UTF8Encoding(false))) + { + xml.Save(writer); + + var data = stream.ToArray(); + var encrypted = encryptor.Encrypt(data); + + File.WriteAllBytes(filePath, encrypted); + Size += encrypted.Length; + } } - private void SaveImage(string fileName, ScreenShot screenShot) + private void SaveImage(string filePath, ScreenShot screenShot) { - var extension = screenShot.Format.ToString().ToLower(); - var imagePath = Path.Combine(Directory, $"{fileName}.{extension}"); + var encrypted = encryptor.Encrypt(screenShot.Data); - File.WriteAllBytes(imagePath, screenShot.Data); + File.WriteAllBytes(filePath, encrypted); + Size += encrypted.Length; } } } diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Data/IntervalTrigger.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Data/IntervalTrigger.cs index 68a28e9..ba774e0 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Data/IntervalTrigger.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Data/IntervalTrigger.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Data/KeyboardTrigger.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Data/KeyboardTrigger.cs index bf2f14c..f402620 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Data/KeyboardTrigger.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Data/KeyboardTrigger.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Data/MetaDataAggregator.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Data/MetaDataAggregator.cs index c928f10..8561cae 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Data/MetaDataAggregator.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Data/MetaDataAggregator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Data/Metadata.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Data/Metadata.cs index 9df624d..44494c1 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Data/Metadata.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Data/Metadata.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Data/MouseTrigger.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Data/MouseTrigger.cs index ec6055a..3478994 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Data/MouseTrigger.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Data/MouseTrigger.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/DataCollector.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/DataCollector.cs index f71eb22..dd7f062 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/DataCollector.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/DataCollector.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -66,8 +66,8 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring mouseHookId = nativeMethods.RegisterMouseHook(MouseHookCallback); timer.AutoReset = false; - timer.Elapsed += MaxIntervalElapsed; - timer.Interval = settings.MaxInterval; + timer.Elapsed += IntervalMaximumElapsed; + timer.Interval = settings.IntervalMaximum; timer.Start(); logger.Debug("Started."); @@ -90,7 +90,7 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring keyboardHookId = default; mouseHookId = default; - timer.Elapsed -= MaxIntervalElapsed; + timer.Elapsed -= IntervalMaximumElapsed; timer.Stop(); logger.Debug("Stopped."); @@ -110,11 +110,11 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring return false; } - private void MaxIntervalElapsed(object sender, ElapsedEventArgs args) + private void IntervalMaximumElapsed(object sender, ElapsedEventArgs args) { var trigger = new IntervalTrigger { - ConfigurationValue = settings.MaxInterval, + ConfigurationValue = settings.IntervalMaximum, }; TryCollect(interval: trigger); @@ -136,7 +136,7 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring private void TryCollect(IntervalTrigger interval = default, KeyboardTrigger keyboard = default, MouseTrigger mouse = default) { - if (MinIntervalElapsed() && Monitor.TryEnter(@lock)) + if (HasIntervalMinimumElapsed() && Monitor.TryEnter(@lock)) { var elapsed = DateTime.Now.Subtract(last); @@ -169,9 +169,9 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring } } - private bool MinIntervalElapsed() + private bool HasIntervalMinimumElapsed() { - return DateTime.Now.Subtract(last) >= new TimeSpan(0, 0, 0, 0, settings.MinInterval); + return DateTime.Now.Subtract(last) >= new TimeSpan(0, 0, 0, 0, settings.IntervalMinimum); } } } diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Events/DataCollectedEventHandler.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Events/DataCollectedEventHandler.cs index dcd9a7f..aa3389d 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Events/DataCollectedEventHandler.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Events/DataCollectedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Imaging/Extensions.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Imaging/Extensions.cs index 5026324..d59d682 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Imaging/Extensions.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Imaging/Extensions.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Imaging/ProcessingOrder.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Imaging/ProcessingOrder.cs index 2f0c4ab..fdbcd50 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Imaging/ProcessingOrder.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Imaging/ProcessingOrder.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Imaging/ScreenShot.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Imaging/ScreenShot.cs index 6504d8e..b4a5aa7 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Imaging/ScreenShot.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Imaging/ScreenShot.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Imaging/ScreenShotProcessor.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Imaging/ScreenShotProcessor.cs index 1253edf..3893126 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Imaging/ScreenShotProcessor.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Imaging/ScreenShotProcessor.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/ScreenProctoringImplementation.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/ScreenProctoringImplementation.cs index abf4975..20e44c0 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/ScreenProctoringImplementation.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/ScreenProctoringImplementation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -47,7 +47,7 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring this.logger = logger; this.service = service; this.settings = settings.ScreenProctoring; - this.spooler = new TransmissionSpooler(appConfig, logger.CloneFor(nameof(TransmissionSpooler)), service); + this.spooler = new TransmissionSpooler(appConfig, logger.CloneFor(nameof(TransmissionSpooler)), service, settings.ScreenProctoring); this.text = text; } @@ -112,6 +112,7 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring { settings.ClientId = instruction.ClientId; settings.ClientSecret = instruction.ClientSecret; + settings.EncryptionSecret = instruction.EncryptionSecret; settings.GroupId = instruction.GroupId; settings.ServiceUrl = instruction.ServiceUrl; diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Api.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Api.cs index 0eb6bcd..03e5e15 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Api.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Api.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -19,10 +19,10 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring.Service internal Api() { - AccessTokenEndpoint = "/oauth/token"; - HealthEndpoint = "/health"; - ScreenShotEndpoint = $"/seb-api/v1/session/{SESSION_ID}/screenshot"; - SessionEndpoint = "/seb-api/v1/session"; + AccessTokenEndpoint = "oauth/token"; + HealthEndpoint = "health"; + ScreenShotEndpoint = $"seb-api/v1/session/{SESSION_ID}/screenshot"; + SessionEndpoint = "seb-api/v1/session"; } } } diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Parser.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Parser.cs index d2efb11..53d19ad 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Parser.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Parser.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/ContentType.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/ContentType.cs index d9a3652..5bd4906 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/ContentType.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/ContentType.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/CreateSessionRequest.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/CreateSessionRequest.cs index 19a3405..71867e0 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/CreateSessionRequest.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/CreateSessionRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/Extensions.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/Extensions.cs index 6a12b52..acf2334 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/Extensions.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/Extensions.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/Header.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/Header.cs index 0c3f430..5d94d46 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/Header.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/Header.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/HealthRequest.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/HealthRequest.cs index 14dee99..74827cc 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/HealthRequest.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/HealthRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/OAuth2TokenRequest.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/OAuth2TokenRequest.cs index 9aed6e9..28dc7d7 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/OAuth2TokenRequest.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/OAuth2TokenRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/Request.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/Request.cs index 4389c07..4a0f8a6 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/Request.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/Request.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/ScreenShotRequest.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/ScreenShotRequest.cs index bca0e58..0fbbc4d 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/ScreenShotRequest.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/ScreenShotRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/TerminateSessionRequest.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/TerminateSessionRequest.cs index 0f63d41..3818c49 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/TerminateSessionRequest.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/Requests/TerminateSessionRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/ServiceProxy.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/ServiceProxy.cs index c507e9a..eb68ffa 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/ServiceProxy.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/ServiceProxy.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -20,6 +20,7 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring.Service private readonly Api api; private readonly ILogger logger; private readonly Parser parser; + private readonly Sanitizer sanitizer; private HttpClient httpClient; @@ -31,16 +32,19 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring.Service this.api = new Api(); this.logger = logger; this.parser = new Parser(logger); + this.sanitizer = new Sanitizer(); } internal ServiceResponse Connect(string clientId, string clientSecret, string serviceUrl) { httpClient = new HttpClient { - BaseAddress = new Uri(serviceUrl), + BaseAddress = sanitizer.Sanitize(serviceUrl), Timeout = TimeSpan.FromSeconds(10) }; + sanitizer.Sanitize(api); + var request = new OAuth2TokenRequest(api, httpClient, logger, parser); var success = request.TryExecute(clientId, clientSecret, out var message); diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/ServiceResponse.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/ServiceResponse.cs index a127b16..08e524b 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/Service/ServiceResponse.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/Service/ServiceResponse.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/TransmissionSpooler.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/TransmissionSpooler.cs index 7b28118..2fea726 100644 --- a/SafeExamBrowser.Proctoring/ScreenProctoring/TransmissionSpooler.cs +++ b/SafeExamBrowser.Proctoring/ScreenProctoring/TransmissionSpooler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -16,6 +16,7 @@ using SafeExamBrowser.Proctoring.Contracts.Events; using SafeExamBrowser.Proctoring.ScreenProctoring.Data; using SafeExamBrowser.Proctoring.ScreenProctoring.Imaging; using SafeExamBrowser.Proctoring.ScreenProctoring.Service; +using SafeExamBrowser.Settings.Proctoring; using Timer = System.Timers.Timer; namespace SafeExamBrowser.Proctoring.ScreenProctoring @@ -40,10 +41,10 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring private Thread thread; private CancellationTokenSource token; - internal TransmissionSpooler(AppConfig appConfig, IModuleLogger logger, ServiceProxy service) + internal TransmissionSpooler(AppConfig appConfig, IModuleLogger logger, ServiceProxy service, ScreenProctoringSettings settings) { this.buffer = new Buffer(logger.CloneFor(nameof(Buffer))); - this.cache = new Cache(appConfig, logger.CloneFor(nameof(Cache))); + this.cache = new Cache(appConfig, logger.CloneFor(nameof(Cache)), settings); this.logger = logger; this.queue = new ConcurrentQueue<(MetaData, ScreenShot)>(); this.random = new Random(); @@ -56,13 +57,14 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring queue.Enqueue((metaData, screenShot)); } - internal void ExecuteRemainingWork(Action updateStatus) + internal void ExecuteRemainingWork(Action handler) { var previous = buffer.Count + cache.Count; var progress = 0; + var start = DateTime.Now; var total = previous; - while (HasRemainingWork() && service.IsConnected && (!networkIssue || recovering || DateTime.Now < resume)) + while (HasRemainingWork() && service.IsConnected) { var remaining = buffer.Count + cache.Count; @@ -78,26 +80,19 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring previous = remaining; progress = total - remaining; - updateStatus(new RemainingWorkUpdatedEventArgs + var args = UpdateStatus(handler, progress, start, total); + + if (args.CancellationRequested) { - IsWaiting = recovering || networkIssue, - Next = buffer.TryPeek(out _, out var schedule, out _) ? schedule : default(DateTime?), - Progress = progress, - Resume = resume, - Total = total - }); + logger.Warn($"The execution of the remaining work has been cancelled and {remaining} item(s) will not be transmitted!"); + + break; + } Thread.Sleep(100); } - if (networkIssue) - { - updateStatus(new RemainingWorkUpdatedEventArgs { HasFailed = true, CachePath = cache.Directory }); - } - else - { - updateStatus(new RemainingWorkUpdatedEventArgs { IsFinished = true }); - } + UpdateStatus(handler); } internal bool HasRemainingWork() @@ -163,6 +158,9 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring thread = default; token = default; } + + buffer.Clear(); + cache.Clear(); } private void Execute() @@ -417,5 +415,34 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring return current; } + + private RemainingWorkUpdatedEventArgs UpdateStatus(Action handler, int progress, DateTime start, int total) + { + var args = new RemainingWorkUpdatedEventArgs + { + AllowCancellation = start.Add(new TimeSpan(0, 1, 15)) < DateTime.Now, + IsWaiting = health == BAD || networkIssue || recovering || DateTime.Now < resume, + Next = buffer.TryPeek(out _, out var schedule, out _) ? schedule : default(DateTime?), + Progress = progress, + Resume = DateTime.Now < resume ? resume : default(DateTime?), + Total = total + }; + + handler.Invoke(args); + + return args; + } + + private void UpdateStatus(Action handler) + { + if (HasRemainingWork()) + { + handler.Invoke(new RemainingWorkUpdatedEventArgs { HasFailed = true, CachePath = cache.Directory }); + } + else + { + handler.Invoke(new RemainingWorkUpdatedEventArgs { IsFinished = true }); + } + } } } diff --git a/SafeExamBrowser.Proctoring/packages.config b/SafeExamBrowser.Proctoring/packages.config index 30f406d..fe468df 100644 --- a/SafeExamBrowser.Proctoring/packages.config +++ b/SafeExamBrowser.Proctoring/packages.config @@ -1,7 +1,8 @@  - - - + + + + \ No newline at end of file diff --git a/SafeExamBrowser.ResetUtility/CompositionRoot.cs b/SafeExamBrowser.ResetUtility/CompositionRoot.cs index c5799cb..0a1eb77 100644 --- a/SafeExamBrowser.ResetUtility/CompositionRoot.cs +++ b/SafeExamBrowser.ResetUtility/CompositionRoot.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.ResetUtility/NativeMethods.cs b/SafeExamBrowser.ResetUtility/NativeMethods.cs index 1d51d71..bae4ae0 100644 --- a/SafeExamBrowser.ResetUtility/NativeMethods.cs +++ b/SafeExamBrowser.ResetUtility/NativeMethods.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.ResetUtility/Procedure/Initialization.cs b/SafeExamBrowser.ResetUtility/Procedure/Initialization.cs index 09b22e9..5278744 100644 --- a/SafeExamBrowser.ResetUtility/Procedure/Initialization.cs +++ b/SafeExamBrowser.ResetUtility/Procedure/Initialization.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.ResetUtility/Procedure/Log.cs b/SafeExamBrowser.ResetUtility/Procedure/Log.cs index 9f09fbe..8183890 100644 --- a/SafeExamBrowser.ResetUtility/Procedure/Log.cs +++ b/SafeExamBrowser.ResetUtility/Procedure/Log.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.ResetUtility/Procedure/MainMenu.cs b/SafeExamBrowser.ResetUtility/Procedure/MainMenu.cs index c275e99..846e643 100644 --- a/SafeExamBrowser.ResetUtility/Procedure/MainMenu.cs +++ b/SafeExamBrowser.ResetUtility/Procedure/MainMenu.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.ResetUtility/Procedure/MainMenuOption.cs b/SafeExamBrowser.ResetUtility/Procedure/MainMenuOption.cs index ebe9c94..d736318 100644 --- a/SafeExamBrowser.ResetUtility/Procedure/MainMenuOption.cs +++ b/SafeExamBrowser.ResetUtility/Procedure/MainMenuOption.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.ResetUtility/Procedure/MenuOption.cs b/SafeExamBrowser.ResetUtility/Procedure/MenuOption.cs index 546ecb2..316b798 100644 --- a/SafeExamBrowser.ResetUtility/Procedure/MenuOption.cs +++ b/SafeExamBrowser.ResetUtility/Procedure/MenuOption.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.ResetUtility/Procedure/ProcedureContext.cs b/SafeExamBrowser.ResetUtility/Procedure/ProcedureContext.cs index 1cc6b52..bbd35cb 100644 --- a/SafeExamBrowser.ResetUtility/Procedure/ProcedureContext.cs +++ b/SafeExamBrowser.ResetUtility/Procedure/ProcedureContext.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.ResetUtility/Procedure/ProcedureStep.cs b/SafeExamBrowser.ResetUtility/Procedure/ProcedureStep.cs index 7868968..0ccbba0 100644 --- a/SafeExamBrowser.ResetUtility/Procedure/ProcedureStep.cs +++ b/SafeExamBrowser.ResetUtility/Procedure/ProcedureStep.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.ResetUtility/Procedure/ProcedureStepResult.cs b/SafeExamBrowser.ResetUtility/Procedure/ProcedureStepResult.cs index b9fe773..80960ee 100644 --- a/SafeExamBrowser.ResetUtility/Procedure/ProcedureStepResult.cs +++ b/SafeExamBrowser.ResetUtility/Procedure/ProcedureStepResult.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.ResetUtility/Procedure/Reset.cs b/SafeExamBrowser.ResetUtility/Procedure/Reset.cs index 1ea73d1..527feb0 100644 --- a/SafeExamBrowser.ResetUtility/Procedure/Reset.cs +++ b/SafeExamBrowser.ResetUtility/Procedure/Reset.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.ResetUtility/Procedure/Restore.cs b/SafeExamBrowser.ResetUtility/Procedure/Restore.cs index 8362d50..4f439a7 100644 --- a/SafeExamBrowser.ResetUtility/Procedure/Restore.cs +++ b/SafeExamBrowser.ResetUtility/Procedure/Restore.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.ResetUtility/Procedure/Version.cs b/SafeExamBrowser.ResetUtility/Procedure/Version.cs index 1db165a..3030115 100644 --- a/SafeExamBrowser.ResetUtility/Procedure/Version.cs +++ b/SafeExamBrowser.ResetUtility/Procedure/Version.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.ResetUtility/Program.cs b/SafeExamBrowser.ResetUtility/Program.cs index 3a48fa5..bd9c987 100644 --- a/SafeExamBrowser.ResetUtility/Program.cs +++ b/SafeExamBrowser.ResetUtility/Program.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.ResetUtility/Properties/AssemblyInfo.cs b/SafeExamBrowser.ResetUtility/Properties/AssemblyInfo.cs index b14ee8c..e40b5d5 100644 --- a/SafeExamBrowser.ResetUtility/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.ResetUtility/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.ResetUtility")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Runtime.UnitTests/Communication/RuntimeHostTests.cs b/SafeExamBrowser.Runtime.UnitTests/Communication/RuntimeHostTests.cs index 05221b0..c9c2e71 100644 --- a/SafeExamBrowser.Runtime.UnitTests/Communication/RuntimeHostTests.cs +++ b/SafeExamBrowser.Runtime.UnitTests/Communication/RuntimeHostTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime.UnitTests/Operations/ClientOperationTests.cs b/SafeExamBrowser.Runtime.UnitTests/Operations/ClientOperationTests.cs index 7d9d1e7..e2bda0c 100644 --- a/SafeExamBrowser.Runtime.UnitTests/Operations/ClientOperationTests.cs +++ b/SafeExamBrowser.Runtime.UnitTests/Operations/ClientOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime.UnitTests/Operations/ClientTerminationOperationTests.cs b/SafeExamBrowser.Runtime.UnitTests/Operations/ClientTerminationOperationTests.cs index 53fdc66..dca828d 100644 --- a/SafeExamBrowser.Runtime.UnitTests/Operations/ClientTerminationOperationTests.cs +++ b/SafeExamBrowser.Runtime.UnitTests/Operations/ClientTerminationOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime.UnitTests/Operations/ConfigurationOperationTests.cs b/SafeExamBrowser.Runtime.UnitTests/Operations/ConfigurationOperationTests.cs index c6e50c3..55d51a1 100644 --- a/SafeExamBrowser.Runtime.UnitTests/Operations/ConfigurationOperationTests.cs +++ b/SafeExamBrowser.Runtime.UnitTests/Operations/ConfigurationOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime.UnitTests/Operations/DisclaimerOperationTests.cs b/SafeExamBrowser.Runtime.UnitTests/Operations/DisclaimerOperationTests.cs index 008e508..605ed00 100644 --- a/SafeExamBrowser.Runtime.UnitTests/Operations/DisclaimerOperationTests.cs +++ b/SafeExamBrowser.Runtime.UnitTests/Operations/DisclaimerOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime.UnitTests/Operations/DisplayMonitorOperationTests.cs b/SafeExamBrowser.Runtime.UnitTests/Operations/DisplayMonitorOperationTests.cs index 357f599..07e1ff3 100644 --- a/SafeExamBrowser.Runtime.UnitTests/Operations/DisplayMonitorOperationTests.cs +++ b/SafeExamBrowser.Runtime.UnitTests/Operations/DisplayMonitorOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime.UnitTests/Operations/KioskModeOperationTests.cs b/SafeExamBrowser.Runtime.UnitTests/Operations/KioskModeOperationTests.cs index e7e71b5..2c8275c 100644 --- a/SafeExamBrowser.Runtime.UnitTests/Operations/KioskModeOperationTests.cs +++ b/SafeExamBrowser.Runtime.UnitTests/Operations/KioskModeOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime.UnitTests/Operations/RemoteSessionOperationTests.cs b/SafeExamBrowser.Runtime.UnitTests/Operations/RemoteSessionOperationTests.cs index 3199279..5d64ca2 100644 --- a/SafeExamBrowser.Runtime.UnitTests/Operations/RemoteSessionOperationTests.cs +++ b/SafeExamBrowser.Runtime.UnitTests/Operations/RemoteSessionOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime.UnitTests/Operations/ServerOperationTests.cs b/SafeExamBrowser.Runtime.UnitTests/Operations/ServerOperationTests.cs index bbb431f..3ffe059 100644 --- a/SafeExamBrowser.Runtime.UnitTests/Operations/ServerOperationTests.cs +++ b/SafeExamBrowser.Runtime.UnitTests/Operations/ServerOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime.UnitTests/Operations/ServiceOperationTests.cs b/SafeExamBrowser.Runtime.UnitTests/Operations/ServiceOperationTests.cs index f24b664..bea2388 100644 --- a/SafeExamBrowser.Runtime.UnitTests/Operations/ServiceOperationTests.cs +++ b/SafeExamBrowser.Runtime.UnitTests/Operations/ServiceOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime.UnitTests/Operations/SessionActivationOperationTests.cs b/SafeExamBrowser.Runtime.UnitTests/Operations/SessionActivationOperationTests.cs index dd5ff17..871d07a 100644 --- a/SafeExamBrowser.Runtime.UnitTests/Operations/SessionActivationOperationTests.cs +++ b/SafeExamBrowser.Runtime.UnitTests/Operations/SessionActivationOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime.UnitTests/Operations/SessionInitializationOperationTests.cs b/SafeExamBrowser.Runtime.UnitTests/Operations/SessionInitializationOperationTests.cs index db72bc4..fd14e5e 100644 --- a/SafeExamBrowser.Runtime.UnitTests/Operations/SessionInitializationOperationTests.cs +++ b/SafeExamBrowser.Runtime.UnitTests/Operations/SessionInitializationOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime.UnitTests/Operations/VirtualMachineOperationTests.cs b/SafeExamBrowser.Runtime.UnitTests/Operations/VirtualMachineOperationTests.cs index 236dfe4..fcd80a1 100644 --- a/SafeExamBrowser.Runtime.UnitTests/Operations/VirtualMachineOperationTests.cs +++ b/SafeExamBrowser.Runtime.UnitTests/Operations/VirtualMachineOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime.UnitTests/Properties/AssemblyInfo.cs b/SafeExamBrowser.Runtime.UnitTests/Properties/AssemblyInfo.cs index 27fef77..5201b2b 100644 --- a/SafeExamBrowser.Runtime.UnitTests/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Runtime.UnitTests/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Runtime.UnitTests")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] [assembly: ComVisible(false)] diff --git a/SafeExamBrowser.Runtime.UnitTests/RuntimeControllerTests.cs b/SafeExamBrowser.Runtime.UnitTests/RuntimeControllerTests.cs index 200e191..fa926e4 100644 --- a/SafeExamBrowser.Runtime.UnitTests/RuntimeControllerTests.cs +++ b/SafeExamBrowser.Runtime.UnitTests/RuntimeControllerTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime.UnitTests/SafeExamBrowser.Runtime.UnitTests.csproj b/SafeExamBrowser.Runtime.UnitTests/SafeExamBrowser.Runtime.UnitTests.csproj index a416f73..22e08f0 100644 --- a/SafeExamBrowser.Runtime.UnitTests/SafeExamBrowser.Runtime.UnitTests.csproj +++ b/SafeExamBrowser.Runtime.UnitTests/SafeExamBrowser.Runtime.UnitTests.csproj @@ -1,8 +1,9 @@  - - - + + + + Debug AnyCPU @@ -66,73 +67,73 @@ ..\packages\Microsoft.ApplicationInsights.2.22.0\lib\net46\Microsoft.ApplicationInsights.dll - - ..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll + + ..\packages\Microsoft.Testing.Platform.MSBuild.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.MSBuild.dll - - ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll + + ..\packages\Microsoft.Testing.Extensions.Telemetry.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll - - ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll + + ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll + + ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.MSBuild.dll + + ..\packages\Microsoft.Testing.Platform.1.5.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - ..\packages\Moq.4.20.70\lib\net462\Moq.dll + + ..\packages\Moq.4.20.72\lib\net462\Moq.dll - - ..\packages\NuGet.Frameworks.6.9.1\lib\net472\NuGet.Frameworks.dll + + ..\packages\NuGet.Frameworks.6.12.1\lib\net472\NuGet.Frameworks.dll - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + ..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll - - ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll + + ..\packages\System.Collections.Immutable.9.0.1\lib\net462\System.Collections.Immutable.dll - - ..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll + + ..\packages\System.Diagnostics.DiagnosticSource.9.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll - - ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + ..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + ..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll - - ..\packages\System.Reflection.Metadata.8.0.0\lib\net462\System.Reflection.Metadata.dll + + ..\packages\System.Reflection.Metadata.9.0.1\lib\net462\System.Reflection.Metadata.dll - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + ..\packages\System.Threading.Tasks.Extensions.4.6.0\lib\net462\System.Threading.Tasks.Extensions.dll ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll @@ -225,18 +226,26 @@ Always + + + + + + + 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.Runtime.UnitTests/app.config b/SafeExamBrowser.Runtime.UnitTests/app.config index 231e026..95a6e9e 100644 --- a/SafeExamBrowser.Runtime.UnitTests/app.config +++ b/SafeExamBrowser.Runtime.UnitTests/app.config @@ -4,7 +4,7 @@ - + @@ -12,7 +12,7 @@ - + @@ -28,7 +28,7 @@ - + @@ -36,15 +36,19 @@ - + - + - + + + + + diff --git a/SafeExamBrowser.Runtime.UnitTests/packages.config b/SafeExamBrowser.Runtime.UnitTests/packages.config index 397a147..cfe5cf0 100644 --- a/SafeExamBrowser.Runtime.UnitTests/packages.config +++ b/SafeExamBrowser.Runtime.UnitTests/packages.config @@ -2,23 +2,24 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SafeExamBrowser.Runtime/App.cs b/SafeExamBrowser.Runtime/App.cs index d9b2cd5..ff26953 100644 --- a/SafeExamBrowser.Runtime/App.cs +++ b/SafeExamBrowser.Runtime/App.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Communication/RuntimeHost.cs b/SafeExamBrowser.Runtime/Communication/RuntimeHost.cs index 5d0461a..000a69b 100644 --- a/SafeExamBrowser.Runtime/Communication/RuntimeHost.cs +++ b/SafeExamBrowser.Runtime/Communication/RuntimeHost.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/CompositionRoot.cs b/SafeExamBrowser.Runtime/CompositionRoot.cs index 09788e4..31ab855 100644 --- a/SafeExamBrowser.Runtime/CompositionRoot.cs +++ b/SafeExamBrowser.Runtime/CompositionRoot.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -92,7 +92,7 @@ namespace SafeExamBrowser.Runtime var vmDetector = new VirtualMachineDetector(ModuleLogger(nameof(VirtualMachineDetector)), registry, systemInfo); var bootstrapOperations = new Queue(); - var sessionOperations = new Queue(); + var sessionOperations = new Queue(); bootstrapOperations.Enqueue(new I18nOperation(logger, text)); bootstrapOperations.Enqueue(new CommunicationHostOperation(runtimeHost, logger)); @@ -113,8 +113,8 @@ namespace SafeExamBrowser.Runtime sessionOperations.Enqueue(new ClientOperation(logger, processFactory, proxyFactory, runtimeHost, sessionContext, THIRTY_SECONDS)); sessionOperations.Enqueue(new SessionActivationOperation(logger, sessionContext)); - var bootstrapSequence = new OperationSequence(logger, bootstrapOperations); - var sessionSequence = new RepeatableOperationSequence(logger, sessionOperations); + var bootstrapSequence = new OperationSequence(logger, bootstrapOperations); + var sessionSequence = new RepeatableOperationSequence(logger, sessionOperations); RuntimeController = new RuntimeController( appConfig, diff --git a/SafeExamBrowser.Runtime/Operations/ApplicationIntegrityOperation.cs b/SafeExamBrowser.Runtime/Operations/ApplicationIntegrityOperation.cs index 42133e6..fd75a8b 100644 --- a/SafeExamBrowser.Runtime/Operations/ApplicationIntegrityOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/ApplicationIntegrityOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/ClientOperation.cs b/SafeExamBrowser.Runtime/Operations/ClientOperation.cs index c3e3220..b3ccfb7 100644 --- a/SafeExamBrowser.Runtime/Operations/ClientOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/ClientOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/ClientTerminationOperation.cs b/SafeExamBrowser.Runtime/Operations/ClientTerminationOperation.cs index d56b1e0..c64a029 100644 --- a/SafeExamBrowser.Runtime/Operations/ClientTerminationOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/ClientTerminationOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/ConfigurationBaseOperation.cs b/SafeExamBrowser.Runtime/Operations/ConfigurationBaseOperation.cs index eaa5956..ec7640a 100644 --- a/SafeExamBrowser.Runtime/Operations/ConfigurationBaseOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/ConfigurationBaseOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/ConfigurationOperation.cs b/SafeExamBrowser.Runtime/Operations/ConfigurationOperation.cs index 44c18cd..5ae6a91 100644 --- a/SafeExamBrowser.Runtime/Operations/ConfigurationOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/ConfigurationOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/DisclaimerOperation.cs b/SafeExamBrowser.Runtime/Operations/DisclaimerOperation.cs index 8b5e7b4..0dd607f 100644 --- a/SafeExamBrowser.Runtime/Operations/DisclaimerOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/DisclaimerOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/DisplayMonitorOperation.cs b/SafeExamBrowser.Runtime/Operations/DisplayMonitorOperation.cs index f2d5d45..3bf9b43 100644 --- a/SafeExamBrowser.Runtime/Operations/DisplayMonitorOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/DisplayMonitorOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/Events/ClientConfigurationErrorMessageArgs.cs b/SafeExamBrowser.Runtime/Operations/Events/ClientConfigurationErrorMessageArgs.cs index 0aa93cc..a8752b7 100644 --- a/SafeExamBrowser.Runtime/Operations/Events/ClientConfigurationErrorMessageArgs.cs +++ b/SafeExamBrowser.Runtime/Operations/Events/ClientConfigurationErrorMessageArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/Events/ConfigurationCompletedEventArgs.cs b/SafeExamBrowser.Runtime/Operations/Events/ConfigurationCompletedEventArgs.cs index 898e0a1..9072018 100644 --- a/SafeExamBrowser.Runtime/Operations/Events/ConfigurationCompletedEventArgs.cs +++ b/SafeExamBrowser.Runtime/Operations/Events/ConfigurationCompletedEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/Events/ExamSelectionEventArgs.cs b/SafeExamBrowser.Runtime/Operations/Events/ExamSelectionEventArgs.cs index 2562bd9..6c73f74 100644 --- a/SafeExamBrowser.Runtime/Operations/Events/ExamSelectionEventArgs.cs +++ b/SafeExamBrowser.Runtime/Operations/Events/ExamSelectionEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/Events/InvalidDataMessageArgs.cs b/SafeExamBrowser.Runtime/Operations/Events/InvalidDataMessageArgs.cs index 1ff81fc..0317ccc 100644 --- a/SafeExamBrowser.Runtime/Operations/Events/InvalidDataMessageArgs.cs +++ b/SafeExamBrowser.Runtime/Operations/Events/InvalidDataMessageArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/Events/InvalidPasswordMessageArgs.cs b/SafeExamBrowser.Runtime/Operations/Events/InvalidPasswordMessageArgs.cs index 28122a7..7796018 100644 --- a/SafeExamBrowser.Runtime/Operations/Events/InvalidPasswordMessageArgs.cs +++ b/SafeExamBrowser.Runtime/Operations/Events/InvalidPasswordMessageArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/Events/MessageEventArgs.cs b/SafeExamBrowser.Runtime/Operations/Events/MessageEventArgs.cs index f7c432b..b21b77e 100644 --- a/SafeExamBrowser.Runtime/Operations/Events/MessageEventArgs.cs +++ b/SafeExamBrowser.Runtime/Operations/Events/MessageEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/Events/NotSupportedMessageArgs.cs b/SafeExamBrowser.Runtime/Operations/Events/NotSupportedMessageArgs.cs index a763ef9..79910d1 100644 --- a/SafeExamBrowser.Runtime/Operations/Events/NotSupportedMessageArgs.cs +++ b/SafeExamBrowser.Runtime/Operations/Events/NotSupportedMessageArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/Events/PasswordRequiredEventArgs.cs b/SafeExamBrowser.Runtime/Operations/Events/PasswordRequiredEventArgs.cs index 48a63b0..c3d9a3d 100644 --- a/SafeExamBrowser.Runtime/Operations/Events/PasswordRequiredEventArgs.cs +++ b/SafeExamBrowser.Runtime/Operations/Events/PasswordRequiredEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/Events/ServerFailureEventArgs.cs b/SafeExamBrowser.Runtime/Operations/Events/ServerFailureEventArgs.cs index ff7719c..aa8b7b2 100644 --- a/SafeExamBrowser.Runtime/Operations/Events/ServerFailureEventArgs.cs +++ b/SafeExamBrowser.Runtime/Operations/Events/ServerFailureEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/Events/UnexpectedErrorMessageArgs.cs b/SafeExamBrowser.Runtime/Operations/Events/UnexpectedErrorMessageArgs.cs index cd184f7..140e4f5 100644 --- a/SafeExamBrowser.Runtime/Operations/Events/UnexpectedErrorMessageArgs.cs +++ b/SafeExamBrowser.Runtime/Operations/Events/UnexpectedErrorMessageArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/Events/VersionRestrictionMessageArgs.cs b/SafeExamBrowser.Runtime/Operations/Events/VersionRestrictionMessageArgs.cs index a854309..fc0ca82 100644 --- a/SafeExamBrowser.Runtime/Operations/Events/VersionRestrictionMessageArgs.cs +++ b/SafeExamBrowser.Runtime/Operations/Events/VersionRestrictionMessageArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/KioskModeOperation.cs b/SafeExamBrowser.Runtime/Operations/KioskModeOperation.cs index baabc3e..0e396c0 100644 --- a/SafeExamBrowser.Runtime/Operations/KioskModeOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/KioskModeOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -48,7 +48,6 @@ namespace SafeExamBrowser.Runtime.Operations public override OperationResult Perform() { logger.Info($"Initializing kiosk mode '{Context.Next.Settings.Security.KioskMode}'..."); - /* StatusChanged?.Invoke(TextKey.OperationStatus_InitializeKioskMode); activeMode = Context.Next.Settings.Security.KioskMode; @@ -62,7 +61,7 @@ namespace SafeExamBrowser.Runtime.Operations TerminateExplorerShell(); break; } - */ + return OperationResult.Success; } diff --git a/SafeExamBrowser.Runtime/Operations/RemoteSessionOperation.cs b/SafeExamBrowser.Runtime/Operations/RemoteSessionOperation.cs index 10200fa..d978195 100644 --- a/SafeExamBrowser.Runtime/Operations/RemoteSessionOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/RemoteSessionOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -48,22 +48,22 @@ namespace SafeExamBrowser.Runtime.Operations private OperationResult ValidatePolicy() { logger.Info($"Validating remote session policy..."); - StatusChanged?.Invoke(TextKey.OperationStatus_ValidateRemoteSessionPolicy); + //StatusChanged?.Invoke(TextKey.OperationStatus_ValidateRemoteSessionPolicy); - if (Context.Next.Settings.Service.DisableRemoteConnections && detector.IsRemoteSession()) - { - var args = new MessageEventArgs - { - Icon = MessageBoxIcon.Error, - Message = TextKey.MessageBox_RemoteSessionNotAllowed, - Title = TextKey.MessageBox_RemoteSessionNotAllowedTitle - }; + //if (Context.Next.Settings.Service.DisableRemoteConnections && detector.IsRemoteSession()) + //{ + // var args = new MessageEventArgs + // { + // Icon = MessageBoxIcon.Error, + // Message = TextKey.MessageBox_RemoteSessionNotAllowed, + // Title = TextKey.MessageBox_RemoteSessionNotAllowedTitle + // }; - logger.Error("Detected remote session while SEB is not allowed to be run in a remote session! Aborting..."); - ActionRequired?.Invoke(args); + // logger.Error("Detected remote session while SEB is not allowed to be run in a remote session! Aborting..."); + // ActionRequired?.Invoke(args); - return OperationResult.Aborted; - } + // return OperationResult.Aborted; + //} return OperationResult.Success; } diff --git a/SafeExamBrowser.Runtime/Operations/ServerOperation.cs b/SafeExamBrowser.Runtime/Operations/ServerOperation.cs index 1fca830..ccf053a 100644 --- a/SafeExamBrowser.Runtime/Operations/ServerOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/ServerOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/ServiceOperation.cs b/SafeExamBrowser.Runtime/Operations/ServiceOperation.cs index 9b7d132..e67b06f 100644 --- a/SafeExamBrowser.Runtime/Operations/ServiceOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/ServiceOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/SessionActivationOperation.cs b/SafeExamBrowser.Runtime/Operations/SessionActivationOperation.cs index c90e2ef..b7ac05f 100644 --- a/SafeExamBrowser.Runtime/Operations/SessionActivationOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/SessionActivationOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/SessionInitializationOperation.cs b/SafeExamBrowser.Runtime/Operations/SessionInitializationOperation.cs index 438657c..790cb31 100644 --- a/SafeExamBrowser.Runtime/Operations/SessionInitializationOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/SessionInitializationOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/SessionIntegrityOperation.cs b/SafeExamBrowser.Runtime/Operations/SessionIntegrityOperation.cs index acbcf37..12a6d7f 100644 --- a/SafeExamBrowser.Runtime/Operations/SessionIntegrityOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/SessionIntegrityOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/SessionOperation.cs b/SafeExamBrowser.Runtime/Operations/SessionOperation.cs index e4122c3..d0dc270 100644 --- a/SafeExamBrowser.Runtime/Operations/SessionOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/SessionOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/VersionRestrictionOperation.cs b/SafeExamBrowser.Runtime/Operations/VersionRestrictionOperation.cs index 6979204..a79e6fa 100644 --- a/SafeExamBrowser.Runtime/Operations/VersionRestrictionOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/VersionRestrictionOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Operations/VirtualMachineOperation.cs b/SafeExamBrowser.Runtime/Operations/VirtualMachineOperation.cs index 68b5caa..95e7db3 100644 --- a/SafeExamBrowser.Runtime/Operations/VirtualMachineOperation.cs +++ b/SafeExamBrowser.Runtime/Operations/VirtualMachineOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Runtime/Properties/AssemblyInfo.cs b/SafeExamBrowser.Runtime/Properties/AssemblyInfo.cs index fa2462c..c105d7a 100644 --- a/SafeExamBrowser.Runtime/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Runtime/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Windows; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("Safe Exam Browser")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 @@ -48,6 +48,6 @@ using System.Windows; // 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("3.8.0.742")] -[assembly: AssemblyFileVersion("3.8.0.742")] -[assembly: AssemblyInformationalVersion("3.8.0.742")] +[assembly: AssemblyVersion("3.9.0.787")] +[assembly: AssemblyFileVersion("3.9.0.787")] +[assembly: AssemblyInformationalVersion("3.9.0.787")] diff --git a/SafeExamBrowser.Runtime/RuntimeController.cs b/SafeExamBrowser.Runtime/RuntimeController.cs index dd32682..f64ece8 100644 --- a/SafeExamBrowser.Runtime/RuntimeController.cs +++ b/SafeExamBrowser.Runtime/RuntimeController.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -115,6 +115,7 @@ namespace SafeExamBrowser.Runtime logger.Log(string.Empty); logger.Subscribe(runtimeWindow); splashScreen.Hide(); + StartSession(); } else @@ -204,8 +205,13 @@ namespace SafeExamBrowser.Runtime runtimeWindow.ShowProgressBar = false; runtimeWindow.ShowLog = Session.Settings.Security.AllowApplicationLogAccess; - runtimeWindow.TopMost = false; + runtimeWindow.TopMost = Session.Settings.Security.KioskMode != KioskMode.None; runtimeWindow.UpdateStatus(TextKey.RuntimeWindow_ApplicationRunning); + + //if (Session.Settings.Security.KioskMode == KioskMode.DisableExplorerShell) + //{ + // runtimeWindow.Hide(); + //} runtimeWindow.Hide(); } @@ -236,10 +242,11 @@ namespace SafeExamBrowser.Runtime runtimeWindow.UpdateStatus(TextKey.RuntimeWindow_ApplicationRunning); runtimeWindow.TopMost = Session.Settings.Security.KioskMode != KioskMode.None; - if (Session.Settings.Security.KioskMode == KioskMode.DisableExplorerShell) - { - runtimeWindow.Hide(); - } + //if (Session.Settings.Security.KioskMode == KioskMode.DisableExplorerShell) + //{ + // runtimeWindow.Hide(); + //} + runtimeWindow.Hide(); sessionContext.ClientProxy.InformReconfigurationAborted(); } diff --git a/SafeExamBrowser.Runtime/SessionContext.cs b/SafeExamBrowser.Runtime/SessionContext.cs index 4c7f7e9..ef189e2 100644 --- a/SafeExamBrowser.Runtime/SessionContext.cs +++ b/SafeExamBrowser.Runtime/SessionContext.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server.Contracts/Data/ConnectionInfo.cs b/SafeExamBrowser.Server.Contracts/Data/ConnectionInfo.cs index 463879a..dca949f 100644 --- a/SafeExamBrowser.Server.Contracts/Data/ConnectionInfo.cs +++ b/SafeExamBrowser.Server.Contracts/Data/ConnectionInfo.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server.Contracts/Data/Exam.cs b/SafeExamBrowser.Server.Contracts/Data/Exam.cs index aaa0b01..09b2eb0 100644 --- a/SafeExamBrowser.Server.Contracts/Data/Exam.cs +++ b/SafeExamBrowser.Server.Contracts/Data/Exam.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server.Contracts/Data/ServerResponse.cs b/SafeExamBrowser.Server.Contracts/Data/ServerResponse.cs index cef11ac..f567b31 100644 --- a/SafeExamBrowser.Server.Contracts/Data/ServerResponse.cs +++ b/SafeExamBrowser.Server.Contracts/Data/ServerResponse.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server.Contracts/Events/LockScreenRequestedEventHandler.cs b/SafeExamBrowser.Server.Contracts/Events/LockScreenRequestedEventHandler.cs index a9f88f3..ca6ffc9 100644 --- a/SafeExamBrowser.Server.Contracts/Events/LockScreenRequestedEventHandler.cs +++ b/SafeExamBrowser.Server.Contracts/Events/LockScreenRequestedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server.Contracts/Events/Proctoring/InstructionEventArgs.cs b/SafeExamBrowser.Server.Contracts/Events/Proctoring/InstructionEventArgs.cs index 68a7a6b..6782964 100644 --- a/SafeExamBrowser.Server.Contracts/Events/Proctoring/InstructionEventArgs.cs +++ b/SafeExamBrowser.Server.Contracts/Events/Proctoring/InstructionEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server.Contracts/Events/Proctoring/InstructionMethod.cs b/SafeExamBrowser.Server.Contracts/Events/Proctoring/InstructionMethod.cs index b91f0af..acbfaad 100644 --- a/SafeExamBrowser.Server.Contracts/Events/Proctoring/InstructionMethod.cs +++ b/SafeExamBrowser.Server.Contracts/Events/Proctoring/InstructionMethod.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server.Contracts/Events/Proctoring/JitsiMeetInstruction.cs b/SafeExamBrowser.Server.Contracts/Events/Proctoring/JitsiMeetInstruction.cs index 1deb6fd..ea0d60d 100644 --- a/SafeExamBrowser.Server.Contracts/Events/Proctoring/JitsiMeetInstruction.cs +++ b/SafeExamBrowser.Server.Contracts/Events/Proctoring/JitsiMeetInstruction.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server.Contracts/Events/Proctoring/ProctoringConfigurationReceivedEventHandler.cs b/SafeExamBrowser.Server.Contracts/Events/Proctoring/ProctoringConfigurationReceivedEventHandler.cs index 42b4676..61641de 100644 --- a/SafeExamBrowser.Server.Contracts/Events/Proctoring/ProctoringConfigurationReceivedEventHandler.cs +++ b/SafeExamBrowser.Server.Contracts/Events/Proctoring/ProctoringConfigurationReceivedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server.Contracts/Events/Proctoring/ProctoringInstructionReceivedEventHandler.cs b/SafeExamBrowser.Server.Contracts/Events/Proctoring/ProctoringInstructionReceivedEventHandler.cs index 9520590..3eb99f3 100644 --- a/SafeExamBrowser.Server.Contracts/Events/Proctoring/ProctoringInstructionReceivedEventHandler.cs +++ b/SafeExamBrowser.Server.Contracts/Events/Proctoring/ProctoringInstructionReceivedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server.Contracts/Events/Proctoring/ScreenProctoringInstruction.cs b/SafeExamBrowser.Server.Contracts/Events/Proctoring/ScreenProctoringInstruction.cs index c759415..43da1f6 100644 --- a/SafeExamBrowser.Server.Contracts/Events/Proctoring/ScreenProctoringInstruction.cs +++ b/SafeExamBrowser.Server.Contracts/Events/Proctoring/ScreenProctoringInstruction.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -15,6 +15,7 @@ namespace SafeExamBrowser.Server.Contracts.Events.Proctoring { public string ClientId { get; set; } public string ClientSecret { get; set; } + public string EncryptionSecret { get; set; } public string GroupId { get; set; } public string ServiceUrl { get; set; } public string SessionId { get; set; } diff --git a/SafeExamBrowser.Server.Contracts/Events/Proctoring/ZoomInstruction.cs b/SafeExamBrowser.Server.Contracts/Events/Proctoring/ZoomInstruction.cs index 9f7b1e3..ea3d035 100644 --- a/SafeExamBrowser.Server.Contracts/Events/Proctoring/ZoomInstruction.cs +++ b/SafeExamBrowser.Server.Contracts/Events/Proctoring/ZoomInstruction.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server.Contracts/Events/ServerEventHandler.cs b/SafeExamBrowser.Server.Contracts/Events/ServerEventHandler.cs index b7b5a91..3f30fda 100644 --- a/SafeExamBrowser.Server.Contracts/Events/ServerEventHandler.cs +++ b/SafeExamBrowser.Server.Contracts/Events/ServerEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server.Contracts/Events/TerminationRequestedEventHandler.cs b/SafeExamBrowser.Server.Contracts/Events/TerminationRequestedEventHandler.cs index 8cd6aec..3670c12 100644 --- a/SafeExamBrowser.Server.Contracts/Events/TerminationRequestedEventHandler.cs +++ b/SafeExamBrowser.Server.Contracts/Events/TerminationRequestedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server.Contracts/IServerProxy.cs b/SafeExamBrowser.Server.Contracts/IServerProxy.cs index 95a31fd..23d2ab7 100644 --- a/SafeExamBrowser.Server.Contracts/IServerProxy.cs +++ b/SafeExamBrowser.Server.Contracts/IServerProxy.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server.Contracts/Properties/AssemblyInfo.cs b/SafeExamBrowser.Server.Contracts/Properties/AssemblyInfo.cs index a415928..9fe7721 100644 --- a/SafeExamBrowser.Server.Contracts/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Server.Contracts/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Server.Contracts")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Server/Data/ApiVersion1.cs b/SafeExamBrowser.Server/Data/ApiVersion1.cs deleted file mode 100644 index 25d2ab7..0000000 --- a/SafeExamBrowser.Server/Data/ApiVersion1.cs +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2024 ETH Zürich, IT Services - * - * 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.Server.Data -{ - internal class ApiVersion1 - { - public string AccessTokenEndpoint { get; set; } - public string HandshakeEndpoint { get; set; } - public string ConfigurationEndpoint { get; set; } - public string PingEndpoint { get; set; } - public string LogEndpoint { get; set; } - } -} diff --git a/SafeExamBrowser.Server/Data/AttributeType.cs b/SafeExamBrowser.Server/Data/AttributeType.cs index 24c3b25..ab42bf7 100644 --- a/SafeExamBrowser.Server/Data/AttributeType.cs +++ b/SafeExamBrowser.Server/Data/AttributeType.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server/Data/Attributes.cs b/SafeExamBrowser.Server/Data/Attributes.cs index 3e8119c..0c54d2b 100644 --- a/SafeExamBrowser.Server/Data/Attributes.cs +++ b/SafeExamBrowser.Server/Data/Attributes.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server/Data/Instructions.cs b/SafeExamBrowser.Server/Data/Instructions.cs index ed7b372..addaf19 100644 --- a/SafeExamBrowser.Server/Data/Instructions.cs +++ b/SafeExamBrowser.Server/Data/Instructions.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server/Extensions.cs b/SafeExamBrowser.Server/Extensions.cs deleted file mode 100644 index aa5f42a..0000000 --- a/SafeExamBrowser.Server/Extensions.cs +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2024 ETH Zürich, IT Services - * - * 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.Net.Http; -using System.Text; -using SafeExamBrowser.Settings.Logging; - -namespace SafeExamBrowser.Server -{ - internal static class Extensions - { - internal static string ToLogString(this HttpResponseMessage response) - { - return response == default ? "No Response" : $"{(int) response.StatusCode} {response.StatusCode} {response.ReasonPhrase}"; - } - - internal static string ToLogType(this LogLevel severity) - { - switch (severity) - { - case LogLevel.Debug: - return "DEBUG_LOG"; - case LogLevel.Error: - return "ERROR_LOG"; - case LogLevel.Info: - return "INFO_LOG"; - case LogLevel.Warning: - return "WARN_LOG"; - } - - return "UNKNOWN"; - } - - internal static string ToSummary(this Exception exception) - { - var trimChars = new[] { '.', '!' }; - var summary = new StringBuilder(exception.Message?.TrimEnd(trimChars)); - - for (var inner = exception.InnerException; inner != default; inner = inner.InnerException) - { - summary.Append($" -> {inner.Message?.TrimEnd(trimChars)}"); - } - - return summary.ToString(); - } - - internal static long ToUnixTimestamp(this DateTime date) - { - return new DateTimeOffset(date).ToUnixTimeMilliseconds(); - } - } -} diff --git a/SafeExamBrowser.Server/FileSystem.cs b/SafeExamBrowser.Server/FileSystem.cs index aca7e73..b8d2c7b 100644 --- a/SafeExamBrowser.Server/FileSystem.cs +++ b/SafeExamBrowser.Server/FileSystem.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server/Parser.cs b/SafeExamBrowser.Server/Parser.cs index eff595c..b476c2c 100644 --- a/SafeExamBrowser.Server/Parser.cs +++ b/SafeExamBrowser.Server/Parser.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -50,11 +50,11 @@ namespace SafeExamBrowser.Server return isExpired; } - internal bool TryParseApi(HttpContent content, out ApiVersion1 api) + internal bool TryParseApi(HttpContent content, out Api api) { var success = false; - api = new ApiVersion1(); + api = new Api(); try { @@ -343,7 +343,7 @@ namespace SafeExamBrowser.Server private ScreenProctoringInstruction ParseScreenProctoringInstruction(JObject attributesJson) { - return new ScreenProctoringInstruction + var instruction = new ScreenProctoringInstruction { ClientId = attributesJson["screenProctoringClientId"].Value(), ClientSecret = attributesJson["screenProctoringClientSecret"].Value(), @@ -351,6 +351,13 @@ namespace SafeExamBrowser.Server ServiceUrl = attributesJson["screenProctoringServiceURL"].Value(), SessionId = attributesJson["screenProctoringClientSessionId"].Value() }; + + if (attributesJson.ContainsKey("screenProctoringEncryptSecret")) + { + instruction.EncryptionSecret = attributesJson["screenProctoringEncryptSecret"].Value(); + } + + return instruction; } private ZoomInstruction ParseZoomInstruction(JObject attributesJson) diff --git a/SafeExamBrowser.Server/Properties/AssemblyInfo.cs b/SafeExamBrowser.Server/Properties/AssemblyInfo.cs index c49dc80..a463c4d 100644 --- a/SafeExamBrowser.Server/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Server/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Server")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Server/Requests/ApiRequest.cs b/SafeExamBrowser.Server/Requests/ApiRequest.cs index 696d3e1..1783550 100644 --- a/SafeExamBrowser.Server/Requests/ApiRequest.cs +++ b/SafeExamBrowser.Server/Requests/ApiRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -13,27 +13,32 @@ using SafeExamBrowser.Settings.Server; namespace SafeExamBrowser.Server.Requests { - internal class ApiRequest : BaseRequest + internal class ApiRequest : Request { + private readonly Sanitizer sanitizer; + internal ApiRequest( - ApiVersion1 api, + Api api, HttpClient httpClient, ILogger logger, Parser parser, + Sanitizer sanitizer, ServerSettings settings) : base(api, httpClient, logger, parser, settings) { + this.sanitizer = sanitizer; } - internal bool TryExecute(out ApiVersion1 api, out string message) + internal bool TryExecute(out Api api, out string message) { var success = TryExecute(HttpMethod.Get, settings.ApiUrl, out var response); - api = new ApiVersion1(); + api = new Api(); message = response.ToLogString(); if (success) { parser.TryParseApi(response.Content, out api); + sanitizer.Sanitize(api); } return success; diff --git a/SafeExamBrowser.Server/Requests/AppSignatureKeyRequest.cs b/SafeExamBrowser.Server/Requests/AppSignatureKeyRequest.cs deleted file mode 100644 index 683f980..0000000 --- a/SafeExamBrowser.Server/Requests/AppSignatureKeyRequest.cs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2024 ETH Zürich, IT Services - * - * 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.Net.Http; -using SafeExamBrowser.Logging.Contracts; -using SafeExamBrowser.Server.Data; -using SafeExamBrowser.Settings.Server; - -namespace SafeExamBrowser.Server.Requests -{ - internal class AppSignatureKeyRequest : BaseRequest - { - internal AppSignatureKeyRequest( - ApiVersion1 api, - HttpClient httpClient, - ILogger logger, - Parser parser, - ServerSettings settings) : base(api, httpClient, logger, parser, settings) - { - } - - internal bool TryExecute(string appSignatureKey, out string message) - { - var content = $"seb_signature_key={appSignatureKey}"; - var success = TryExecute(new HttpMethod("PATCH"), api.HandshakeEndpoint, out var response, content, ContentType.URL_ENCODED, Authorization, Token); - - message = response.ToLogString(); - - return success; - } - } -} diff --git a/SafeExamBrowser.Server/Requests/AvailableExamsRequest.cs b/SafeExamBrowser.Server/Requests/AvailableExamsRequest.cs index aa5d379..4f9bad8 100644 --- a/SafeExamBrowser.Server/Requests/AvailableExamsRequest.cs +++ b/SafeExamBrowser.Server/Requests/AvailableExamsRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -17,14 +17,14 @@ using SafeExamBrowser.SystemComponents.Contracts; namespace SafeExamBrowser.Server.Requests { - internal class AvailableExamsRequest : BaseRequest + internal class AvailableExamsRequest : Request { private readonly AppConfig appConfig; private readonly ISystemInfo systemInfo; private readonly IUserInfo userInfo; internal AvailableExamsRequest( - ApiVersion1 api, + Api api, AppConfig appConfig, HttpClient httpClient, ILogger logger, diff --git a/SafeExamBrowser.Server/Requests/BaseRequest.cs b/SafeExamBrowser.Server/Requests/BaseRequest.cs deleted file mode 100644 index 362df41..0000000 --- a/SafeExamBrowser.Server/Requests/BaseRequest.cs +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright (c) 2024 ETH Zürich, IT Services - * - * 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.Collections.Generic; -using System.Net; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Text; -using System.Threading.Tasks; -using SafeExamBrowser.Logging.Contracts; -using SafeExamBrowser.Server.Data; -using SafeExamBrowser.Settings.Server; - -namespace SafeExamBrowser.Server.Requests -{ - internal abstract class BaseRequest - { - private static string connectionToken; - private static string oauth2Token; - - private readonly HttpClient httpClient; - - private bool hadException; - - protected readonly ApiVersion1 api; - protected readonly ILogger logger; - protected readonly Parser parser; - protected readonly ServerSettings settings; - - protected (string, string) Authorization => (Header.AUTHORIZATION, $"Bearer {oauth2Token}"); - protected (string, string) Token => (Header.CONNECTION_TOKEN, connectionToken); - - internal static string ConnectionToken - { - get { return connectionToken; } - set { connectionToken = value; } - } - - internal static string Oauth2Token - { - get { return oauth2Token; } - set { oauth2Token = value; } - } - - protected BaseRequest(ApiVersion1 api, HttpClient httpClient, ILogger logger, Parser parser, ServerSettings settings) - { - this.api = api; - this.httpClient = httpClient; - this.logger = logger; - this.parser = parser; - this.settings = settings; - } - - protected bool TryExecute( - HttpMethod method, - string url, - out HttpResponseMessage response, - string content = default, - string contentType = default, - params (string name, string value)[] headers) - { - response = default; - - for (var attempt = 0; attempt < settings.RequestAttempts && (response == default || !response.IsSuccessStatusCode); attempt++) - { - var request = BuildRequest(method, url, content, contentType, headers); - - try - { - response = httpClient.SendAsync(request).GetAwaiter().GetResult(); - - if (PerformLoggingFor(request)) - { - logger.Debug($"Completed request: {request.Method} '{request.RequestUri}' -> {response.ToLogString()}"); - } - - if (response.StatusCode == HttpStatusCode.Unauthorized && parser.IsTokenExpired(response.Content)) - { - logger.Info("OAuth2 token has expired, attempting to retrieve new one..."); - - if (TryRetrieveOAuth2Token(out var message)) - { - headers = UpdateOAuth2Token(headers); - } - } - } - catch (TaskCanceledException) - { - if (PerformLoggingFor(request)) - { - logger.Warn($"Request {request.Method} '{request.RequestUri}' did not complete within {settings.RequestTimeout}ms!"); - } - - break; - } - catch (Exception e) - { - if (PerformLoggingFor(request) && IsFirstException()) - { - logger.Warn($"Request {request.Method} '{request.RequestUri}' has failed: {e.ToSummary()}!"); - } - } - } - - return response != default && response.IsSuccessStatusCode; - } - - protected bool TryRetrieveConnectionToken(HttpResponseMessage response) - { - var success = parser.TryParseConnectionToken(response, out connectionToken); - - if (success) - { - logger.Info("Successfully retrieved connection token."); - } - else - { - logger.Error("Failed to retrieve connection token!"); - } - - return success; - } - - protected bool TryRetrieveOAuth2Token(out string message) - { - var secret = Convert.ToBase64String(Encoding.UTF8.GetBytes($"{settings.ClientName}:{settings.ClientSecret}")); - var authorization = (Header.AUTHORIZATION, $"Basic {secret}"); - var content = "grant_type=client_credentials&scope=read write"; - var success = TryExecute(HttpMethod.Post, api.AccessTokenEndpoint, out var response, content, ContentType.URL_ENCODED, authorization); - - message = response.ToLogString(); - - if (success && parser.TryParseOauth2Token(response.Content, out oauth2Token)) - { - logger.Info("Successfully retrieved OAuth2 token."); - } - else - { - logger.Error("Failed to retrieve OAuth2 token!"); - } - - return success; - } - - private HttpRequestMessage BuildRequest( - HttpMethod method, - string url, - string content = default, - string contentType = default, - params (string name, string value)[] headers) - { - var request = new HttpRequestMessage(method, url); - - if (content != default) - { - request.Content = new StringContent(content, Encoding.UTF8); - - if (contentType != default) - { - request.Content.Headers.ContentType = MediaTypeHeaderValue.Parse(contentType); - } - } - - request.Headers.Add(Header.ACCEPT, "application/json, */*"); - - foreach (var (name, value) in headers) - { - request.Headers.Add(name, value); - } - - return request; - } - - private bool IsFirstException() - { - var isFirst = !hadException; - - hadException = true; - - return isFirst; - } - - private bool PerformLoggingFor(HttpRequestMessage request) - { - return request.RequestUri.AbsolutePath != api.LogEndpoint && request.RequestUri.AbsolutePath != api.PingEndpoint; - } - - private (string name, string value)[] UpdateOAuth2Token((string name, string value)[] headers) - { - var result = new List<(string name, string value)>(); - - foreach (var header in headers) - { - if (header.name == Header.AUTHORIZATION) - { - result.Add((Header.AUTHORIZATION, $"Bearer {oauth2Token}")); - } - else - { - result.Add(header); - } - } - - return result.ToArray(); - } - } -} diff --git a/SafeExamBrowser.Server/Requests/ConfirmLockScreenRequest.cs b/SafeExamBrowser.Server/Requests/ConfirmLockScreenRequest.cs index 1fec9cc..9bc88da 100644 --- a/SafeExamBrowser.Server/Requests/ConfirmLockScreenRequest.cs +++ b/SafeExamBrowser.Server/Requests/ConfirmLockScreenRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -15,10 +15,10 @@ using SafeExamBrowser.Settings.Server; namespace SafeExamBrowser.Server.Requests { - internal class ConfirmLockScreenRequest : BaseRequest + internal class ConfirmLockScreenRequest : Request { internal ConfirmLockScreenRequest( - ApiVersion1 api, + Api api, HttpClient httpClient, ILogger logger, Parser parser, diff --git a/SafeExamBrowser.Server/Requests/ContentType.cs b/SafeExamBrowser.Server/Requests/ContentType.cs index d7c97ec..b0b21e3 100644 --- a/SafeExamBrowser.Server/Requests/ContentType.cs +++ b/SafeExamBrowser.Server/Requests/ContentType.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server/Requests/DisconnectionRequest.cs b/SafeExamBrowser.Server/Requests/DisconnectionRequest.cs index 3932f92..c0c4fb2 100644 --- a/SafeExamBrowser.Server/Requests/DisconnectionRequest.cs +++ b/SafeExamBrowser.Server/Requests/DisconnectionRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -13,10 +13,10 @@ using SafeExamBrowser.Settings.Server; namespace SafeExamBrowser.Server.Requests { - internal class DisconnectionRequest : BaseRequest + internal class DisconnectionRequest : Request { internal DisconnectionRequest( - ApiVersion1 api, + Api api, HttpClient httpClient, ILogger logger, Parser parser, diff --git a/SafeExamBrowser.Server/Requests/ExamConfigurationRequest.cs b/SafeExamBrowser.Server/Requests/ExamConfigurationRequest.cs index 615df8e..f7c7188 100644 --- a/SafeExamBrowser.Server/Requests/ExamConfigurationRequest.cs +++ b/SafeExamBrowser.Server/Requests/ExamConfigurationRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -14,10 +14,10 @@ using SafeExamBrowser.Settings.Server; namespace SafeExamBrowser.Server.Requests { - internal class ExamConfigurationRequest : BaseRequest + internal class ExamConfigurationRequest : Request { internal ExamConfigurationRequest( - ApiVersion1 api, + Api api, HttpClient httpClient, ILogger logger, Parser parser, diff --git a/SafeExamBrowser.Server/Requests/Header.cs b/SafeExamBrowser.Server/Requests/Header.cs index 93b30f7..6afade0 100644 --- a/SafeExamBrowser.Server/Requests/Header.cs +++ b/SafeExamBrowser.Server/Requests/Header.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Server/Requests/LockScreenRequest.cs b/SafeExamBrowser.Server/Requests/LockScreenRequest.cs index a8fc478..92ece17 100644 --- a/SafeExamBrowser.Server/Requests/LockScreenRequest.cs +++ b/SafeExamBrowser.Server/Requests/LockScreenRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -15,10 +15,10 @@ using SafeExamBrowser.Settings.Server; namespace SafeExamBrowser.Server.Requests { - internal class LockScreenRequest : BaseRequest + internal class LockScreenRequest : Request { internal LockScreenRequest( - ApiVersion1 api, + Api api, HttpClient httpClient, ILogger logger, Parser parser, diff --git a/SafeExamBrowser.Server/Requests/LogRequest.cs b/SafeExamBrowser.Server/Requests/LogRequest.cs index 290f880..0e31789 100644 --- a/SafeExamBrowser.Server/Requests/LogRequest.cs +++ b/SafeExamBrowser.Server/Requests/LogRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -14,10 +14,10 @@ using SafeExamBrowser.Settings.Server; namespace SafeExamBrowser.Server.Requests { - internal class LogRequest : BaseRequest + internal class LogRequest : Request { internal LogRequest( - ApiVersion1 api, + Api api, HttpClient httpClient, ILogger logger, Parser parser, diff --git a/SafeExamBrowser.Server/Requests/LowerHandRequest.cs b/SafeExamBrowser.Server/Requests/LowerHandRequest.cs index c72b715..8d6ae3c 100644 --- a/SafeExamBrowser.Server/Requests/LowerHandRequest.cs +++ b/SafeExamBrowser.Server/Requests/LowerHandRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -15,10 +15,10 @@ using SafeExamBrowser.Settings.Server; namespace SafeExamBrowser.Server.Requests { - internal class LowerHandRequest : BaseRequest + internal class LowerHandRequest : Request { internal LowerHandRequest( - ApiVersion1 api, + Api api, HttpClient httpClient, ILogger logger, Parser parser, diff --git a/SafeExamBrowser.Server/Requests/NetworkAdapterRequest.cs b/SafeExamBrowser.Server/Requests/NetworkAdapterRequest.cs index ee628a1..4b5f654 100644 --- a/SafeExamBrowser.Server/Requests/NetworkAdapterRequest.cs +++ b/SafeExamBrowser.Server/Requests/NetworkAdapterRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -17,10 +17,10 @@ using SafeExamBrowser.SystemComponents.Contracts.Network; namespace SafeExamBrowser.Server.Requests { - internal class NetworkAdapterRequest : BaseRequest + internal class NetworkAdapterRequest : Request { internal NetworkAdapterRequest( - ApiVersion1 api, + Api api, HttpClient httpClient, ILogger logger, Parser parser, diff --git a/SafeExamBrowser.Server/Requests/OAuth2TokenRequest.cs b/SafeExamBrowser.Server/Requests/OAuth2TokenRequest.cs index 8a6ff20..68e4411 100644 --- a/SafeExamBrowser.Server/Requests/OAuth2TokenRequest.cs +++ b/SafeExamBrowser.Server/Requests/OAuth2TokenRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -13,10 +13,10 @@ using SafeExamBrowser.Settings.Server; namespace SafeExamBrowser.Server.Requests { - internal class OAuth2TokenRequest : BaseRequest + internal class OAuth2TokenRequest : Request { internal OAuth2TokenRequest( - ApiVersion1 api, + Api api, HttpClient httpClient, ILogger logger, Parser parser, diff --git a/SafeExamBrowser.Server/Requests/PingRequest.cs b/SafeExamBrowser.Server/Requests/PingRequest.cs index dd78fe5..aa6e55a 100644 --- a/SafeExamBrowser.Server/Requests/PingRequest.cs +++ b/SafeExamBrowser.Server/Requests/PingRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -14,10 +14,10 @@ using SafeExamBrowser.Settings.Server; namespace SafeExamBrowser.Server.Requests { - internal class PingRequest : BaseRequest + internal class PingRequest : Request { internal PingRequest( - ApiVersion1 api, + Api api, HttpClient httpClient, ILogger logger, Parser parser, diff --git a/SafeExamBrowser.Server/Requests/PowerSupplyRequest.cs b/SafeExamBrowser.Server/Requests/PowerSupplyRequest.cs index 973ab05..6f8c8c7 100644 --- a/SafeExamBrowser.Server/Requests/PowerSupplyRequest.cs +++ b/SafeExamBrowser.Server/Requests/PowerSupplyRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -17,10 +17,10 @@ using SafeExamBrowser.SystemComponents.Contracts.PowerSupply; namespace SafeExamBrowser.Server.Requests { - internal class PowerSupplyRequest : BaseRequest + internal class PowerSupplyRequest : Request { internal PowerSupplyRequest( - ApiVersion1 api, + Api api, HttpClient httpClient, ILogger logger, Parser parser, diff --git a/SafeExamBrowser.Server/Requests/RaiseHandRequest.cs b/SafeExamBrowser.Server/Requests/RaiseHandRequest.cs index 0bed819..2cdf9c3 100644 --- a/SafeExamBrowser.Server/Requests/RaiseHandRequest.cs +++ b/SafeExamBrowser.Server/Requests/RaiseHandRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -15,10 +15,10 @@ using SafeExamBrowser.Settings.Server; namespace SafeExamBrowser.Server.Requests { - internal class RaiseHandRequest : BaseRequest + internal class RaiseHandRequest : Request { internal RaiseHandRequest( - ApiVersion1 api, + Api api, HttpClient httpClient, ILogger logger, Parser parser, diff --git a/SafeExamBrowser.Server/Requests/SelectExamRequest.cs b/SafeExamBrowser.Server/Requests/SelectExamRequest.cs index a7b79c1..7852502 100644 --- a/SafeExamBrowser.Server/Requests/SelectExamRequest.cs +++ b/SafeExamBrowser.Server/Requests/SelectExamRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -14,16 +14,17 @@ using SafeExamBrowser.Settings.Server; namespace SafeExamBrowser.Server.Requests { - internal class SelectExamRequest : BaseRequest + internal class SelectExamRequest : Request { - internal SelectExamRequest(ApiVersion1 api, HttpClient httpClient, ILogger logger, Parser parser, ServerSettings settings) : base(api, httpClient, logger, parser, settings) + internal SelectExamRequest(Api api, HttpClient httpClient, ILogger logger, Parser parser, ServerSettings settings) : base(api, httpClient, logger, parser, settings) { } internal bool TryExecute(Exam exam, out string message, out string appSignatureKeySalt, out string browserExamKey) { var content = $"examId={exam.Id}"; - var success = TryExecute(HttpMethod.Put, api.HandshakeEndpoint, out var response, content, ContentType.URL_ENCODED, Authorization, Token); + var method = new HttpMethod("PATCH"); + var success = TryExecute(method, api.HandshakeEndpoint, out var response, content, ContentType.URL_ENCODED, Authorization, Token); appSignatureKeySalt = default; browserExamKey = default; diff --git a/SafeExamBrowser.Server/Requests/UserIdentifierRequest.cs b/SafeExamBrowser.Server/Requests/UserIdentifierRequest.cs index bb01562..a4fe463 100644 --- a/SafeExamBrowser.Server/Requests/UserIdentifierRequest.cs +++ b/SafeExamBrowser.Server/Requests/UserIdentifierRequest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -13,10 +13,10 @@ using SafeExamBrowser.Settings.Server; namespace SafeExamBrowser.Server.Requests { - internal class UserIdentifierRequest : BaseRequest + internal class UserIdentifierRequest : Request { internal UserIdentifierRequest( - ApiVersion1 api, + Api api, HttpClient httpClient, ILogger logger, Parser parser, diff --git a/SafeExamBrowser.Server/SafeExamBrowser.Server.csproj b/SafeExamBrowser.Server/SafeExamBrowser.Server.csproj index 1bcd192..ceddccc 100644 --- a/SafeExamBrowser.Server/SafeExamBrowser.Server.csproj +++ b/SafeExamBrowser.Server/SafeExamBrowser.Server.csproj @@ -59,18 +59,18 @@ - + - + - + - + @@ -86,6 +86,7 @@ + diff --git a/SafeExamBrowser.Server/ServerProxy.cs b/SafeExamBrowser.Server/ServerProxy.cs index 8f45991..db5cb37 100644 --- a/SafeExamBrowser.Server/ServerProxy.cs +++ b/SafeExamBrowser.Server/ServerProxy.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -43,11 +43,12 @@ namespace SafeExamBrowser.Server private readonly Parser parser; private readonly Timer pingTimer; private readonly IPowerSupply powerSupply; + private readonly Sanitizer sanitizer; private readonly ISystemInfo systemInfo; private readonly IUserInfo userInfo; private readonly INetworkAdapter networkAdapter; - private ApiVersion1 api; + private Api api; private int currentHandId; private int currentLockScreenId; private string examId; @@ -75,7 +76,7 @@ namespace SafeExamBrowser.Server IPowerSupply powerSupply = default, INetworkAdapter networkAdapter = default) { - this.api = new ApiVersion1(); + this.api = new Api(); this.appConfig = appConfig; this.keyGenerator = keyGenerator; this.fileSystem = new FileSystem(appConfig, logger); @@ -87,6 +88,7 @@ namespace SafeExamBrowser.Server this.parser = new Parser(logger); this.pingTimer = new Timer(); this.powerSupply = powerSupply; + this.sanitizer = new Sanitizer(); this.systemInfo = systemInfo; this.userInfo = userInfo; } @@ -110,7 +112,7 @@ namespace SafeExamBrowser.Server public ServerResponse Connect() { - var request = new ApiRequest(api, httpClient, logger, parser, settings); + var request = new ApiRequest(api, httpClient, logger, parser, sanitizer, settings); var success = request.TryExecute(out api, out var message); if (success) @@ -194,8 +196,8 @@ namespace SafeExamBrowser.Server return new ConnectionInfo { Api = JsonConvert.SerializeObject(api), - ConnectionToken = BaseRequest.ConnectionToken, - Oauth2Token = BaseRequest.Oauth2Token + ConnectionToken = Request.ConnectionToken, + Oauth2Token = Request.Oauth2Token }; } @@ -204,7 +206,7 @@ namespace SafeExamBrowser.Server this.settings = settings; httpClient = new HttpClient(); - httpClient.BaseAddress = new Uri(settings.ServerUrl); + httpClient.BaseAddress = sanitizer.Sanitize(settings.ServerUrl); if (settings.RequestTimeout > 0) { @@ -214,11 +216,11 @@ namespace SafeExamBrowser.Server public void Initialize(string api, string connectionToken, string examId, string oauth2Token, ServerSettings settings) { - this.api = JsonConvert.DeserializeObject(api); + this.api = JsonConvert.DeserializeObject(api); this.examId = examId; - BaseRequest.ConnectionToken = connectionToken; - BaseRequest.Oauth2Token = oauth2Token; + Request.ConnectionToken = connectionToken; + Request.Oauth2Token = oauth2Token; Initialize(settings); } @@ -284,30 +286,22 @@ namespace SafeExamBrowser.Server var request = new SelectExamRequest(api, httpClient, logger, parser, settings); var success = request.TryExecute(exam, out var message, out var appSignatureKeySalt, out var browserExamKey); + if (browserExamKey != default) + { + logger.Info("Custom browser exam key detected."); + } + if (success) { logger.Info("Successfully sent selected exam."); + + success = TryFinishHandshake(out message, appSignatureKeySalt); } else { logger.Error("Failed to send selected exam!"); } - if (success && appSignatureKeySalt != default) - { - logger.Info("App signature key salt detected, performing key exchange..."); - success = TrySendAppSignatureKey(appSignatureKeySalt, out message); - } - else - { - logger.Info("No app signature key salt detected, skipping key exchange."); - } - - if (browserExamKey != default) - { - logger.Info("Custom browser exam key detected."); - } - return new ServerResponse(success, browserExamKey, message); } @@ -515,19 +509,30 @@ namespace SafeExamBrowser.Server } } - private bool TrySendAppSignatureKey(string salt, out string message) + private bool TryFinishHandshake(out string message, string appSignatureKeySalt = default) { - var appSignatureKey = keyGenerator.CalculateAppSignatureKey(BaseRequest.ConnectionToken, salt); - var request = new AppSignatureKeyRequest(api, httpClient, logger, parser, settings); - var success = request.TryExecute(appSignatureKey, out message); + var appSignatureKey = default(string); - if (success) + if (appSignatureKeySalt != default) { - logger.Info("Successfully sent app signature key."); + logger.Info("App signature key salt available, performing key exchange..."); + appSignatureKey = keyGenerator.CalculateAppSignatureKey(Request.ConnectionToken, appSignatureKeySalt); } else { - logger.Error("Failed to send app signature key!"); + logger.Info("App signature key salt not available, not performing key exchange."); + } + + var request = new FinishHandshakeRequest(api, httpClient, logger, parser, settings); + var success = request.TryExecute(out message, appSignatureKey); + + if (success) + { + logger.Info("Successfully finished handshake."); + } + else + { + logger.Error("Failed to finish handshake!"); } return success; diff --git a/SafeExamBrowser.Service.UnitTests/Communication/ServiceHostTests.cs b/SafeExamBrowser.Service.UnitTests/Communication/ServiceHostTests.cs index ad595ee..2e5dc53 100644 --- a/SafeExamBrowser.Service.UnitTests/Communication/ServiceHostTests.cs +++ b/SafeExamBrowser.Service.UnitTests/Communication/ServiceHostTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service.UnitTests/Operations/EventStub.cs b/SafeExamBrowser.Service.UnitTests/Operations/EventStub.cs index 1da7b9a..9d4458b 100644 --- a/SafeExamBrowser.Service.UnitTests/Operations/EventStub.cs +++ b/SafeExamBrowser.Service.UnitTests/Operations/EventStub.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service.UnitTests/Operations/LockdownOperationTests.cs b/SafeExamBrowser.Service.UnitTests/Operations/LockdownOperationTests.cs index 78cf662..c8f0528 100644 --- a/SafeExamBrowser.Service.UnitTests/Operations/LockdownOperationTests.cs +++ b/SafeExamBrowser.Service.UnitTests/Operations/LockdownOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service.UnitTests/Operations/RestoreOperationTests.cs b/SafeExamBrowser.Service.UnitTests/Operations/RestoreOperationTests.cs index 2caff59..ccba77e 100644 --- a/SafeExamBrowser.Service.UnitTests/Operations/RestoreOperationTests.cs +++ b/SafeExamBrowser.Service.UnitTests/Operations/RestoreOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service.UnitTests/Operations/ServiceEventCleanupOperationTests.cs b/SafeExamBrowser.Service.UnitTests/Operations/ServiceEventCleanupOperationTests.cs index d4fc114..c1c67b1 100644 --- a/SafeExamBrowser.Service.UnitTests/Operations/ServiceEventCleanupOperationTests.cs +++ b/SafeExamBrowser.Service.UnitTests/Operations/ServiceEventCleanupOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service.UnitTests/Operations/SessionActivationOperationTests.cs b/SafeExamBrowser.Service.UnitTests/Operations/SessionActivationOperationTests.cs index 4aebf87..5405e5b 100644 --- a/SafeExamBrowser.Service.UnitTests/Operations/SessionActivationOperationTests.cs +++ b/SafeExamBrowser.Service.UnitTests/Operations/SessionActivationOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service.UnitTests/Operations/SessionInitializationOperationTests.cs b/SafeExamBrowser.Service.UnitTests/Operations/SessionInitializationOperationTests.cs index 9221249..c33549b 100644 --- a/SafeExamBrowser.Service.UnitTests/Operations/SessionInitializationOperationTests.cs +++ b/SafeExamBrowser.Service.UnitTests/Operations/SessionInitializationOperationTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service.UnitTests/Properties/AssemblyInfo.cs b/SafeExamBrowser.Service.UnitTests/Properties/AssemblyInfo.cs index c6107cb..cf9b2d4 100644 --- a/SafeExamBrowser.Service.UnitTests/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Service.UnitTests/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Service.UnitTests")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] [assembly: ComVisible(false)] diff --git a/SafeExamBrowser.Service.UnitTests/SafeExamBrowser.Service.UnitTests.csproj b/SafeExamBrowser.Service.UnitTests/SafeExamBrowser.Service.UnitTests.csproj index 0cf8478..db60982 100644 --- a/SafeExamBrowser.Service.UnitTests/SafeExamBrowser.Service.UnitTests.csproj +++ b/SafeExamBrowser.Service.UnitTests/SafeExamBrowser.Service.UnitTests.csproj @@ -1,8 +1,9 @@  - - - + + + + Debug @@ -68,73 +69,73 @@ ..\packages\Microsoft.ApplicationInsights.2.22.0\lib\net46\Microsoft.ApplicationInsights.dll - - ..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll + + ..\packages\Microsoft.Testing.Platform.MSBuild.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.MSBuild.dll - - ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll + + ..\packages\Microsoft.Testing.Extensions.Telemetry.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll - - ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll + + ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll + + ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.5.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll - - ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.MSBuild.dll + + ..\packages\Microsoft.Testing.Platform.1.5.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\packages\Microsoft.TestPlatform.ObjectModel.17.12.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - ..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + ..\packages\MSTest.TestFramework.3.7.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - ..\packages\Moq.4.20.70\lib\net462\Moq.dll + + ..\packages\Moq.4.20.72\lib\net462\Moq.dll - - ..\packages\NuGet.Frameworks.6.9.1\lib\net472\NuGet.Frameworks.dll + + ..\packages\NuGet.Frameworks.6.12.1\lib\net472\NuGet.Frameworks.dll - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + ..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll - - ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll + + ..\packages\System.Collections.Immutable.9.0.1\lib\net462\System.Collections.Immutable.dll - - ..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll + + ..\packages\System.Diagnostics.DiagnosticSource.9.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll - - ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + ..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + ..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll - - ..\packages\System.Reflection.Metadata.8.0.0\lib\net462\System.Reflection.Metadata.dll + + ..\packages\System.Reflection.Metadata.9.0.1\lib\net462\System.Reflection.Metadata.dll - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + ..\packages\System.Threading.Tasks.Extensions.4.6.0\lib\net462\System.Threading.Tasks.Extensions.dll @@ -187,19 +188,26 @@ SafeExamBrowser.Settings - + + + + + + + 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.Service.UnitTests/ServiceControllerTests.cs b/SafeExamBrowser.Service.UnitTests/ServiceControllerTests.cs index 41cffc6..1d1c892 100644 --- a/SafeExamBrowser.Service.UnitTests/ServiceControllerTests.cs +++ b/SafeExamBrowser.Service.UnitTests/ServiceControllerTests.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service.UnitTests/app.config b/SafeExamBrowser.Service.UnitTests/app.config index f6140c1..b7d13bc 100644 --- a/SafeExamBrowser.Service.UnitTests/app.config +++ b/SafeExamBrowser.Service.UnitTests/app.config @@ -4,11 +4,11 @@ - + - + @@ -16,7 +16,7 @@ - + @@ -24,15 +24,19 @@ - + - + - + + + + + diff --git a/SafeExamBrowser.Service.UnitTests/packages.config b/SafeExamBrowser.Service.UnitTests/packages.config index f170b50..da1800f 100644 --- a/SafeExamBrowser.Service.UnitTests/packages.config +++ b/SafeExamBrowser.Service.UnitTests/packages.config @@ -2,22 +2,23 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SafeExamBrowser.Service/Communication/ServiceHost.cs b/SafeExamBrowser.Service/Communication/ServiceHost.cs index 41d6888..353f823 100644 --- a/SafeExamBrowser.Service/Communication/ServiceHost.cs +++ b/SafeExamBrowser.Service/Communication/ServiceHost.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service/CompositionRoot.cs b/SafeExamBrowser.Service/CompositionRoot.cs index b3a1238..312fb3b 100644 --- a/SafeExamBrowser.Service/CompositionRoot.cs +++ b/SafeExamBrowser.Service/CompositionRoot.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -52,7 +52,7 @@ namespace SafeExamBrowser.Service var systemConfigurationUpdate = new SystemConfigurationUpdate(new ModuleLogger(logger, nameof(SystemConfigurationUpdate))); var bootstrapOperations = new Queue(); - var sessionOperations = new Queue(); + var sessionOperations = new Queue(); sessionContext.AutoRestoreMechanism = new AutoRestoreMechanism(featureBackup, new ModuleLogger(logger, nameof(AutoRestoreMechanism)), systemConfigurationUpdate, FIVE_SECONDS); @@ -64,8 +64,8 @@ namespace SafeExamBrowser.Service sessionOperations.Enqueue(new LockdownOperation(featureBackup, featureFactory, featureMonitor, logger, sessionContext)); sessionOperations.Enqueue(new SessionActivationOperation(logger, sessionContext)); - var bootstrapSequence = new OperationSequence(logger, bootstrapOperations); - var sessionSequence = new OperationSequence(logger, sessionOperations); + var bootstrapSequence = new OperationSequence(logger, bootstrapOperations); + var sessionSequence = new OperationSequence(logger, sessionOperations); ServiceController = new ServiceController(logger, LogWriterFactory, bootstrapSequence, sessionSequence, serviceHost, sessionContext, systemConfigurationUpdate); } diff --git a/SafeExamBrowser.Service/Installer.cs b/SafeExamBrowser.Service/Installer.cs index e1d6493..fc40297 100644 --- a/SafeExamBrowser.Service/Installer.cs +++ b/SafeExamBrowser.Service/Installer.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service/Operations/LockdownOperation.cs b/SafeExamBrowser.Service/Operations/LockdownOperation.cs index 966f401..e518072 100644 --- a/SafeExamBrowser.Service/Operations/LockdownOperation.cs +++ b/SafeExamBrowser.Service/Operations/LockdownOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service/Operations/RestoreOperation.cs b/SafeExamBrowser.Service/Operations/RestoreOperation.cs index 44b1119..df25e4c 100644 --- a/SafeExamBrowser.Service/Operations/RestoreOperation.cs +++ b/SafeExamBrowser.Service/Operations/RestoreOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service/Operations/ServiceEventCleanupOperation.cs b/SafeExamBrowser.Service/Operations/ServiceEventCleanupOperation.cs index 743e6a8..23f670e 100644 --- a/SafeExamBrowser.Service/Operations/ServiceEventCleanupOperation.cs +++ b/SafeExamBrowser.Service/Operations/ServiceEventCleanupOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service/Operations/SessionActivationOperation.cs b/SafeExamBrowser.Service/Operations/SessionActivationOperation.cs index 1c0158f..b667457 100644 --- a/SafeExamBrowser.Service/Operations/SessionActivationOperation.cs +++ b/SafeExamBrowser.Service/Operations/SessionActivationOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service/Operations/SessionInitializationOperation.cs b/SafeExamBrowser.Service/Operations/SessionInitializationOperation.cs index 31b63a1..7fcfb66 100644 --- a/SafeExamBrowser.Service/Operations/SessionInitializationOperation.cs +++ b/SafeExamBrowser.Service/Operations/SessionInitializationOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service/Operations/SessionOperation.cs b/SafeExamBrowser.Service/Operations/SessionOperation.cs index baf1227..a4b73c4 100644 --- a/SafeExamBrowser.Service/Operations/SessionOperation.cs +++ b/SafeExamBrowser.Service/Operations/SessionOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service/Properties/AssemblyInfo.cs b/SafeExamBrowser.Service/Properties/AssemblyInfo.cs index 666e527..66948dc 100644 --- a/SafeExamBrowser.Service/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Service/Properties/AssemblyInfo.cs @@ -9,7 +9,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Service")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Service/Service.cs b/SafeExamBrowser.Service/Service.cs index 1b4c5cc..e58b1f2 100644 --- a/SafeExamBrowser.Service/Service.cs +++ b/SafeExamBrowser.Service/Service.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service/ServiceController.cs b/SafeExamBrowser.Service/ServiceController.cs index b86ea99..952c5e9 100644 --- a/SafeExamBrowser.Service/ServiceController.cs +++ b/SafeExamBrowser.Service/ServiceController.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Service/SessionContext.cs b/SafeExamBrowser.Service/SessionContext.cs index 181386e..1309305 100644 --- a/SafeExamBrowser.Service/SessionContext.cs +++ b/SafeExamBrowser.Service/SessionContext.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/AppSettings.cs b/SafeExamBrowser.Settings/AppSettings.cs index e136bf2..2d09335 100644 --- a/SafeExamBrowser.Settings/AppSettings.cs +++ b/SafeExamBrowser.Settings/AppSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Applications/ApplicationSettings.cs b/SafeExamBrowser.Settings/Applications/ApplicationSettings.cs index 9944210..8432450 100644 --- a/SafeExamBrowser.Settings/Applications/ApplicationSettings.cs +++ b/SafeExamBrowser.Settings/Applications/ApplicationSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Applications/BlacklistApplication.cs b/SafeExamBrowser.Settings/Applications/BlacklistApplication.cs index 05acbeb..ae5eaa2 100644 --- a/SafeExamBrowser.Settings/Applications/BlacklistApplication.cs +++ b/SafeExamBrowser.Settings/Applications/BlacklistApplication.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Applications/WhitelistApplication.cs b/SafeExamBrowser.Settings/Applications/WhitelistApplication.cs index c609d96..0948687 100644 --- a/SafeExamBrowser.Settings/Applications/WhitelistApplication.cs +++ b/SafeExamBrowser.Settings/Applications/WhitelistApplication.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Browser/BrowserSettings.cs b/SafeExamBrowser.Settings/Browser/BrowserSettings.cs index 6b3ea96..c547f71 100644 --- a/SafeExamBrowser.Settings/Browser/BrowserSettings.cs +++ b/SafeExamBrowser.Settings/Browser/BrowserSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Browser/Filter/FilterResult.cs b/SafeExamBrowser.Settings/Browser/Filter/FilterResult.cs index 436bcb2..e5871ef 100644 --- a/SafeExamBrowser.Settings/Browser/Filter/FilterResult.cs +++ b/SafeExamBrowser.Settings/Browser/Filter/FilterResult.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Browser/Filter/FilterRuleSettings.cs b/SafeExamBrowser.Settings/Browser/Filter/FilterRuleSettings.cs index 04b22ab..828b8ed 100644 --- a/SafeExamBrowser.Settings/Browser/Filter/FilterRuleSettings.cs +++ b/SafeExamBrowser.Settings/Browser/Filter/FilterRuleSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Browser/Filter/FilterRuleType.cs b/SafeExamBrowser.Settings/Browser/Filter/FilterRuleType.cs index ae8ddf0..535dfdc 100644 --- a/SafeExamBrowser.Settings/Browser/Filter/FilterRuleType.cs +++ b/SafeExamBrowser.Settings/Browser/Filter/FilterRuleType.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Browser/FilterSettings.cs b/SafeExamBrowser.Settings/Browser/FilterSettings.cs index 271c6e7..fe8546c 100644 --- a/SafeExamBrowser.Settings/Browser/FilterSettings.cs +++ b/SafeExamBrowser.Settings/Browser/FilterSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Browser/PopupPolicy.cs b/SafeExamBrowser.Settings/Browser/PopupPolicy.cs index b6ef516..241b2f0 100644 --- a/SafeExamBrowser.Settings/Browser/PopupPolicy.cs +++ b/SafeExamBrowser.Settings/Browser/PopupPolicy.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Browser/Proxy/ProxyConfiguration.cs b/SafeExamBrowser.Settings/Browser/Proxy/ProxyConfiguration.cs index 425646c..012112f 100644 --- a/SafeExamBrowser.Settings/Browser/Proxy/ProxyConfiguration.cs +++ b/SafeExamBrowser.Settings/Browser/Proxy/ProxyConfiguration.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Browser/Proxy/ProxyPolicy.cs b/SafeExamBrowser.Settings/Browser/Proxy/ProxyPolicy.cs index e01d820..59bb40a 100644 --- a/SafeExamBrowser.Settings/Browser/Proxy/ProxyPolicy.cs +++ b/SafeExamBrowser.Settings/Browser/Proxy/ProxyPolicy.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Browser/Proxy/ProxyProtocol.cs b/SafeExamBrowser.Settings/Browser/Proxy/ProxyProtocol.cs index 9e6b54e..e3b44b1 100644 --- a/SafeExamBrowser.Settings/Browser/Proxy/ProxyProtocol.cs +++ b/SafeExamBrowser.Settings/Browser/Proxy/ProxyProtocol.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Browser/ProxySettings.cs b/SafeExamBrowser.Settings/Browser/ProxySettings.cs index 89a6ea0..2ee1008 100644 --- a/SafeExamBrowser.Settings/Browser/ProxySettings.cs +++ b/SafeExamBrowser.Settings/Browser/ProxySettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Browser/UrlPolicy.cs b/SafeExamBrowser.Settings/Browser/UrlPolicy.cs index ba1dc9d..8efc7a0 100644 --- a/SafeExamBrowser.Settings/Browser/UrlPolicy.cs +++ b/SafeExamBrowser.Settings/Browser/UrlPolicy.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Browser/WindowPosition.cs b/SafeExamBrowser.Settings/Browser/WindowPosition.cs index 95619f4..15a9fa1 100644 --- a/SafeExamBrowser.Settings/Browser/WindowPosition.cs +++ b/SafeExamBrowser.Settings/Browser/WindowPosition.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Browser/WindowSettings.cs b/SafeExamBrowser.Settings/Browser/WindowSettings.cs index bbbb05d..61ec8b8 100644 --- a/SafeExamBrowser.Settings/Browser/WindowSettings.cs +++ b/SafeExamBrowser.Settings/Browser/WindowSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/ConfigurationMode.cs b/SafeExamBrowser.Settings/ConfigurationMode.cs index 3963afc..2a93545 100644 --- a/SafeExamBrowser.Settings/ConfigurationMode.cs +++ b/SafeExamBrowser.Settings/ConfigurationMode.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Logging/LogLevel.cs b/SafeExamBrowser.Settings/Logging/LogLevel.cs index f3caef4..d7ce260 100644 --- a/SafeExamBrowser.Settings/Logging/LogLevel.cs +++ b/SafeExamBrowser.Settings/Logging/LogLevel.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Monitoring/DisplaySettings.cs b/SafeExamBrowser.Settings/Monitoring/DisplaySettings.cs index a707b7b..66278d8 100644 --- a/SafeExamBrowser.Settings/Monitoring/DisplaySettings.cs +++ b/SafeExamBrowser.Settings/Monitoring/DisplaySettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Monitoring/KeyboardSettings.cs b/SafeExamBrowser.Settings/Monitoring/KeyboardSettings.cs index 460568c..1838c6d 100644 --- a/SafeExamBrowser.Settings/Monitoring/KeyboardSettings.cs +++ b/SafeExamBrowser.Settings/Monitoring/KeyboardSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Monitoring/MouseSettings.cs b/SafeExamBrowser.Settings/Monitoring/MouseSettings.cs index 7f212d0..d96ba24 100644 --- a/SafeExamBrowser.Settings/Monitoring/MouseSettings.cs +++ b/SafeExamBrowser.Settings/Monitoring/MouseSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Proctoring/ImageFormat.cs b/SafeExamBrowser.Settings/Proctoring/ImageFormat.cs index 8d93fc2..349b37a 100644 --- a/SafeExamBrowser.Settings/Proctoring/ImageFormat.cs +++ b/SafeExamBrowser.Settings/Proctoring/ImageFormat.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Proctoring/ImageQuantization.cs b/SafeExamBrowser.Settings/Proctoring/ImageQuantization.cs index 2866424..6d8a539 100644 --- a/SafeExamBrowser.Settings/Proctoring/ImageQuantization.cs +++ b/SafeExamBrowser.Settings/Proctoring/ImageQuantization.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Proctoring/MetaDataSettings.cs b/SafeExamBrowser.Settings/Proctoring/MetaDataSettings.cs index df40637..f86b716 100644 --- a/SafeExamBrowser.Settings/Proctoring/MetaDataSettings.cs +++ b/SafeExamBrowser.Settings/Proctoring/MetaDataSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Proctoring/ProctoringSettings.cs b/SafeExamBrowser.Settings/Proctoring/ProctoringSettings.cs index e17d4a5..d5c747d 100644 --- a/SafeExamBrowser.Settings/Proctoring/ProctoringSettings.cs +++ b/SafeExamBrowser.Settings/Proctoring/ProctoringSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Proctoring/ScreenProctoringSettings.cs b/SafeExamBrowser.Settings/Proctoring/ScreenProctoringSettings.cs index 13c136f..4329361 100644 --- a/SafeExamBrowser.Settings/Proctoring/ScreenProctoringSettings.cs +++ b/SafeExamBrowser.Settings/Proctoring/ScreenProctoringSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -16,6 +16,11 @@ namespace SafeExamBrowser.Settings.Proctoring [Serializable] public class ScreenProctoringSettings { + /// + /// The maximum size of the locally cached data per session in megabytes. + /// + public int CacheSize { get; set; } + /// /// The client identifier used for authentication with the screen proctoring service. /// @@ -31,6 +36,11 @@ namespace SafeExamBrowser.Settings.Proctoring /// public bool Enabled { get; set; } + /// + /// The encryption secret to be used for the locally cached data. + /// + public string EncryptionSecret { get; set; } + /// /// The identifier of the group to which the user belongs. /// @@ -54,18 +64,18 @@ namespace SafeExamBrowser.Settings.Proctoring /// /// The maximum time interval in milliseconds between screen shot transmissions. /// - public int MaxInterval { get; set; } + public int IntervalMaximum { get; set; } + + /// + /// The minimum time interval in milliseconds between screen shot transmissions. + /// + public int IntervalMinimum { get; set; } /// /// All settings related to the metadata capturing of the screen proctoring. /// public MetaDataSettings MetaData { get; set; } - /// - /// The minimum time interval in milliseconds between screen shot transmissions. - /// - public int MinInterval { get; set; } - /// /// The URL of the screen proctoring service. /// diff --git a/SafeExamBrowser.Settings/Properties/AssemblyInfo.cs b/SafeExamBrowser.Settings/Properties/AssemblyInfo.cs index dee100f..cd9c235 100644 --- a/SafeExamBrowser.Settings/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Settings/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.Settings")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.Settings/Security/ClipboardPolicy.cs b/SafeExamBrowser.Settings/Security/ClipboardPolicy.cs index c3d9aca..b74241b 100644 --- a/SafeExamBrowser.Settings/Security/ClipboardPolicy.cs +++ b/SafeExamBrowser.Settings/Security/ClipboardPolicy.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Security/KioskMode.cs b/SafeExamBrowser.Settings/Security/KioskMode.cs index da00585..81363ef 100644 --- a/SafeExamBrowser.Settings/Security/KioskMode.cs +++ b/SafeExamBrowser.Settings/Security/KioskMode.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Security/SecuritySettings.cs b/SafeExamBrowser.Settings/Security/SecuritySettings.cs index 1249021..2e0f57e 100644 --- a/SafeExamBrowser.Settings/Security/SecuritySettings.cs +++ b/SafeExamBrowser.Settings/Security/SecuritySettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Security/VersionRestriction.cs b/SafeExamBrowser.Settings/Security/VersionRestriction.cs index 89f204c..42d24e9 100644 --- a/SafeExamBrowser.Settings/Security/VersionRestriction.cs +++ b/SafeExamBrowser.Settings/Security/VersionRestriction.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Security/VirtualMachinePolicy.cs b/SafeExamBrowser.Settings/Security/VirtualMachinePolicy.cs index 7644f58..6fbac02 100644 --- a/SafeExamBrowser.Settings/Security/VirtualMachinePolicy.cs +++ b/SafeExamBrowser.Settings/Security/VirtualMachinePolicy.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Server/ServerSettings.cs b/SafeExamBrowser.Settings/Server/ServerSettings.cs index fff088b..8cccdd3 100644 --- a/SafeExamBrowser.Settings/Server/ServerSettings.cs +++ b/SafeExamBrowser.Settings/Server/ServerSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Service/ServicePolicy.cs b/SafeExamBrowser.Settings/Service/ServicePolicy.cs index 614d750..754b727 100644 --- a/SafeExamBrowser.Settings/Service/ServicePolicy.cs +++ b/SafeExamBrowser.Settings/Service/ServicePolicy.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/Service/ServiceSettings.cs b/SafeExamBrowser.Settings/Service/ServiceSettings.cs index 4424ed7..6516865 100644 --- a/SafeExamBrowser.Settings/Service/ServiceSettings.cs +++ b/SafeExamBrowser.Settings/Service/ServiceSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/SessionMode.cs b/SafeExamBrowser.Settings/SessionMode.cs index afe027f..12a305a 100644 --- a/SafeExamBrowser.Settings/SessionMode.cs +++ b/SafeExamBrowser.Settings/SessionMode.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/System/SystemSettings.cs b/SafeExamBrowser.Settings/System/SystemSettings.cs index 40ef12f..7ac4844 100644 --- a/SafeExamBrowser.Settings/System/SystemSettings.cs +++ b/SafeExamBrowser.Settings/System/SystemSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/SystemComponents/AudioSettings.cs b/SafeExamBrowser.Settings/SystemComponents/AudioSettings.cs index 13c23e1..2c8666d 100644 --- a/SafeExamBrowser.Settings/SystemComponents/AudioSettings.cs +++ b/SafeExamBrowser.Settings/SystemComponents/AudioSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/SystemComponents/PowerSupplySettings.cs b/SafeExamBrowser.Settings/SystemComponents/PowerSupplySettings.cs index c3d20ad..6c6cc6d 100644 --- a/SafeExamBrowser.Settings/SystemComponents/PowerSupplySettings.cs +++ b/SafeExamBrowser.Settings/SystemComponents/PowerSupplySettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/UserInterface/ActionCenterSettings.cs b/SafeExamBrowser.Settings/UserInterface/ActionCenterSettings.cs index 178b0e3..2a35f76 100644 --- a/SafeExamBrowser.Settings/UserInterface/ActionCenterSettings.cs +++ b/SafeExamBrowser.Settings/UserInterface/ActionCenterSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/UserInterface/LockScreenSettings.cs b/SafeExamBrowser.Settings/UserInterface/LockScreenSettings.cs index 1bd90d6..98ee59c 100644 --- a/SafeExamBrowser.Settings/UserInterface/LockScreenSettings.cs +++ b/SafeExamBrowser.Settings/UserInterface/LockScreenSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/UserInterface/TaskbarSettings.cs b/SafeExamBrowser.Settings/UserInterface/TaskbarSettings.cs index e200904..a492bed 100644 --- a/SafeExamBrowser.Settings/UserInterface/TaskbarSettings.cs +++ b/SafeExamBrowser.Settings/UserInterface/TaskbarSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/UserInterface/UserInterfaceMode.cs b/SafeExamBrowser.Settings/UserInterface/UserInterfaceMode.cs index 61574e0..97efd17 100644 --- a/SafeExamBrowser.Settings/UserInterface/UserInterfaceMode.cs +++ b/SafeExamBrowser.Settings/UserInterface/UserInterfaceMode.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.Settings/UserInterface/UserInterfaceSettings.cs b/SafeExamBrowser.Settings/UserInterface/UserInterfaceSettings.cs index 10dc5ec..552afcb 100644 --- a/SafeExamBrowser.Settings/UserInterface/UserInterfaceSettings.cs +++ b/SafeExamBrowser.Settings/UserInterface/UserInterfaceSettings.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/Audio/Events/VolumeChangedEventHandler.cs b/SafeExamBrowser.SystemComponents.Contracts/Audio/Events/VolumeChangedEventHandler.cs index 4bed1a2..6d7dad7 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/Audio/Events/VolumeChangedEventHandler.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/Audio/Events/VolumeChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/Audio/IAudio.cs b/SafeExamBrowser.SystemComponents.Contracts/Audio/IAudio.cs index dfa3407..27730fd 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/Audio/IAudio.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/Audio/IAudio.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/IFileSystem.cs b/SafeExamBrowser.SystemComponents.Contracts/IFileSystem.cs index 9490b9a..afc8b5b 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/IFileSystem.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/IFileSystem.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/ISystemComponent.cs b/SafeExamBrowser.SystemComponents.Contracts/ISystemComponent.cs index 9d14c09..8bf43bc 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/ISystemComponent.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/ISystemComponent.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/ISystemInfo.cs b/SafeExamBrowser.SystemComponents.Contracts/ISystemInfo.cs index 3cee851..8184ddc 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/ISystemInfo.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/ISystemInfo.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/IUserInfo.cs b/SafeExamBrowser.SystemComponents.Contracts/IUserInfo.cs index 98afdf8..bfdf042 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/IUserInfo.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/IUserInfo.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/Keyboard/Events/LayoutChangedEventHandler.cs b/SafeExamBrowser.SystemComponents.Contracts/Keyboard/Events/LayoutChangedEventHandler.cs index 98480ca..a2041d7 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/Keyboard/Events/LayoutChangedEventHandler.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/Keyboard/Events/LayoutChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/Keyboard/IKeyboard.cs b/SafeExamBrowser.SystemComponents.Contracts/Keyboard/IKeyboard.cs index f891c77..e4cf759 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/Keyboard/IKeyboard.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/Keyboard/IKeyboard.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/Keyboard/IKeyboardLayout.cs b/SafeExamBrowser.SystemComponents.Contracts/Keyboard/IKeyboardLayout.cs index 2a93467..8c0c217 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/Keyboard/IKeyboardLayout.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/Keyboard/IKeyboardLayout.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/Network/ConnectionStatus.cs b/SafeExamBrowser.SystemComponents.Contracts/Network/ConnectionStatus.cs index 8b9e5e9..4b9314a 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/Network/ConnectionStatus.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/Network/ConnectionStatus.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/Network/ConnectionType.cs b/SafeExamBrowser.SystemComponents.Contracts/Network/ConnectionType.cs index f8f3f47..da56f6a 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/Network/ConnectionType.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/Network/ConnectionType.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/Network/Events/ChangedEventHandler.cs b/SafeExamBrowser.SystemComponents.Contracts/Network/Events/ChangedEventHandler.cs index 083a247..21bb165 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/Network/Events/ChangedEventHandler.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/Network/Events/ChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/Network/Events/CredentialsRequiredEventArgs.cs b/SafeExamBrowser.SystemComponents.Contracts/Network/Events/CredentialsRequiredEventArgs.cs index 11a4ee6..7651ccc 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/Network/Events/CredentialsRequiredEventArgs.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/Network/Events/CredentialsRequiredEventArgs.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/Network/Events/CredentialsRequiredEventHandler.cs b/SafeExamBrowser.SystemComponents.Contracts/Network/Events/CredentialsRequiredEventHandler.cs index 08357be..81ba46e 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/Network/Events/CredentialsRequiredEventHandler.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/Network/Events/CredentialsRequiredEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/Network/INetworkAdapter.cs b/SafeExamBrowser.SystemComponents.Contracts/Network/INetworkAdapter.cs index ef98a53..074e983 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/Network/INetworkAdapter.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/Network/INetworkAdapter.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/Network/IWirelessNetwork.cs b/SafeExamBrowser.SystemComponents.Contracts/Network/IWirelessNetwork.cs index 965d5ed..11a53c9 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/Network/IWirelessNetwork.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/Network/IWirelessNetwork.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/OperatingSystem.cs b/SafeExamBrowser.SystemComponents.Contracts/OperatingSystem.cs index 72dd5f2..ed00df1 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/OperatingSystem.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/OperatingSystem.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/PowerSupply/BatteryChargeStatus.cs b/SafeExamBrowser.SystemComponents.Contracts/PowerSupply/BatteryChargeStatus.cs index 678a978..0770396 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/PowerSupply/BatteryChargeStatus.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/PowerSupply/BatteryChargeStatus.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/PowerSupply/Events/StatusChangedEventHandler.cs b/SafeExamBrowser.SystemComponents.Contracts/PowerSupply/Events/StatusChangedEventHandler.cs index b060f54..36b1d0d 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/PowerSupply/Events/StatusChangedEventHandler.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/PowerSupply/Events/StatusChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/PowerSupply/IPowerSupply.cs b/SafeExamBrowser.SystemComponents.Contracts/PowerSupply/IPowerSupply.cs index e481479..4d87a0a 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/PowerSupply/IPowerSupply.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/PowerSupply/IPowerSupply.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/PowerSupply/IPowerSupplyStatus.cs b/SafeExamBrowser.SystemComponents.Contracts/PowerSupply/IPowerSupplyStatus.cs index 5213b5b..fa46013 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/PowerSupply/IPowerSupplyStatus.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/PowerSupply/IPowerSupplyStatus.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/Properties/AssemblyInfo.cs b/SafeExamBrowser.SystemComponents.Contracts/Properties/AssemblyInfo.cs index 58bb5d8..1fb2d3f 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.SystemComponents.Contracts")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/Registry/Events/RegistryValueChangedEventHandler.cs b/SafeExamBrowser.SystemComponents.Contracts/Registry/Events/RegistryValueChangedEventHandler.cs index accb8e0..6b11f69 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/Registry/Events/RegistryValueChangedEventHandler.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/Registry/Events/RegistryValueChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/Registry/IRegistry.cs b/SafeExamBrowser.SystemComponents.Contracts/Registry/IRegistry.cs index ff3ddd9..e847fcd 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/Registry/IRegistry.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/Registry/IRegistry.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents.Contracts/Registry/RegistryValue.cs b/SafeExamBrowser.SystemComponents.Contracts/Registry/RegistryValue.cs index 9547dbe..83cf122 100644 --- a/SafeExamBrowser.SystemComponents.Contracts/Registry/RegistryValue.cs +++ b/SafeExamBrowser.SystemComponents.Contracts/Registry/RegistryValue.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents/Audio/Audio.cs b/SafeExamBrowser.SystemComponents/Audio/Audio.cs index 3992b5e..f3c643d 100644 --- a/SafeExamBrowser.SystemComponents/Audio/Audio.cs +++ b/SafeExamBrowser.SystemComponents/Audio/Audio.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents/FileSystem.cs b/SafeExamBrowser.SystemComponents/FileSystem.cs index b10a296..f3b417f 100644 --- a/SafeExamBrowser.SystemComponents/FileSystem.cs +++ b/SafeExamBrowser.SystemComponents/FileSystem.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents/Keyboard/Keyboard.cs b/SafeExamBrowser.SystemComponents/Keyboard/Keyboard.cs index 2be0a14..651fb20 100644 --- a/SafeExamBrowser.SystemComponents/Keyboard/Keyboard.cs +++ b/SafeExamBrowser.SystemComponents/Keyboard/Keyboard.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents/Keyboard/KeyboardLayout.cs b/SafeExamBrowser.SystemComponents/Keyboard/KeyboardLayout.cs index 293ae85..813e26a 100644 --- a/SafeExamBrowser.SystemComponents/Keyboard/KeyboardLayout.cs +++ b/SafeExamBrowser.SystemComponents/Keyboard/KeyboardLayout.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents/Network/Extensions.cs b/SafeExamBrowser.SystemComponents/Network/Extensions.cs index 73975f7..13a62c0 100644 --- a/SafeExamBrowser.SystemComponents/Network/Extensions.cs +++ b/SafeExamBrowser.SystemComponents/Network/Extensions.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents/Network/NetworkAdapter.cs b/SafeExamBrowser.SystemComponents/Network/NetworkAdapter.cs index a63d705..b62ceb5 100644 --- a/SafeExamBrowser.SystemComponents/Network/NetworkAdapter.cs +++ b/SafeExamBrowser.SystemComponents/Network/NetworkAdapter.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents/Network/WirelessNetwork.cs b/SafeExamBrowser.SystemComponents/Network/WirelessNetwork.cs index 4dca409..03d797d 100644 --- a/SafeExamBrowser.SystemComponents/Network/WirelessNetwork.cs +++ b/SafeExamBrowser.SystemComponents/Network/WirelessNetwork.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents/PowerSupply/PowerSupply.cs b/SafeExamBrowser.SystemComponents/PowerSupply/PowerSupply.cs index 8a2805c..abb7b8d 100644 --- a/SafeExamBrowser.SystemComponents/PowerSupply/PowerSupply.cs +++ b/SafeExamBrowser.SystemComponents/PowerSupply/PowerSupply.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents/PowerSupply/PowerSupplyStatus.cs b/SafeExamBrowser.SystemComponents/PowerSupply/PowerSupplyStatus.cs index ec94e78..0f8f65c 100644 --- a/SafeExamBrowser.SystemComponents/PowerSupply/PowerSupplyStatus.cs +++ b/SafeExamBrowser.SystemComponents/PowerSupply/PowerSupplyStatus.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents/Properties/AssemblyInfo.cs b/SafeExamBrowser.SystemComponents/Properties/AssemblyInfo.cs index 6ecad22..50869d8 100644 --- a/SafeExamBrowser.SystemComponents/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.SystemComponents/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.SystemComponents")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.SystemComponents/Registry/Registry.cs b/SafeExamBrowser.SystemComponents/Registry/Registry.cs index df658b5..c9df3a7 100644 --- a/SafeExamBrowser.SystemComponents/Registry/Registry.cs +++ b/SafeExamBrowser.SystemComponents/Registry/Registry.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents/SafeExamBrowser.SystemComponents.csproj b/SafeExamBrowser.SystemComponents/SafeExamBrowser.SystemComponents.csproj index c29e936..2efd494 100644 --- a/SafeExamBrowser.SystemComponents/SafeExamBrowser.SystemComponents.csproj +++ b/SafeExamBrowser.SystemComponents/SafeExamBrowser.SystemComponents.csproj @@ -96,7 +96,7 @@ 5.0.0 - 10.0.17134.1000 + 10.0.26100.1742 2.2.1 diff --git a/SafeExamBrowser.SystemComponents/SystemInfo.cs b/SafeExamBrowser.SystemComponents/SystemInfo.cs index e858be9..aece6d7 100644 --- a/SafeExamBrowser.SystemComponents/SystemInfo.cs +++ b/SafeExamBrowser.SystemComponents/SystemInfo.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.SystemComponents/UserInfo.cs b/SafeExamBrowser.SystemComponents/UserInfo.cs index 0eb2757..d6cc116 100644 --- a/SafeExamBrowser.SystemComponents/UserInfo.cs +++ b/SafeExamBrowser.SystemComponents/UserInfo.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Browser/Data/DownloadItemState.cs b/SafeExamBrowser.UserInterface.Contracts/Browser/Data/DownloadItemState.cs index f4dfba6..ebc7745 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Browser/Data/DownloadItemState.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Browser/Data/DownloadItemState.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -16,7 +16,7 @@ namespace SafeExamBrowser.UserInterface.Contracts.Browser.Data public class DownloadItemState { /// - /// The current completion of the item, as percentage value from 0.0 to 1.0. + /// The current completion of the item (if available, see ), as percentage value from 0.0 to 1.0. /// public double Completion { get; set; } @@ -40,6 +40,16 @@ namespace SafeExamBrowser.UserInterface.Contracts.Browser.Data /// public bool IsComplete { get; set; } + /// + /// Indicates whether the is known or not. + /// + public bool IsIndeterminate { get; set; } + + /// + /// The current size of the download item in bytes. + /// + public long Size { get; set; } + /// /// The download URL of the item. /// diff --git a/SafeExamBrowser.UserInterface.Contracts/Browser/Data/JavascriptResult.cs b/SafeExamBrowser.UserInterface.Contracts/Browser/Data/JavascriptResult.cs index f93fc0b..c619788 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Browser/Data/JavascriptResult.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Browser/Data/JavascriptResult.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Browser/Events/AddressChangedEventHandler.cs b/SafeExamBrowser.UserInterface.Contracts/Browser/Events/AddressChangedEventHandler.cs index 0ec39be..956d0c4 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Browser/Events/AddressChangedEventHandler.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Browser/Events/AddressChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Browser/Events/FindRequestedEventHandler.cs b/SafeExamBrowser.UserInterface.Contracts/Browser/Events/FindRequestedEventHandler.cs index 8bb351a..93d9cab 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Browser/Events/FindRequestedEventHandler.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Browser/Events/FindRequestedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Browser/Events/LoadFailedEventHandler.cs b/SafeExamBrowser.UserInterface.Contracts/Browser/Events/LoadFailedEventHandler.cs index 31da350..93e605a 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Browser/Events/LoadFailedEventHandler.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Browser/Events/LoadFailedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Browser/Events/LoadingStateChangedEventHandler.cs b/SafeExamBrowser.UserInterface.Contracts/Browser/Events/LoadingStateChangedEventHandler.cs index fac6140..77fe776 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Browser/Events/LoadingStateChangedEventHandler.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Browser/Events/LoadingStateChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Browser/Events/TitleChangedEventHandler.cs b/SafeExamBrowser.UserInterface.Contracts/Browser/Events/TitleChangedEventHandler.cs index 3d1d903..26b22f0 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Browser/Events/TitleChangedEventHandler.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Browser/Events/TitleChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Browser/IBrowserControl.cs b/SafeExamBrowser.UserInterface.Contracts/Browser/IBrowserControl.cs index 4e78332..8289fb9 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Browser/IBrowserControl.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Browser/IBrowserControl.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Browser/IBrowserWindow.cs b/SafeExamBrowser.UserInterface.Contracts/Browser/IBrowserWindow.cs index 9938655..c9daeb3 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Browser/IBrowserWindow.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Browser/IBrowserWindow.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Events/ActionRequestedEventHandler.cs b/SafeExamBrowser.UserInterface.Contracts/Events/ActionRequestedEventHandler.cs index 0ad67f9..1bfb749 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Events/ActionRequestedEventHandler.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Events/ActionRequestedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/FileSystemDialogResult.cs b/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/FileSystemDialogResult.cs index 7d77d85..30e0ab9 100644 --- a/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/FileSystemDialogResult.cs +++ b/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/FileSystemDialogResult.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/FileSystemElement.cs b/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/FileSystemElement.cs index 1b84885..e3809c6 100644 --- a/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/FileSystemElement.cs +++ b/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/FileSystemElement.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/FileSystemOperation.cs b/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/FileSystemOperation.cs index 9d6557b..0713329 100644 --- a/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/FileSystemOperation.cs +++ b/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/FileSystemOperation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/IFileSystemDialog.cs b/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/IFileSystemDialog.cs index 3ba370e..2937dcd 100644 --- a/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/IFileSystemDialog.cs +++ b/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/IFileSystemDialog.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/IProgressIndicator.cs b/SafeExamBrowser.UserInterface.Contracts/IProgressIndicator.cs index 9529c2d..d645a48 100644 --- a/SafeExamBrowser.UserInterface.Contracts/IProgressIndicator.cs +++ b/SafeExamBrowser.UserInterface.Contracts/IProgressIndicator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/IUserInterfaceFactory.cs b/SafeExamBrowser.UserInterface.Contracts/IUserInterfaceFactory.cs index 35fa290..fdb494f 100644 --- a/SafeExamBrowser.UserInterface.Contracts/IUserInterfaceFactory.cs +++ b/SafeExamBrowser.UserInterface.Contracts/IUserInterfaceFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/MessageBox/IMessageBox.cs b/SafeExamBrowser.UserInterface.Contracts/MessageBox/IMessageBox.cs index 8ee1bb7..639fdcb 100644 --- a/SafeExamBrowser.UserInterface.Contracts/MessageBox/IMessageBox.cs +++ b/SafeExamBrowser.UserInterface.Contracts/MessageBox/IMessageBox.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/MessageBox/MessageBoxAction.cs b/SafeExamBrowser.UserInterface.Contracts/MessageBox/MessageBoxAction.cs index 32d60b9..09f191d 100644 --- a/SafeExamBrowser.UserInterface.Contracts/MessageBox/MessageBoxAction.cs +++ b/SafeExamBrowser.UserInterface.Contracts/MessageBox/MessageBoxAction.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/MessageBox/MessageBoxIcon.cs b/SafeExamBrowser.UserInterface.Contracts/MessageBox/MessageBoxIcon.cs index caca4e3..7aec882 100644 --- a/SafeExamBrowser.UserInterface.Contracts/MessageBox/MessageBoxIcon.cs +++ b/SafeExamBrowser.UserInterface.Contracts/MessageBox/MessageBoxIcon.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/MessageBox/MessageBoxResult.cs b/SafeExamBrowser.UserInterface.Contracts/MessageBox/MessageBoxResult.cs index 64f15ed..97a536f 100644 --- a/SafeExamBrowser.UserInterface.Contracts/MessageBox/MessageBoxResult.cs +++ b/SafeExamBrowser.UserInterface.Contracts/MessageBox/MessageBoxResult.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Proctoring/Events/FullScreenChangedEventHandler.cs b/SafeExamBrowser.UserInterface.Contracts/Proctoring/Events/FullScreenChangedEventHandler.cs index 84bcc66..d22b67a 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Proctoring/Events/FullScreenChangedEventHandler.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Proctoring/Events/FullScreenChangedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Proctoring/IProctoringControl.cs b/SafeExamBrowser.UserInterface.Contracts/Proctoring/IProctoringControl.cs index d9cd3fb..dd7faaf 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Proctoring/IProctoringControl.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Proctoring/IProctoringControl.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Proctoring/IProctoringFinalizationDialog.cs b/SafeExamBrowser.UserInterface.Contracts/Proctoring/IProctoringFinalizationDialog.cs index 96c634e..9d2ae91 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Proctoring/IProctoringFinalizationDialog.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Proctoring/IProctoringFinalizationDialog.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Proctoring/IProctoringWindow.cs b/SafeExamBrowser.UserInterface.Contracts/Proctoring/IProctoringWindow.cs index 24e8028..c2018c3 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Proctoring/IProctoringWindow.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Proctoring/IProctoringWindow.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Properties/AssemblyInfo.cs b/SafeExamBrowser.UserInterface.Contracts/Properties/AssemblyInfo.cs index 94a83ce..b2dd314 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.UserInterface.Contracts")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Shell/Events/ActivatorEventHandler.cs b/SafeExamBrowser.UserInterface.Contracts/Shell/Events/ActivatorEventHandler.cs index 4d5b1f4..4ef9a70 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Shell/Events/ActivatorEventHandler.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Shell/Events/ActivatorEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Shell/Events/QuitButtonClickedEventHandler.cs b/SafeExamBrowser.UserInterface.Contracts/Shell/Events/QuitButtonClickedEventHandler.cs index 84ddb68..32e93e8 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Shell/Events/QuitButtonClickedEventHandler.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Shell/Events/QuitButtonClickedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Shell/IActionCenter.cs b/SafeExamBrowser.UserInterface.Contracts/Shell/IActionCenter.cs index 5c0c016..b7c13d0 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Shell/IActionCenter.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Shell/IActionCenter.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Shell/IActionCenterActivator.cs b/SafeExamBrowser.UserInterface.Contracts/Shell/IActionCenterActivator.cs index a1e2f6b..baa684c 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Shell/IActionCenterActivator.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Shell/IActionCenterActivator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Shell/IActivator.cs b/SafeExamBrowser.UserInterface.Contracts/Shell/IActivator.cs index decb34f..7f2728b 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Shell/IActivator.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Shell/IActivator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Shell/IApplicationControl.cs b/SafeExamBrowser.UserInterface.Contracts/Shell/IApplicationControl.cs index db4d16b..ad6de6c 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Shell/IApplicationControl.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Shell/IApplicationControl.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Shell/INotificationControl.cs b/SafeExamBrowser.UserInterface.Contracts/Shell/INotificationControl.cs index a0459b6..4ba3290 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Shell/INotificationControl.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Shell/INotificationControl.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Shell/ISystemControl.cs b/SafeExamBrowser.UserInterface.Contracts/Shell/ISystemControl.cs index d879697..127c1f1 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Shell/ISystemControl.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Shell/ISystemControl.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Shell/ITaskView.cs b/SafeExamBrowser.UserInterface.Contracts/Shell/ITaskView.cs index 5ff21d8..a89530f 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Shell/ITaskView.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Shell/ITaskView.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Shell/ITaskViewActivator.cs b/SafeExamBrowser.UserInterface.Contracts/Shell/ITaskViewActivator.cs index 364e2e1..96ed1d1 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Shell/ITaskViewActivator.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Shell/ITaskViewActivator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Shell/ITaskbar.cs b/SafeExamBrowser.UserInterface.Contracts/Shell/ITaskbar.cs index 8d7e23b..1c7b05a 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Shell/ITaskbar.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Shell/ITaskbar.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Shell/ITaskbarActivator.cs b/SafeExamBrowser.UserInterface.Contracts/Shell/ITaskbarActivator.cs index c9473c8..31b9c84 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Shell/ITaskbarActivator.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Shell/ITaskbarActivator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Shell/ITerminationActivator.cs b/SafeExamBrowser.UserInterface.Contracts/Shell/ITerminationActivator.cs index a03753c..0812ef1 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Shell/ITerminationActivator.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Shell/ITerminationActivator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Shell/Location.cs b/SafeExamBrowser.UserInterface.Contracts/Shell/Location.cs index 4d19dff..9420cda 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Shell/Location.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Shell/Location.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Windows/Data/CredentialsDialogPurpose.cs b/SafeExamBrowser.UserInterface.Contracts/Windows/Data/CredentialsDialogPurpose.cs index 5f7686e..68a9355 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Windows/Data/CredentialsDialogPurpose.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Windows/Data/CredentialsDialogPurpose.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Windows/Data/CredentialsDialogResult.cs b/SafeExamBrowser.UserInterface.Contracts/Windows/Data/CredentialsDialogResult.cs index d268603..fb96486 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Windows/Data/CredentialsDialogResult.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Windows/Data/CredentialsDialogResult.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Windows/Data/ExamSelectionDialogResult.cs b/SafeExamBrowser.UserInterface.Contracts/Windows/Data/ExamSelectionDialogResult.cs index 1186c9e..b3e415f 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Windows/Data/ExamSelectionDialogResult.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Windows/Data/ExamSelectionDialogResult.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Windows/Data/LockScreenOption.cs b/SafeExamBrowser.UserInterface.Contracts/Windows/Data/LockScreenOption.cs index 3f0314b..25a079c 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Windows/Data/LockScreenOption.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Windows/Data/LockScreenOption.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Windows/Data/LockScreenResult.cs b/SafeExamBrowser.UserInterface.Contracts/Windows/Data/LockScreenResult.cs index efe54e3..bbf335f 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Windows/Data/LockScreenResult.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Windows/Data/LockScreenResult.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Windows/Data/PasswordDialogResult.cs b/SafeExamBrowser.UserInterface.Contracts/Windows/Data/PasswordDialogResult.cs index 0b39915..b690851 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Windows/Data/PasswordDialogResult.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Windows/Data/PasswordDialogResult.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Windows/Data/ServerFailureDialogResult.cs b/SafeExamBrowser.UserInterface.Contracts/Windows/Data/ServerFailureDialogResult.cs index 245dc37..9204403 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Windows/Data/ServerFailureDialogResult.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Windows/Data/ServerFailureDialogResult.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Windows/Events/WindowClosedEventHandler.cs b/SafeExamBrowser.UserInterface.Contracts/Windows/Events/WindowClosedEventHandler.cs index 8b40990..605e172 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Windows/Events/WindowClosedEventHandler.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Windows/Events/WindowClosedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Windows/Events/WindowClosingEventHandler.cs b/SafeExamBrowser.UserInterface.Contracts/Windows/Events/WindowClosingEventHandler.cs index d29f8ea..4e3b986 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Windows/Events/WindowClosingEventHandler.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Windows/Events/WindowClosingEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Windows/ICredentialsDialog.cs b/SafeExamBrowser.UserInterface.Contracts/Windows/ICredentialsDialog.cs index b2b3ff8..49a6f3d 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Windows/ICredentialsDialog.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Windows/ICredentialsDialog.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Windows/IExamSelectionDialog.cs b/SafeExamBrowser.UserInterface.Contracts/Windows/IExamSelectionDialog.cs index 4c95e7f..bfa2c93 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Windows/IExamSelectionDialog.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Windows/IExamSelectionDialog.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Windows/ILockScreen.cs b/SafeExamBrowser.UserInterface.Contracts/Windows/ILockScreen.cs index b492a98..f724a8e 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Windows/ILockScreen.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Windows/ILockScreen.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Windows/IPasswordDialog.cs b/SafeExamBrowser.UserInterface.Contracts/Windows/IPasswordDialog.cs index 1e1c24a..d282ad4 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Windows/IPasswordDialog.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Windows/IPasswordDialog.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Windows/IRuntimeWindow.cs b/SafeExamBrowser.UserInterface.Contracts/Windows/IRuntimeWindow.cs index 3ab2526..f1fdf16 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Windows/IRuntimeWindow.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Windows/IRuntimeWindow.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Windows/IServerFailureDialog.cs b/SafeExamBrowser.UserInterface.Contracts/Windows/IServerFailureDialog.cs index 3ea8e70..4359e68 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Windows/IServerFailureDialog.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Windows/IServerFailureDialog.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Windows/ISplashScreen.cs b/SafeExamBrowser.UserInterface.Contracts/Windows/ISplashScreen.cs index 1ebce3e..4464a14 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Windows/ISplashScreen.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Windows/ISplashScreen.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Contracts/Windows/IWindow.cs b/SafeExamBrowser.UserInterface.Contracts/Windows/IWindow.cs index ba7d09f..53dc9c4 100644 --- a/SafeExamBrowser.UserInterface.Contracts/Windows/IWindow.cs +++ b/SafeExamBrowser.UserInterface.Contracts/Windows/IWindow.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/ApplicationButton.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/ApplicationButton.xaml.cs index e3bb1ff..395e711 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/ApplicationButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/ApplicationButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/ApplicationControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/ApplicationControl.xaml.cs index d99ec80..92f4fad 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/ApplicationControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/ApplicationControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/AudioControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/AudioControl.xaml.cs index b0ffbb1..07f2be9 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/AudioControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/AudioControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/Clock.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/Clock.xaml.cs index 4719cb4..a4a57e4 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/Clock.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/Clock.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/KeyboardLayoutButton.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/KeyboardLayoutButton.xaml.cs index 8cb1509..c04fc6f 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/KeyboardLayoutButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/KeyboardLayoutButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/KeyboardLayoutControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/KeyboardLayoutControl.xaml.cs index 83c7270..a752941 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/KeyboardLayoutControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/KeyboardLayoutControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NetworkButton.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NetworkButton.xaml.cs index b1f5993..ad48309 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NetworkButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NetworkButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NetworkControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NetworkControl.xaml.cs index ee636b9..97be1a8 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NetworkControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NetworkControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NotificationButton.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NotificationButton.xaml.cs index fe6457f..716dc97 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NotificationButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NotificationButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/PowerSupplyControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/PowerSupplyControl.xaml.cs index ba12740..751bb2b 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/PowerSupplyControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/PowerSupplyControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/QuitButton.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/QuitButton.xaml.cs index 3b773da..1e3b4bb 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/QuitButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/QuitButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/RaiseHandControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/RaiseHandControl.xaml.cs index 4110b97..dc9aae6 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/RaiseHandControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/RaiseHandControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Browser/DownloadItemControl.xaml b/SafeExamBrowser.UserInterface.Desktop/Controls/Browser/DownloadItemControl.xaml index 5de9df5..5d4fc15 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/Browser/DownloadItemControl.xaml +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Browser/DownloadItemControl.xaml @@ -17,6 +17,6 @@ - + diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Browser/DownloadItemControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Browser/DownloadItemControl.xaml.cs index 2065d27..afedb8e 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/Browser/DownloadItemControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Browser/DownloadItemControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -17,7 +17,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.Browser { internal partial class DownloadItemControl : UserControl { - private IText text; + private readonly IText text; internal Guid Id { get; } @@ -31,26 +31,75 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.Browser internal void Update(DownloadItemState state) { - ItemName.Text = Uri.TryCreate(state.Url, UriKind.Absolute, out var uri) ? Path.GetFileName(uri.AbsolutePath) : state.Url; - Progress.Value = state.Completion * 100; - Status.Text = $"{text.Get(TextKey.BrowserWindow_Downloading)} ({state.Completion * 100}%)"; - - if (File.Exists(state.FullPath)) - { - ItemName.Text = Path.GetFileName(state.FullPath); - Icon.Content = new Image { Source = IconLoader.LoadIconFor(new FileInfo(state.FullPath)) }; - } + InitializeIcon(state); + InitializeName(state); if (state.IsCancelled) { - Progress.Visibility = System.Windows.Visibility.Collapsed; - Status.Text = text.Get(TextKey.BrowserWindow_DownloadCancelled); + ShowCancelled(); } else if (state.IsComplete) { - Progress.Visibility = System.Windows.Visibility.Collapsed; - Status.Text = text.Get(TextKey.BrowserWindow_DownloadComplete); + ShowCompleted(state); } + else + { + ShowProgress(state); + } + } + + private string BuildSizeInfo(DownloadItemState state) + { + return state.Size > 1000000 ? $"{state.Size / 1000000.0:N1} MB" : $"{state.Size / 1000.0:N1} kB"; + } + + private void InitializeIcon(DownloadItemState state) + { + if (Icon.Content == default && File.Exists(state.FullPath)) + { + Icon.Content = new Image { Source = IconLoader.LoadIconFor(new FileInfo(state.FullPath)) }; + } + } + + private void InitializeName(DownloadItemState state) + { + var fileName = Path.GetFileName(state.FullPath); + + if (ItemName.Text != fileName && File.Exists(state.FullPath)) + { + ItemName.Text = fileName; + } + else if (string.IsNullOrEmpty(ItemName.Text)) + { + ItemName.Text = Uri.TryCreate(state.Url, UriKind.Absolute, out var uri) ? Path.GetFileName(uri.AbsolutePath) : state.Url; + } + } + + private void ShowCancelled() + { + Progress.IsIndeterminate = false; + Progress.Visibility = System.Windows.Visibility.Collapsed; + Status.Text = text.Get(TextKey.BrowserWindow_DownloadCancelled); + } + + private void ShowCompleted(DownloadItemState state) + { + Progress.IsIndeterminate = false; + Progress.Visibility = System.Windows.Visibility.Collapsed; + Status.Text = $"{BuildSizeInfo(state)} — {text.Get(TextKey.BrowserWindow_DownloadComplete)}"; + + if (File.Exists(state.FullPath)) + { + Icon.Content = new Image { Source = IconLoader.LoadIconFor(new FileInfo(state.FullPath)) }; + ItemName.Text = Path.GetFileName(state.FullPath); + } + } + + private void ShowProgress(DownloadItemState state) + { + Progress.IsIndeterminate = state.IsIndeterminate; + Progress.Value = state.Completion * 100; + Status.Text = $"{BuildSizeInfo(state)} — {text.Get(TextKey.BrowserWindow_Downloading)}{(state.IsIndeterminate ? "" : $" ({state.Completion * 100}%)")}"; } } } diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/ApplicationControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/ApplicationControl.xaml.cs index f91fc8f..1180883 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/ApplicationControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/ApplicationControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/ApplicationWindowButton.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/ApplicationWindowButton.xaml.cs index bd200fb..5fab83b 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/ApplicationWindowButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/ApplicationWindowButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/AudioControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/AudioControl.xaml.cs index a6ca35b..3bdc5df 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/AudioControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/AudioControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/Clock.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/Clock.xaml.cs index e245940..a384d2b 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/Clock.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/Clock.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/KeyboardLayoutButton.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/KeyboardLayoutButton.xaml.cs index 6d70a30..3e09a0b 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/KeyboardLayoutButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/KeyboardLayoutButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/KeyboardLayoutControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/KeyboardLayoutControl.xaml.cs index 3855fb5..f03e7e5 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/KeyboardLayoutControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/KeyboardLayoutControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/NetworkButton.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/NetworkButton.xaml.cs index 962a3da..474f82a 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/NetworkButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/NetworkButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/NetworkControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/NetworkControl.xaml.cs index 1d2cf1c..0af0077 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/NetworkControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/NetworkControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/NotificationButton.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/NotificationButton.xaml.cs index bedc427..59efb1f 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/NotificationButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/NotificationButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/PowerSupplyControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/PowerSupplyControl.xaml.cs index 17b05b5..891f161 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/PowerSupplyControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/PowerSupplyControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/QuitButton.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/QuitButton.xaml.cs index 48148c2..182c150 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/QuitButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/QuitButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/RaiseHandControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/RaiseHandControl.xaml.cs index 994527a..8f6f597 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/RaiseHandControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/RaiseHandControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskview/WindowControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskview/WindowControl.xaml.cs index cb82955..d8fc94c 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskview/WindowControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskview/WindowControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/FileSystemDialogFactory.cs b/SafeExamBrowser.UserInterface.Desktop/FileSystemDialogFactory.cs index ed23403..323d5df 100644 --- a/SafeExamBrowser.UserInterface.Desktop/FileSystemDialogFactory.cs +++ b/SafeExamBrowser.UserInterface.Desktop/FileSystemDialogFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/MessageBoxFactory.cs b/SafeExamBrowser.UserInterface.Desktop/MessageBoxFactory.cs index 015864b..345ad28 100644 --- a/SafeExamBrowser.UserInterface.Desktop/MessageBoxFactory.cs +++ b/SafeExamBrowser.UserInterface.Desktop/MessageBoxFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Properties/AssemblyInfo.cs b/SafeExamBrowser.UserInterface.Desktop/Properties/AssemblyInfo.cs index d9d8589..2dbe2f9 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Properties/AssemblyInfo.cs @@ -9,7 +9,7 @@ using System.Windows; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.UserInterface.Desktop")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 @@ -46,6 +46,6 @@ using System.Windows; // 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("3.8.0.742")] -[assembly: AssemblyFileVersion("3.8.0.742")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0.0")] diff --git a/SafeExamBrowser.UserInterface.Desktop/UserInterfaceFactory.cs b/SafeExamBrowser.UserInterface.Desktop/UserInterfaceFactory.cs index 3487f5c..6deebf3 100644 --- a/SafeExamBrowser.UserInterface.Desktop/UserInterfaceFactory.cs +++ b/SafeExamBrowser.UserInterface.Desktop/UserInterfaceFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/ViewModels/DateTimeViewModel.cs b/SafeExamBrowser.UserInterface.Desktop/ViewModels/DateTimeViewModel.cs index 186166c..60eeba6 100644 --- a/SafeExamBrowser.UserInterface.Desktop/ViewModels/DateTimeViewModel.cs +++ b/SafeExamBrowser.UserInterface.Desktop/ViewModels/DateTimeViewModel.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/ViewModels/LogViewModel.cs b/SafeExamBrowser.UserInterface.Desktop/ViewModels/LogViewModel.cs index fb04c35..815f02f 100644 --- a/SafeExamBrowser.UserInterface.Desktop/ViewModels/LogViewModel.cs +++ b/SafeExamBrowser.UserInterface.Desktop/ViewModels/LogViewModel.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/ViewModels/ProgressIndicatorViewModel.cs b/SafeExamBrowser.UserInterface.Desktop/ViewModels/ProgressIndicatorViewModel.cs index 8614537..179acdc 100644 --- a/SafeExamBrowser.UserInterface.Desktop/ViewModels/ProgressIndicatorViewModel.cs +++ b/SafeExamBrowser.UserInterface.Desktop/ViewModels/ProgressIndicatorViewModel.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/ViewModels/RuntimeWindowViewModel.cs b/SafeExamBrowser.UserInterface.Desktop/ViewModels/RuntimeWindowViewModel.cs index 13fb161..deadb8b 100644 --- a/SafeExamBrowser.UserInterface.Desktop/ViewModels/RuntimeWindowViewModel.cs +++ b/SafeExamBrowser.UserInterface.Desktop/ViewModels/RuntimeWindowViewModel.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/AboutWindow.xaml b/SafeExamBrowser.UserInterface.Desktop/Windows/AboutWindow.xaml index f9aa9b8..f305211 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/AboutWindow.xaml +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/AboutWindow.xaml @@ -30,52 +30,57 @@ .NET Framework - Copyright © 2002-2024 Microsoft. All rights reserved. + Copyright © 2002-2025 Microsoft. All rights reserved. + + + Bouncy Castle + + Copyright © 2000-2025 Legion of the Bouncy Castle Inc. All rights reserved. CefSharp (.NET bindings for the Chromium Embedded Framework) - Copyright © 2010-2024 The CefSharp Authors. All rights reserved. + Copyright © 2010-2025 The CefSharp Authors. All rights reserved. CEF (Chromium Embedded Framework) - Copyright © 2008-2024 The Chromium Embedded Framework Authors. All rights reserved. + Copyright © 2008-2025 The Chromium Embedded Framework Authors. All rights reserved. Font-Awesome-WPF - Copyright © 2014-2024 charri. All rights reserved. + Copyright © 2014-2025 charri. All rights reserved. KGy SOFT Core & Drawing Libraries - Copyright © 2005-2024 KGy SOFT. All rights reserved. + Copyright © 2005-2025 KGy SOFT. All rights reserved. KnownFolders - Copyright © 2017-2024 Syroot. All rights reserved. + Copyright © 2017-2025 Syroot. All rights reserved. Microsoft.Windows.SDK.Contracts - Copyright © 2019-2024 Microsoft. All rights reserved. + Copyright © 2019-2025 Microsoft. All rights reserved. NAudio - Copyright © 2008-2024 Mark Heath & contributors. All rights reserved. + Copyright © 2008-2025 Mark Heath & contributors. All rights reserved. Newtonsoft.Json - Copyright © 2007-2024 James Newton-King. All rights reserved. + Copyright © 2007-2025 James Newton-King. All rights reserved. Visual C++ Redistributable - Copyright © 1993-2024 Microsoft. All rights reserved. + Copyright © 1993-2025 Microsoft. All rights reserved. diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/AboutWindow.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/AboutWindow.xaml.cs index 1528637..8f015c7 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/AboutWindow.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/AboutWindow.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/ActionCenter.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/ActionCenter.xaml.cs index 9f04cfe..65633b8 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/ActionCenter.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/ActionCenter.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -96,12 +96,12 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows public void Promote() { - Task.Run(() => - { - Dispatcher.Invoke(ShowAnimated); - Thread.Sleep(2000); - Dispatcher.Invoke(HideAnimated); - }); + //Task.Run(() => + //{ + // Dispatcher.Invoke(ShowAnimated); + // Thread.Sleep(2000); + // Dispatcher.Invoke(HideAnimated); + //}); } public void Register(IActionCenterActivator activator) diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/BrowserWindow.xaml b/SafeExamBrowser.UserInterface.Desktop/Windows/BrowserWindow.xaml index 718419c..a7a7753 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/BrowserWindow.xaml +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/BrowserWindow.xaml @@ -4,6 +4,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:fa="http://schemas.fontawesome.io/icons/" + xmlns:local="clr-namespace:SafeExamBrowser.UserInterface.Desktop.Controls" mc:Ignorable="d" Background="#FFF0F0F0" Height="500" Width="750" MinHeight="250" MinWidth="250" Icon="../Images/SafeExamBrowser.ico"> diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/BrowserWindow.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/BrowserWindow.xaml.cs index 1f6538f..7490cf8 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/BrowserWindow.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/BrowserWindow.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -8,8 +8,10 @@ using System; using System.ComponentModel; +using System.Linq; using System.Threading.Tasks; using System.Windows; +using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Input; using System.Windows.Interop; @@ -42,8 +44,8 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows private WindowClosedEventHandler closed; private WindowClosingEventHandler closing; - private bool browserControlGetsFocusFromTaskbar = false; - private IInputElement tabKeyDownFocusElement = null; + private bool browserControlGetsFocusFromTaskbar; + private IInputElement tabKeyDownFocusElement; private WindowSettings WindowSettings { @@ -65,7 +67,6 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows public event ActionRequestedEventHandler ZoomOutRequested; public event ActionRequestedEventHandler ZoomResetRequested; public event LoseFocusRequestedEventHandler LoseFocusRequested; - internal event TerminationRequestedEventHandler TerminationRequested; event WindowClosedEventHandler IWindow.Closed { @@ -198,27 +199,15 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows { Dispatcher.InvokeAsync(() => { - var isNewItem = true; + var control = Downloads.Children.OfType().FirstOrDefault(c => c.Id == state.Id); - foreach (var child in Downloads.Children) + if (control == default) { - if (child is DownloadItemControl control && control.Id == state.Id) - { - control.Update(state); - isNewItem = false; - - break; - } - } - - if (isNewItem) - { - var control = new DownloadItemControl(state.Id, text); - - control.Update(state); + control = new DownloadItemControl(state.Id, text); Downloads.Children.Add(control); } + control.Update(state); DownloadsButton.Visibility = Visibility.Visible; DownloadsPopup.IsOpen = IsActive; }); @@ -253,8 +242,10 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows { if (isMainWindow) { + //e.Cancel = true; Dispatcher.Invoke(() => { + Closing -= BrowserWindow_Closing; closing?.Invoke(); base.Close(); }); @@ -263,16 +254,6 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows { closing?.Invoke(); } - /* - if (isMainWindow) - { - e.Cancel = true; - } - else - { - closing?.Invoke(); - } - */ } private void BrowserWindow_KeyDown(object sender, KeyEventArgs e) @@ -341,10 +322,8 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows else if (MenuPopup.IsKeyboardFocusWithin) { var focusedElement = FocusManager.GetFocusedElement(this); - var focusedControl = focusedElement as System.Windows.Controls.Control; - var prevFocusedControl = tabKeyDownFocusElement as System.Windows.Controls.Control; - if (focusedControl != null && prevFocusedControl != null) + if (focusedElement is Control focusedControl && tabKeyDownFocusElement is Control prevFocusedControl) { if (!hasShift && focusedControl.TabIndex < prevFocusedControl.TabIndex) { @@ -540,34 +519,31 @@ if (typeof __SEB_focusElement === 'undefined') { private void ApplySettings() { - BackwardButton.IsEnabled = true; - BackwardButton.Visibility = Visibility.Visible; - DeveloperConsoleMenuItem.Visibility = Visibility.Visible; - FindMenuItem.Visibility =Visibility.Visible; - ForwardButton.IsEnabled = true; - ForwardButton.Visibility = Visibility.Visible; - HomeButton.IsEnabled = true; - HomeButton.Visibility = Visibility.Visible; - ReloadButton.IsEnabled = true; - ReloadButton.Visibility = Visibility.Visible; - Toolbar.Visibility = Visibility.Visible; - UrlTextBox.Visibility = Visibility.Visible; - ZoomMenuItem.Visibility = Visibility.Visible; + BackwardButton.IsEnabled = WindowSettings.AllowBackwardNavigation; + BackwardButton.Visibility = WindowSettings.AllowBackwardNavigation ? Visibility.Visible : Visibility.Collapsed; + DeveloperConsoleMenuItem.Visibility = WindowSettings.AllowDeveloperConsole ? Visibility.Visible : Visibility.Collapsed; + FindMenuItem.Visibility = settings.AllowFind ? Visibility.Visible : Visibility.Collapsed; + ForwardButton.IsEnabled = WindowSettings.AllowForwardNavigation; + ForwardButton.Visibility = WindowSettings.AllowForwardNavigation ? Visibility.Visible : Visibility.Collapsed; + HomeButton.IsEnabled = WindowSettings.ShowHomeButton; + HomeButton.Visibility = WindowSettings.ShowHomeButton ? Visibility.Visible : Visibility.Collapsed; + ReloadButton.IsEnabled = WindowSettings.AllowReloading; + ReloadButton.Visibility = WindowSettings.ShowReloadButton ? Visibility.Visible : Visibility.Collapsed; + Toolbar.Visibility = WindowSettings.ShowToolbar ? Visibility.Visible : Visibility.Collapsed; + UrlTextBox.Visibility = WindowSettings.AllowAddressBar ? Visibility.Visible : Visibility.Hidden; + ZoomMenuItem.Visibility = settings.AllowPageZoom ? Visibility.Visible : Visibility.Collapsed; } private void InitializeBounds() { if (isMainWindow && WindowSettings.FullScreenMode) { - /* Top = 0; Left = 0; Height = SystemParameters.WorkArea.Height; Width = SystemParameters.WorkArea.Width; ResizeMode = ResizeMode.NoResize; WindowStyle = WindowStyle.None; - */ - WindowState = WindowState.Maximized; } else if (WindowSettings.RelativeHeight == 100 && WindowSettings.RelativeWidth == 100) { diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/CredentialsDialog.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/CredentialsDialog.xaml.cs index 74c4dfd..555d499 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/CredentialsDialog.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/CredentialsDialog.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/ExamSelectionDialog.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/ExamSelectionDialog.xaml.cs index ebabde6..75adea3 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/ExamSelectionDialog.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/ExamSelectionDialog.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/FileSystemDialog.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/FileSystemDialog.xaml.cs index 7e8d692..baf4a7c 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/FileSystemDialog.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/FileSystemDialog.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/LockScreen.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/LockScreen.xaml.cs index 5da4463..b5f62ff 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/LockScreen.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/LockScreen.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/LogWindow.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/LogWindow.xaml.cs index 6de1439..3033f8d 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/LogWindow.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/LogWindow.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/PasswordDialog.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/PasswordDialog.xaml.cs index 98180c7..dd85d8c 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/PasswordDialog.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/PasswordDialog.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringFinalizationDialog.xaml b/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringFinalizationDialog.xaml index 3f75ddc..316d6f8 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringFinalizationDialog.xaml +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringFinalizationDialog.xaml @@ -5,7 +5,7 @@ xmlns:fa="http://schemas.fontawesome.io/icons/" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:SafeExamBrowser.UserInterface.Desktop.Windows" - mc:Ignorable="d" Height="250" Width="650" ResizeMode="NoResize" Topmost="True" WindowStartupLocation="CenterScreen"> + mc:Ignorable="d" Height="275" Width="650" ResizeMode="NoResize" Topmost="True" WindowStartupLocation="CenterScreen"> diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringFinalizationDialog.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringFinalizationDialog.xaml.cs index 391fc28..b710de0 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringFinalizationDialog.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringFinalizationDialog.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -19,6 +19,9 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows { private readonly IText text; + private bool cancellationRequested; + private bool initialized; + public ProctoringFinalizationDialog(IText text) { this.text = text; @@ -53,14 +56,14 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows private void InitializeDialog() { - Button.Click += (o, args) => Close(); - Button.Content = text.Get(TextKey.ProctoringFinalizationDialog_Confirm); Loaded += (o, args) => this.DisableCloseButton(); Title = text.Get(TextKey.ProctoringFinalizationDialog_Title); } private void ShowFailure(RemainingWorkUpdatedEventArgs status) { + Button.Click += (o, args) => Close(); + Button.Content = text.Get(TextKey.ProctoringFinalizationDialog_Confirm); ButtonPanel.Visibility = Visibility.Visible; // TODO: Revert once cache handling has been specified and changed! @@ -77,41 +80,68 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows private void ShowProgress(RemainingWorkUpdatedEventArgs status) { - ButtonPanel.Visibility = Visibility.Collapsed; + ButtonPanel.Visibility = status.AllowCancellation ? Visibility.Visible : Visibility.Collapsed; Cursor = Cursors.Wait; FailurePanel.Visibility = Visibility.Collapsed; Info.Text = text.Get(TextKey.ProctoringFinalizationDialog_InfoMessage); ProgressPanel.Visibility = Visibility.Visible; + if (status.AllowCancellation && !initialized) + { + Button.Click += (o, args) => cancellationRequested = true; + Button.Content = text.Get(TextKey.ProctoringFinalizationDialog_Abort); + initialized = true; + } + if (status.IsWaiting) { - var count = $"{status.Total - status.Progress}"; - var time = $"{status.Resume.ToLongTimeString()}"; - - Percentage.Text = ""; - Progress.IsIndeterminate = true; - Status.Text = text.Get(TextKey.ProctoringFinalizationDialog_StatusWaiting).Replace("%%_COUNT_%%", count).Replace("%%_TIME_%%", time); + UpdateWaitingProgress(status); } else { - var count = $"{status.Progress}"; - var total = $"{status.Total}"; + UpdateProgress(status); + } - Percentage.Text = $"{status.Progress / (double) (status.Total > 0 ? status.Total : 1) * 100:N0}%"; - Progress.IsIndeterminate = false; - Progress.Maximum = status.Total; - Progress.Value = status.Progress; + status.CancellationRequested = cancellationRequested; + } - if (status.Next.HasValue) - { - Status.Text = text.Get(TextKey.ProctoringFinalizationDialog_StatusAndTime).Replace("%%_TIME_%%", $"{status.Next.Value.ToLongTimeString()}"); - } - else - { - Status.Text = text.Get(TextKey.ProctoringFinalizationDialog_Status); - } + private void UpdateProgress(RemainingWorkUpdatedEventArgs status) + { + var count = $"{status.Progress}"; + var total = $"{status.Total}"; - Status.Text = Status.Text.Replace("%%_COUNT_%%", count).Replace("%%_TOTAL_%%", total); + Percentage.Text = $"{status.Progress / (double) (status.Total > 0 ? status.Total : 1) * 100:N0}%"; + Progress.IsIndeterminate = false; + Progress.Maximum = status.Total; + Progress.Value = status.Progress; + + if (status.Next.HasValue) + { + Status.Text = text.Get(TextKey.ProctoringFinalizationDialog_StatusAndTime).Replace("%%_TIME_%%", $"{status.Next.Value.ToLongTimeString()}"); + } + else + { + Status.Text = text.Get(TextKey.ProctoringFinalizationDialog_Status); + } + + Status.Text = Status.Text.Replace("%%_COUNT_%%", count).Replace("%%_TOTAL_%%", total); + } + + private void UpdateWaitingProgress(RemainingWorkUpdatedEventArgs status) + { + var count = $"{status.Total - status.Progress}"; + var time = status.Resume?.ToLongTimeString(); + + Percentage.Text = ""; + Progress.IsIndeterminate = true; + + if (status.Resume.HasValue) + { + Status.Text = text.Get(TextKey.ProctoringFinalizationDialog_StatusWaitingAndTime).Replace("%%_COUNT_%%", count).Replace("%%_TIME_%%", time); + } + else + { + Status.Text = text.Get(TextKey.ProctoringFinalizationDialog_StatusWaiting).Replace("%%_COUNT_%%", count); } } } diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringWindow.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringWindow.xaml.cs index 1e4abb8..16fbf13 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringWindow.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringWindow.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/RuntimeWindow.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/RuntimeWindow.xaml.cs index cf8384e..e3639fc 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/RuntimeWindow.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/RuntimeWindow.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/ServerFailureDialog.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/ServerFailureDialog.xaml.cs index e8ba1ae..d4eabbe 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/ServerFailureDialog.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/ServerFailureDialog.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/SplashScreen.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/SplashScreen.xaml.cs index 6bc89a4..0b4a5e4 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/SplashScreen.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/SplashScreen.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/Taskbar.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/Taskbar.xaml.cs index 1fb84dc..2168821 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/Taskbar.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/Taskbar.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -42,6 +42,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows internal Taskbar(ILogger logger) { this.logger = logger; + InitializeComponent(); InitializeTaskbar(); } @@ -140,11 +141,9 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows private void InitializeTaskbar() { - /* Closing += Taskbar_Closing; Loaded += (o, args) => InitializeBounds(); QuitButton.Clicked += QuitButton_Clicked; - */ } public void InitializeText(IText text) diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/Taskview.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/Taskview.xaml.cs index c14194d..c2223d4 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/Taskview.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/Taskview.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -80,13 +80,11 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows private void InitializeTaskview() { - /* Loaded += (o, args) => { Handle = new WindowInteropHelper(this).Handle; Update(); }; - */ } private void SelectNext() diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/ApplicationButton.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/ApplicationButton.xaml.cs index 10b31c5..f76aa65 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/ApplicationButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/ApplicationButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/ApplicationControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/ApplicationControl.xaml.cs index 6474e11..9bdca64 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/ApplicationControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/ApplicationControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/AudioControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/AudioControl.xaml.cs index d2a69a6..b75cefb 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/AudioControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/AudioControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/Clock.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/Clock.xaml.cs index cdd303c..ba12317 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/Clock.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/Clock.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/KeyboardLayoutButton.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/KeyboardLayoutButton.xaml.cs index 93c4a23..40f3826 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/KeyboardLayoutButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/KeyboardLayoutButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/KeyboardLayoutControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/KeyboardLayoutControl.xaml.cs index d29a71e..f38aff0 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/KeyboardLayoutControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/KeyboardLayoutControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/NetworkButton.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/NetworkButton.xaml.cs index ec9efbf..a38b235 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/NetworkButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/NetworkButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/NetworkControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/NetworkControl.xaml.cs index 01a86e6..00f3260 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/NetworkControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/NetworkControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/NotificationButton.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/NotificationButton.xaml.cs index 98995ed..13ab0e0 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/NotificationButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/NotificationButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/PowerSupplyControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/PowerSupplyControl.xaml.cs index 0c63e98..33bf62f 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/PowerSupplyControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/PowerSupplyControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/QuitButton.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/QuitButton.xaml.cs index e92f44f..abb0acc 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/QuitButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/QuitButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/RaiseHandControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/RaiseHandControl.xaml.cs index 844aa60..160f26b 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/RaiseHandControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/RaiseHandControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Browser/DownloadItemControl.xaml b/SafeExamBrowser.UserInterface.Mobile/Controls/Browser/DownloadItemControl.xaml index 7254663..1034133 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/Browser/DownloadItemControl.xaml +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Browser/DownloadItemControl.xaml @@ -17,6 +17,6 @@ - + diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Browser/DownloadItemControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Browser/DownloadItemControl.xaml.cs index 96cf416..62945c9 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/Browser/DownloadItemControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Browser/DownloadItemControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -17,7 +17,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.Browser { public partial class DownloadItemControl : UserControl { - private IText text; + private readonly IText text; public Guid Id { get; } @@ -29,28 +29,77 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.Browser InitializeComponent(); } - public void Update(DownloadItemState state) + internal void Update(DownloadItemState state) { - ItemName.Text = Uri.TryCreate(state.Url, UriKind.Absolute, out var uri) ? Path.GetFileName(uri.AbsolutePath) : state.Url; - Progress.Value = state.Completion * 100; - Status.Text = $"{text.Get(TextKey.BrowserWindow_Downloading)} ({state.Completion * 100}%)"; - - if (File.Exists(state.FullPath)) - { - ItemName.Text = Path.GetFileName(state.FullPath); - Icon.Content = new Image { Source = IconLoader.LoadIconFor(new FileInfo(state.FullPath)) }; - } + InitializeIcon(state); + InitializeName(state); if (state.IsCancelled) { - Progress.Visibility = System.Windows.Visibility.Collapsed; - Status.Text = text.Get(TextKey.BrowserWindow_DownloadCancelled); + ShowCancelled(); } else if (state.IsComplete) { - Progress.Visibility = System.Windows.Visibility.Collapsed; - Status.Text = text.Get(TextKey.BrowserWindow_DownloadComplete); + ShowCompleted(state); } + else + { + ShowProgress(state); + } + } + + private string BuildSizeInfo(DownloadItemState state) + { + return state.Size > 1000000 ? $"{state.Size / 1000000.0:N1} MB" : $"{state.Size / 1000.0:N1} kB"; + } + + private void InitializeIcon(DownloadItemState state) + { + if (Icon.Content == default && File.Exists(state.FullPath)) + { + Icon.Content = new Image { Source = IconLoader.LoadIconFor(new FileInfo(state.FullPath)) }; + } + } + + private void InitializeName(DownloadItemState state) + { + var fileName = Path.GetFileName(state.FullPath); + + if (ItemName.Text != fileName && File.Exists(state.FullPath)) + { + ItemName.Text = fileName; + } + else if (string.IsNullOrEmpty(ItemName.Text)) + { + ItemName.Text = Uri.TryCreate(state.Url, UriKind.Absolute, out var uri) ? Path.GetFileName(uri.AbsolutePath) : state.Url; + } + } + + private void ShowCancelled() + { + Progress.IsIndeterminate = false; + Progress.Visibility = System.Windows.Visibility.Collapsed; + Status.Text = text.Get(TextKey.BrowserWindow_DownloadCancelled); + } + + private void ShowCompleted(DownloadItemState state) + { + Progress.IsIndeterminate = false; + Progress.Visibility = System.Windows.Visibility.Collapsed; + Status.Text = $"{BuildSizeInfo(state)} — {text.Get(TextKey.BrowserWindow_DownloadComplete)}"; + + if (File.Exists(state.FullPath)) + { + Icon.Content = new Image { Source = IconLoader.LoadIconFor(new FileInfo(state.FullPath)) }; + ItemName.Text = Path.GetFileName(state.FullPath); + } + } + + private void ShowProgress(DownloadItemState state) + { + Progress.IsIndeterminate = state.IsIndeterminate; + Progress.Value = state.Completion * 100; + Status.Text = $"{BuildSizeInfo(state)} — {text.Get(TextKey.BrowserWindow_Downloading)}{(state.IsIndeterminate ? "" : $" ({state.Completion * 100}%)")}"; } } } diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/ApplicationControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/ApplicationControl.xaml.cs index 1813e24..7744a4e 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/ApplicationControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/ApplicationControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/ApplicationWindowButton.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/ApplicationWindowButton.xaml.cs index 5d9d9e9..5085bb9 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/ApplicationWindowButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/ApplicationWindowButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/AudioControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/AudioControl.xaml.cs index 2e007f1..9535c19 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/AudioControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/AudioControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/Clock.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/Clock.xaml.cs index c208227..486a40f 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/Clock.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/Clock.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/KeyboardLayoutButton.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/KeyboardLayoutButton.xaml.cs index d6615e4..ed8932f 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/KeyboardLayoutButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/KeyboardLayoutButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/KeyboardLayoutControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/KeyboardLayoutControl.xaml.cs index cb4e901..7f68dff 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/KeyboardLayoutControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/KeyboardLayoutControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/NetworkButton.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/NetworkButton.xaml.cs index 13b2b04..a84cb55 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/NetworkButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/NetworkButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/NetworkControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/NetworkControl.xaml.cs index 4d4a967..245546c 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/NetworkControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/NetworkControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/NotificationButton.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/NotificationButton.xaml.cs index a902d09..de6f41a 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/NotificationButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/NotificationButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/PowerSupplyControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/PowerSupplyControl.xaml.cs index bbe0617..64d3923 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/PowerSupplyControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/PowerSupplyControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/QuitButton.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/QuitButton.xaml.cs index f660713..fb8f458 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/QuitButton.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/QuitButton.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/RaiseHandControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/RaiseHandControl.xaml.cs index 223164d..e224d58 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/RaiseHandControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/RaiseHandControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskview/WindowControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskview/WindowControl.xaml.cs index fb6b0a2..6658699 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskview/WindowControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskview/WindowControl.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/FileSystemDialogFactory.cs b/SafeExamBrowser.UserInterface.Mobile/FileSystemDialogFactory.cs index 7ed8feb..10c1811 100644 --- a/SafeExamBrowser.UserInterface.Mobile/FileSystemDialogFactory.cs +++ b/SafeExamBrowser.UserInterface.Mobile/FileSystemDialogFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/MessageBoxFactory.cs b/SafeExamBrowser.UserInterface.Mobile/MessageBoxFactory.cs index 672ab6d..b1e3a94 100644 --- a/SafeExamBrowser.UserInterface.Mobile/MessageBoxFactory.cs +++ b/SafeExamBrowser.UserInterface.Mobile/MessageBoxFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Properties/AssemblyInfo.cs b/SafeExamBrowser.UserInterface.Mobile/Properties/AssemblyInfo.cs index feccebc..6e2e2ac 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Properties/AssemblyInfo.cs @@ -9,7 +9,7 @@ using System.Windows; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.UserInterface.Mobile")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/UserInterfaceFactory.cs b/SafeExamBrowser.UserInterface.Mobile/UserInterfaceFactory.cs index 283cb3b..19e209c 100644 --- a/SafeExamBrowser.UserInterface.Mobile/UserInterfaceFactory.cs +++ b/SafeExamBrowser.UserInterface.Mobile/UserInterfaceFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/ViewModels/DateTimeViewModel.cs b/SafeExamBrowser.UserInterface.Mobile/ViewModels/DateTimeViewModel.cs index e9cfa15..f621f2a 100644 --- a/SafeExamBrowser.UserInterface.Mobile/ViewModels/DateTimeViewModel.cs +++ b/SafeExamBrowser.UserInterface.Mobile/ViewModels/DateTimeViewModel.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/ViewModels/LogViewModel.cs b/SafeExamBrowser.UserInterface.Mobile/ViewModels/LogViewModel.cs index 45c3620..550d70c 100644 --- a/SafeExamBrowser.UserInterface.Mobile/ViewModels/LogViewModel.cs +++ b/SafeExamBrowser.UserInterface.Mobile/ViewModels/LogViewModel.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/ViewModels/ProgressIndicatorViewModel.cs b/SafeExamBrowser.UserInterface.Mobile/ViewModels/ProgressIndicatorViewModel.cs index 1b479be..e515f1e 100644 --- a/SafeExamBrowser.UserInterface.Mobile/ViewModels/ProgressIndicatorViewModel.cs +++ b/SafeExamBrowser.UserInterface.Mobile/ViewModels/ProgressIndicatorViewModel.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/ViewModels/RuntimeWindowViewModel.cs b/SafeExamBrowser.UserInterface.Mobile/ViewModels/RuntimeWindowViewModel.cs index 5fb8061..25956de 100644 --- a/SafeExamBrowser.UserInterface.Mobile/ViewModels/RuntimeWindowViewModel.cs +++ b/SafeExamBrowser.UserInterface.Mobile/ViewModels/RuntimeWindowViewModel.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/AboutWindow.xaml b/SafeExamBrowser.UserInterface.Mobile/Windows/AboutWindow.xaml index 48bf281..717bc1c 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/AboutWindow.xaml +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/AboutWindow.xaml @@ -30,52 +30,57 @@ .NET Framework - Copyright © 2002-2024 Microsoft. All rights reserved. + Copyright © 2002-2025 Microsoft. All rights reserved. + + + Bouncy Castle + + Copyright © 2000-2025 Legion of the Bouncy Castle Inc. All rights reserved. CefSharp (.NET bindings for the Chromium Embedded Framework) - Copyright © 2010-2024 The CefSharp Authors. All rights reserved. + Copyright © 2010-2025 The CefSharp Authors. All rights reserved. CEF (Chromium Embedded Framework) - Copyright © 2008-2024 The Chromium Embedded Framework Authors. All rights reserved. + Copyright © 2008-2025 The Chromium Embedded Framework Authors. All rights reserved. Font-Awesome-WPF - Copyright © 2014-2024 charri. All rights reserved. + Copyright © 2014-2025 charri. All rights reserved. KGy SOFT Core & Drawing Libraries - Copyright © 2005-2024 KGy SOFT. All rights reserved. + Copyright © 2005-2025 KGy SOFT. All rights reserved. KnownFolders - Copyright © 2017-2024 Syroot. All rights reserved. + Copyright © 2017-2025 Syroot. All rights reserved. Microsoft.Windows.SDK.Contracts - Copyright © 2019-2024 Microsoft. All rights reserved. + Copyright © 2019-2025 Microsoft. All rights reserved. NAudio - Copyright © 2008-2024 Mark Heath & contributors. All rights reserved. + Copyright © 2008-2025 Mark Heath & contributors. All rights reserved. Newtonsoft.Json - Copyright © 2007-2024 James Newton-King. All rights reserved. + Copyright © 2007-2025 James Newton-King. All rights reserved. Visual C++ Redistributable - Copyright © 1993-2024 Microsoft. All rights reserved. + Copyright © 1993-2025 Microsoft. All rights reserved. diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/AboutWindow.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/AboutWindow.xaml.cs index 37bcc8d..300dda6 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/AboutWindow.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/AboutWindow.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/ActionCenter.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/ActionCenter.xaml.cs index 5a53c6c..25bff50 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/ActionCenter.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/ActionCenter.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/BrowserWindow.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/BrowserWindow.xaml.cs index 405db84..ba2578c 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/BrowserWindow.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/BrowserWindow.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -8,8 +8,10 @@ using System; using System.ComponentModel; +using System.Linq; using System.Threading.Tasks; using System.Windows; +using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Input; using System.Windows.Interop; @@ -42,8 +44,8 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows private WindowClosedEventHandler closed; private WindowClosingEventHandler closing; - private bool browserControlGetsFocusFromTaskbar = false; - private IInputElement tabKeyDownFocusElement = null; + private bool browserControlGetsFocusFromTaskbar; + private IInputElement tabKeyDownFocusElement; private WindowSettings WindowSettings { @@ -197,27 +199,15 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows { Dispatcher.InvokeAsync(() => { - var isNewItem = true; + var control = Downloads.Children.OfType().FirstOrDefault(c => c.Id == state.Id); - foreach (var child in Downloads.Children) + if (control == default) { - if (child is DownloadItemControl control && control.Id == state.Id) - { - control.Update(state); - isNewItem = false; - - break; - } - } - - if (isNewItem) - { - var control = new DownloadItemControl(state.Id, text); - - control.Update(state); + control = new DownloadItemControl(state.Id, text); Downloads.Children.Add(control); } + control.Update(state); DownloadsButton.Visibility = Visibility.Visible; DownloadsPopup.IsOpen = IsActive; }); @@ -252,7 +242,13 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows { if (isMainWindow) { - e.Cancel = true; + //e.Cancel = true; + Dispatcher.Invoke(() => + { + Closing -= BrowserWindow_Closing; + closing?.Invoke(); + base.Close(); + }); } else { @@ -265,12 +261,15 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows if (e.Key == Key.Tab) { var hasShift = (Keyboard.Modifiers & ModifierKeys.Shift) == ModifierKeys.Shift; + if (Toolbar.IsKeyboardFocusWithin && hasShift) { var firstActiveElementInToolbar = Toolbar.PredictFocus(FocusNavigationDirection.Right); - if (firstActiveElementInToolbar is System.Windows.UIElement) + + if (firstActiveElementInToolbar is UIElement) { - var control = firstActiveElementInToolbar as System.Windows.UIElement; + var control = firstActiveElementInToolbar as UIElement; + if (control.IsKeyboardFocusWithin) { LoseFocusRequested?.Invoke(false); @@ -322,10 +321,8 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows else if (MenuPopup.IsKeyboardFocusWithin) { var focusedElement = FocusManager.GetFocusedElement(this); - var focusedControl = focusedElement as System.Windows.Controls.Control; - var prevFocusedControl = tabKeyDownFocusElement as System.Windows.Controls.Control; - if (focusedControl != null && prevFocusedControl != null) + if (focusedElement is Control focusedControl && tabKeyDownFocusElement is Control prevFocusedControl) { if (!hasShift && focusedControl.TabIndex < prevFocusedControl.TabIndex) { @@ -354,7 +351,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows if (isMainWindow) { - this.DisableCloseButton(); + //this.DisableCloseButton(); } } diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/CredentialsDialog.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/CredentialsDialog.xaml.cs index ce9e1ca..aaa0825 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/CredentialsDialog.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/CredentialsDialog.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/ExamSelectionDialog.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/ExamSelectionDialog.xaml.cs index f5f849f..d3c173e 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/ExamSelectionDialog.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/ExamSelectionDialog.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/FileSystemDialog.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/FileSystemDialog.xaml.cs index 10bf05a..cd78354 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/FileSystemDialog.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/FileSystemDialog.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/LockScreen.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/LockScreen.xaml.cs index 99e71ae..f352fab 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/LockScreen.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/LockScreen.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/LogWindow.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/LogWindow.xaml.cs index 54f470a..cecab92 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/LogWindow.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/LogWindow.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/MessageBoxDialog.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/MessageBoxDialog.xaml.cs index 3159e09..f7fb056 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/MessageBoxDialog.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/MessageBoxDialog.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/PasswordDialog.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/PasswordDialog.xaml.cs index 447fd40..5e671b3 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/PasswordDialog.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/PasswordDialog.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/ProctoringFinalizationDialog.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/ProctoringFinalizationDialog.xaml.cs index 323a5d1..96a5337 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/ProctoringFinalizationDialog.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/ProctoringFinalizationDialog.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -19,6 +19,9 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows { private readonly IText text; + private bool cancellationRequested; + private bool initialized; + public ProctoringFinalizationDialog(IText text) { this.text = text; @@ -65,8 +68,6 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows private void InitializeDialog() { - Button.Click += (o, args) => Close(); - Button.Content = text.Get(TextKey.ProctoringFinalizationDialog_Confirm); Title = text.Get(TextKey.ProctoringFinalizationDialog_Title); InitializeBounds(); @@ -76,6 +77,8 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows private void ShowFailure(RemainingWorkUpdatedEventArgs status) { + Button.Click += (o, args) => Close(); + Button.Content = text.Get(TextKey.ProctoringFinalizationDialog_Confirm); ButtonPanel.Visibility = Visibility.Visible; // TODO: Revert once cache handling has been specified and changed! @@ -90,41 +93,68 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows private void ShowProgress(RemainingWorkUpdatedEventArgs status) { - ButtonPanel.Visibility = Visibility.Collapsed; + ButtonPanel.Visibility = status.AllowCancellation ? Visibility.Visible : Visibility.Collapsed; Cursor = Cursors.Wait; FailurePanel.Visibility = Visibility.Collapsed; Info.Text = text.Get(TextKey.ProctoringFinalizationDialog_InfoMessage); ProgressPanel.Visibility = Visibility.Visible; + if (status.AllowCancellation && !initialized) + { + Button.Click += (o, args) => cancellationRequested = true; + Button.Content = text.Get(TextKey.ProctoringFinalizationDialog_Abort); + initialized = true; + } + if (status.IsWaiting) { - var count = $"{status.Total - status.Progress}"; - var time = $"{status.Resume.ToLongTimeString()}"; - - Percentage.Text = ""; - Progress.IsIndeterminate = true; - Status.Text = text.Get(TextKey.ProctoringFinalizationDialog_StatusWaiting).Replace("%%_COUNT_%%", count).Replace("%%_TIME_%%", time); + UpdateWaitingProgress(status); } else { - var count = $"{status.Progress}"; - var total = $"{status.Total}"; + UpdateProgress(status); + } - Percentage.Text = $"{status.Progress / (double) (status.Total > 0 ? status.Total : 1) * 100:N0}%"; - Progress.IsIndeterminate = false; - Progress.Maximum = status.Total; - Progress.Value = status.Progress; + status.CancellationRequested = cancellationRequested; + } - if (status.Next.HasValue) - { - Status.Text = text.Get(TextKey.ProctoringFinalizationDialog_StatusAndTime).Replace("%%_TIME_%%", $"{status.Next.Value.ToLongTimeString()}"); - } - else - { - Status.Text = text.Get(TextKey.ProctoringFinalizationDialog_Status); - } + private void UpdateProgress(RemainingWorkUpdatedEventArgs status) + { + var count = $"{status.Progress}"; + var total = $"{status.Total}"; - Status.Text = Status.Text.Replace("%%_COUNT_%%", count).Replace("%%_TOTAL_%%", total); + Percentage.Text = $"{status.Progress / (double) (status.Total > 0 ? status.Total : 1) * 100:N0}%"; + Progress.IsIndeterminate = false; + Progress.Maximum = status.Total; + Progress.Value = status.Progress; + + if (status.Next.HasValue) + { + Status.Text = text.Get(TextKey.ProctoringFinalizationDialog_StatusAndTime).Replace("%%_TIME_%%", $"{status.Next.Value.ToLongTimeString()}"); + } + else + { + Status.Text = text.Get(TextKey.ProctoringFinalizationDialog_Status); + } + + Status.Text = Status.Text.Replace("%%_COUNT_%%", count).Replace("%%_TOTAL_%%", total); + } + + private void UpdateWaitingProgress(RemainingWorkUpdatedEventArgs status) + { + var count = $"{status.Total - status.Progress}"; + var time = status.Resume?.ToLongTimeString(); + + Percentage.Text = ""; + Progress.IsIndeterminate = true; + + if (status.Resume.HasValue) + { + Status.Text = text.Get(TextKey.ProctoringFinalizationDialog_StatusWaitingAndTime).Replace("%%_COUNT_%%", count).Replace("%%_TIME_%%", time); + } + else + { + Status.Text = text.Get(TextKey.ProctoringFinalizationDialog_StatusWaiting).Replace("%%_COUNT_%%", count); } } diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/ProctoringWindow.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/ProctoringWindow.xaml.cs index 36c9a4d..0c5fadd 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/ProctoringWindow.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/ProctoringWindow.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/RuntimeWindow.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/RuntimeWindow.xaml.cs index a13e3bd..5d3c279 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/RuntimeWindow.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/RuntimeWindow.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/ServerFailureDialog.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/ServerFailureDialog.xaml.cs index 71e3ad2..e33a762 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/ServerFailureDialog.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/ServerFailureDialog.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/SplashScreen.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/SplashScreen.xaml.cs index 87cfd3d..8b044d4 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/SplashScreen.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/SplashScreen.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/Taskbar.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/Taskbar.xaml.cs index dfe0dbe..7bea763 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/Taskbar.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/Taskbar.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/Taskview.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/Taskview.xaml.cs index 112c2d6..65f6121 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/Taskview.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/Taskview.xaml.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Shared/Activators/ActionCenterKeyboardActivator.cs b/SafeExamBrowser.UserInterface.Shared/Activators/ActionCenterKeyboardActivator.cs index a1a5593..0424f8f 100644 --- a/SafeExamBrowser.UserInterface.Shared/Activators/ActionCenterKeyboardActivator.cs +++ b/SafeExamBrowser.UserInterface.Shared/Activators/ActionCenterKeyboardActivator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Shared/Activators/ActionCenterTouchActivator.cs b/SafeExamBrowser.UserInterface.Shared/Activators/ActionCenterTouchActivator.cs index 759883e..79a482a 100644 --- a/SafeExamBrowser.UserInterface.Shared/Activators/ActionCenterTouchActivator.cs +++ b/SafeExamBrowser.UserInterface.Shared/Activators/ActionCenterTouchActivator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Shared/Activators/KeyboardActivator.cs b/SafeExamBrowser.UserInterface.Shared/Activators/KeyboardActivator.cs index 2c7ecd0..b634c56 100644 --- a/SafeExamBrowser.UserInterface.Shared/Activators/KeyboardActivator.cs +++ b/SafeExamBrowser.UserInterface.Shared/Activators/KeyboardActivator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Shared/Activators/TaskViewKeyboardActivator.cs b/SafeExamBrowser.UserInterface.Shared/Activators/TaskViewKeyboardActivator.cs index f993124..f29cfec 100644 --- a/SafeExamBrowser.UserInterface.Shared/Activators/TaskViewKeyboardActivator.cs +++ b/SafeExamBrowser.UserInterface.Shared/Activators/TaskViewKeyboardActivator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -49,7 +49,6 @@ namespace SafeExamBrowser.UserInterface.Shared.Activators protected override bool Process(Key key, KeyModifier modifier, KeyState state) { - /* if (IsDeactivation(modifier)) { return false; @@ -59,7 +58,6 @@ namespace SafeExamBrowser.UserInterface.Shared.Activators { return true; } - */ return false; } diff --git a/SafeExamBrowser.UserInterface.Shared/Activators/TaskbarKeyboardActivator.cs b/SafeExamBrowser.UserInterface.Shared/Activators/TaskbarKeyboardActivator.cs index 24a7538..bb3e09b 100644 --- a/SafeExamBrowser.UserInterface.Shared/Activators/TaskbarKeyboardActivator.cs +++ b/SafeExamBrowser.UserInterface.Shared/Activators/TaskbarKeyboardActivator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -29,7 +29,6 @@ namespace SafeExamBrowser.UserInterface.Shared.Activators protected override bool Process(Key key, KeyModifier modifier, KeyState state) { - /* var changed = false; var pressed = state == KeyState.Pressed; @@ -44,7 +43,7 @@ namespace SafeExamBrowser.UserInterface.Shared.Activators logger.Debug("Detected activation sequence for taskbar."); Activated?.Invoke(); } - */ + return false; } } diff --git a/SafeExamBrowser.UserInterface.Shared/Activators/TerminationActivator.cs b/SafeExamBrowser.UserInterface.Shared/Activators/TerminationActivator.cs index ba2c1bd..3728f1e 100644 --- a/SafeExamBrowser.UserInterface.Shared/Activators/TerminationActivator.cs +++ b/SafeExamBrowser.UserInterface.Shared/Activators/TerminationActivator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Shared/Activators/TouchActivator.cs b/SafeExamBrowser.UserInterface.Shared/Activators/TouchActivator.cs index 08dda8a..e45e6be 100644 --- a/SafeExamBrowser.UserInterface.Shared/Activators/TouchActivator.cs +++ b/SafeExamBrowser.UserInterface.Shared/Activators/TouchActivator.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Shared/Properties/AssemblyInfo.cs b/SafeExamBrowser.UserInterface.Shared/Properties/AssemblyInfo.cs index 6b4ad43..6952b77 100644 --- a/SafeExamBrowser.UserInterface.Shared/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.UserInterface.Shared/Properties/AssemblyInfo.cs @@ -9,7 +9,7 @@ using System.Windows; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.UserInterface.Shared")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 @@ -46,6 +46,6 @@ using System.Windows; // 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("3.8.0.742")] -[assembly: AssemblyFileVersion("3.8.0.742")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0.0")] diff --git a/SafeExamBrowser.UserInterface.Shared/Utilities/IconLoader.cs b/SafeExamBrowser.UserInterface.Shared/Utilities/IconLoader.cs index 37ec58b..c825898 100644 --- a/SafeExamBrowser.UserInterface.Shared/Utilities/IconLoader.cs +++ b/SafeExamBrowser.UserInterface.Shared/Utilities/IconLoader.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -66,7 +66,7 @@ namespace SafeExamBrowser.UserInterface.Shared.Utilities private static extern int DestroyIcon(IntPtr hIcon); [DllImport("shell32.dll", CharSet = CharSet.Unicode)] - static extern IntPtr ExtractAssociatedIcon(IntPtr hInst, StringBuilder lpIconPath, out ushort lpiIcon); + private static extern IntPtr ExtractAssociatedIcon(IntPtr hInst, StringBuilder lpIconPath, out ushort lpiIcon); [DllImport("shell32.dll", CharSet = CharSet.Unicode)] private static extern IntPtr SHGetFileInfo(string pszPath, uint dwFileAttributes, ref SHFILEINFO psfi, uint cbSizeFileInfo, uint uFlags); diff --git a/SafeExamBrowser.UserInterface.Shared/Utilities/IconResourceLoader.cs b/SafeExamBrowser.UserInterface.Shared/Utilities/IconResourceLoader.cs index e037650..39b83b7 100644 --- a/SafeExamBrowser.UserInterface.Shared/Utilities/IconResourceLoader.cs +++ b/SafeExamBrowser.UserInterface.Shared/Utilities/IconResourceLoader.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Shared/Utilities/Parser.cs b/SafeExamBrowser.UserInterface.Shared/Utilities/Parser.cs index e84301f..b5de3bc 100644 --- a/SafeExamBrowser.UserInterface.Shared/Utilities/Parser.cs +++ b/SafeExamBrowser.UserInterface.Shared/Utilities/Parser.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Shared/Utilities/Thumbnail.cs b/SafeExamBrowser.UserInterface.Shared/Utilities/Thumbnail.cs index 9659aa0..9ef1874 100644 --- a/SafeExamBrowser.UserInterface.Shared/Utilities/Thumbnail.cs +++ b/SafeExamBrowser.UserInterface.Shared/Utilities/Thumbnail.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Shared/Utilities/VisualExtensions.cs b/SafeExamBrowser.UserInterface.Shared/Utilities/VisualExtensions.cs index 8385636..020a3fa 100644 --- a/SafeExamBrowser.UserInterface.Shared/Utilities/VisualExtensions.cs +++ b/SafeExamBrowser.UserInterface.Shared/Utilities/VisualExtensions.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.UserInterface.Shared/Utilities/WindowExtensions.cs b/SafeExamBrowser.UserInterface.Shared/Utilities/WindowExtensions.cs index e6ebadb..dd13b75 100644 --- a/SafeExamBrowser.UserInterface.Shared/Utilities/WindowExtensions.cs +++ b/SafeExamBrowser.UserInterface.Shared/Utilities/WindowExtensions.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/Events/KeyModifier.cs b/SafeExamBrowser.WindowsApi.Contracts/Events/KeyModifier.cs index 6b7301d..fe1af4d 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/Events/KeyModifier.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/Events/KeyModifier.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/Events/KeyState.cs b/SafeExamBrowser.WindowsApi.Contracts/Events/KeyState.cs index 358ec46..944cc5c 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/Events/KeyState.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/Events/KeyState.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/Events/KeyboardHookCallback.cs b/SafeExamBrowser.WindowsApi.Contracts/Events/KeyboardHookCallback.cs index 0cbe6e4..2f6fbf1 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/Events/KeyboardHookCallback.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/Events/KeyboardHookCallback.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/Events/MouseButton.cs b/SafeExamBrowser.WindowsApi.Contracts/Events/MouseButton.cs index e1b05e6..71b261b 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/Events/MouseButton.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/Events/MouseButton.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/Events/MouseButtonState.cs b/SafeExamBrowser.WindowsApi.Contracts/Events/MouseButtonState.cs index 548efda..235ea59 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/Events/MouseButtonState.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/Events/MouseButtonState.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/Events/MouseHookCallback.cs b/SafeExamBrowser.WindowsApi.Contracts/Events/MouseHookCallback.cs index b127db6..e094e9e 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/Events/MouseHookCallback.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/Events/MouseHookCallback.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/Events/MouseInformation.cs b/SafeExamBrowser.WindowsApi.Contracts/Events/MouseInformation.cs index 4df3ee9..32da201 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/Events/MouseInformation.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/Events/MouseInformation.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/Events/ProcessTerminatedEventHandler.cs b/SafeExamBrowser.WindowsApi.Contracts/Events/ProcessTerminatedEventHandler.cs index a43d7bf..b024215 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/Events/ProcessTerminatedEventHandler.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/Events/ProcessTerminatedEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/Events/SystemEventCallback.cs b/SafeExamBrowser.WindowsApi.Contracts/Events/SystemEventCallback.cs index e0af74f..d8b0567 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/Events/SystemEventCallback.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/Events/SystemEventCallback.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/Events/TerminationActivatorEventHandler.cs b/SafeExamBrowser.WindowsApi.Contracts/Events/TerminationActivatorEventHandler.cs index f9a91e8..4ccc369 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/Events/TerminationActivatorEventHandler.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/Events/TerminationActivatorEventHandler.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/IBounds.cs b/SafeExamBrowser.WindowsApi.Contracts/IBounds.cs index fee99c3..4638d9e 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/IBounds.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/IBounds.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/IDesktop.cs b/SafeExamBrowser.WindowsApi.Contracts/IDesktop.cs index 4eca859..921650b 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/IDesktop.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/IDesktop.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/IDesktopFactory.cs b/SafeExamBrowser.WindowsApi.Contracts/IDesktopFactory.cs index 6222d9b..b24a685 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/IDesktopFactory.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/IDesktopFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/IDesktopMonitor.cs b/SafeExamBrowser.WindowsApi.Contracts/IDesktopMonitor.cs index 67079f5..22479a6 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/IDesktopMonitor.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/IDesktopMonitor.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/IExplorerShell.cs b/SafeExamBrowser.WindowsApi.Contracts/IExplorerShell.cs index 7af1244..c1a88e3 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/IExplorerShell.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/IExplorerShell.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/INativeMethods.cs b/SafeExamBrowser.WindowsApi.Contracts/INativeMethods.cs index 1700190..912cf79 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/INativeMethods.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/INativeMethods.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/IProcess.cs b/SafeExamBrowser.WindowsApi.Contracts/IProcess.cs index 5a5f3ea..0239652 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/IProcess.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/IProcess.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/IProcessFactory.cs b/SafeExamBrowser.WindowsApi.Contracts/IProcessFactory.cs index ac48ca8..6042dcb 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/IProcessFactory.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/IProcessFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/IStickyKeysState.cs b/SafeExamBrowser.WindowsApi.Contracts/IStickyKeysState.cs index dc779af..51fccf6 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/IStickyKeysState.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/IStickyKeysState.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi.Contracts/Properties/AssemblyInfo.cs b/SafeExamBrowser.WindowsApi.Contracts/Properties/AssemblyInfo.cs index 8da9b71..52c3fef 100644 --- a/SafeExamBrowser.WindowsApi.Contracts/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.WindowsApi.Contracts/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.WindowsApi.Contracts")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SafeExamBrowser.WindowsApi/Constants/AccessMask.cs b/SafeExamBrowser.WindowsApi/Constants/AccessMask.cs index 5a71c4a..893a322 100644 --- a/SafeExamBrowser.WindowsApi/Constants/AccessMask.cs +++ b/SafeExamBrowser.WindowsApi/Constants/AccessMask.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Constants/Constant.cs b/SafeExamBrowser.WindowsApi/Constants/Constant.cs index af5cb64..eaad17c 100644 --- a/SafeExamBrowser.WindowsApi/Constants/Constant.cs +++ b/SafeExamBrowser.WindowsApi/Constants/Constant.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Constants/HookType.cs b/SafeExamBrowser.WindowsApi/Constants/HookType.cs index 758a94a..048d4ec 100644 --- a/SafeExamBrowser.WindowsApi/Constants/HookType.cs +++ b/SafeExamBrowser.WindowsApi/Constants/HookType.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Constants/SPI.cs b/SafeExamBrowser.WindowsApi/Constants/SPI.cs index e262221..ee60852 100644 --- a/SafeExamBrowser.WindowsApi/Constants/SPI.cs +++ b/SafeExamBrowser.WindowsApi/Constants/SPI.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Constants/SPIF.cs b/SafeExamBrowser.WindowsApi/Constants/SPIF.cs index 1250aa4..2908ee8 100644 --- a/SafeExamBrowser.WindowsApi/Constants/SPIF.cs +++ b/SafeExamBrowser.WindowsApi/Constants/SPIF.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Constants/ShowWindowCommand.cs b/SafeExamBrowser.WindowsApi/Constants/ShowWindowCommand.cs index e8bcf65..8681dbc 100644 --- a/SafeExamBrowser.WindowsApi/Constants/ShowWindowCommand.cs +++ b/SafeExamBrowser.WindowsApi/Constants/ShowWindowCommand.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Constants/StickyKeysFlags.cs b/SafeExamBrowser.WindowsApi/Constants/StickyKeysFlags.cs index ed1c6f5..2e73652 100644 --- a/SafeExamBrowser.WindowsApi/Constants/StickyKeysFlags.cs +++ b/SafeExamBrowser.WindowsApi/Constants/StickyKeysFlags.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Constants/SystemCommand.cs b/SafeExamBrowser.WindowsApi/Constants/SystemCommand.cs index 5530396..01911f3 100644 --- a/SafeExamBrowser.WindowsApi/Constants/SystemCommand.cs +++ b/SafeExamBrowser.WindowsApi/Constants/SystemCommand.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Constants/ThreadAccess.cs b/SafeExamBrowser.WindowsApi/Constants/ThreadAccess.cs index a722a66..e5779a1 100644 --- a/SafeExamBrowser.WindowsApi/Constants/ThreadAccess.cs +++ b/SafeExamBrowser.WindowsApi/Constants/ThreadAccess.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Constants/VirtualKeyCode.cs b/SafeExamBrowser.WindowsApi/Constants/VirtualKeyCode.cs index f0d28cb..4378431 100644 --- a/SafeExamBrowser.WindowsApi/Constants/VirtualKeyCode.cs +++ b/SafeExamBrowser.WindowsApi/Constants/VirtualKeyCode.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Delegates/EnumDesktopDelegate.cs b/SafeExamBrowser.WindowsApi/Delegates/EnumDesktopDelegate.cs index 819cb8f..bbbefdc 100644 --- a/SafeExamBrowser.WindowsApi/Delegates/EnumDesktopDelegate.cs +++ b/SafeExamBrowser.WindowsApi/Delegates/EnumDesktopDelegate.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Delegates/EnumWindowsDelegate.cs b/SafeExamBrowser.WindowsApi/Delegates/EnumWindowsDelegate.cs index c04e908..46b0624 100644 --- a/SafeExamBrowser.WindowsApi/Delegates/EnumWindowsDelegate.cs +++ b/SafeExamBrowser.WindowsApi/Delegates/EnumWindowsDelegate.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Delegates/EventDelegate.cs b/SafeExamBrowser.WindowsApi/Delegates/EventDelegate.cs index dcadeac..ff7b073 100644 --- a/SafeExamBrowser.WindowsApi/Delegates/EventDelegate.cs +++ b/SafeExamBrowser.WindowsApi/Delegates/EventDelegate.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Delegates/HookDelegate.cs b/SafeExamBrowser.WindowsApi/Delegates/HookDelegate.cs index 8dd2b4a..8220145 100644 --- a/SafeExamBrowser.WindowsApi/Delegates/HookDelegate.cs +++ b/SafeExamBrowser.WindowsApi/Delegates/HookDelegate.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Desktops/Desktop.cs b/SafeExamBrowser.WindowsApi/Desktops/Desktop.cs index 73472c2..5b0ebcb 100644 --- a/SafeExamBrowser.WindowsApi/Desktops/Desktop.cs +++ b/SafeExamBrowser.WindowsApi/Desktops/Desktop.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -26,12 +26,22 @@ namespace SafeExamBrowser.WindowsApi.Desktops public void Activate() { - + var success = User32.SwitchDesktop(Handle); + + if (!success) + { + throw new Win32Exception(Marshal.GetLastWin32Error()); + } } public void Close() { - + var success = User32.CloseDesktop(Handle); + + if (!success) + { + throw new Win32Exception(Marshal.GetLastWin32Error()); + } } public override string ToString() diff --git a/SafeExamBrowser.WindowsApi/Desktops/DesktopFactory.cs b/SafeExamBrowser.WindowsApi/Desktops/DesktopFactory.cs index da9fec8..0931efc 100644 --- a/SafeExamBrowser.WindowsApi/Desktops/DesktopFactory.cs +++ b/SafeExamBrowser.WindowsApi/Desktops/DesktopFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Desktops/DesktopMonitor.cs b/SafeExamBrowser.WindowsApi/Desktops/DesktopMonitor.cs index 553187b..1e41ba5 100644 --- a/SafeExamBrowser.WindowsApi/Desktops/DesktopMonitor.cs +++ b/SafeExamBrowser.WindowsApi/Desktops/DesktopMonitor.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -49,7 +49,41 @@ namespace SafeExamBrowser.WindowsApi.Desktops private void Timer_Elapsed(object sender, ElapsedEventArgs e) { - + var handle = User32.OpenInputDesktop(0, false, (uint) AccessMask.DESKTOP_NONE); + var name = default(string); + var nameLength = 0; + + if (handle != IntPtr.Zero) + { + User32.GetUserObjectInformation(handle, Constant.UOI_NAME, IntPtr.Zero, 0, ref nameLength); + + var namePointer = Marshal.AllocHGlobal(nameLength); + var success = User32.GetUserObjectInformation(handle, Constant.UOI_NAME, namePointer, nameLength, ref nameLength); + + if (success) + { + name = Marshal.PtrToStringAnsi(namePointer); + Marshal.FreeHGlobal(namePointer); + + if (name?.Equals(desktop.Name, StringComparison.OrdinalIgnoreCase) != true) + { + logger.Warn($"Detected desktop switch to '{name}' [{handle}], trying to reactivate {desktop}..."); + desktop.Activate(); + } + } + else + { + logger.Warn("Failed to get name of currently active desktop!"); + } + + User32.CloseDesktop(handle); + } + else + { + logger.Warn("Failed to get currently active desktop!"); + } + + timer.Start(); } } } diff --git a/SafeExamBrowser.WindowsApi/Desktops/ObfuscatedDesktop.cs b/SafeExamBrowser.WindowsApi/Desktops/ObfuscatedDesktop.cs index 6b9831e..e135f17 100644 --- a/SafeExamBrowser.WindowsApi/Desktops/ObfuscatedDesktop.cs +++ b/SafeExamBrowser.WindowsApi/Desktops/ObfuscatedDesktop.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/ExplorerShell.cs b/SafeExamBrowser.WindowsApi/ExplorerShell.cs index eb72de4..110fd17 100644 --- a/SafeExamBrowser.WindowsApi/ExplorerShell.cs +++ b/SafeExamBrowser.WindowsApi/ExplorerShell.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 @@ -34,24 +34,106 @@ namespace SafeExamBrowser.WindowsApi public void HideAllWindows() { logger.Info("Searching for windows to be minimized..."); + + foreach (var handle in nativeMethods.GetOpenWindows()) + { + var window = new Window + { + Handle = handle, + Title = nativeMethods.GetWindowTitle(handle) + }; + + minimizedWindows.Add(window); + logger.Info($"Found window '{window.Title}' with handle = {window.Handle}."); + } + logger.Info("Minimizing all open windows..."); + nativeMethods.MinimizeAllOpenWindows(); logger.Info("Open windows successfully minimized."); } public void RestoreAllWindows() { logger.Info("Restoring all minimized windows..."); + + foreach (var window in minimizedWindows) + { + nativeMethods.RestoreWindow(window.Handle); + logger.Info($"Restored window '{window.Title}' with handle = {window.Handle}."); + } + + minimizedWindows.Clear(); logger.Info("Minimized windows successfully restored."); } public void Start() { + var process = new System.Diagnostics.Process(); + var explorerPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "explorer.exe"); + logger.Debug("Starting explorer shell process..."); + + process.StartInfo.CreateNoWindow = true; + process.StartInfo.FileName = explorerPath; + process.StartInfo.UseShellExecute = false; + process.StartInfo.WorkingDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Windows); + process.Start(); + + logger.Debug("Waiting for explorer shell to initialize..."); + + while (nativeMethods.GetShellWindowHandle() == IntPtr.Zero) + { + Thread.Sleep(20); + } + + process.Refresh(); + logger.Info($"Explorer shell successfully started with PID = {process.Id}."); + process.Close(); } public void Terminate() { - + const int THREE_SECONDS = 3000; + var processId = nativeMethods.GetShellProcessId(); + var explorerProcesses = System.Diagnostics.Process.GetProcessesByName("explorer"); + var process = explorerProcesses.FirstOrDefault(p => p.Id == processId); + + if (process != null) + { + logger.Debug($"Found explorer shell processes with PID = {processId}. Sending close message..."); + nativeMethods.PostCloseMessageToShell(); + logger.Debug("Waiting for explorer shell to terminate..."); + + for (var elapsed = 0; nativeMethods.GetShellWindowHandle() != IntPtr.Zero && elapsed < THREE_SECONDS; elapsed += 20) + { + Thread.Sleep(20); + } + + process.WaitForExit(THREE_SECONDS); + process.Refresh(); + + if (!process.HasExited) + { + KillExplorerShell(process.Id); + } + + process.Refresh(); + + if (process.HasExited) + { + logger.Info($"Successfully terminated explorer shell process with PID = {processId}."); + } + else + { + logger.Error($"Failed to completely terminate explorer shell process with PID = {processId}."); + } + + process.Close(); + } + else + { + logger.Info("The explorer shell seems to already be terminated."); + } } private void KillExplorerShell(int processId) diff --git a/SafeExamBrowser.WindowsApi/Hooks/KeyboardHook.cs b/SafeExamBrowser.WindowsApi/Hooks/KeyboardHook.cs index 6580067..c621863 100644 --- a/SafeExamBrowser.WindowsApi/Hooks/KeyboardHook.cs +++ b/SafeExamBrowser.WindowsApi/Hooks/KeyboardHook.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Hooks/MouseHook.cs b/SafeExamBrowser.WindowsApi/Hooks/MouseHook.cs index 04832ef..4687579 100644 --- a/SafeExamBrowser.WindowsApi/Hooks/MouseHook.cs +++ b/SafeExamBrowser.WindowsApi/Hooks/MouseHook.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Hooks/SystemHook.cs b/SafeExamBrowser.WindowsApi/Hooks/SystemHook.cs index e533f89..3f98b1b 100644 --- a/SafeExamBrowser.WindowsApi/Hooks/SystemHook.cs +++ b/SafeExamBrowser.WindowsApi/Hooks/SystemHook.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Kernel32.cs b/SafeExamBrowser.WindowsApi/Kernel32.cs index 30f07cf..cd04636 100644 --- a/SafeExamBrowser.WindowsApi/Kernel32.cs +++ b/SafeExamBrowser.WindowsApi/Kernel32.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/NativeMethods.cs b/SafeExamBrowser.WindowsApi/NativeMethods.cs index ca510e4..a8a5e0f 100644 --- a/SafeExamBrowser.WindowsApi/NativeMethods.cs +++ b/SafeExamBrowser.WindowsApi/NativeMethods.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Processes/Process.cs b/SafeExamBrowser.WindowsApi/Processes/Process.cs index 2999ccb..0f15b7a 100644 --- a/SafeExamBrowser.WindowsApi/Processes/Process.cs +++ b/SafeExamBrowser.WindowsApi/Processes/Process.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Processes/ProcessFactory.cs b/SafeExamBrowser.WindowsApi/Processes/ProcessFactory.cs index e249a91..40fb2cb 100644 --- a/SafeExamBrowser.WindowsApi/Processes/ProcessFactory.cs +++ b/SafeExamBrowser.WindowsApi/Processes/ProcessFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Properties/AssemblyInfo.cs b/SafeExamBrowser.WindowsApi/Properties/AssemblyInfo.cs index 956db77..7501767 100644 --- a/SafeExamBrowser.WindowsApi/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.WindowsApi/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SafeExamBrowser.WindowsApi")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 @@ -28,6 +28,6 @@ using System.Runtime.InteropServices; // 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("3.8.0.742")] -[assembly: AssemblyFileVersion("3.8.0.742")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0.0")] diff --git a/SafeExamBrowser.WindowsApi/Types/Bounds.cs b/SafeExamBrowser.WindowsApi/Types/Bounds.cs index 8d90517..c7c72d9 100644 --- a/SafeExamBrowser.WindowsApi/Types/Bounds.cs +++ b/SafeExamBrowser.WindowsApi/Types/Bounds.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Types/EXECUTION_STATE.cs b/SafeExamBrowser.WindowsApi/Types/EXECUTION_STATE.cs index d5d9c90..03b7393 100644 --- a/SafeExamBrowser.WindowsApi/Types/EXECUTION_STATE.cs +++ b/SafeExamBrowser.WindowsApi/Types/EXECUTION_STATE.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Types/KBDLLHOOKSTRUCT.cs b/SafeExamBrowser.WindowsApi/Types/KBDLLHOOKSTRUCT.cs index 5da74cf..0dc021d 100644 --- a/SafeExamBrowser.WindowsApi/Types/KBDLLHOOKSTRUCT.cs +++ b/SafeExamBrowser.WindowsApi/Types/KBDLLHOOKSTRUCT.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Types/KBDLLHOOKSTRUCTFlags.cs b/SafeExamBrowser.WindowsApi/Types/KBDLLHOOKSTRUCTFlags.cs index 0f5a6eb..82fcf79 100644 --- a/SafeExamBrowser.WindowsApi/Types/KBDLLHOOKSTRUCTFlags.cs +++ b/SafeExamBrowser.WindowsApi/Types/KBDLLHOOKSTRUCTFlags.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Types/MSLLHOOKSTRUCT.cs b/SafeExamBrowser.WindowsApi/Types/MSLLHOOKSTRUCT.cs index 67b403a..ee3a902 100644 --- a/SafeExamBrowser.WindowsApi/Types/MSLLHOOKSTRUCT.cs +++ b/SafeExamBrowser.WindowsApi/Types/MSLLHOOKSTRUCT.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Types/POINT.cs b/SafeExamBrowser.WindowsApi/Types/POINT.cs index b72454a..6af88fc 100644 --- a/SafeExamBrowser.WindowsApi/Types/POINT.cs +++ b/SafeExamBrowser.WindowsApi/Types/POINT.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Types/PROCESS_INFORMATION.cs b/SafeExamBrowser.WindowsApi/Types/PROCESS_INFORMATION.cs index ffe1e62..7dbfd68 100644 --- a/SafeExamBrowser.WindowsApi/Types/PROCESS_INFORMATION.cs +++ b/SafeExamBrowser.WindowsApi/Types/PROCESS_INFORMATION.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Types/RECT.cs b/SafeExamBrowser.WindowsApi/Types/RECT.cs index fa3d704..4216232 100644 --- a/SafeExamBrowser.WindowsApi/Types/RECT.cs +++ b/SafeExamBrowser.WindowsApi/Types/RECT.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Types/STARTUPINFO.cs b/SafeExamBrowser.WindowsApi/Types/STARTUPINFO.cs index d077f58..359310b 100644 --- a/SafeExamBrowser.WindowsApi/Types/STARTUPINFO.cs +++ b/SafeExamBrowser.WindowsApi/Types/STARTUPINFO.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Types/STICKYKEYS.cs b/SafeExamBrowser.WindowsApi/Types/STICKYKEYS.cs index cd83a1f..5945ffe 100644 --- a/SafeExamBrowser.WindowsApi/Types/STICKYKEYS.cs +++ b/SafeExamBrowser.WindowsApi/Types/STICKYKEYS.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Types/StickyKeysState.cs b/SafeExamBrowser.WindowsApi/Types/StickyKeysState.cs index ec3f6c0..e9ab7be 100644 --- a/SafeExamBrowser.WindowsApi/Types/StickyKeysState.cs +++ b/SafeExamBrowser.WindowsApi/Types/StickyKeysState.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Types/WINDOWPLACEMENT.cs b/SafeExamBrowser.WindowsApi/Types/WINDOWPLACEMENT.cs index 2f95f9c..c7733a7 100644 --- a/SafeExamBrowser.WindowsApi/Types/WINDOWPLACEMENT.cs +++ b/SafeExamBrowser.WindowsApi/Types/WINDOWPLACEMENT.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/Types/Window.cs b/SafeExamBrowser.WindowsApi/Types/Window.cs index 53da3f3..6e73dcd 100644 --- a/SafeExamBrowser.WindowsApi/Types/Window.cs +++ b/SafeExamBrowser.WindowsApi/Types/Window.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/User32.cs b/SafeExamBrowser.WindowsApi/User32.cs index e61a25e..39514e6 100644 --- a/SafeExamBrowser.WindowsApi/User32.cs +++ b/SafeExamBrowser.WindowsApi/User32.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SafeExamBrowser.WindowsApi/WinInet.cs b/SafeExamBrowser.WindowsApi/WinInet.cs index 28e6ee1..81bd73f 100644 --- a/SafeExamBrowser.WindowsApi/WinInet.cs +++ b/SafeExamBrowser.WindowsApi/WinInet.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 ETH Zürich, IT Services + * Copyright (c) 2025 ETH Zürich, IT Services * * 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 diff --git a/SebWindowsConfig/Properties/AssemblyInfo.cs b/SebWindowsConfig/Properties/AssemblyInfo.cs index 0944d39..424c8b5 100644 --- a/SebWindowsConfig/Properties/AssemblyInfo.cs +++ b/SebWindowsConfig/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDescription("Safe Exam Browser")] [assembly: AssemblyCompany("ETH Zürich")] [assembly: AssemblyProduct("SEB Configuration Tool")] -[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")] +[assembly: AssemblyCopyright("Copyright © 2025 ETH Zürich, IT Services")] // 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 diff --git a/SebWindowsConfig/SEBSettings.cs b/SebWindowsConfig/SEBSettings.cs index 57601c5..7692029 100644 --- a/SebWindowsConfig/SEBSettings.cs +++ b/SebWindowsConfig/SEBSettings.cs @@ -179,7 +179,6 @@ namespace SebWindowsConfig public const String KeyAllowPrint = "allowPrint"; // Group "DownUploads" - public const String KeyAllowDownUploads = "allowDownUploads"; public const String KeyAllowCustomDownUploadLocation = "allowCustomDownUploadLocation"; public const String KeyDownloadDirectoryOSX = "downloadDirectoryOSX"; public const String KeyDownloadDirectoryWin = "downloadDirectoryWin"; @@ -722,7 +721,6 @@ namespace SebWindowsConfig SEBSettings.strArrayDefault[SEBSettings.ValNewBrowserWindowByLinkHeight] = "100%"; // Default settings for group "DownUploads" - SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowDownUploads, false); SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowCustomDownUploadLocation, false); SEBSettings.settingsDefault.Add(SEBSettings.KeyDownloadDirectoryOSX, "~/Downloads"); SEBSettings.settingsDefault.Add(SEBSettings.KeyDownloadDirectoryWin, ""); @@ -735,7 +733,7 @@ namespace SebWindowsConfig SEBSettings.settingsDefault.Add(SEBSettings.KeyUseTemporaryDownUploadDirectory, false); SEBSettings.settingsDefault.Add(SEBSettings.KeyShowFileSystemElementPath, true); SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowDownloads, true); - SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowUploads, true); + SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowUploads, false); // Default settings for group "Exam" SEBSettings.settingsDefault.Add(SEBSettings.KeyExamKeySalt, new Byte[] { }); @@ -847,6 +845,8 @@ namespace SebWindowsConfig "RPCService.exe", "RPCSuite.exe", "Discord.exe", + "DiscordPTB.exe", + "DiscordCanary.exe", "Camtasia.exe", "CamtasiaStudio.exe", "Camtasia_Studio.exe", @@ -879,7 +879,8 @@ namespace SebWindowsConfig "spotify.exe", "Microsoft.Media.Player.exe", "vlc.exe", - "sethc.exe" + "sethc.exe", + "Guilded.exe", }; // Default settings for group "Network - Filter" diff --git a/SebWindowsConfig/SebWindowsConfigForm.Designer.cs b/SebWindowsConfig/SebWindowsConfigForm.Designer.cs index 7389238..4f6709c 100644 --- a/SebWindowsConfig/SebWindowsConfigForm.Designer.cs +++ b/SebWindowsConfig/SebWindowsConfigForm.Designer.cs @@ -30,8 +30,8 @@ namespace SebWindowsConfig { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SebWindowsConfigForm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.openFileDialogSebConfigFile = new System.Windows.Forms.OpenFileDialog(); this.saveFileDialogSebConfigFile = new System.Windows.Forms.SaveFileDialog(); this.imageListTabIcons = new System.Windows.Forms.ImageList(this.components); @@ -76,6 +76,7 @@ namespace SebWindowsConfig this.checkBoxInsideSebEnableEaseOfAccess = new System.Windows.Forms.CheckBox(); this.checkBoxInsideSebEnableVmWareClientShade = new System.Windows.Forms.CheckBox(); this.tabPageSecurity = new System.Windows.Forms.TabPage(); + this.checkBoxAllowStickyKeys = new System.Windows.Forms.CheckBox(); this.checkBoxEnableSessionVerification = new System.Windows.Forms.CheckBox(); this.checkBoxEnableCursorVerification = new System.Windows.Forms.CheckBox(); this.groupBox21 = new System.Windows.Forms.GroupBox(); @@ -300,7 +301,6 @@ namespace SebWindowsConfig this.labelChooseFileToUploadPolicy = new System.Windows.Forms.Label(); this.checkBoxDownloadPDFFiles = new System.Windows.Forms.CheckBox(); this.checkBoxOpenDownloads = new System.Windows.Forms.CheckBox(); - this.checkBoxAllowDownUploads = new System.Windows.Forms.CheckBox(); this.tabPageBrowser = new System.Windows.Forms.TabPage(); this.groupBox19 = new System.Windows.Forms.GroupBox(); this.label25 = new System.Windows.Forms.Label(); @@ -485,7 +485,6 @@ namespace SebWindowsConfig this.editDuplicateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.configureClientToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.applyAndStartSEBToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.checkBoxAllowStickyKeys = new System.Windows.Forms.CheckBox(); this.tabPageHookedKeys.SuspendLayout(); this.groupBoxFunctionKeys.SuspendLayout(); this.groupBoxSpecialKeys.SuspendLayout(); @@ -1166,6 +1165,19 @@ namespace SebWindowsConfig this.tabPageSecurity.Text = "Security"; this.tabPageSecurity.UseVisualStyleBackColor = true; // + // checkBoxAllowStickyKeys + // + this.checkBoxAllowStickyKeys.AutoSize = true; + this.checkBoxAllowStickyKeys.Location = new System.Drawing.Point(230, 321); + this.checkBoxAllowStickyKeys.Name = "checkBoxAllowStickyKeys"; + this.checkBoxAllowStickyKeys.Size = new System.Drawing.Size(166, 17); + this.checkBoxAllowStickyKeys.TabIndex = 113; + this.checkBoxAllowStickyKeys.Text = "Allow to use sticky keys (Win)"; + this.toolTip1.SetToolTip(this.checkBoxAllowStickyKeys, "Indicates whether the sticky keys accessibility feature of the operating system m" + + "ay be used while SEB is running."); + this.checkBoxAllowStickyKeys.UseVisualStyleBackColor = true; + this.checkBoxAllowStickyKeys.CheckedChanged += new System.EventHandler(this.checkBoxAllowStickyKeys_CheckedChanged); + // // checkBoxEnableSessionVerification // this.checkBoxEnableSessionVerification.AutoSize = true; @@ -2071,8 +2083,8 @@ namespace SebWindowsConfig // // Type // - dataGridViewCellStyle3.BackColor = System.Drawing.Color.Silver; - this.Type.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.Silver; + this.Type.DefaultCellStyle = dataGridViewCellStyle1; this.Type.HeaderText = "Type"; this.Type.Name = "Type"; this.Type.ReadOnly = true; @@ -3744,7 +3756,6 @@ namespace SebWindowsConfig this.tabPageDownUploads.Controls.Add(this.labelChooseFileToUploadPolicy); this.tabPageDownUploads.Controls.Add(this.checkBoxDownloadPDFFiles); this.tabPageDownUploads.Controls.Add(this.checkBoxOpenDownloads); - this.tabPageDownUploads.Controls.Add(this.checkBoxAllowDownUploads); this.tabPageDownUploads.ImageIndex = 4; this.tabPageDownUploads.Location = new System.Drawing.Point(4, 39); this.tabPageDownUploads.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1); @@ -3758,7 +3769,7 @@ namespace SebWindowsConfig // checkBoxAllowUploads // this.checkBoxAllowUploads.AutoSize = true; - this.checkBoxAllowUploads.Location = new System.Drawing.Point(25, 225); + this.checkBoxAllowUploads.Location = new System.Drawing.Point(21, 196); this.checkBoxAllowUploads.Name = "checkBoxAllowUploads"; this.checkBoxAllowUploads.Size = new System.Drawing.Size(121, 17); this.checkBoxAllowUploads.TabIndex = 93; @@ -3769,7 +3780,7 @@ namespace SebWindowsConfig // checkBoxAllowDownloads // this.checkBoxAllowDownloads.AutoSize = true; - this.checkBoxAllowDownloads.Location = new System.Drawing.Point(25, 47); + this.checkBoxAllowDownloads.Location = new System.Drawing.Point(21, 18); this.checkBoxAllowDownloads.Name = "checkBoxAllowDownloads"; this.checkBoxAllowDownloads.Size = new System.Drawing.Size(135, 17); this.checkBoxAllowDownloads.TabIndex = 92; @@ -3780,7 +3791,7 @@ namespace SebWindowsConfig // checkBoxShowFileSystemElementPath // this.checkBoxShowFileSystemElementPath.AutoSize = true; - this.checkBoxShowFileSystemElementPath.Location = new System.Drawing.Point(45, 183); + this.checkBoxShowFileSystemElementPath.Location = new System.Drawing.Point(41, 143); this.checkBoxShowFileSystemElementPath.Name = "checkBoxShowFileSystemElementPath"; this.checkBoxShowFileSystemElementPath.Size = new System.Drawing.Size(213, 17); this.checkBoxShowFileSystemElementPath.TabIndex = 91; @@ -3791,7 +3802,7 @@ namespace SebWindowsConfig // checkBoxTemporaryDownloadDirectory // this.checkBoxTemporaryDownloadDirectory.AutoSize = true; - this.checkBoxTemporaryDownloadDirectory.Location = new System.Drawing.Point(45, 161); + this.checkBoxTemporaryDownloadDirectory.Location = new System.Drawing.Point(41, 121); this.checkBoxTemporaryDownloadDirectory.Name = "checkBoxTemporaryDownloadDirectory"; this.checkBoxTemporaryDownloadDirectory.Size = new System.Drawing.Size(229, 17); this.checkBoxTemporaryDownloadDirectory.TabIndex = 90; @@ -3802,7 +3813,7 @@ namespace SebWindowsConfig // checkBoxAllowCustomDownloadLocation // this.checkBoxAllowCustomDownloadLocation.AutoSize = true; - this.checkBoxAllowCustomDownloadLocation.Location = new System.Drawing.Point(45, 138); + this.checkBoxAllowCustomDownloadLocation.Location = new System.Drawing.Point(41, 98); this.checkBoxAllowCustomDownloadLocation.Name = "checkBoxAllowCustomDownloadLocation"; this.checkBoxAllowCustomDownloadLocation.Size = new System.Drawing.Size(289, 17); this.checkBoxAllowCustomDownloadLocation.TabIndex = 89; @@ -3814,7 +3825,7 @@ namespace SebWindowsConfig // this.checkBoxAllowPDFPlugIn.AutoSize = true; this.checkBoxAllowPDFPlugIn.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.checkBoxAllowPDFPlugIn.Location = new System.Drawing.Point(25, 359); + this.checkBoxAllowPDFPlugIn.Location = new System.Drawing.Point(21, 337); this.checkBoxAllowPDFPlugIn.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1); this.checkBoxAllowPDFPlugIn.Name = "checkBoxAllowPDFPlugIn"; this.checkBoxAllowPDFPlugIn.Size = new System.Drawing.Size(310, 17); @@ -3828,7 +3839,7 @@ namespace SebWindowsConfig // // textBoxDownloadDirectoryWin // - this.textBoxDownloadDirectoryWin.Location = new System.Drawing.Point(269, 71); + this.textBoxDownloadDirectoryWin.Location = new System.Drawing.Point(265, 42); this.textBoxDownloadDirectoryWin.Name = "textBoxDownloadDirectoryWin"; this.textBoxDownloadDirectoryWin.Size = new System.Drawing.Size(379, 20); this.textBoxDownloadDirectoryWin.TabIndex = 87; @@ -3838,7 +3849,7 @@ namespace SebWindowsConfig // this.checkBoxDownloadOpenSEBFiles.AutoSize = true; this.checkBoxDownloadOpenSEBFiles.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.checkBoxDownloadOpenSEBFiles.Location = new System.Drawing.Point(25, 398); + this.checkBoxDownloadOpenSEBFiles.Location = new System.Drawing.Point(21, 384); this.checkBoxDownloadOpenSEBFiles.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1); this.checkBoxDownloadOpenSEBFiles.Name = "checkBoxDownloadOpenSEBFiles"; this.checkBoxDownloadOpenSEBFiles.Size = new System.Drawing.Size(203, 17); @@ -3852,7 +3863,7 @@ namespace SebWindowsConfig // label5 // this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(117, 104); + this.label5.Location = new System.Drawing.Point(113, 75); this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(137, 13); @@ -3862,7 +3873,7 @@ namespace SebWindowsConfig // // textBoxDownloadDirectoryOSX // - this.textBoxDownloadDirectoryOSX.Location = new System.Drawing.Point(269, 101); + this.textBoxDownloadDirectoryOSX.Location = new System.Drawing.Point(265, 72); this.textBoxDownloadDirectoryOSX.Name = "textBoxDownloadDirectoryOSX"; this.textBoxDownloadDirectoryOSX.Size = new System.Drawing.Size(379, 20); this.textBoxDownloadDirectoryOSX.TabIndex = 84; @@ -3871,7 +3882,7 @@ namespace SebWindowsConfig // buttonDownloadDirectoryWin // this.buttonDownloadDirectoryWin.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonDownloadDirectoryWin.Location = new System.Drawing.Point(45, 68); + this.buttonDownloadDirectoryWin.Location = new System.Drawing.Point(41, 39); this.buttonDownloadDirectoryWin.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1); this.buttonDownloadDirectoryWin.Name = "buttonDownloadDirectoryWin"; this.buttonDownloadDirectoryWin.Size = new System.Drawing.Size(209, 25); @@ -3883,7 +3894,7 @@ namespace SebWindowsConfig // listBoxChooseFileToUploadPolicy // this.listBoxChooseFileToUploadPolicy.FormattingEnabled = true; - this.listBoxChooseFileToUploadPolicy.Location = new System.Drawing.Point(44, 266); + this.listBoxChooseFileToUploadPolicy.Location = new System.Drawing.Point(41, 238); this.listBoxChooseFileToUploadPolicy.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1); this.listBoxChooseFileToUploadPolicy.Name = "listBoxChooseFileToUploadPolicy"; this.listBoxChooseFileToUploadPolicy.Size = new System.Drawing.Size(348, 43); @@ -3896,7 +3907,7 @@ namespace SebWindowsConfig // labelChooseFileToUploadPolicy // this.labelChooseFileToUploadPolicy.AutoSize = true; - this.labelChooseFileToUploadPolicy.Location = new System.Drawing.Point(41, 245); + this.labelChooseFileToUploadPolicy.Location = new System.Drawing.Point(38, 217); this.labelChooseFileToUploadPolicy.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.labelChooseFileToUploadPolicy.Name = "labelChooseFileToUploadPolicy"; this.labelChooseFileToUploadPolicy.Size = new System.Drawing.Size(145, 13); @@ -3907,7 +3918,7 @@ namespace SebWindowsConfig // this.checkBoxDownloadPDFFiles.AutoSize = true; this.checkBoxDownloadPDFFiles.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.checkBoxDownloadPDFFiles.Location = new System.Drawing.Point(25, 340); + this.checkBoxDownloadPDFFiles.Location = new System.Drawing.Point(21, 318); this.checkBoxDownloadPDFFiles.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1); this.checkBoxDownloadPDFFiles.Name = "checkBoxDownloadPDFFiles"; this.checkBoxDownloadPDFFiles.Size = new System.Drawing.Size(270, 17); @@ -3923,7 +3934,7 @@ namespace SebWindowsConfig // this.checkBoxOpenDownloads.AutoSize = true; this.checkBoxOpenDownloads.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.checkBoxOpenDownloads.Location = new System.Drawing.Point(45, 204); + this.checkBoxOpenDownloads.Location = new System.Drawing.Point(41, 164); this.checkBoxOpenDownloads.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1); this.checkBoxOpenDownloads.Name = "checkBoxOpenDownloads"; this.checkBoxOpenDownloads.Size = new System.Drawing.Size(160, 17); @@ -3935,22 +3946,6 @@ namespace SebWindowsConfig this.checkBoxOpenDownloads.Visible = false; this.checkBoxOpenDownloads.CheckedChanged += new System.EventHandler(this.checkBoxOpenDownloads_CheckedChanged); // - // checkBoxAllowDownUploads - // - this.checkBoxAllowDownUploads.AutoSize = true; - this.checkBoxAllowDownUploads.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.checkBoxAllowDownUploads.Location = new System.Drawing.Point(25, 26); - this.checkBoxAllowDownUploads.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1); - this.checkBoxAllowDownUploads.Name = "checkBoxAllowDownUploads"; - this.checkBoxAllowDownUploads.Size = new System.Drawing.Size(439, 17); - this.checkBoxAllowDownUploads.TabIndex = 71; - this.checkBoxAllowDownUploads.Text = "Allow downloading and uploading files (deprecated, start using separate settings " + - "below!)"; - this.toolTip1.SetToolTip(this.checkBoxAllowDownUploads, "Usually to be used with permitted third party applications for which you want to " + - "provide files to be downloaded."); - this.checkBoxAllowDownUploads.UseVisualStyleBackColor = true; - this.checkBoxAllowDownUploads.CheckedChanged += new System.EventHandler(this.checkBoxAllowDownUploads_CheckedChanged); - // // tabPageBrowser // this.tabPageBrowser.Controls.Add(this.groupBox19); @@ -4899,8 +4894,8 @@ namespace SebWindowsConfig // spellCheckerDictionaryFilesColumn // this.spellCheckerDictionaryFilesColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.spellCheckerDictionaryFilesColumn.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.spellCheckerDictionaryFilesColumn.DefaultCellStyle = dataGridViewCellStyle2; this.spellCheckerDictionaryFilesColumn.HeaderText = "Files"; this.spellCheckerDictionaryFilesColumn.Name = "spellCheckerDictionaryFilesColumn"; this.spellCheckerDictionaryFilesColumn.ReadOnly = true; @@ -6298,19 +6293,6 @@ namespace SebWindowsConfig this.applyAndStartSEBToolStripMenuItem.Visible = false; this.applyAndStartSEBToolStripMenuItem.Click += new System.EventHandler(this.applyAndStartSEBToolStripMenuItem_Click); // - // checkBoxAllowStickyKeys - // - this.checkBoxAllowStickyKeys.AutoSize = true; - this.checkBoxAllowStickyKeys.Location = new System.Drawing.Point(230, 321); - this.checkBoxAllowStickyKeys.Name = "checkBoxAllowStickyKeys"; - this.checkBoxAllowStickyKeys.Size = new System.Drawing.Size(166, 17); - this.checkBoxAllowStickyKeys.TabIndex = 113; - this.checkBoxAllowStickyKeys.Text = "Allow to use sticky keys (Win)"; - this.toolTip1.SetToolTip(this.checkBoxAllowStickyKeys, "Indicates whether the sticky keys accessibility feature of the operating system m" + - "ay be used while SEB is running."); - this.checkBoxAllowStickyKeys.UseVisualStyleBackColor = true; - this.checkBoxAllowStickyKeys.CheckedChanged += new System.EventHandler(this.checkBoxAllowStickyKeys_CheckedChanged); - // // SebWindowsConfigForm // this.AllowDrop = true; @@ -6507,7 +6489,6 @@ namespace SebWindowsConfig private System.Windows.Forms.ListBox listBoxChooseFileToUploadPolicy; private System.Windows.Forms.Label labelChooseFileToUploadPolicy; private System.Windows.Forms.CheckBox checkBoxOpenDownloads; - private System.Windows.Forms.CheckBox checkBoxAllowDownUploads; private System.Windows.Forms.TabPage tabPageBrowser; private System.Windows.Forms.ListBox listBoxOpenLinksHTML; private System.Windows.Forms.Label labelUseSEBWithoutBrowser; diff --git a/SebWindowsConfig/SebWindowsConfigForm.cs b/SebWindowsConfig/SebWindowsConfigForm.cs index 6c4669b..0f54844 100644 --- a/SebWindowsConfig/SebWindowsConfigForm.cs +++ b/SebWindowsConfig/SebWindowsConfigForm.cs @@ -550,7 +550,6 @@ namespace SebWindowsConfig comboBoxUrlPolicyNewWindow.SelectedIndex = (int) SEBSettings.settingsCurrent[SEBSettings.KeyNewBrowserWindowUrlPolicy]; // Group "Down/Uploads" - checkBoxAllowDownUploads.Checked = (Boolean) SEBSettings.settingsCurrent[SEBSettings.KeyAllowDownUploads]; checkBoxAllowCustomDownloadLocation.Checked = (Boolean) SEBSettings.settingsCurrent[SEBSettings.KeyAllowCustomDownUploadLocation]; checkBoxOpenDownloads.Checked = (Boolean) SEBSettings.settingsCurrent[SEBSettings.KeyOpenDownloads]; checkBoxDownloadPDFFiles.Checked = (Boolean) SEBSettings.settingsCurrent[SEBSettings.KeyDownloadPDFFiles]; @@ -2333,10 +2332,6 @@ namespace SebWindowsConfig // ******************** // Group "Down/Uploads" // ******************** - private void checkBoxAllowDownUploads_CheckedChanged(object sender, EventArgs e) - { - SEBSettings.settingsCurrent[SEBSettings.KeyAllowDownUploads] = checkBoxAllowDownUploads.Checked; - } private void buttonDownloadDirectoryWin_Click(object sender, EventArgs e) { diff --git a/SebWindowsConfig/SebWindowsConfigForm.resx b/SebWindowsConfig/SebWindowsConfigForm.resx index 41ad3b3..506e47d 100644 --- a/SebWindowsConfig/SebWindowsConfigForm.resx +++ b/SebWindowsConfig/SebWindowsConfigForm.resx @@ -131,7 +131,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAC6 - 1QAAAk1TRnQBSQFMAgEBDAEAAYgBDAGIAQwBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA + 1QAAAk1TRnQBSQFMAgEBDAEAAZABDAGQAQwBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA AwABgAMAAQEBAAEgBwABAf8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A /wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A /wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A0QABjgGLAQAB/wGOAYsBAAH/AY4BiwEAAf8BjgGLAQAB/wGO @@ -654,10 +654,10 @@ AuYB/wPkAf8B4gLhAf8D1QH/AbgBuQG4Af8DnAH/A5QB/wOVAf8DigH/A6kB/wNiAe8DFQEdGAADLQFF A/0B/wHsAu0B/wHrAewB7QH/AeoB6wHsAf8B6QLrAf8B6AHpAesB/wHnAekB6gH/AecB6AHpAf8B5gLo Af8B5QLnAf8B5AHmAecB/wHjAeUB5gH/AeIB5AHlAf8B4QLkAf8B4AHjAeQB/wHfAeIB4wH/Ad4B4QHi - Af8B3QHgAeEB/wHdAeAB4QH/AdsB3gHfAf8B6QLsAf8DWQG7KAADGwElAk0BQAH6AwAB/wMAAf8DAAH/ + Af8B3QHgAeEB/wHdAeAB4QH/AdsB3gHfAf8B6QLsAf8DWQG7KAADGwElAk0BQgH6AwAB/wMAAf8DAAH/ AZkBhQGAAf8BmgGEAQAB/wG1AaABmwH/AZwCAAH/AaUBiQGEAf8BqQGNAYcB/wGpAY4BiAH/AakBjgGI Af8BqAGMAYYB/wGzAZsBlgH/AbIBmgGUAf8BtQGdAZgB/wHGAbMBrgH/AaQBigGEAf8BqQGUAY8B/wHg - AdgB1gH/AbgBrAGqAf8DAAH/AwAB/wFNAkAB+gMdASgcAAM7AWMBAAG/AQAB/wEAAcEBAAH/AQABuwEA + AdgB1gH/AbgBrAGqAf8DAAH/AwAB/wFNAkIB+gMdASgcAAM7AWMBAAG/AQAB/wEAAcEBAAH/AQABuwEA Af8BAAG5AQAB/wEAAboBAAH/AVgCWgG9KAADEwEaAQABtQEAAf8BAAHKAYIB/wEAAb8BAAH/AQABxwEA Af8BXwJhAdokAAMlATYC3wHcA/8B+gH/AgAB9AH/AtUB6AP/AeQD/wHhAf8CAAH0Af8CgwHyA/8B5AH/ AusB5gH/AeYB5QHkAf8C4gHjAf8D4QH/A98B/wPPAf8DoQH/AwAB/wMAAf8DAAH/A5kB/wO8Af8DLwFJ @@ -720,8 +720,8 @@ A5EB/wORAf8DkQH/A5EB/wORAf8DkQH/A5EB/wORAf8DkQH/A5EB/wORAf8DkQH/A5EB/wORAf8DkQH/ A5EB/wORAf8DkQH/AZECkgH/A5IB/wOSAf8DkgH/A48B/wNdAc8DBgEIEAADNAFTBAAD+AH/A/YB/wP2 Af8D9gH/A/YB/wP1Af8D5gH/A8AB/wOXAf8DiQH/AwAB/wMAAf8DAAH/AwAB/wONAf8DrgH/A94B/wPw - Af8D9gH/A/cB/wQAAzgBWxQAAxQBGwNRAaQDWgHyAwAB/wN+Af4DfgH+A34B/gN+Af4DfgH+A30B/gN3 - Af4DYwH+A1AB/gOAAf4DgAH+A4AB/gOAAf4DgAH+A4AB/gOAAf4DgAH+A4AB/gOAAf4DgAH+A4AB/gOA + Af8D9gH/A/cB/wQAAzgBWxQAAxQBGwNRAaQDWgHyAwAB/wN/Af4DfwH+A38B/gN/Af4DfwH+A34B/gN4 + Af4DZAH+A1EB/gOAAf4DgAH+A4AB/gOAAf4DgAH+A4AB/gOAAf4DgAH+A4AB/gOAAf4DgAH+A4AB/gOA Af4DAAH/A2cB8gNRAaQDFAEbHAADCgENA0sBjAJtAWwB9wHcAaYBAAH/AcUBhgEAAf8BvAIAAf8BvAIA Af8BuQIAAf8BtQIAAf8BrAIAAf8BqAIAAf8BqAIAAf8BpwIAAf8BqAIAAf8BrQIAAf8BvQIAAf8B2AGg AQAB/wJtAWwB9wNLAYwDCgENGAADBgEHA50B/wHvAvAB/wPrAf8B7wHwAfEB/wHvAvEB/wPrAf8D6gH/ @@ -754,7 +754,7 @@ Af8D5wH/A+YB/wPfAf8D1QH/A84B/wPSAf8D3AH/A+UB/wPmAf8D5gH/AusB7AH/AsgBxwH/AeYC5wH/ Ab4CugH/AaYBogGfAf8C9AH1Af8DogH/AwYBCBAAAzMBUgwAA+gB/wO4Af8DngH/A58B/wOdAf8DqwH/ A8cB/wPHAf8DuwH/A7cB/wOzAf8DsgH/A74B/wO5Af8DAAH/AwAB/wMAAf8DAAH/A9QB/wM3AVoQAAMO - ARIBSAEjATYB/gMAAf8BvwLBAf8ByALJAf8DxAH/AcoByAHEAf8B1AHSAcMB/wHBAcIBygH/AcEBwgHK + ARIBSQEkATcB/gMAAf8BvwLBAf8ByALJAf8DxAH/AcoByAHEAf8B1AHSAcMB/wHBAcIBygH/AcEBwgHK Af8B1AHSAcMB/wG+AbwBtwH/ApsBnAH/AwAB/wP0Af8D/AH/AfoC+QH/BAAC+gH7Af8CzwHOAf8D8QH/ BAAD+gH/A/kB/wP6Af8B+wL6Af8B9gH5AfcB/wH2AfkB9wH/AvsB/AH/BAADgAH+Aw4BEggAAwkBDANf AdAB3gGpAQAB/wHFAYUBAAH/AcQBgwEAAf8BwwGBAQAB/wHAAgAB/wHIAgAB/wEAAZMBrQH/AQABjQH8 @@ -763,8 +763,8 @@ AQwIAAMGAQcDoQH/A+8B/wPfAf8DtQH/AbsBugG5Af8D4AH/A+oB/wPnAf8D5wH/A+cB/wPnAf8D5wH/ A+gB/wPuAf8D5wH/A9MB/wO9Af8DsQH/A8AB/wPVAf8D4wH/A+gB/wPnAf8D6QH/A+IB/wPFAf8BvgK9 Af8B1wLYAf8D8QH/A6EB/wMGAQgQAAMzAVIIAAP9Af8DywH/A6sB/wOoAf8DqgH/A48B/wMAAf8DAAH/ - A4IB/wPMAf8DuQH/A7QB/wOzAf8DtQH/A7YB/wMAAf8DAAH/AwAB/wMAAf8DoQH/A08BmRAAAw4BEgFH - ASIBNgH+AwAB/wHDAsQB/wHLAs0B/wLNAcgB/wLOAckB/wEAAYEB4gH/AgAB9wH/AgAB9wH/AQABggHg + A4IB/wPMAf8DuQH/A7QB/wOzAf8DtQH/A7YB/wMAAf8DAAH/AwAB/wMAAf8DoQH/A08BmRAAAw4BEgFI + ASMBNwH+AwAB/wHDAsQB/wHLAs0B/wLNAcgB/wLOAckB/wEAAYEB4gH/AgAB9wH/AgAB9wH/AQABggHg Af8BwwHCAb0B/wGkAaMBnwH/AwAB/wL1AfQB/wH8AfsB/AH/AewB9QH3Af8B6gH3AfoB/wHtAfoC/wH2 A/8B/AL+Af8D+QH/A/kB/wP5Af8B9wH5AfcB/wHvAfgB8AH/AesB+wHzAf8B6wH7AfMB/wHvAfkB8wH/ BAADgAH+Aw4BEggAA0sBjQHlAbMBAAH/AcsBjQEAAf8BxwGHAQAB/wHGAYUBAAH/AcMBggEAAf8BwQIA @@ -774,7 +774,7 @@ Af8D5wH/A+cB/wPnAf8D5wH/A+sB/wPWAf8DxwH/A6sB/wGRAZIBkQH/A5sB/wO1Af8D0gH/A+MB/wPn Af8D5wH/A+cB/wPqAf8D6QH/A+kB/wPtAf8D7QH/A6EB/wMGAQgQAAMzAVIIAAPuAf8DwAH/A6wB/wOs Af8DuQH/AwAB/wMAAf8DAAH/AwAB/wPIAf8DvQH/A7YB/wOzAf8DxAH/A6AB/wMAAf8DAAH/AwAB/wMA - Af8DAAH/A2AB2wMhAS8MAAMOARIBRQEhATQB/gMAAf8DxQH/Ac8B0QHPAf8B3QHZAckB/wIAAdAB/wIA + Af8DAAH/A2AB2wMhAS8MAAMOARIBRgEiATUB/gMAAf8DxQH/Ac8B0QHPAf8B3QHZAckB/wIAAdAB/wIA AfwB/wGrAbsB/gH/Aa0BuwH+Af8CAAH8Af8CAAHGAf8BsQGvAZ8B/wOBAf8B9gH0AfUB/wHvAfYB+QH/ AeEB8AH3Af8B6gH5Av8B7AH4Av8B4QHwAfcB/wHqAfAB9QH/AfoC+QH/AfoB+QH6Af8B+gL5Af8B6gH1 Ae4B/wHkAfcB6wH/Ae0B/wH0Af8B7QH/AfQB/wHlAfgB6wH/AfIB/QH4Af8DgAH+Aw4BEgQAAx8BLAJq @@ -785,7 +785,7 @@ Af8D6QH/A+oB/wPvAf8BlQGWAZUB/wGOAY8BjgH/AZQBlgGVAf8DAAH/A4gB/wOwAf8D0gH/A+cB/wPq Af8D6QH/A+kB/wPoAf8D6QH/A+kB/wPoAf8D7gH/A6MB/wMGAQgQAAMzAVIIAAPhAf8DuAH/A6wB/wOu Af8DsgH/A5EB/wMAAf8DAAH/AwAB/wPGAf8DxAH/A8UB/wO7Af8DoAH/A5IB/wOyAf8DlQH/AwAB/wMA - Af8DAAH/AysB/ANBAXIMAAMOARIBQgEfATIB/gMAAf8DyAH/AtkB1AH/AckByAHHAf8CAAG9Af8CAAHv + Af8DAAH/AysB/ANBAXIMAAMOARIBQwEgATMB/gMAAf8DyAH/AtkB1AH/AckByAHHAf8CAAG9Af8CAAHv Af8CAAH1Af8CAAH1Af8CAAHvAf8CAAGzAf8BoAGfAZwB/wGHAYYBhQH/AvIB9AH/AeYB7gHyAf8B3gHr AfIB/wHnAfUB+wH/AeQB8wH5Af8B3gHrAfIB/wHkAe4B8gH/AfkB9wH5Af8D/AH/AfwB/gH8Af8B5gH2 Ae4B/wHhAfQB6QH/AeYB+gHtAf8B6gH8AfAB/wHgAfUB6AH/AewB+wHxAf8DgAH+Aw4BEgQAA1EBngHi @@ -796,7 +796,7 @@ A+oB/wPqAf8D6gH/A+oB/wP1Af8BywHKAcsB/wPPAf8D2gH/A64B/wMAAf8DrgH/A9cB/wPpAf8D6wH/ A+oB/wPqAf8D6gH/A+oB/wPqAf8D6gH/A/AB/wOkAf8DBgEIEAADMwFSBAAD/gH/A9cB/wPPAf8DwQH/ A60B/wOoAf8DuwH/AwAB/wMAAf8DAAH/A9QB/wO7Af8DmQH/AwAB/wMAAf8DvAH/A8AB/wO8Af8DAAH/ - AwAB/wMAAf8DrgH/A08BlwwAAw4BEgE+AR4BLgH+AwAB/wHLAs0B/wLbAdcB/wHPAc4ByQH/AgABjgH/ + AwAB/wMAAf8DrgH/A08BlwwAAw4BEgE/AR8BLwH+AwAB/wHLAs0B/wLbAdcB/wHPAc4ByQH/AgABjgH/ AgABywH/AgAB6QH/AgAB6QH/AgABygH/AgABhQH/AqYBoQH/AYkBiAGHAf8C8gH0Af8B5QHsAfAB/wHg Ae0B8QH/AeEB8AH1Af8B4gHyAfkB/wHnAfUB+gH/AecB7wHxAf8B/AH7AfwB/wQAA+wB/wHNAdgB0QH/ AeEB8wHoAf8B6wH9AfIB/wHqAfsB8AH/AekB/AHxAf8B7AH3AfAB/wOAAf4DDgQSARgDXgHwAdgBoAEA @@ -807,7 +807,7 @@ A+oB/wPqAf8D6gH/A/UB/wOyAf8DvgH/CAADuwH/AwAB/wO4Af8D3QH/A+sB/wPqAf8D6gH/A+oB/wPq Af8D6gH/A+oB/wPqAf8D8AH/A6QB/wMGAQgQAAMzAVIEAAP9Af8D4QH/A/IB/wPyAf8D0gH/A6wB/wOy Af8DvAH/AwAB/wMAAf8DwAH/AwAB/wODAf8DmQH/A6MB/wO9Af8DswH/A7sB/wOGAf8DAAH/AwAB/wOo - Af8DUQGiDAADDgESATwBHQEtAf4DAAH/Ac4CzwH/A9cB/wHtAeoB3gH/AwAB/wIAAcMB/wIAAfwB/wIA + Af8DUQGiDAADDgESAT0BHgEuAf4DAAH/Ac4CzwH/A9cB/wHtAeoB3gH/AwAB/wIAAcMB/wIAAfwB/wIA AfwB/wIAAcQB/wMAAf8BvgG8AbEB/wOGAf8D9QH/AfAB9AH1Af8B6wH4AfwB/wMAAf8B4AHtAfIB/wHb AeYB6wH/AwAB/wPlAf8DmQH/AwAB/wMAAf8B0QHhAdgB/wG9AcsBwgH/AwAB/wHmAfYB6wH/AwAB/wOA Af4DDgESAzgBXAHmAbUBAAH/AdMBmQEAAf8BzwGUAQAB/wHOAZIBAAH/AcwBjgEAAf8BygGLAQAB/wHH @@ -817,7 +817,7 @@ A/EB/wPrAf8D6wH/A+sB/wPrAf8D6wH/A+sB/wPrAf8D6wH/A+sB/wP8Af8DmAH/A6MB/wgAA6kB/wMA Af8DxwH/A+QB/wPtAf8D6wH/A+sB/wPrAf8D6wH/A+sB/wPrAf8D6wH/A/EB/wOkAf8DBgEIEAADMwFS BAAD/AH/A9UB/wOuAf8DAAH/AwAB/wOzAf8DugH/A+kB/wMAAf8DAAH/AwAB/wOTAf8DsAH/A8MB/wO6 - Af8DsQH/A7MB/wO6Af8DhgH/AwAB/wMAAf8DrgH/A1ABmgwAAw4BEgE7ASABLQH+AwAB/wHQAtEB/wPa + Af8DsQH/A7MB/wO6Af8DhgH/AwAB/wMAAf8DrgH/A1ABmgwAAw4BEgE8ASEBLgH+AwAB/wHQAtEB/wPa Af8C2wHZAf8B3AHaAdAB/wIAAY8B/wIAAaMB/wIAAaMB/wIAAZAB/wHPAc0BxAH/Aq8BrQH/A4cB/wP1 Af8C/gH8Af8B+gH+Av8DAAH/AesB8QH2Af8DAAH/AwAB/wPRAf8DAAH/A5QB/wG8Ar0B/wH2Af4B+QH/ AQABggGAAf8DAAH/AYoBjgGLAf8DAAH/A4AB/gMOARIDUAGdAeEBrgEAAf8B0gGYAQAB/wHRAZYBAAH/ @@ -828,7 +828,7 @@ A+wB/wPsAf8D7AH/A/0B/wOgAf8DmAH/A/wB/wP+Af8DmgH/AwAB/wPWAf8D6gH/A+0B/wPsAf8D7AH/ A+wB/wPsAf8D7AH/A+wB/wPsAf8D8gH/A6UB/wMGAQgQAAMzAVIDuAH/AwAB/wMAAf8DAAH/AwAB/wMA Af8DiAH/A+oB/wO0Af8DAAH/AwAB/wMAAf8DAAH/A9MB/wPDAf8DugH/A7sB/wO5Af8DvAH/A4AB/wMA - Af8DAAH/A4AB/gNEAXgMAAMOARIBPQEiAS8B/gMAAf8D1gH/AdoC2wH/A9UB/wHfAd0B2gH/AeoB5wHb + Af8DAAH/A4AB/gNEAXgMAAMOARIBPgEjATAB/gMAAf8D1gH/AdoC2wH/A9UB/wHfAd0B2gH/AeoB5wHb Af8BxQHDAcEB/wHFAcQBwQH/AegB5wHbAf8B0wHQAc4B/wKpAasB/wOHAf8D9gH/CwAB/wMAAf8DAAH/ AwAB/wPLAf8DAAH/AZcClgH/AwAB/wHNAssB/wMAAf8BtgG3AbYB/wMAAf8DpgH/A4AB/gMOARIDXQHJ AeMBqwEAAf8B2wGaAQAB/wHYAZYBAAH/Ac8BlAEAAf8BzgGRAQAB/wHMAY4BAAH/AckBiwEAAf8B0AGH @@ -838,7 +838,7 @@ Af8D7QH/A+0B/wPtAf8D7QH/A+0B/wPtAf8D7QH/A+0B/wQAA6IB/wOVAf8D+QH/A/sB/wOWAf8DAAH/ A+MB/wPuAf8D7gH/A+0B/wPtAf8D7QH/A+0B/wPtAf8D7QH/A+0B/wPzAf8DpgH/AwYBCBAAAzMBUgMA Af8DAAH/A5cB/wOxAf8D8AH/A4MB/wMAAf8DgAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DoQH/A74B/wO5 - Af8DqgH/A7QB/wOaAf8DAAH/AwAB/wMAAf8DYAHgAyUBNwwAAw4BEgE9ASQBLwH+AwAB/wHBAbwBvgH/ + Af8DqgH/A7QB/wOaAf8DAAH/AwAB/wMAAf8DYAHgAyUBNwwAAw4BEgE+ASUBMAH+AwAB/wHBAbwBvgH/ AewB8wHwAf8D3AH/AdoC3AH/A9wB/wHhAeIB4AH/AeEB4gHgAf8C2wHcAf8D0AH/Aa4CrwH/A4sB/wP3 Af8LAAH/AwAB/wP3Af8DAAH/A9YB/wPIAf8DAAH/A48B/wPyAf8DgAH/BwAB/wPqAf8DgAH+Aw4BEgNg AeABmgG1AbAB/wGBAbABwQH/AbQBpwGFAf8B1wGXAQAB/wHOAZIBAAH/Ac0BkAEAAf8BygGMAQAB/wHR @@ -848,7 +848,7 @@ A+4B/wPuAf8D7gH/A+4B/wPuAf8D7gH/A+4B/wQAA6QB/wMAAf8D2AH/A9gB/wMAAf8DAAH/A+8B/wPx Af8D7gH/A+4B/wPuAf8D7gH/A+4B/wPuAf8D7gH/A+4B/wP0Af8DpgH/AwYBCBAAAzMBUgOVAf8DAAH/ A/MB/wPxAf8D9gH/A7MB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/A5wB/wOYAf8DAAH/ - AwAB/wMAAf8DAAH/AwAB/wOcAf8DUQGiEAADDgESAToBJQEtAf4DAAH/AwAB/wHJAcIBxQH/AeQC5QH/ + AwAB/wMAAf8DAAH/AwAB/wOcAf8DUQGiEAADDgESATsBJgEuAf4DAAH/AwAB/wHJAcIBxQH/AeQC5QH/ AeEB4AHhAf8B4QHgAeEB/wHhAeAB4QH/AeEB4AHhAf8B4QLgAf8B1QLUAf8BtAKzAf8BiwGNAYsB/wP2 Af8LAAH/A50B/wcAAf8DywH/IAADgAH+Aw4BEgNlAewBAAG3AdkB/wEAAbQC/wEAAbMC/wGrAagBjwH/ Ad0BkwEAAf8BzgGQAQAB/wHMAY0BAAH/Ac0BkQEAAf8BAAGiAdkB/wEAAZwB+gH/AQABmQH0Af8BAAGW @@ -857,8 +857,8 @@ Af8DZQHsAwYBBwOmAf8D9AH/A+8B/wPvAf8D7gH/A+4B/wPuAf8D7gH/A+4B/wPuAf8D7gH/BAADpQH/ AwAB/wPFAf8DxQH/AwAB/wOGAf8D9wH/A/IB/wPuAf8D7gH/A+4B/wPuAf8D7gH/A+4B/wPuAf8D7gH/ A/QB/wOmAf8DBgEIEAADMwFSA9sB/wMAAf8D4QH/A+wB/wPcAf8D3AH/AwAB/wMAAf8DAAH/A5gB/wOd - Af8DAAH/A44B/wO5Af8DyAH/A7MB/wMAAf8DAAH/AwAB/wMAAf8DAAH/A84B/wM4AV0QAAMOARIBMwEi - AScB/gMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wHmAeMB5QH/ + Af8DAAH/A44B/wO5Af8DyAH/A7MB/wMAAf8DAAH/AwAB/wMAAf8DAAH/A84B/wM4AV0QAAMOARIBNAEj + ASgB/gMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wHmAeMB5QH/ AfIB8AHxAf8B7QLsAf8C6wHqAf8B9gH0AfUB/wHwAe0B7wH/AeoB6AHqAf8B7AHrAewB/wHtAesB7AH/ AewB6gHrAf8B7AHqAesB/wHrAeoB6wH/AewB6gHsAf8B7AHqAesB/wHtAewB7QH/AfUB9AH1Af8DgAH+ Aw4BEgNlAewBAAG4AdUB/wEAAbUC/wEAAbIB/AH/AQABsQHyAf8BoQGpAZoB/wHUAZYBAAH/Ac8BjAEA @@ -868,7 +868,7 @@ A/QB/wPyAf8D8gH/A/EB/wPwAf8D8AH/A+8B/wPvAf8D7wH/BAADoQH/A6IB/wgAA6EB/wORAf8D/gH/ A/EB/wPvAf8D7wH/A+8B/wPvAf8D7wH/A+8B/wPvAf8D7wH/A/UB/wOnAf8DBgEIEAADMwFSBwAB/wOY Af8D8gH/A9kB/wQAA5AB/wMAAf8D1gH/A+kB/wPgAf8D3QH/A9cB/wPRAf8DzgH/A50B/wMAAf8DgAH/ - AwAB/wMAAf8DswH/A/QB/wM3AVoQAAMOARIBLAEfASMB/gMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMA + AwAB/wMAAf8DswH/A/QB/wM3AVoQAAMOARIBLQEgASQB/gMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMA Af8DAAH/AwAB/wMAAf8DAAH/AwAB/wHnAeUB5gH/A/EB/wHsAecB6gH/AfAB6wHtAf8B7QHqAewB/wHs AecB6gH/AfAB6wHtAf8B7QHqAewB/wHsAeoB6wH/AewB6gHrAf8B7AHqAewB/wHtAesB7AH/Ae0B6wHt Af8B7wHrAe0B/wHwAe0B7wH/AfcB9QH3Af8DgAH+Aw4BEgNgAeABhAG4AcwB/wEAAbYC/wEAAbMB+QH/ @@ -879,7 +879,7 @@ A/MB/wPyAf8EAAOiAf8BqgKpAf8IAAOpAf8DnQH/BAAD8QH/A/AB/wPwAf8D8AH/A/AB/wPwAf8D8AH/ A/AB/wPwAf8D9gH/A6gB/wMGAQgQAAMzAVIEAAOIAf8DAAH/A/AB/wPpAf8DqgH/AwAB/wMAAf8DrgH/ A+MB/wPKAf8DywH/A84B/wPIAf8DnQH/A4EB/wOGAf8DAAH/AwAB/wOrAf8D5wH/BAADNwFaEAADDgES - ASEBGQEcAf4DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8C6wHw + ASIBGgEdAf4DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8C6wHw Af8C9gH+Af8C7wH0Af8B8AHvAfQB/wHwAe4B9QH/AfAB7gH1Af8B8AHxAfUB/wHwAfEB9QH/AfAB8QH1 Af8C8QH1Af8B8QHwAfcB/wHxAfIB9wH/AvIB9gH/AvIB+QH/AfQB8gH6Af8B+wH6Av8DgAH+Aw4BEgNd AckBlwG5AbgB/wEAAbgC/wEAAbUB+QH/AQABsgH5Af8BAAGvAfkB/wEAAa0B/gH/AQABqgHDAf8BnQGk @@ -889,7 +889,7 @@ Af8D9AH/A/QB/wP0Af8D9AH/A/QB/wP0Af8D9AH/A/QB/wP0Af8EAAOmAf8DAAH/A8QB/wPEAf8DAAH/ A6QB/wQAA/EB/wPxAf8D8QH/A/AB/wPwAf8D8AH/A/AB/wPwAf8D8AH/A/UB/wOnAf8DBgEIEAADMwFS BAADyAH/AwAB/wOHAf8DAAH/AwAB/wMAAf8DAAH/A8sB/wPbAf8DzwH/A8QB/wOsAf8DmgH/A4sB/wOH - Af8DAAH/A4AB/wO3Af8D5wH/A/EB/wQAAzcBWhAAAw4BEgEeARgBGgH+AwAB/wMAAf8DAAH/AwAB/wMA + Af8DAAH/A4AB/wO3Af8D5wH/A/EB/wQAAzcBWhAAAw4BEgEfARkBGwH+AwAB/wMAAf8DAAH/AwAB/wMA Af8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AeAC3AH/AewB6gHrAf8B5gHjAeYB/wHmAeMB5gH/ AeYB4wHmAf8B5gHjAeYB/wHmAeMB5gH/AeYB4wHmAf8B5gHjAeYB/wHnAeMB5gH/AecC5gH/AecB5QHm Af8B5wHlAeYB/wHnAeUB5gH/AegB5gHoAf8B8QLtAf8DgAH+Aw4BEgNQAZ0BtQG6AZkB/wEAAbkC/wEA @@ -900,10 +900,10 @@ Af8D9QH/A/UB/wP1Af8D9QH/BAADvgH/AwAB/wMAAf8DAAH/AwAB/wO+Af8EAAP2Af8D9QH/A/UB/wP0 Af8D9AH/A/MB/wPzAf8D8wH/A/IB/wP4Af8DqgH/AwYBCBAAAzMBUgQAA+4B/wMAAf8DAAH/AwAB/wOo Af8D2QH/A/AB/wPZAf8DzwH/A9MB/wPQAf8DoAH/A5IB/wOVAf8DmAH/A6wB/wPUAf8D6AH/A+0B/wPu - Af8EAAM3AVoQAAMOARIBgAFyAXQB/gHRAbkBvAH/AcoBswG2Af8ByQGyAbUB/wHJAbIBtQH/AckBsgG1 + Af8EAAM3AVoQAAMOARIBgAFzAXUB/gHRAbkBvAH/AcoBswG2Af8ByQGyAbUB/wHJAbIBtQH/AckBsgG1 Af8ByQGyAbUB/wHJAbIBtQH/AckBsgG1Af8ByQGyAbUB/wHJAbIBtQH/AckBtAG7Af8BxgKsAf8BzAIA Af8BygIAAf8BygIAAf8BygIAAf8BygIAAf8BygIAAf8BygIAAf8BygIAAf8BygIAAf8BygIAAf8BygIA - Af8ByQIAAf8ByQIAAf8ByQIAAf8BygIAAf8B0gIAAf8BgAE2ARQB/gMOARIDOAFcAdcBuQEAAf8BAAG6 + Af8ByQIAAf8ByQIAAf8ByQIAAf8BygIAAf8B0gIAAf8BgAE3ARUB/gMOARIDOAFcAdcBuQEAAf8BAAG6 AfYB/wEAAbcB/AH/AQABtQH5Af8BAAGyAfkB/wEAAa8B+AH/AQABrAH4Af8BAAGpAfcB/wEAAaYB9gH/ AQABowH2Af8BAAGgAfUB/wEAAZ0B9QH/AQABmgH0Af8BAAGYAfQB/wEAAZQB8wH/AQABkgH9Af8BAAGT AdQB/wGdAZQBAAH/AQABjwHsAf8BAAGLAdoB/wEAAYoBpwH/AQABiAG/Af8BAAGHAdEB/wEAAYcBmwH/ @@ -911,21 +911,21 @@ Af8D9gH/A/YB/wP2Af8D9gH/A/YB/wP2Af8D9gH/A/gB/wP7Af8D8wH/AfEC8wH/AfEC8wH/A/MB/wP7 Af8D+AH/A/YB/wP2Af8D9gH/A/YB/wP2Af8D9gH/A/YB/wP2Af8D9wH/A/wB/wOsAf8DBgEIEAADMwFS BAAD7QH/A9MB/wPKAf8D6wH/A+sB/wPrAf8D6wH/A+QB/wPaAf8D1QH/A84B/wPCAf8DwgH/A8sB/wPa - Af8D4gH/A+MB/wPjAf8D4wH/A+MB/wP+Af8DOAFbEAADDgESAYABbAFuAf4BxgGqAawB/wG/AaMBpQH/ + Af8D4gH/A+MB/wPjAf8D4wH/A+MB/wP+Af8DOAFbEAADDgESAYABbQFvAf4BxgGqAawB/wG/AaMBpQH/ Ab4BogGkAf8BvgGiAaQB/wG+AaIBpAH/Ab4BogGkAf8BvgGiAaQB/wG+AaIBpAH/Ab4BogGkAf8BvgGi AaMB/wG+AaMBqAH/Ab4BogGhAf8B0AIAAf8B0AIAAf8B0AIAAf8B0AIAAf8B0AIAAf8B0AIAAf8B0AIA - Af8B0AIAAf8B0AIAAf8B0AIAAf8B0AIAAf8B0AIAAf8B0AIAAf8B0AIAAf8B0QIAAf8B2AIAAf8BgAE3 - ARQB/gMOBBIBGANeAfABhAG6Ac0B/wEAAbkC/wEAAbYB+QH/AQABswH5Af8BAAGwAfgB/wEAAa4B+AH/ + Af8B0AIAAf8B0AIAAf8B0AIAAf8B0AIAAf8B0AIAAf8B0AIAAf8B0AIAAf8B0QIAAf8B2AIAAf8BgAE4 + ARUB/gMOBBIBGANeAfABhAG6Ac0B/wEAAbkC/wEAAbYB+QH/AQABswH5Af8BAAGwAfgB/wEAAa4B+AH/ AQABqgH3Af8BAAGoAfcB/wEAAaQB9gH/AQABogH2Af8BAAGeAfUB/wEAAZwB9AH/AQABmQH0Af8BAAGW AfwB/wEAAZgBtQH/AcMBggEAAf8BxQIAAf8BpAGLAQAB/wG1AgAB/wG/AgAB/wG8AgAB/wG5AgAB/wG2 AgAB/wGrAgAB/wGrAgAB/wGrAgAB/wGoAgAB/wG9AgAB/wNeAfADEgEYAwYBBwOrAf8D/AH/A/cB/wP3 Af8D9wH/A/cB/wP3Af8D9wH/A/cB/wP3Af8D9wH/A/cB/wP6Af8D/QH/A/4B/wP+Af8D/QH/A/oB/wP3 Af8D9wH/A/cB/wP3Af8D9wH/A/cB/wP3Af8D9wH/A/cB/wP3Af8D/AH/A6sB/wMGAQgQAAMzAVIEAAPs Af8D6gH/A+oB/wPqAf8D6gH/A+oB/wPqAf8D6gH/A+YB/wPgAf8D2gH/A9oB/wPdAf8D3wH/A9sB/wPP - Af8DxwH/A8UB/wPHAf8DwgH/A9cB/wM1AVUQAAMOARIBgAFqAW0B/gHFAacBqgH/Ab4BoAGkAf8BvQGf + Af8DxwH/A8UB/wPHAf8DwgH/A9cB/wM1AVUQAAMOARIBgAFrAW4B/gHFAacBqgH/Ab4BoAGkAf8BvQGf AaMB/wG9AZ8BowH/Ab0BnwGjAf8BvQGfAaMB/wG9AZ8BowH/Ab0BnwGjAf8BvQGfAaMB/wG9AZ8BoQH/ Ab0BoAGnAf8BvQGeAaAB/wHSAgAB/wHSAgAB/wHRAgAB/wHTAgAB/wHSAgAB/wHSAgAB/wHRAgAB/wHT - AgAB/wHRAgAB/wHTAgAB/wHRAgAB/wHPAgAB/wHVAgAB/wHWAgAB/wHTAgAB/wHbAgAB/wGAATsBFQH+ + AgAB/wHRAgAB/wHTAgAB/wHRAgAB/wHPAgAB/wHVAgAB/wHWAgAB/wHTAgAB/wHbAgAB/wGAATwBFgH+ Aw4BEgQAA1EBnwHBAboBjAH/AQABugH+Af8BAAG3AfoB/wEAAbQB+QH/AQABsgH4Af8BAAGvAfgB/wEA AawB+AH/AQABqQH3Af8BAAGmAfYB/wEAAaMB9gH/AQABoAH1Af8BAAGdAfUB/wEAAZoB+wH/AQABnAHL Af8B0gGEAQAB/wHKAgAB/wG9AYEBAAH/AZoBjgEAAf8BtwIAAf8BtAIAAf8BsgIAAf8BsAIAAf8BrQIA @@ -933,44 +933,44 @@ Af8D+AH/A/gB/wP4Af8D+AH/A/gB/wP4Af8D+AH/A/gB/wP4Af8D+AH/A/gB/wP4Af8D+AH/A/gB/wP4 Af8D+AH/A/gB/wP4Af8D+QH/Av4C/wQAAfkC+wH/A/wB/wOsAf8DBgEIEAADMwFSBAAD6gH/A+gB/wPo Af8D6AH/A+gB/wPoAf8D6AH/A+gB/wPoAf8D6AH/A+gB/wPoAf8D6QH/A+IB/wPMAf8DowH/A4sB/wOH - Af8DAAH/A4wB/wNiAe8DCQELEAADDgESAYABbQFvAf4BxgGrAa0B/wG/AaQBpgH/Ab4BowGlAf8BvgGj + Af8DAAH/A4wB/wNiAe8DCQELEAADDgESAYABbgFwAf4BxgGrAa0B/wG/AaQBpgH/Ab4BowGlAf8BvgGj AaUB/wG+AaMBpQH/Ab4BowGlAf8BvgGjAaUB/wG+AaMBpQH/Ab4BowGlAf8BvgGjAaUB/wG+AaQBqQH/ Ab8CowH/AdgCAAH/AdkCAAH/AdcCAAH/AfkB4wHKAf8B4gGQAQAB/wHWAgAB/wHbAgAB/wH6AegB1AH/ AdsCAAH/AfYB3gHDAf8B3QIAAf8B6QGsAQAB/wH3AdkBuAH/AfEBwgGMAf8B4AGCAQAB/wHhAgAB/wGA - AT8BFQH+Aw4BEgQAAx8BLAJqAWgB+QGDAboBzwH/AQABuQL/AQABtgH5Af8BAAGzAfkB/wEAAbAB+AH/ + AUABFgH+Aw4BEgQAAx8BLAJqAWgB+QGDAboBzwH/AQABuQL/AQABtgH5Af8BAAGzAfkB/wEAAbAB+AH/ AQABrQH4Af8BAAGqAfcB/wEAAagB9wH/AQABpAH2Af8BAAGhAfUB/wEAAZ4B9QH/AQABmwH6Af8BAAGc AcwB/wGYAZQBhQH/AY8BlAGNAf8BAAGVAc8B/wEAAZAC/wGSAY0BAAH/Ab0CAAH/AbMCAAH/AbECAAH/ Aa8CAAH/Aa0CAAH/AasCAAH/AacCAAH/Ab0CAAH/AmoBaAH5Ax8BLAQAAwYBBwOuAf8D/AH/BAAB4gHf Ad4B/wHkAeIB4AH/BAAD+gH/A/kB/wP5Af8D+QH/A/kB/wP5Af8D+QH/A/kB/wP5Af8D+QH/A/kB/wP5 Af8D+QH/A/kB/wP5Af8D+QH/A/kB/wP6Af8EAAHkAeMB4QH/AeAB3gHbAf8EAAP8Af8DrgH/AwYBCBAA AzMBUgQAA+gB/wPmAf8D5gH/A+YB/wPmAf8D5gH/A+YB/wPmAf8D5gH/A+YB/wPmAf8D5gH/A+cB/wPe - Af8DvwH/AwAB/wMAAf8DAAH/A5AB/wOiAf8DIQEwFAADDgESAYABcAFyAf4BygGuAbAB/wHDAacBqQH/ + Af8DvwH/AwAB/wMAAf8DAAH/A5AB/wOiAf8DIQEwFAADDgESAYABcQFzAf4BygGuAbAB/wHDAacBqQH/ AcIBpgGoAf8BwgGmAagB/wHCAaYBqAH/AcIBpgGoAf8BwgGmAagB/wHCAaYBqAH/AcIBpgGoAf8BwgGm AagB/wHCAacBrQH/AcMBpQGmAf8B3gIAAf8B4AIAAf8B3QIAAf8B/gHyAeYB/wHrAZ0BAAH/Ad4CAAH/ AeICAAH/Af4B+wH2Af8B4AIAAf8B+wHsAdoB/wHoAZIBAAP/Af4B/wHsAawBAAH/AecBlwEAAf8B5AIA - Af8B6AIAAf8BgAFDARUB/gMOARIIAANLAY0B1QG5AQAB/wEAAbkB8gH/AQABtwH9Af8BAAG0AfkB/wEA + Af8B6AIAAf8BgAFEARYB/gMOARIIAANLAY0B1QG5AQAB/wEAAbkB8gH/AQABtwH9Af8BAAG0AfkB/wEA AbEB+AH/AQABrgH4Af8BAAGsAfcB/wEAAakB9wH/AQABpgH2Af8BAAGjAfYB/wEAAaAB9QH/AQABnQH0 Af8BAAGaAfgB/wEAAZgC/wEAAZUB/gH/AQABkAL/AQABkwH8Af8BpgGJAQAB/wG7AgAB/wG0AgAB/wGy AgAB/wGwAgAB/wGuAgAB/wGqAgAB/wGuAgAB/wHgAawBAAH/A0sBjQgAAwYBBwOvAf8D/AH/Ad8B3gHd Af8BqwGlAaAB/wMAAf8B0wHPAc0B/wQAA/oB/wP6Af8D+gH/A/oB/wP6Af8D+gH/A/oB/wP6Af8D+gH/ A/oB/wP6Af8D+gH/A/oB/wP6Af8D+gH/A/oB/wQAAegB5wHoAf8BuwG1AbEB/wMAAf8BwwG9AbsB/wP8 Af8DrwH/AwYBCBAAAzMBUgQAA+cB/wPlAf8D5QH/A+UB/wPlAf8D5QH/A+UB/wPlAf8D5QH/A+UB/wPl - Af8D5gH/A+YB/wPXAf8DtgH/A+YB/wPtAf8EAAPsAf8DJQE3GAADDgESAYABdQF3Af4BzwG0AbYB/wHI + Af8D5gH/A+YB/wPXAf8DtgH/A+YB/wPtAf8EAAPsAf8DJQE3GAADDgESAYABdgF4Af4BzwG0AbYB/wHI Aa0BrwH/AcYBrAGuAf8BxgGsAa4B/wHGAawBrgH/AcYBrAGuAf8BxgGsAa4B/wHGAawBrgH/AcYBrAGu Af8BxgGsAa4B/wHFAa0BsgH/AcYBqwGsAf8B6AIAAf8B6AIAAf8B5wIAAf8B+wHqAdUB/wH6AeEBwQH/ AfUBwQGEAf8B6QIAAf8B/gH/Af4B/wHoAgAB/wH6AeoB0gH/Ae0BkQEAAf8B/AH0AeoB/wHyAbEBAAH/ - BAAB7gGWAQAB/wHwAgAB/wGAAUcBFwH+Aw4BEggAAwkBDAJfAVsB0AG6AbkBkwH/AQABuAH9Af8BAAG2 + BAAB7gGWAQAB/wHwAgAB/wGAAUgBGAH+Aw4BEggAAwkBDAJfAVsB0AG6AbkBkwH/AQABuAH9Af8BAAG2 AfwB/wEAAbMB+QH/AQABsAH4Af8BAAGtAfgB/wEAAaoB9wH/AQABpwH3Af8BAAGkAfsB/wEAAaEB9gH/ AQABngH1Af8BAAGbAfQB/wEAAZgB9AH/AQABlAH8Af8BAAGYAeQB/wGeAZEBAAH/AcACAAH/AbcCAAH/ AbUCAAH/AbMCAAH/AbECAAH/Aa4CAAH/AasCAAH/AdUBnAEAAf8DXwHQAwkBDAgAAwYBBwOwAf8D/AH/ A8kB/wHVAdQB1QH/AbIBsQGuAf8BuQG2AbMB/wQAA/sB/wP7Af8D+wH/A/sB/wP7Af8D+wH/A/sB/wP7 Af8D+wH/A/sB/wP7Af8D+wH/A/sB/wP7Af8D+wH/A/sB/wQAA9kB/wHMAc0BzAH/AckBxwHFAf8BtQGy Aa4B/wP8Af8DsAH/AwYBCBAAAzMBUgQAA+YB/wPkAf8D5AH/A+QB/wPkAf8D5AH/A+QB/wPkAf8D5AH/ - A+QB/wPkAf8D5QH/A+MB/wPTAf8DsgH/A/kB/wQAA+kB/wMoATscAAMOARIBgAF7AX0B/gHUAbsBvQH/ + A+QB/wPkAf8D5QH/A+MB/wPTAf8DsgH/A/kB/wQAA+kB/wMoATscAAMOARIBgAF8AX4B/gHUAbsBvQH/ AcwBtAG2Af8BywGzAbUB/wHLAbMBtQH/AcsBswG1Af8BywGzAbUB/wHLAbMBtQH/AcsBswG1Af8BywGz AbUB/wHLAbMBtQH/AcoBtAG7Af8BywKzAf8B8AIAAf8B8QIAAf8B7gIAAf8B/gHyAeYB/wHyAZoBAAH/ Ae0CAAH/Ae4CAAH/AfoBxwGLAf8B8AIAAf8B/AHvAd4B/wHxAYwBAAH/AfIBmQEAAf8B+QHQAZ4B/wH3 - Ab0BAAH/AfECAAH/AfgBgwEAAf8BgAFMARcB/gMOARIMAAMdASkDYAHoAbABuQGfAf8BAAG3Af0B/wEA + Ab0BAAH/AfECAAH/AfgBgwEAAf8BgAFNARgB/gMOARIMAAMdASkDYAHoAbABuQGfAf8BAAG3Af0B/wEA AbQB/QH/AQABsQH4Af8BAAGuAfgB/wEAAasB/QH/AQABrAHFAf8BAAGpAb0B/wEAAaMB+gH/AQABoAL/ AQABngL/AQABnAL/AQABnQHbAf8BugGNAQAB/wHGAgAB/wG6AgAB/wG4AgAB/wG2AgAB/wG0AgAB/wGx AgAB/wGuAgAB/wHRAZcBAAH/A2AB6AMdASkMAAMGAQcDsQH/A/0B/wP1Af8BzwHRAdAB/wLUAdUB/wP1 @@ -991,7 +991,7 @@ AdIBvAG+Af8B0gG8Ab4B/wHSAbwBvgH/AdIBvAG+Af8B0gG8Ab4B/wHRAb4BxAH/AdQBvAG7Af8B/AGD AQAC/wGCAQAB/wH8AYIBAAH/AfwBgQEAAf8B/QGGAQAB/wH9AYoBAAH/AfwBhAEAAf8B/QGVAQAB/wH8 AYIBAAH/Af0BmQEAAf8B/QGJAQAB/wH8AYIBAAH/AfwBgwEAAf8B/AGDAQAC/wGJAQAC/wGTAQAB/wFa - AlcB9QMFAQYUAAMeASsCXAFbAc0B1QG4AQAB/wEAAbUBzQH/AQABsQH+Af8BAAGuAv8BAAGrAfsB/wEA + AlgB9QMFAQYUAAMeASsCXAFbAc0B1QG4AQAB/wEAAbUBzQH/AQABsQH+Af8BAAGuAv8BAAGrAfsB/wEA AagB/gH/AQABpwHvAf8BmgGiAZcB/wHVAYoBAAH/AcwBggEAAf8BxQGAAQAB/wHBAgAB/wG/AgAB/wG8 AgAB/wG4AgAB/wG2AgAB/wHFAYQBAAH/AeIBrgEAAf8DXAHNAx4BKxgAA1oBwgPDAf8DwgH/A8IB/wPC Af8DwgH/A8IB/wPCAf8DwgH/A8IB/wPCAf8DwgH/A8IB/wPCAf8DwgH/A8IB/wPCAf8DwgH/A8IB/wPC @@ -1003,9 +1003,9 @@ AaMBAAH/AdECAAH/AUgCRwGDHAADCgENA0sBjAJtAVEB9wG/AbcBjAH/AQABsgHMAf8BAAGtAfMB/wEA AakC/wEAAaUC/wEAAacB9gH/AcMBkgEAAf8BxgGCAQAB/wHCAYABAAH/Ab8CAAH/Ab4CAAH/Ab8CAAH/ AckBigEAAf8B3AGlAQAB/wJtAWwB9wNLAYwDCgENqAADNAFTOAADyAH/AycBOjQAA0cBggNeAe0BlAGF - AYYB/wOAAf4DgAH+A4AB/gOAAf4DgAH+A4AB/gOAAf4DgAH+A4AB/gGAAVoBHAH+AYABVwEaAf4BgAFZ - ARsB/gGAAVkBGwH+AYABWQEbAf4BgAFZARsB/gGAAVkBGwH+AYABWQEbAf4BgAFZARsB/gGAAVkBGwH+ - AYABWQEbAf4BgAFZARsB/gGAAVkBHAH+AbACAAH/A14B7QNHAYIoAAMhAS8DUAGdA14B7QHWAbgBAAH/ + AYYB/wOAAf4DgAH+A4AB/gOAAf4DgAH+A4AB/gOAAf4DgAH+A4AB/gGAAVsBHQH+AYABWAEbAf4BgAFa + ARwB/gGAAVoBHAH+AYABWgEcAf4BgAFaARwB/gGAAVoBHAH+AYABWgEcAf4BgAFaARwB/gGAAVoBHAH+ + AYABWgEcAf4BgAFaARwB/gGAAVoBHQH+AbACAAH/A14B7QNHAYIoAAMhAS8DUAGdA14B7QHWAbgBAAH/ Aa8BtAGYAf8BjQGwAbcB/wGyAasBigH/AdQBmAEAAf8BzwGSAQAB/wHQAZQBAAH/AdMBmQEAAf8B2gGj AQAB/wHkAbEBAAH/A14B7QNQAZ0DIQEvsAADGwElA00BkwNIAYQDSAGDA0gBgwNIAYMDSAGDA0gBgwNI AYMDSAGDA0gBgwNIAYMDSAGDA0kBiANHAYEDGAEg2AADEwEaAzgBXANRAZwDWgHHA10B3wNhAesDYQHr @@ -1051,9 +1051,6 @@ 17, 17 - - 17, 17 - IMPORTANT: The SEB Service changes aspects of the system configuration, e.g. to lock down the security screen (CTRL+ALT+DEL). Some anti-virus software providers might falsely identify its operations as malicious, thus it is not recommended to use the SEB Service in uncontrolled environments (e.g. BYOD). @@ -1067,36 +1064,12 @@ True - - True - - - True - True True - - True - - - True - - - True - - - True - - - True - - - True - True @@ -1118,12 +1091,6 @@ True - - True - - - True - Allow locating third party applications with a file dialog if it cannot be found at the paths specified. Only applications matching other criteria specified (like Original Name, executable) are accepted. @@ -1139,18 +1106,6 @@ True - - True - - - True - - - True - - - True - The seb(s):// link to the config file can contain an additional query string, separated from the main URL by '?' or '??' (if the URL itself doesn't contain a query). SEB will then append this query string to the Start URL. @@ -1183,15 +1138,6 @@ IMPORTANT: Always copy the key(s) as a last step, after the configuration file w True - - True - - - True - - - True - To be used on Windows tablets. In Window 10, Tablet Mode needs to be activated. Not working with the Create New Desktop kiosk mode, you have to reconfigure the SEB client settings to Disable Explorer Shell. diff --git a/appveyor-release.yml b/appveyor-release.yml deleted file mode 100644 index a85100a..0000000 --- a/appveyor-release.yml +++ /dev/null @@ -1,43 +0,0 @@ -version: '3.8.0.{build}' -image: Windows -configuration: Release -platform: - - x64 - - x86 -matrix: - fast_finish: true -max_jobs: 1 -assembly_info: - patch: true - file: AssemblyInfo.* - assembly_version: '{version}' - assembly_file_version: '{version}' - assembly_informational_version: '3.8.0 ($(platform))' -install: - - appveyor DownloadFile "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -build_script: - - msbuild /verbosity:minimal /property:langversion=latest "SafeExamBrowser.sln" -test: off - -for: -- - matrix: - only: - - platform: x64 - before_build: - - nuget restore - after_build: - - copy /y "Setup\bin\%PLATFORM%\%CONFIGURATION%\Setup.msi" "%TEMP%\SEB_Setup.msi" - - appveyor PushArtifact "Setup\bin\%PLATFORM%\%CONFIGURATION%\Setup.msi" -FileName "SEB_%APPVEYOR_BUILD_VERSION%_%PLATFORM%_Setup.msi" -DeploymentName "%APPVEYOR_BUILD_VERSION% Setup (%PLATFORM%)" - -- - matrix: - only: - - platform: x86 - before_build: - - nuget restore - - md "Setup\bin\x64\%CONFIGURATION%" - - move "%TEMP%\SEB_Setup.msi" "Setup\bin\x64\%CONFIGURATION%\Setup.msi" - after_build: - - appveyor PushArtifact "Setup\bin\%PLATFORM%\%CONFIGURATION%\Setup.msi" -FileName "SEB_%APPVEYOR_BUILD_VERSION%_%PLATFORM%_Setup.msi" -DeploymentName "%APPVEYOR_BUILD_VERSION% Setup (%PLATFORM%)" - - appveyor PushArtifact "SetupBundle\bin\%PLATFORM%\%CONFIGURATION%\SetupBundle.exe" -FileName "SEB_%APPVEYOR_BUILD_VERSION%_SetupBundle.exe" -DeploymentName "%APPVEYOR_BUILD_VERSION% Setup Bundle" diff --git a/appveyor-test.yml b/appveyor-test.yml deleted file mode 100644 index 1b1fbb3..0000000 --- a/appveyor-test.yml +++ /dev/null @@ -1,27 +0,0 @@ -version: '{build}' -image: Visual Studio 2022 -configuration: Debug -platform: - - x64 - - x86 -matrix: - fast_finish: true -before_build: - - nuget restore - - choco install codecov -build_script: - - msbuild /verbosity:minimal /property:langversion=latest "SafeExamBrowser.sln" -test_script: - - .\packages\OpenCover.4.7.1221\tools\OpenCover.Console.exe -register -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.Applications.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.Applications.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -output:"coverage.xml" - - .\packages\OpenCover.4.7.1221\tools\OpenCover.Console.exe -register -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.Browser.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.Browser.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -mergeoutput -output:"coverage.xml" - - .\packages\OpenCover.4.7.1221\tools\OpenCover.Console.exe -register -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.Client.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.Client.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -mergeoutput -output:"coverage.xml" - - .\packages\OpenCover.4.7.1221\tools\OpenCover.Console.exe -register -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.Communication.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.Communication.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -mergeoutput -output:"coverage.xml" - - .\packages\OpenCover.4.7.1221\tools\OpenCover.Console.exe -register -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.Configuration.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.Configuration.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -mergeoutput -output:"coverage.xml" - - .\packages\OpenCover.4.7.1221\tools\OpenCover.Console.exe -register -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.Core.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.Core.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -mergeoutput -output:"coverage.xml" - - .\packages\OpenCover.4.7.1221\tools\OpenCover.Console.exe -register -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.I18n.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.I18n.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -mergeoutput -output:"coverage.xml" - - .\packages\OpenCover.4.7.1221\tools\OpenCover.Console.exe -register -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.Lockdown.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.Lockdown.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -mergeoutput -output:"coverage.xml" - - .\packages\OpenCover.4.7.1221\tools\OpenCover.Console.exe -register -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.Logging.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.Logging.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -mergeoutput -output:"coverage.xml" - - .\packages\OpenCover.4.7.1221\tools\OpenCover.Console.exe -register -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.Runtime.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.Runtime.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -mergeoutput -output:"coverage.xml" - - .\packages\OpenCover.4.7.1221\tools\OpenCover.Console.exe -register -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.Service.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.Service.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -mergeoutput -output:"coverage.xml" -after_test: - - codecov -f "coverage.xml" -X gcov diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index 674ae4f..0000000 --- a/codecov.yml +++ /dev/null @@ -1,6 +0,0 @@ -coverage: - range: 50..100 - round: down - precision: 2 -ignore: - - "SafeExamBrowser.*.Contracts" \ No newline at end of file diff --git a/patch-seb/Form1.Designer.cs b/patch-seb/Form1.Designer.cs index dde6b1d..e7dfc95 100644 --- a/patch-seb/Form1.Designer.cs +++ b/patch-seb/Form1.Designer.cs @@ -48,6 +48,7 @@ // // textBox1 // + this.textBox1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.textBox1.Location = new System.Drawing.Point(12, 38); this.textBox1.Multiline = true; this.textBox1.Name = "textBox1"; @@ -71,7 +72,7 @@ this.checkBox1.AutoSize = true; this.checkBox1.Location = new System.Drawing.Point(12, 258); this.checkBox1.Name = "checkBox1"; - this.checkBox1.Size = new System.Drawing.Size(64, 17); + this.checkBox1.Size = new System.Drawing.Size(63, 17); this.checkBox1.TabIndex = 3; this.checkBox1.Text = "Backup"; this.checkBox1.UseVisualStyleBackColor = true; diff --git a/patch-seb/Form1.cs b/patch-seb/Form1.cs index 82f2ce5..42f7add 100644 --- a/patch-seb/Form1.cs +++ b/patch-seb/Form1.cs @@ -21,7 +21,7 @@ namespace patch_seb public static bool started = false; public static bool alreadyPatched = false; public static string SEBPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + @"\SafeExamBrowser\Application\"; - public static string SupportedSEB = "3.8.0.742"; + public static string SupportedSEB = "3.9.0.787"; public static int something = 0; public Form1() @@ -35,25 +35,26 @@ namespace patch_seb private void Form1_Load(object sender, EventArgs e) { - AddLog("Safe Exam Browser Patch v" + Application.ProductVersion); - AddLog("For Safe Exam Browser version " + SupportedSEB); + AddLog("Safe Exam Browser Patch v" + Application.ProductVersion + " (Safe Exam Browser v" + SupportedSEB + ")"); + //AddLog("For Safe Exam Browser version " + SupportedSEB); + AddLog(""); if (Environment.Is64BitOperatingSystem) { - AddLog("Detected x64 operating system."); + AddLog("[INFO] Detected x64 operating system."); } else { - AddLog("Detected x86 operating system."); + AddLog("[INFO] Detected x86 operating system."); } if (Environment.OSVersion.Version.Major != 10) { - AddLog("Supported Windows version not found."); + AddLog("[ERROR] Supported Windows version not found."); button1.Enabled = false; } else if (!File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + @"\SafeExamBrowser\Application\SafeExamBrowser.exe")) { - AddLog("Safe Exam Browser not found."); + AddLog("[ERROR] Safe Exam Browser not found."); button1.Enabled = false; } else @@ -62,7 +63,7 @@ namespace patch_seb FileVersionInfo SEBDLLVersion = FileVersionInfo.GetVersionInfo(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + @"\SafeExamBrowser\Application\SafeExamBrowser.Configuration.dll"); if (SEBVersion.FileVersion != SupportedSEB) { - AddLog("Found unsupported Safe Exam Browser version."); + AddLog("[ERROR] Found unsupported Safe Exam Browser version."); button1.Enabled = false; } else if (SEBVersion.ProductVersion == SupportedSEB || SEBDLLVersion.ProductVersion == "1.0.0.0") // Somehow the patched version string differs from the official version string. @@ -72,11 +73,13 @@ namespace patch_seb isBackup = false; alreadyPatched = true; button1.Text = "PATCH AGAIN/UPDATE"; - AddLog("Found an already patched Safe Exam Browser."); + AddLog("[WARNING] Found an already patched Safe Exam Browser."); + AddLog("READY TO UPDATE PATCH"); } else { - AddLog("Supported Safe Exam Browser version found."); + AddLog("[INFO] Supported Safe Exam Browser version found."); + AddLog("READY TO PATCH"); } } } @@ -130,20 +133,15 @@ namespace patch_seb File.Delete(SEBPath + @"SafeExamBrowser.UserInterface.Desktop.dll.backup"); } File.Copy(SEBPath + @"SafeExamBrowser.UserInterface.Desktop.dll", SEBPath + @"SafeExamBrowser.UserInterface.Desktop.dll.backup"); - if (File.Exists(SEBPath + @"SafeExamBrowser.UserInterface.Shared.dll.backup")) + if (File.Exists(SEBPath + @"SafeExamBrowser.UserInterface.Mobile.dll.backup")) { - File.Delete(SEBPath + @"SafeExamBrowser.UserInterface.Shared.dll.backup"); + File.Delete(SEBPath + @"SafeExamBrowser.UserInterface.Mobile.dll.backup"); } - File.Copy(SEBPath + @"SafeExamBrowser.UserInterface.Shared.dll", SEBPath + @"SafeExamBrowser.UserInterface.Shared.dll.backup"); - if (File.Exists(SEBPath + @"SafeExamBrowser.WindowsApi.dll.backup")) - { - File.Delete(SEBPath + @"SafeExamBrowser.WindowsApi.dll.backup"); - } - File.Copy(SEBPath + @"SafeExamBrowser.WindowsApi.dll", SEBPath + @"SafeExamBrowser.WindowsApi.dll.backup"); + File.Copy(SEBPath + @"SafeExamBrowser.UserInterface.Mobile.dll", SEBPath + @"SafeExamBrowser.UserInterface.Mobile.dll.backup"); } catch (Exception ex) { - AddLog(ex.Message); + AddLog("[ERROR] " + ex.Message); } } try @@ -153,8 +151,7 @@ namespace patch_seb File.Delete(SEBPath + @"SafeExamBrowser.Configuration.dll"); File.Delete(SEBPath + @"SafeExamBrowser.Monitoring.dll"); File.Delete(SEBPath + @"SafeExamBrowser.UserInterface.Desktop.dll"); - File.Delete(SEBPath + @"SafeExamBrowser.UserInterface.Shared.dll"); - File.Delete(SEBPath + @"SafeExamBrowser.WindowsApi.dll"); + File.Delete(SEBPath + @"SafeExamBrowser.UserInterface.Mobile.dll"); if (Environment.Is64BitOperatingSystem) // 64 bits patch { File.WriteAllBytes(SEBPath + @"SafeExamBrowser.exe", Resources.SafeExamBrowser); @@ -162,8 +159,7 @@ namespace patch_seb File.WriteAllBytes(SEBPath + @"SafeExamBrowser.Configuration.dll", Resources.SafeExamBrowser_Configuration); File.WriteAllBytes(SEBPath + @"SafeExamBrowser.Monitoring.dll", Resources.SafeExamBrowser_Monitoring); File.WriteAllBytes(SEBPath + @"SafeExamBrowser.UserInterface.Desktop.dll", Resources.SafeExamBrowser_UserInterface_Desktop); - File.WriteAllBytes(SEBPath + @"SafeExamBrowser.UserInterface.Shared.dll", Resources.SafeExamBrowser_UserInterface_Shared); - File.WriteAllBytes(SEBPath + @"SafeExamBrowser.WindowsApi.dll", Resources.SafeExamBrowser_WindowsApi); + File.WriteAllBytes(SEBPath + @"SafeExamBrowser.UserInterface.Mobile.dll", Resources.SafeExamBrowser_UserInterface_Mobile); } else // 32 bits patch { @@ -172,15 +168,14 @@ namespace patch_seb File.WriteAllBytes(SEBPath + @"SafeExamBrowser.Configuration.dll", Resources.SafeExamBrowser_Configuration1); File.WriteAllBytes(SEBPath + @"SafeExamBrowser.Monitoring.dll", Resources.SafeExamBrowser_Monitoring1); File.WriteAllBytes(SEBPath + @"SafeExamBrowser.UserInterface.Desktop.dll", Resources.SafeExamBrowser_UserInterface_Desktop1); - File.WriteAllBytes(SEBPath + @"SafeExamBrowser.UserInterface.Shared.dll", Resources.SafeExamBrowser_UserInterface_Shared1); - File.WriteAllBytes(SEBPath + @"SafeExamBrowser.WindowsApi.dll", Resources.SafeExamBrowser_WindowsApi1); + File.WriteAllBytes(SEBPath + @"SafeExamBrowser.UserInterface.Mobile.dll", Resources.SafeExamBrowser_UserInterface_Mobile1); } - AddLog("Patching done."); + AddLog("PATCHING DONE"); button1.Text = "PATCH DONE"; } catch (Exception ex) { - AddLog(ex.Message); + AddLog("[ERROR] " + ex.Message); } } diff --git a/patch-seb/Properties/AssemblyInfo.cs b/patch-seb/Properties/AssemblyInfo.cs index 499d13d..49bcf25 100644 --- a/patch-seb/Properties/AssemblyInfo.cs +++ b/patch-seb/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Numero di build // Revisione // -[assembly: AssemblyVersion("1.4.1.0")] -[assembly: AssemblyFileVersion("1.4.1.0")] +[assembly: AssemblyVersion("1.5.2.0")] +[assembly: AssemblyFileVersion("1.5.2.0")] diff --git a/patch-seb/Properties/Resources.Designer.cs b/patch-seb/Properties/Resources.Designer.cs index 9d2bd4b..f88acc6 100644 --- a/patch-seb/Properties/Resources.Designer.cs +++ b/patch-seb/Properties/Resources.Designer.cs @@ -153,9 +153,9 @@ namespace patch_seb.Properties { /// /// Cerca una risorsa localizzata di tipo System.Byte[]. /// - internal static byte[] SafeExamBrowser_UserInterface_Shared { + internal static byte[] SafeExamBrowser_UserInterface_Mobile { get { - object obj = ResourceManager.GetObject("SafeExamBrowser_UserInterface_Shared", resourceCulture); + object obj = ResourceManager.GetObject("SafeExamBrowser_UserInterface_Mobile", resourceCulture); return ((byte[])(obj)); } } @@ -163,29 +163,9 @@ namespace patch_seb.Properties { /// /// Cerca una risorsa localizzata di tipo System.Byte[]. /// - internal static byte[] SafeExamBrowser_UserInterface_Shared1 { + internal static byte[] SafeExamBrowser_UserInterface_Mobile1 { get { - object obj = ResourceManager.GetObject("SafeExamBrowser_UserInterface_Shared1", resourceCulture); - return ((byte[])(obj)); - } - } - - /// - /// Cerca una risorsa localizzata di tipo System.Byte[]. - /// - internal static byte[] SafeExamBrowser_WindowsApi { - get { - object obj = ResourceManager.GetObject("SafeExamBrowser_WindowsApi", resourceCulture); - return ((byte[])(obj)); - } - } - - /// - /// Cerca una risorsa localizzata di tipo System.Byte[]. - /// - internal static byte[] SafeExamBrowser_WindowsApi1 { - get { - object obj = ResourceManager.GetObject("SafeExamBrowser_WindowsApi1", resourceCulture); + object obj = ResourceManager.GetObject("SafeExamBrowser_UserInterface_Mobile1", resourceCulture); return ((byte[])(obj)); } } diff --git a/patch-seb/Properties/Resources.resx b/patch-seb/Properties/Resources.resx index 5747cef..10489dd 100644 --- a/patch-seb/Properties/Resources.resx +++ b/patch-seb/Properties/Resources.resx @@ -148,16 +148,10 @@ ..\Resources\x86\SafeExamBrowser.UserInterface.Desktop.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Resources\x64\SafeExamBrowser.UserInterface.Shared.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\x64\SafeExamBrowser.UserInterface.Mobile.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Resources\x86\SafeExamBrowser.UserInterface.Shared.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ..\Resources\x64\SafeExamBrowser.WindowsApi.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ..\Resources\x86\SafeExamBrowser.WindowsApi.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\x86\SafeExamBrowser.UserInterface.Mobile.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/patch-seb/patch-seb.csproj b/patch-seb/patch-seb.csproj index cf0771b..e7b898e 100644 --- a/patch-seb/patch-seb.csproj +++ b/patch-seb/patch-seb.csproj @@ -94,15 +94,13 @@ - - - - + +