Beispiel #1
0
        private Int16 ReadInt16(EDFField itemInfo)
        {
            string strInt    = ReadAscii(itemInfo).Trim();
            Int16  intResult = -1;

            try { intResult = Convert.ToInt16(strInt); }
            catch (Exception ex) { Console.WriteLine("Error, could not convert string to integer. " + ex.Message); }
            return(intResult);
        }
Beispiel #2
0
        private string[] ReadMultipleAscii(EDFField itemInfo, int numberOfParts)
        {
            var parts = new List <string>();

            for (int i = 0; i < numberOfParts; i++)
            {
                byte[] bytes = this.ReadBytes(itemInfo.AsciiLength);
                parts.Add(AsciiString(bytes));
            }

            return(parts.ToArray());
        }
Beispiel #3
0
        private double[] ReadMultipleDouble(EDFField itemInfo, int numberOfParts)
        {
            var parts = new List <double>();

            for (int i = 0; i < numberOfParts; i++)
            {
                byte[] bytes = this.ReadBytes(itemInfo.AsciiLength);
                string ascii = AsciiString(bytes);
                parts.Add(Convert.ToDouble(ascii));
            }

            return(parts.ToArray());
        }
Beispiel #4
0
 private string ReadAscii(EDFField itemInfo)
 {
     byte[] bytes = this.ReadBytes(itemInfo.AsciiLength);
     return(AsciiString(bytes));
 }
Beispiel #5
0
 public VariableLengthDouble(EDFField info) : base(info)
 {
 }
Beispiel #6
0
 public HeaderItem(EDFField info)
 {
     Name        = info.Name;
     AsciiLength = info.AsciiLength;
 }
Beispiel #7
0
 public VariableLengthInt(EDFField info) : base(info)
 {
 }
Beispiel #8
0
 public VariableLengthString(EDFField info) : base(info)
 {
 }
Beispiel #9
0
 public FixedLengthDouble(EDFField info) : base(info)
 {
 }
Beispiel #10
0
 public FixedLengthInt(EDFField info) : base(info)
 {
 }
Beispiel #11
0
 public FixedLengthString(EDFField info) : base(info)
 {
 }