예제 #1
0
        public void showJPGMetadata(String path)
        {
            try
            {
                var jpg_parser = new ZPI_Projekt_Anonimizator.Parsers.JPGParser();

                var table = jpg_parser.parseDocument(path);
                if (table == null || path == "")
                {
                    promptUser("An error ocurred, unable to open the jpg file." + path);
                }
                else
                {
                    var values = table.Rows[0].ItemArray;
                    TextLine0.Text = table.Columns[0].ColumnName + ": " + values[0];
                    TextLine1.Text = table.Columns[1].ColumnName + ": " + values[1];
                    TextLine2.Text = table.Columns[2].ColumnName + ": " + values[2];
                    TextLine3.Text = table.Columns[3].ColumnName + ": " + values[3];
                    TextLine4.Text = table.Columns[4].ColumnName + ": " + values[4];
                    TextLine5.Text = "PATH: " + path;
                    MetadataDocumentView.Visibility = Visibility.Visible;
                }
            }
            catch (Exception ex)
            {
                promptUser("An error ocurred, unable to open the jpg file." + path);
            }
        }
예제 #2
0
 public void Setup()
 {
     JPGParser = new ZPI_Projekt_Anonimizator.Parsers.JPGParser();
     path      = Directory.GetParent(Environment.CurrentDirectory).Parent.Parent.FullName + @"\resource\JPG_files\test.jpg";
 }