Exemplo n.º 1
0
        /// <summary>
        /// Handles a show info event raised by a sender.
        /// Bubbles up the event to the ShowInfoEventHandler.
        /// </summary>
        /// <param name="sender">sender of event</param>
        /// <param name="e">show message event arguments</param>
        protected virtual void HandleShowInfo(object sender, ShowMessageEventArgs e)
        {
            ShowInfoEventHandler handler = this.ShowInfo;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Raises this object's show info event.
        /// </summary>
        /// <param name="message">message</param>
        /// <param name="caption">caption</param>
        /// <param name="supplementMsg">(optional)supplemental message</param>
        protected virtual void OnShowInfo(string message, string caption = null, string supplementMsg = null)
        {
            ShowInfoEventHandler handler = this.ShowInfo;

            if (handler != null)
            {
                var args = new ShowMessageEventArgs(message, caption, supplementMsg);
                handler(this, args);
            }
        }