Example #1
0
        public TopFile(StreamReader b)
        {
            ConnectingStation = new List<Tuple<int, string, string>>();
            ch0 = 'T';
            ch1 = 'o';
            ch2 = 'p';

            ver = (byte)3;

            this.TripCount = 1;
            this.Trips = new List<Trip>() { new Trip(DateTime.Now, "", 0) };

            this.ShotsCount = LoadSurvexFile(b);
            //this.Shots = LoadShotList(b, this.ShotsCount);

            this.RefCount = 0;
            this.References = new List<Reference>();

            this.OverView = new Mapping();
            this.OutLine = new Drawing();
            this.SideView = new Drawing();
            this.FileLoaded = true;
        }
Example #2
0
        public TopFile(BinaryReader byteFile)
        {
            this.ConnectingStation = new List<Tuple<int, string, string>>();
            ch0 = byteFile.ReadChar();
            ch1 = byteFile.ReadChar();
            ch2 = byteFile.ReadChar();

            ver = byteFile.ReadByte();

            this.TripCount = byteFile.ReadUInt32();
            this.Trips = LoadTripList(byteFile, this.TripCount);

            this.ShotsCount = byteFile.ReadUInt32();
            this.Shots = LoadShotList(byteFile, this.ShotsCount);

            this.RefCount = byteFile.ReadUInt32();
            this.References = LoadRefList(byteFile, this.RefCount);

            this.OverView = new Mapping(byteFile);
            this.OutLine = new Drawing(byteFile);
            this.SideView = new Drawing(byteFile);
            this.FileLoaded = true;
        }
Example #3
0
        public TopFile(List<Station> Stations, TopFile file = null)
        {
            ch0 = 'T';
            ch1 = 'o';
            ch2 = 'p';
            ver = 3;

            this.TripCount = 1;
            this.Trips = new List<Trip>() { new Trip() };

            this.ShotsCount = (uint)Stations.Count;
            this.Shots = new List<Shot>();
            foreach (Station station in Stations)
            {
                Shots.Add(new Shot(station));
            }

            this.RefCount = 0;
            this.References = new List<Reference>();

            if (file != null)
            {
                this.OverView = file.OverView;
                this.OutLine = file.OutLine;
                this.SideView = file.SideView;
            }
            else
            {
                this.OverView = new Mapping();
                this.OutLine = new Drawing();
                this.SideView = new Drawing();
            }
            this.FileLoaded = true;
        }
Example #4
0
        public TopFile()
        {
            ch0 = 'T';
            ch1 = 'o';
            ch2 = 'p';

            ver = 3;

            this.TripCount = 0;
            this.Trips = new List<Trip>();

            this.ShotsCount = 0;
            this.Shots = new List<Shot>();

            this.RefCount = 0;
            this.References = new List<Reference>();

            this.OverView = new Mapping();
            this.OutLine = new Drawing();
            this.SideView = new Drawing();
            this.FileLoaded = true;
        }