Esempio n. 1
0
        /// <summary>
        /// Assign a property referencing it by the tag associated with it.
        /// </summary>
        /// <param name="tag">A varTags value</param>
        /// <param name="val">Value to assign</param>
        /// <returns>TRUE if the assignment was successful, FALSE otherwise.</returns>
        public bool setByTag(ChainInfo.varTags tag, string val)
        {
            switch (tag)
            {
            case ChainInfo.varTags.dataDescription:
                DataDescription = val;
                return(true);

            case ChainInfo.varTags.startDateTime:
                StartDateTime = val;
                return(true);

            case ChainInfo.varTags.bitsPerSample:
                BitsPerSample = Convert.ToInt32(val);
                return(true);

            case ChainInfo.varTags.zeroReferenceVoltage:
                ZeroReferenceVoltage = val;
                return(true);

            case ChainInfo.varTags.fullScaleReferenceVoltage:
                FullScaleReferenceVoltage = val;
                return(true);

            case ChainInfo.varTags.scaleMultiplier:
                ScaleMultiplier = val;
                return(true);

            case ChainInfo.varTags.zeroOffset:
                ZeroOffset = val;
                return(true);
            }
            return(false);
        }
Esempio n. 2
0
        /// <summary>
        /// Assign a property referencing it by the tag associated with it.
        /// </summary>
        /// <param name="tag">A varTags value</param>
        /// <param name="val">Value to assign</param>
        /// <returns>TRUE if the assignment was successful, FALSE otherwise.</returns>
        public bool setByTag(ChainInfo.varTags tag, string val)
        {
            switch (tag)
            {
            case ChainInfo.varTags.dataFormat:
                iDataFormat = val;
                return(true);

            case ChainInfo.varTags.writerClassName:
                iWriterClassName = val;
                return(true);

            case ChainInfo.varTags.multiFileNum:
                iMultiFileNum = val;
                return(true);

            case ChainInfo.varTags.startTime:
                iStartTime = val;
                return(true);
            }
            // We have no properties to set!
            return(false);
        }
Esempio n. 3
0
        private void setInitValueByTag(ChainInfo initSet, ChainInfo.tagValuePair tagVal)
        {
            // Get the tag:
            ChainInfo.varTags tag = ChainInfo.getTagFromValue(tagVal.tagName);
            // Set appropriately -- try ChainInfo first:
            bool matched = initSet.setByTag(tag, tagVal.tagValue);

            if (!matched)               // It was not an ChainInfo, try DataInfo:
            {
                matched = initSet.dataInfo.setByTag(tag, tagVal.tagValue);
            }
            if (!matched)               // Not a DataInfo, try a PatientInfo
            {
                matched = initSet.patientInfo.setByTag(tag, tagVal.tagValue);
            }
            if (!matched)
            {
                matched = initSet.fileInfo.setByTag(tag, tagVal.tagValue);
            }
            if (!matched)
            {
                // None of the above -- ????
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Assign a property referencing it by the tag associated with it.
        /// </summary>
        /// <param name="tag">A varTags value</param>
        /// <param name="val">Value to assign</param>
        /// <returns>TRUE if the assignment was successful, FALSE otherwise.</returns>
        public bool setByTag(ChainInfo.varTags tag, string val)
        {
            switch (tag)
            {
            case ChainInfo.varTags.PatientID:
                this.PatientID = val;
                return(true);

            case ChainInfo.varTags.Prefix:
                this.Prefix = val;
                return(true);

            case ChainInfo.varTags.FirstName:
                this.FirstName = val;
                return(true);

            case ChainInfo.varTags.MiddleName:
                this.MiddleName = val;
                return(true);

            case ChainInfo.varTags.LastName:
                this.LastName = val;
                return(true);

            case ChainInfo.varTags.Suffix:
                this.Suffix = val;
                return(true);

            case ChainInfo.varTags.Addr1:
                this.Addr1 = val;
                return(true);

            case ChainInfo.varTags.Addr2:
                this.Addr2 = val;
                return(true);

            case ChainInfo.varTags.City:
                this.City = val;
                return(true);

            case ChainInfo.varTags.State:
                this.State = val;
                return(true);

            case ChainInfo.varTags.Zip:
                this.Zip = val;
                return(true);

            case ChainInfo.varTags.Country:
                this.Country = val;
                return(true);

            case ChainInfo.varTags.Age:
                this.Age = Convert.ToInt32(val);
                return(true);

            case ChainInfo.varTags.DOB:
                this.DOBstring = val;
                return(true);

            case ChainInfo.varTags.FullName:
                this.FullName = val;
                return(true);

            case ChainInfo.varTags.FullAddress:
                this.FullAddress = val;
                return(true);
            }
            return(false);
        }