48 lines
No EOL
1.8 KiB
C#
48 lines
No EOL
1.8 KiB
C#
using System;
|
|
using System.Windows;
|
|
using System.Windows.Forms;
|
|
using JD.LogService;
|
|
|
|
namespace JD.MessageService
|
|
{
|
|
/// <summary>
|
|
/// Interface for message service implmenations
|
|
/// </summary>
|
|
public interface IMessageService
|
|
{
|
|
/// <summary>
|
|
/// Initializes the resources of the message service (should be called in the Main thread).
|
|
/// </summary>
|
|
void Initialize();
|
|
|
|
/// <summary>
|
|
/// Show a message/warning/error with an OK button.
|
|
/// </summary>
|
|
void Show(LogCategory category, string message, string caption);
|
|
|
|
/// <summary>
|
|
/// Show a question to the user.
|
|
/// </summary>
|
|
MessageBoxResult AskQuestion(string question, string caption, MessageBoxImage icon, MessageBoxButton buttons, MessageBoxResult defaultResult);
|
|
|
|
/// <summary>
|
|
/// Shows a message dialog to the user.
|
|
/// </summary>
|
|
MessageDialog.Button ShowMessageDialog(MessageDialog dialog);
|
|
|
|
/// <summary>
|
|
/// Show a input box.
|
|
/// </summary>
|
|
string ShowInputBox(string question, string caption, string defaultValue, MessageService.ValidationPredicate validationPredicate);
|
|
|
|
/// <summary>
|
|
/// Shows a balloon in tray icon closing after the timeout expired.
|
|
/// </summary>
|
|
/// <param name="timeout">The duration before the balloon closes and hides.</param>
|
|
/// <param name="title">The bold title in the header.</param>
|
|
/// <param name="text">The content of the balloon.</param>
|
|
/// <param name="icon">Type of balloon.</param>
|
|
/// <param name="clickAction">An action to execute when clicking the balloon.</param>
|
|
IBalloon ShowBalloon(TimeSpan timeout, string title, string text, ToolTipIcon icon, Action clickAction);
|
|
}
|
|
} |