/// <summary>
        /// This interface method is called to show the GUI of the driver configuration module.
        /// So the ShowDialog method of the <see cref="SendReceiveConfig"/> class must be
        /// called here.
        /// </summary>
        /// <param name="configDriverExchange">
        /// Base interface for communication between a driver and its configuration assembly.
        /// If the driver implements the IDriverSendReceive the configuration assembly
        /// can use the "as" operator to access the IConfigSendReceive interface.
        /// A reference to this interface will be stored in m_SendReceive for later access.
        /// </param>
        /// <returns>
        /// TRUE if the user clicks the OK button of the configuration dialog. Otherwise FALSE.
        /// </returns>
        public bool ShowConfigurationDialog(IConfigDriverExchange configDriverExchange)
        {
            m_SendReceive = configDriverExchange as IConfigSendReceive;

            this.ShowDialog(configDriverExchange.ParentWindow);

            if (this.DialogResult == DialogResult.Cancel)
            {
                return(false);
            }

            return(true);
        }
Exemple #2
0
        bool IConfigurationPlugin.ShowConfigurationDialog(IConfigDriverExchange configDriverExchange)
        {
            if (m_Driver == null)
            {
                return(false);
            }

            m_SendReceive = configDriverExchange as IConfigSendReceive;
            Debug.Assert(m_SendReceive != null);

            UpdateControls();

            ShowDialog(configDriverExchange.ParentWindow);
            return(DialogResult == DialogResult.OK);
        }