protected override void SetEntryField1FromRange(IMssMsgRange msgRange) { int paramIndex = MssParameters.ALL_PARAMS_ID_LIST.FindIndex( paramId => paramId == (MssParameterID)msgRange.Data1RangeBottom); ((ComboBox)EntryField1).SelectedIndex = paramIndex; }
public void InitAllMembers(IMssMsgRange inMsgRange, IMssMsgRange outMsgRange, bool overrideDuplicates, CurveShapeInfo curveShapeInfo) { this.InMssMsgRange = inMsgRange; this.OutMssMsgRange = outMsgRange; this.OverrideDuplicates = overrideDuplicates; this.CurveShapeInfo = curveShapeInfo; }
public void InitAllMembers(IMssMsgRange inMsgRange, IMssMsgRange outMsgRange, bool overrideDuplicates, CurveShapeInfo curveShapeInfo, GenEntryConfigInfo generatorConfigInfo) { this.GenConfigInfo = generatorConfigInfo; InitAllMembers(inMsgRange, outMsgRange, overrideDuplicates, curveShapeInfo); }
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; }
protected override void SetEntryField1FromRange(IMssMsgRange msgRange) { ((ComboBox)EntryField1).SelectedIndex = this.genMappingMgr.GetMappingEntryIndexById((int)msgRange.Data1RangeBottom); }
protected abstract void SetEntryField2FromRange(IMssMsgRange msgRange);
protected override void SetEntryField2FromRange(IMssMsgRange msgRange) { throw new NotImplementedException(); }
protected override void SetEntryField2FromRange(IMssMsgRange msgRange) { EntryField2.Text = msgRange.GetData2RangeStr(this.mappingDlg.MsgInfoFactory); }