/// <summary>
        ///     Initializes this MssMsgRangeEntryMetadata and sets the default properties for controls on the mapping
        ///     dialog
        /// </summary>
        /// <param name="mappingDlg">The mapping dialog this is associated with</param>
        /// <param name="io">Specifies wheather this associated with the input or output entry fields.</param>
        public void AttachToDlg(MappingDlg mappingDlg, IoType io)
        {
            this.msgRange         = new MssMsgRange();
            this.msgRange.MsgType = this.MsgType;

            this.ioCatagory = io;
            this.mappingDlg = mappingDlg;

            InitOutMssMsgTypeNames();

            //Contains the type combo box that did not trigger the creation of this class
            ComboBox otherTypeCombo;

            //For each MSS message type selected for input there are only a subset of MSS message types that are
            //considered valid output. When the input type changes then the output combo box must be repopulated
            if (io == IoType.Input)
            {
                otherTypeCombo = mappingDlg.outTypeCombo;

                otherTypeCombo.Items.Clear();
                otherTypeCombo.Items.AddRange(outMssMsgTypeNames.ToArray());
                //This will cause the output MssMsgRangeEntryMetadata to be created.
                otherTypeCombo.SelectedIndex = 0;
            }
            else if (io == IoType.Output)
            {
                otherTypeCombo = mappingDlg.inTypeCombo;
            }
            else
            {
                //Unknown IO type
                Debug.Assert(false);
                return;
            }

            MssMsgType otherMsgType = mappingDlg.GetMessageTypeFromCombo(otherTypeCombo);


            if (io == IoType.Input)
            {
                if (this.canSelectSameAsInput)
                {
                    mappingDlg.outSameAsInCheckBox.Enabled = true;
                }
                else
                {
                    mappingDlg.outSameAsInCheckBox.Checked = false;
                    mappingDlg.outSameAsInCheckBox.Enabled = false;
                }
            }

            SetMappingDlgEntryFieldsDefaultProperties();
            SetMappingDlgEntryFieldCustomProperties();
        }
        /// <summary>
        ///     Initializes this MssMsgRangeEntryMetadata and sets the default properties for controls on the mapping 
        ///     dialog
        /// </summary>
        /// <param name="mappingDlg">The mapping dialog this is associated with</param>
        /// <param name="io">Specifies wheather this associated with the input or output entry fields.</param>
        public void AttachToDlg(MappingDlg mappingDlg, IoType io)
        {
            this.msgRange = new MssMsgRange();
            this.msgRange.MsgType = this.MsgType;

            this.ioCatagory = io;
            this.mappingDlg = mappingDlg;

            InitOutMssMsgTypeNames();

            //Contains the type combo box that did not trigger the creation of this class
            ComboBox otherTypeCombo;

            //For each MSS message type selected for input there are only a subset of MSS message types that are
            //considered valid output. When the input type changes then the output combo box must be repopulated
            if (io == IoType.Input)
            {
                otherTypeCombo = mappingDlg.outTypeCombo;

                otherTypeCombo.Items.Clear();
                otherTypeCombo.Items.AddRange(outMssMsgTypeNames.ToArray());
                //This will cause the output MssMsgRangeEntryMetadata to be created.
                otherTypeCombo.SelectedIndex = 0;
            }
            else if (io == IoType.Output)
            {
                otherTypeCombo = mappingDlg.inTypeCombo;
            }
            else
            {
                //Unknown IO type
                Debug.Assert(false);
                return;
            }

            MssMsgType otherMsgType = mappingDlg.GetMessageTypeFromCombo(otherTypeCombo);

            if (io == IoType.Input)
            {
                if (this.canSelectSameAsInput)
                {
                    mappingDlg.outSameAsInCheckBox.Enabled = true;
                }
                else
                {
                    mappingDlg.outSameAsInCheckBox.Checked = false;
                    mappingDlg.outSameAsInCheckBox.Enabled = false;

                }
            }

            SetMappingDlgEntryFieldsDefaultProperties();
            SetMappingDlgEntryFieldCustomProperties();
        }