#region Apache License 2.0
/*
Nuclex .NET Framework
Copyright (C) 2002-2024 Markus Ewald / Nuclex Development Labs
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#endregion // Apache License 2.0
using System;
using System.Windows.Forms;
namespace Nuclex.Windows.Forms.Messages {
/// Performs simple user interaction
///
/// Methods provided by this service can be covered using plain old message boxes
/// and do not require special dialogs or calls to the task dialog API.
///
public interface IMessageService {
/// Triggered when a message is about to be displayed to the user
event EventHandler MessageDisplaying;
/// Triggered when the user has acknowledged the current message
event EventHandler MessageAcknowledged;
/// Asks the user a question that can be answered via several buttons
/// Image that will be shown on the message box
/// Text that will be shown to the user
/// Buttons available for the user to click on
/// The button the user has clicked on
DialogResult ShowQuestion(
MessageBoxIcon image, MessageText text, MessageBoxButtons buttons
);
/// Displays a notification to the user
/// Image that will be shown on the message bx
/// Text that will be shown to the user
void ShowNotification(MessageBoxIcon image, MessageText text);
}
} // namespace Nuclex.Windows.Forms.Messages