Exemplo n.º 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);
        }
Exemplo n.º 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());
        }
Exemplo n.º 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());
        }
Exemplo n.º 4
0
 private string ReadAscii(EDFField itemInfo)
 {
     byte[] bytes = this.ReadBytes(itemInfo.AsciiLength);
     return(AsciiString(bytes));
 }
Exemplo n.º 5
0
 public VariableLengthDouble(EDFField info) : base(info)
 {
 }
Exemplo n.º 6
0
 public HeaderItem(EDFField info)
 {
     Name        = info.Name;
     AsciiLength = info.AsciiLength;
 }
Exemplo n.º 7
0
 public VariableLengthInt(EDFField info) : base(info)
 {
 }
Exemplo n.º 8
0
 public VariableLengthString(EDFField info) : base(info)
 {
 }
Exemplo n.º 9
0
 public FixedLengthDouble(EDFField info) : base(info)
 {
 }
Exemplo n.º 10
0
 public FixedLengthInt(EDFField info) : base(info)
 {
 }
Exemplo n.º 11
0
 public FixedLengthString(EDFField info) : base(info)
 {
 }