Do you need to show a simple message? Do you have a non-visual widget but you need some interface? The IUIService provides very basic message box functionality. The interface looks like this:

    /// <summary>
    /// Provides UI functionality
    /// </summary>
    public interface IUIService
    {
        /// <summary>
        /// Shows a message
        /// </summary>
        /// <param name="message"></param>
        void ShowMessage(string message);

        /// <summary>
        /// Shows an error
        /// </summary>
        /// <param name="errorMessage"></param>
        void ShowError(string errorMessage);
        
        /// <summary>
        /// Shows an exception
        /// </summary>
        /// <param name="exception"></param>
        void ShowError(Exception exception);
        
        /// <summary>
        /// Executes an operation in the UI context changing the mouse cursor and handling the errors
        /// </summary>
        /// <param name="operation"></param>
        /// <returns></returns>
        bool ExecuteOperation(Action operation);
    }

Last edited Dec 2, 2009 at 2:57 PM by joj, version 2

Comments

No comments yet.