Esempio n. 1
0
 public XSectionElement(BinaryReader byteFile)
 {
     //this.id = byteFile.ReadByte();
     this.pos = new Point(byteFile);
     this.station = new Id(byteFile);
     this.direction = byteFile.ReadUInt32();
 }
Esempio n. 2
0
        public Shot(BinaryReader byteFile)
        {
            this.Fr = new Id(byteFile);
            this.T = new Id(byteFile);
            this.Dist = byteFile.ReadUInt32();
            this.Azi = byteFile.ReadUInt16();
            this.Incl = byteFile.ReadUInt16();
            this.flags = byteFile.ReadByte();

            this.roll = byteFile.ReadByte();
            this.tripIndex = byteFile.ReadUInt16();
            //if (this.flags == 2)
            if(IsBitSet(this.flags, 1))
            {
                byte bytek = byteFile.ReadByte();
                byte[] stringec = byteFile.ReadBytes(((int)bytek));

                foreach(byte bajt in stringec)
                {
                    this.Comment += (char)bajt;
                }
                /*this.Comment = byteFile.ReadString();
                int len = Comment.Length;*/
            }
        }
Esempio n. 3
0
 public Reference(BinaryReader byteFile)
 {
     this.Station = new Id(byteFile);
     this.East = byteFile.ReadUInt64();
     this.North = byteFile.ReadUInt64();
     this.Altitude = byteFile.ReadUInt32();
     this.Comment = byteFile.ReadString();
 }
Esempio n. 4
0
        public Shot(Station station)
        {
            this.Fr = new Id(station.From);
            this.T = new Id(station.To);
            this.Distance = station.Distance;
            this.Azimuth = station.Azimuth;
            this.Inclination = station.Inclination;
            this.flags = station.flags;

            this.roll = station.roll;
            this.tripIndex = station.tripIndex;
            if (this.flags == 2)
            {
                this.Comment = station.Comment;
            }
        }
Esempio n. 5
0
        public Shot(List<string> splittedLine, int prefix, int prefixAdd)
        {
            Regex matchNumber = new Regex("\\d+");
            string iFrom = string.Format("{0},{1}", prefix + prefixAdd, matchNumber.Match(splittedLine[0]).Value);
            string iTo = string.Format("{0},{1}", prefix + prefixAdd, matchNumber.Match(splittedLine[1]).Value);

            this.Fr = new Id(iFrom);
            this.T = new Id(iTo);
            this.Distance = Math.Round(double.Parse(splittedLine[2]), 3);
            this.Azimuth = Math.Round(double.Parse(splittedLine[3]), 3);
            this.Inclination = double.Parse(splittedLine[4]);
            //TODO: A je prou da je 0?
            this.flags = 0;
            //TODO: A je to prou da je 0?
            this.roll = 0;
            this.tripIndex = 0;
            if (IsBitSet(this.flags, 1))
            {
                this.Comment = "";
            }
        }
Esempio n. 6
0
        public Shot(string equate0, string equate1, int prefix, Dictionary<string, int> rPrefix, int prefixAdd)
        {
            // TODO: Complete member initialization
            string[] prefixOne = equate0.Trim().Split('.');
            string[] prefixTwo = equate1.Trim().Split('.');
            int pref1, pref2;
            int.TryParse(Regex.Match(prefixOne[0], "\\d+").Value, out pref1);
            int.TryParse(Regex.Match(prefixTwo[0], "\\d+").Value, out pref2);

            int post1, post2;
            int.TryParse(Regex.Match(prefixOne[1], "\\d+").Value, out post1);
            int.TryParse(Regex.Match(prefixTwo[1], "\\d+").Value, out post2);
            string iFrom = string.Format("{0},{1}", prefix + pref1, post1);
            string iTo = string.Format("{0},{1}", prefix + pref2, post2);

            this.Fr = new Id(iFrom);
            this.T = new Id(iTo);
            this.Distance = 0.0;
            this.Azimuth = 0.0;
            this.Inclination = 0.0;
            //TODO: A je prou da je 0?
            this.flags = 0;
            //TODO: A je to prou da je 0?
            this.roll = 0;
            this.tripIndex = 0;
            if (IsBitSet(this.flags, 1))
            {
                this.Comment = "";
            }
        }