protected override void SetEntryField1FromRange(IMssMsgRange msgRange)
        {
            int paramIndex = MssParameters.ALL_PARAMS_ID_LIST.FindIndex(
                paramId => paramId == (MssParameterID)msgRange.Data1RangeBottom);

            ((ComboBox)EntryField1).SelectedIndex = paramIndex;
        }
예제 #2
0
 public void InitAllMembers(IMssMsgRange inMsgRange, IMssMsgRange outMsgRange,
                            bool overrideDuplicates, CurveShapeInfo curveShapeInfo)
 {
     this.InMssMsgRange      = inMsgRange;
     this.OutMssMsgRange     = outMsgRange;
     this.OverrideDuplicates = overrideDuplicates;
     this.CurveShapeInfo     = curveShapeInfo;
 }
예제 #3
0
        public void InitAllMembers(IMssMsgRange inMsgRange, IMssMsgRange outMsgRange,
                                   bool overrideDuplicates, CurveShapeInfo curveShapeInfo,
                                   GenEntryConfigInfo generatorConfigInfo)
        {
            this.GenConfigInfo = generatorConfigInfo;

            InitAllMembers(inMsgRange, outMsgRange, overrideDuplicates, curveShapeInfo);
        }
예제 #4
0
        public override bool Equals(object o)
        {
            IMssMsgRange compareToRange = (IMssMsgRange)o;

            return(this.MsgType == compareToRange.MsgType &&
                   this.Data1RangeBottom == compareToRange.Data1RangeBottom &&
                   this.Data1RangeTop == compareToRange.Data1RangeTop &&
                   this.Data2RangeBottom == compareToRange.Data2RangeBottom &&
                   this.Data2RangeTop == compareToRange.Data2RangeTop);
        }
        /// <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>
        ///     Set the entry fields associated with this class based on an initialized MssMsgRange.
        /// </summary>
        public void UseExistingMsgRange(IMssMsgRange msgRange)
        {
            this.msgRange = msgRange;

            if (this.EntryField1 != null)
            {
                SetEntryField1FromRange(this.msgRange);
            }

            if (this.EntryField2 != null)
            {
                SetEntryField2FromRange(this.msgRange);
            }
        }
 protected override void SetEntryField2FromRange(IMssMsgRange msgRange)
 {
     ((ComboBox)EntryField2).SelectedIndex = (int)this.msgRange.Data2RangeBottom;
 }
예제 #8
0
 protected override void SetEntryField1FromRange(IMssMsgRange msgRange)
 {
     ((ComboBox)EntryField1).SelectedIndex = this.genMappingMgr.GetMappingEntryIndexById((int)msgRange.Data1RangeBottom);
 }
 protected override void SetEntryField1FromRange(IMssMsgRange msgRange)
 {
     ((ComboBox)EntryField1).SelectedIndex = this.genMappingMgr.GetMappingEntryIndexById((int)msgRange.Data1RangeBottom);
 }
 protected override void SetEntryField2FromRange(IMssMsgRange msgRange)
 {
     ((ComboBox)EntryField2).SelectedIndex = (int)this.msgRange.Data2RangeBottom;
 }
        public void InitAllMembers(IMssMsgRange inMsgRange, IMssMsgRange outMsgRange,
            bool overrideDuplicates, CurveShapeInfo curveShapeInfo,
            GenEntryConfigInfo generatorConfigInfo)
        {
            this.GenConfigInfo = generatorConfigInfo;

            InitAllMembers(inMsgRange, outMsgRange, overrideDuplicates, curveShapeInfo);
        }
예제 #12
0
 public void InitAllMembers(IMssMsgRange inMsgRange, IMssMsgRange outMsgRange,
     bool overrideDuplicates, CurveShapeInfo curveShapeInfo)
 {
     this.InMssMsgRange = inMsgRange;
     this.OutMssMsgRange = outMsgRange;
     this.OverrideDuplicates = overrideDuplicates;
     this.CurveShapeInfo = curveShapeInfo;
 }
 protected abstract void SetEntryField2FromRange(IMssMsgRange msgRange);
        /// <summary>
        ///     Set the entry fields associated with this class based on an initialized MssMsgRange.
        /// </summary>
        public void UseExistingMsgRange(IMssMsgRange msgRange)
        {
            this.msgRange = msgRange;

            if (this.EntryField1 != null)
            {
                SetEntryField1FromRange(this.msgRange);
            }

            if (this.EntryField2 != null)
            {
                SetEntryField2FromRange(this.msgRange);
            }
        }
        /// <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();
        }
 protected abstract void SetEntryField2FromRange(IMssMsgRange msgRange);
예제 #17
0
 protected override void SetEntryField2FromRange(IMssMsgRange msgRange)
 {
     throw new NotImplementedException();
 }
 protected override void SetEntryField2FromRange(IMssMsgRange msgRange)
 {
     throw new NotImplementedException();
 }
 protected override void SetEntryField2FromRange(IMssMsgRange msgRange)
 {
     EntryField2.Text = msgRange.GetData2RangeStr(this.mappingDlg.MsgInfoFactory);
 }
        protected override void SetEntryField1FromRange(IMssMsgRange msgRange)
        {
            int paramIndex = MssParameters.ALL_PARAMS_ID_LIST.FindIndex(
                paramId => paramId == (MssParameterID)msgRange.Data1RangeBottom);

            ((ComboBox)EntryField1).SelectedIndex = paramIndex;
        }