Exemple #1
0
 private void SaveXsltThreadSafe(IdReGenerator idReGenerator)
 {
     if (InvokeRequired)
     {
         SaveXsltCallback d = SaveXslt;
         Invoke(d, idReGenerator);
     }
     else
     {
         SaveXslt(idReGenerator);
     }
 }
Exemple #2
0
        private void SaveXslt(IdReGenerator idReGenerator)
        {
            if (saveXslDialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            var fileName = saveXslDialog.FileName;

            Log("# Saving XSLT...");
            File.WriteAllText(fileName, idReGenerator.ReshapingXsl.ToString());
            Log($"# XSLT saved as '{fileName}'.");
        }
Exemple #3
0
        private void RegenerateIds()
        {
            if (!IsFolderSelected)
            {
                Log("WARNING: No folder selected: operating in execution directory.");
            }
            var paths = GetFilePaths(true);

            if (paths == null)
            {
                return;
            }
            var reshaper = new IdReGenerator(paths[0], paths.Skip(1).ToList(), Log);

            reshaper.RegenerateIds();
            SaveXsltThreadSafe(reshaper);
        }