Example #1
0
        private void bindXMLBeforeGridData()
        {
            string         filePath   = "";
            OpenFileDialog fileDialog = new OpenFileDialog();

            fileDialog.Multiselect = false;
            fileDialog.Filter      = "XML file|*.xml";
            fileDialog.DefaultExt  = ".xml";
            Nullable <bool> dialogOK = fileDialog.ShowDialog();

            if (dialogOK == true)
            {
                filePath = fileDialog.FileName;
            }
            try
            {
                BrowseTextBlockPath.Text       = filePath.Substring(0, 3) + "(...)" + filePath.Substring(filePath.Length - 20, 20);
                BrowseTextBlockPath.Visibility = Visibility.Visible;
                var xml_reader = new ZPI_Projekt_Anonimizator.Parsers.XMLParser();

                patientDataGenerated = xml_reader.parseDocument(filePath);

                XMLbeforeDataGrid.DataContext = patientDataGenerated.DefaultView;
                XMLbeforeDataGrid.Visibility  = Visibility.Visible;
            }
            catch (Exception ex)
            {
                promptUser("Unable to retrieve patient data. Please try again.");
            }
        }
Example #2
0
 public void Setup()
 {
     XMLParser = new ZPI_Projekt_Anonimizator.Parsers.XMLParser();
     path      = Directory.GetParent(Environment.CurrentDirectory).Parent.Parent.FullName + @"\resource\XML_files\test.xml";
 }
Example #3
0
 public void Setup()
 {
     anon      = new ZPI_Projekt_Anonimizator.Algorithm.Anonymization();
     XMLParser = new ZPI_Projekt_Anonimizator.Parsers.XMLParser();
 }