Update Safe Exam Browser Patch to 3.10.0.826
This commit is contained in:
@@ -9,18 +9,20 @@
|
||||
using System.Windows;
|
||||
using SafeExamBrowser.I18n.Contracts;
|
||||
using SafeExamBrowser.SystemComponents.Contracts;
|
||||
using SafeExamBrowser.UserInterface.Contracts;
|
||||
using SafeExamBrowser.UserInterface.Contracts.FileSystemDialog;
|
||||
using SafeExamBrowser.UserInterface.Contracts.Windows;
|
||||
using SafeExamBrowser.UserInterface.Mobile.Windows;
|
||||
using SafeExamBrowser.UserInterface.Shared;
|
||||
|
||||
namespace SafeExamBrowser.UserInterface.Mobile
|
||||
{
|
||||
public class FileSystemDialogFactory : IFileSystemDialog
|
||||
public class FileSystemDialogFactory : Guardable, IFileSystemDialog
|
||||
{
|
||||
private readonly ISystemInfo systemInfo;
|
||||
private readonly IText text;
|
||||
|
||||
public FileSystemDialogFactory(ISystemInfo systemInfo, IText text)
|
||||
public FileSystemDialogFactory(ISystemInfo systemInfo, IText text, IWindowGuard windowGuard) : base(windowGuard)
|
||||
{
|
||||
this.systemInfo = systemInfo;
|
||||
this.text = text;
|
||||
@@ -38,11 +40,20 @@ namespace SafeExamBrowser.UserInterface.Mobile
|
||||
{
|
||||
if (parent is Window window)
|
||||
{
|
||||
return window.Dispatcher.Invoke(() => new FileSystemDialog(element, operation, systemInfo, text, initialPath, message, title, parent, restrictNavigation, showElementPath).Show());
|
||||
return window.Dispatcher.Invoke(() =>
|
||||
{
|
||||
var dialog = Guard(new FileSystemDialog(element, operation, systemInfo, text, initialPath, message, title, parent, restrictNavigation, showElementPath));
|
||||
var result = dialog.Show();
|
||||
|
||||
return result;
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
return new FileSystemDialog(element, operation, systemInfo, text, initialPath, message, title, restrictNavigation: restrictNavigation, showElementPath: showElementPath).Show();
|
||||
var dialog = Guard(new FileSystemDialog(element, operation, systemInfo, text, initialPath, message, title, restrictNavigation: restrictNavigation, showElementPath: showElementPath));
|
||||
var result = dialog.Show();
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user