/// ------------------------------------------------------------------------------------
        /// <summary>
        /// Called after data has been determined to be dirty, verified and OK is clicked or
        /// the user has confirmed saving the changes. Override in derived classes.
        /// </summary>
        /// <returns>False if closing the form should be canceled. Otherwise, true.</returns>
        /// ------------------------------------------------------------------------------------
        private bool InternalSaveChanges()
        {
            // Broadcast a message to anyone who cares (e.g. an AddOn).
            var dsmi = new DlgSendMessageInfo(this, IsDirty);

            if (App.MsgMediator.SendMessage("DialogSaveChanges", dsmi) && !dsmi.Continue)
            {
                return(dsmi.BoolToReturn);
            }

            return(SaveChanges());
        }
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Called when the help button is clicked.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        private void InternalHandleHelpClick(object sender, EventArgs e)
        {
            // Broadcast a message to anyone who cares (e.g. an AddOn).
            var dsmi = new DlgSendMessageInfo(this, IsDirty);

            App.MsgMediator.SendMessage("DialogSaveSettings", dsmi);

            if (dsmi.Continue)
            {
                HandleHelpClick(sender, e);
            }
        }
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Called before the base class OnClosing to allow derived classes to save form
        /// settings.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        private void InternalSaveSettings()
        {
            // Broadcast a message to anyone who cares (e.g. an AddOn).
            var dsmi = new DlgSendMessageInfo(this, IsDirty);

            App.MsgMediator.SendMessage("DialogSaveSettings", dsmi);

            if (dsmi.Continue)
            {
                SaveSettings();
            }
        }