Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
IDialogService.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 
4 using System;
5 using System.Windows;
6 
7 namespace SiliconStudio.Presentation.Services
8 {
9  /// <summary>
10  /// An interface to invoke dialogs from commands implemented in view models
11  /// </summary>
12  public interface IDialogService
13  {
14  /// <summary>
15  /// Gets the parent window handle.
16  /// </summary>
17  /// <value>The parent window.</value>
18  Window ParentWindow { get; }
19 
20  /// <summary>
21  /// Creates a modal file open dialog.
22  /// </summary>
23  /// <returns>An instance of <see cref="IFileOpenModalDialog"/>.</returns>
24  IFileOpenModalDialog CreateFileOpenModalDialog();
25 
26  /// <summary>
27  /// Create a modal folder open dialog.
28  /// </summary>
29  /// <returns>An instance of <see cref="IFolderOpenModalDialog"/>.</returns>
30  IFolderOpenModalDialog CreateFolderOpenModalDialog();
31 
32  /// <summary>
33  /// Creates a modal file save dialog.
34  /// </summary>
35  /// <returns>An instance of <see cref="IFileSaveModalDialog"/>.</returns>
36  IFileSaveModalDialog CreateFileSaveModalDialog();
37 
38  /// <summary>
39  /// Displays a modal message box.
40  /// </summary>
41  /// <param name="message">The text to display as message in the message box.</param>
42  /// <param name="caption">The title of the message box</param>
43  /// <param name="buttons">The buttons to display in the message box.</param>
44  /// <param name="image">The image to display in the message box.</param>
45  /// <returns>A <see cref="MessageBoxResult"/> value indicating which button the user pressed to close the window.</returns>
46  MessageBoxResult ShowMessageBox(string message, string caption, MessageBoxButton buttons = MessageBoxButton.OK, MessageBoxImage image = MessageBoxImage.None);
47 
48  /// <summary>
49  /// Attempts to close the current window.
50  /// </summary>
51  /// <param name="dialogResult">a nullable boolean indicating, if the current window behave like a dialog window, the result of the dialog invocation.</param>
52  void CloseCurrentWindow(bool? dialogResult = null);
53  }
54 }
MessageBoxResult
An enum representing the button pressed by the user to close a message box.
MessageBoxImage
An enum representing the image to display in a message box.
MessageBoxButton
An enum representing the buttons to display in a message box.
An interface representing a modal file save dialog.
An interface to invoke dialogs from commands implemented in view models
An interface representing a modal file open dialog.
An interface representing a modal folder selection dialog.