Ejemplo n.º 1
0
        private void checkReportdir()
        {
            List <string> csvFiles     = DirectoryImport.importDirFiles(_csvFolderPath, "*.csv", false);
            List <string> csvFileNames = new List <string>();

            foreach (string csv in csvFiles)
            {
                string name = Path.GetFileNameWithoutExtension(csv);
                csvFileNames.Add(name);
            }

            lib_csv_dir.DataSource    = csvFileNames;
            lib_csv_dir.SelectedIndex = csvFileNames.Count - 1;
        }
Ejemplo n.º 2
0
        //BUTTON
        private void btn_check_csv_Click(object sender, EventArgs e)
        {
            csvFileReader    reader     = new csvFileReader(_csvFilePath, _incastClass);
            List <ArrayList> parsedData = reader.importCSV();
            List <string>    _pdfFiles  = DirectoryImport.importDirFiles(_pdfFolderPath, "*.pdf", true);
            List <string>    _dwgFiles  = DirectoryImport.importDirFiles(_dwgFolderPath, "*.dwg", true);

            _reportData = new ElementDataGroup(parsedData, _pdfFiles, _dwgFiles);
            _reportData.buildData();
            _reportData.findDrawingHandler(_drawingType);

            report_labels_update();
            report_list_update();
        }
Ejemplo n.º 3
0
        private void checkDrawingDir()
        {
            List <string> pdfFiles = DirectoryImport.importDirFiles(_pdfFolderPath, "*.pdf", true);
            List <string> dwgFiles = DirectoryImport.importDirFiles(_dwgFolderPath, "*.dwg", true);

            lbl_pdf_dir_main.Text = "PDF:     " + _pdfFolderPath;
            lbl_dwg_dir_main.Text = "DWG:   " + _pdfFolderPath;

            lv_pdf_dir.Clear();
            lv_pdf_dir.Columns.Add("Name");
            lv_pdf_dir.Columns.Add("Path");

            foreach (string path in pdfFiles)
            {
                string name      = Path.GetFileNameWithoutExtension(path);
                string shortPath = path.Replace(_pdfFolderPath, "");
                lv_pdf_dir.Items.Add(name).SubItems.Add(shortPath);
            }

            lv_pdf_dir.Columns[0].Width = -2;
            lv_pdf_dir.Columns[1].Width = -2;

            lv_dwg_dir.Clear();
            lv_dwg_dir.Columns.Add("Name");
            lv_dwg_dir.Columns.Add("Path");

            foreach (string path in dwgFiles)
            {
                string name      = Path.GetFileNameWithoutExtension(path);
                string shortPath = path.Replace(_pdfFolderPath, "");
                lv_dwg_dir.Items.Add(name).SubItems.Add(shortPath);
            }

            lv_dwg_dir.Columns[0].Width = -2;
            lv_dwg_dir.Columns[1].Width = -2;
        }