Exemple #1
0
        public override int Write(Stream output)
        {
            Signals tempSigs = null;
            Signals calcSigs = null;

            try
            {
                System.IO.StreamWriter sw = new StreamWriter(output);

                if (_CalculateLeads &&
                    (this._Sigs != null))
                {
                    calcSigs = _Sigs.CalculateFifteenLeads();

                    if (calcSigs == null)
                    {
                        calcSigs = _Sigs.CalculateTwelveLeads();
                    }

                    if (calcSigs != null)
                    {
                        tempSigs = _Sigs;
                        _Sigs    = calcSigs;
                    }
                }

                int ret = ECGConverter.ToExcelTxt(this, sw, '\t', _UseBufferedStream);

                sw.Flush();

                return(ret);
            }
            catch {}

            if (tempSigs != null)
            {
                _Sigs = tempSigs;
            }

            return(1);
        }