public SiemensProject LoadStructureSiemens(string pathFolder, ILogging logging)
        {
            var filesNameGetter = new SiemensXmlDataFilesNameGetter { LocationDirectory = pathFolder };

            var docFilesGetter = new SiemensDocsFilesNameGetter { LocationDirectory = pathFolder };

            var filesArticlesFactory = new FilesArticlesFactory(filesNameGetter);
            var siemensProjectLoader = new SiemensProjectLoader(filesArticlesFactory, logging, docFilesGetter);

            return siemensProjectLoader.LoadStructureProject();
        }
Esempio n. 2
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(buttonEdit1.Text) && Directory.Exists(buttonEdit1.Text))
            {
                var filesNameGetter = new SiemensXmlDataFilesNameGetter();
                filesNameGetter.LocationDirectory = buttonEdit1.Text;
                var filesArticlesFactory = new FilesArticlesFactory(filesNameGetter);
                var siemensProjectLoader = new SiemensProjectLoader(filesArticlesFactory);

                var project = siemensProjectLoader.LoadStructureProject();
            }
        }
Esempio n. 3
0
        public void LoadStructureProjectTest()
        {
            var filesNameGetter = new SiemensXmlDataFilesNameGetter();
            var docsFilesGetter = new SiemensDocsFilesNameGetter();

            docsFilesGetter.LocationDirectory = filesNameGetter.LocationDirectory = @"D:\Siemens\Y53_00_146-01_B_Бак";

            var filesArticlesFactory = new FilesArticlesFactory(filesNameGetter);
            var siemensProjectLoader = new SiemensProjectLoader(filesArticlesFactory, null, docsFilesGetter);

            var project = siemensProjectLoader.LoadStructureProject();
        }