Exemplo n.º 1
0
        private void FrameAnalysisCreated(DirectoryInfo directory)
        {
            var inputFile  = directory.File($"log{FrameAnalysis.Extension}");
            var outputFile = inputFile.ChangeExt(CSV.Extension);
            var logFile    = directory.File("conversion.log");

            using var logging = logFile.TryOpenWrite(ui);
            using var output  = outputFile.TryOpenWrite(ui);
            if (output != null && logging != null && data.LoadLog(inputFile, msg => logging.WriteLine(msg)))
            {
                LogWriter.Write(data, output);
                ui.Event($"Conversion success: {directory.Name}");
                return;
            }
            ui.Event($"Conversion failure: {directory.Name}");
        }
Exemplo n.º 2
0
 private static bool GetValidLog(FileInfo?initial, [NotNullWhen(true)] out FileInfo file)
 {
     return(ui.GetFile($"frame analysis log file (log{FrameAnalysis.Extension})", FrameAnalysis.Extension, initial, out file) &&
            loadedData.LoadLog(file, ui.Event));
 }