Exemplo n.º 1
0
        public LocationManager(
            string path,
            FaultManager faultManager)
        {
            this.needsSaving     = false;
            this.locationFactory = new LocationFactory();
            this.Locations       = new List <ILocation>();

            this.locationBasePath = path + Path.DirectorySeparatorChar + "Locations";

            this.Big4Regions =
                this.ReadListFileContents(
                    this.locationBasePath + Path.DirectorySeparatorChar + "Big4.txt");
            this.Counties =
                this.ReadListFileContents(
                    this.locationBasePath + Path.DirectorySeparatorChar + "County.txt");
            this.Lines =
                this.ReadListFileContents(
                    this.locationBasePath + Path.DirectorySeparatorChar + "Line.txt");
            this.Regions =
                this.ReadListFileContents(
                    this.locationBasePath + Path.DirectorySeparatorChar + "Region.txt");

            this.Locations = this.locationFactory.ReadLocations(
                this.locationBasePath + Path.DirectorySeparatorChar + "Location.txt",
                faultManager,
                this.Lines,
                this.Counties,
                this.Regions,
                this.Big4Regions);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initialises a new instance of the <see cref="BLManager"/> class.
        /// </summary>
        public BLManager()
        {
            //basePath = "C:\\_myDocs\\bert\\03_projects\\my_programing\\cSharpWPF\\tPix\\tPix\\bin\\Debug//testDb";
            basePath        = "C:\\_myDocs\\bert\\01_common_stuff\\ba_0811\\pics";
            randomGenerator = new Random();

            Factories.ClsNmbFactory clsNmbReader = new BL.Factories.ClsNmbFactory(basePath);
            Factories.ImageReader   reader       = new BL.Factories.ImageReader(basePath);

            this.faultManager = new BL.Model.FaultManager();

            this.locationManager =
                new BL.Model.LocationManager(
                    basePath,
                    faultManager);
            this.clsNmbManager =
                new ClsNmbManager(
                    clsNmbReader.ReadClsDetails(
                        faultManager));

            this.allImages =
                reader.ReadImages(
                    locationManager,
                    clsNmbManager,
                    faultManager);

            locationManager.Save();
        }