From c3a2fb38ce3f2b0e6b8e2508f1676dd9a02d35e5 Mon Sep 17 00:00:00 2001 From: dbuechel Date: Fri, 24 Jan 2020 11:07:52 +0100 Subject: [PATCH] Ensured naming consistency for parent window of file system dialog. --- SafeExamBrowser.Browser/BrowserApplicationInstance.cs | 2 +- SafeExamBrowser.Client/ClientController.cs | 2 +- .../FileSystemDialog/IFileSystemDialog.cs | 2 +- .../FileSystemDialogFactory.cs | 6 +++--- .../FileSystemDialogFactory.cs | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/SafeExamBrowser.Browser/BrowserApplicationInstance.cs b/SafeExamBrowser.Browser/BrowserApplicationInstance.cs index 3b6e5a0a..60065a7c 100644 --- a/SafeExamBrowser.Browser/BrowserApplicationInstance.cs +++ b/SafeExamBrowser.Browser/BrowserApplicationInstance.cs @@ -223,7 +223,7 @@ namespace SafeExamBrowser.Browser if (isAllowed) { - var result = fileSystemDialog.Show(args.Element, args.Operation, args.InitialPath, title: args.Title, owner: window); + var result = fileSystemDialog.Show(args.Element, args.Operation, args.InitialPath, title: args.Title, parent: window); if (result.Success) { diff --git a/SafeExamBrowser.Client/ClientController.cs b/SafeExamBrowser.Client/ClientController.cs index 147d4ea9..4bf9a03f 100644 --- a/SafeExamBrowser.Client/ClientController.cs +++ b/SafeExamBrowser.Client/ClientController.cs @@ -539,7 +539,7 @@ namespace SafeExamBrowser.Client 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, owner: splashScreen); + var result = fileSystemDialog.Show(FileSystemElement.Folder, FileSystemOperation.Open, message: message, parent: splashScreen); if (result.Success) { diff --git a/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/IFileSystemDialog.cs b/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/IFileSystemDialog.cs index 03d5ddde..23d1154b 100644 --- a/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/IFileSystemDialog.cs +++ b/SafeExamBrowser.UserInterface.Contracts/FileSystemDialog/IFileSystemDialog.cs @@ -15,6 +15,6 @@ namespace SafeExamBrowser.UserInterface.Contracts.FileSystemDialog /// /// Creates a dialog according to the given parameters and shows it to the user. /// - FileSystemDialogResult Show(FileSystemElement element, FileSystemOperation operation, string initialPath = default(string), string message = default(string), string title = default(string), IWindow owner = default(IWindow)); + FileSystemDialogResult Show(FileSystemElement element, FileSystemOperation operation, string initialPath = default(string), string message = default(string), string title = default(string), IWindow parent = default(IWindow)); } } diff --git a/SafeExamBrowser.UserInterface.Desktop/FileSystemDialogFactory.cs b/SafeExamBrowser.UserInterface.Desktop/FileSystemDialogFactory.cs index 8ba1ebb4..fda32392 100644 --- a/SafeExamBrowser.UserInterface.Desktop/FileSystemDialogFactory.cs +++ b/SafeExamBrowser.UserInterface.Desktop/FileSystemDialogFactory.cs @@ -22,11 +22,11 @@ namespace SafeExamBrowser.UserInterface.Desktop this.text = text; } - public FileSystemDialogResult Show(FileSystemElement element, FileSystemOperation operation, string initialPath = default(string), string message = null, string title = null, IWindow owner = null) + public FileSystemDialogResult Show(FileSystemElement element, FileSystemOperation operation, string initialPath = default(string), string message = null, string title = null, IWindow parent = null) { - if (owner is Window window) + if (parent is Window window) { - return window.Dispatcher.Invoke(() => new FileSystemDialog(element, operation, text, initialPath, message, title, owner).Show()); + return window.Dispatcher.Invoke(() => new FileSystemDialog(element, operation, text, initialPath, message, title, parent).Show()); } else { diff --git a/SafeExamBrowser.UserInterface.Mobile/FileSystemDialogFactory.cs b/SafeExamBrowser.UserInterface.Mobile/FileSystemDialogFactory.cs index 76489633..2e770e85 100644 --- a/SafeExamBrowser.UserInterface.Mobile/FileSystemDialogFactory.cs +++ b/SafeExamBrowser.UserInterface.Mobile/FileSystemDialogFactory.cs @@ -22,11 +22,11 @@ namespace SafeExamBrowser.UserInterface.Mobile this.text = text; } - public FileSystemDialogResult Show(FileSystemElement element, FileSystemOperation operation, string initialPath = default(string), string message = null, string title = null, IWindow owner = null) + public FileSystemDialogResult Show(FileSystemElement element, FileSystemOperation operation, string initialPath = default(string), string message = null, string title = null, IWindow parent = null) { - if (owner is Window window) + if (parent is Window window) { - return window.Dispatcher.Invoke(() => new FileSystemDialog(element, operation, text, initialPath, message, title, owner).Show()); + return window.Dispatcher.Invoke(() => new FileSystemDialog(element, operation, text, initialPath, message, title, parent).Show()); } else {