Ejemplo n.º 1
0
 private static void ExportUserFolderDeep(TagUserFolder rootUserFolder)
 {
     foreach (TagUserFolder userFolder in rootUserFolder.Folders)
     {
         ExportUserFolderDeep(userFolder);
     }
     ExportTablesInUserFolder(rootUserFolder);
 }
Ejemplo n.º 2
0
        private static void ExportTablesInUserFolder(TagUserFolder folderToExport)
        {
            TagTableComposition tables = folderToExport.TagTables;

            foreach (TagTable table in tables)
            {
                string extension = ".xml";
                var    fileInfo  = new FileInfo(exportLocation + @"\hmi_tag_tables\xml\" + table.Name + extension);
                try
                {
                    if (File.Exists(fileInfo.FullName))
                    {
                        File.Delete(fileInfo.FullName);
                    }
                    Console.WriteLine(table.Name + " to " + fileInfo.FullName);
                    table.Export(fileInfo, ExportOptions.WithDefaults);
                }
                catch (Exception exc)
                {
                    Console.WriteLine(exc.ToString());
                }
            }
        }