Ensured naming consistency for parent window of file system dialog.
This commit is contained in:
parent
b003bf93b7
commit
c3a2fb38ce
5 changed files with 9 additions and 9 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -15,6 +15,6 @@ namespace SafeExamBrowser.UserInterface.Contracts.FileSystemDialog
|
|||
/// <summary>
|
||||
/// Creates a dialog according to the given parameters and shows it to the user.
|
||||
/// </summary>
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue