コード例 #1
0
        public ExcelProject LoadStructureExcel(string pathFolder, ILogging logging)
        {
            var docFilesGetter = new ExcelDocsFilesNameGetter {LocationDirectory = pathFolder};

            var siemensProjectLoader = new ExcelProjectLoader(docFilesGetter, logging);

            return siemensProjectLoader.LoadStructureProject();
        }
コード例 #2
0
        public void ReloadFiles(string pathFolder)
        {
            var docFilesGetter = new ExcelDocsFilesNameGetter {LocationDirectory = pathFolder};
            var taskList = new List<Task>();
            var list = _drawingsDataManager.GetListCollection();

            foreach (var drawing in list)
            {
                drawing.Files =
                    docFilesGetter.GetFilesByNameDrawing(drawing.Designation).Select(x => new UppyFileInfo() {FileName = x}).ToList();

                taskList.Add(_factory.StartNew(() =>
                {
                    LoadFiles(drawing, list);
                }));
            }

            Task.WaitAll(taskList.ToArray());

            foreach (var drawing in list)
            {
                _drawingsDataManager.Update(drawing);
            }
        }