Example #1
0
 public void showDOCXData(String path)
 {
     try
     {
         var docx_parser = new ZPI_Projekt_Anonimizator.Parsers.DOCXParser();
         var table       = docx_parser.parseDocument(path);
         if (table == null)
         {
             promptUser("An error ocurred, unable to open the docx file." + path);
         }
         else
         {
             var values = table.Rows[0].ItemArray;
             TextLine0.Text = "Patient: " + table.Columns[0].ColumnName + " " + values[0] + ", " + values[1] + " " + values[2];;
             TextLine1.Text = table.Columns[3].ColumnName + ", " + table.Columns[4].ColumnName + ": " + values[3] + ", " + values[4];
             TextLine2.Text = table.Columns[5].ColumnName + ": " + values[5];
             TextLine3.Text = table.Columns[6].ColumnName + ": " + values[6];
             TextLine4.Text = table.Columns[7].ColumnName + ": " + values[7];
             TextLine5.Text = table.Columns[8].ColumnName + ": " + values[8] + "\n\nPATH: " + path;
             MetadataDocumentView.Visibility = Visibility.Visible;
         }
     }
     catch (Exception ex)
     {
         promptUser("An error ocurred, unable to open the docx file.");
     }
 }
Example #2
0
 public void Setup()
 {
     DOCXParser = new ZPI_Projekt_Anonimizator.Parsers.DOCXParser();
     path       = Directory.GetParent(Environment.CurrentDirectory).Parent.Parent.FullName + @"\resource\DOCX_files\test.docx";
 }