1.0.6
This commit is contained in:
@@ -1,11 +1,22 @@
|
||||
using System.Xml;
|
||||
using Hawkeye.VisionBuilder.Workflow;
|
||||
|
||||
WorkflowList workflowList = new WorkflowList();
|
||||
var file = File.OpenRead("gold_b97.hrcp");
|
||||
using (var br = new BinaryReader(file))
|
||||
var files = Directory.GetFiles(AppContext.BaseDirectory, "*.hrcp", SearchOption.TopDirectoryOnly);
|
||||
foreach (var file in files)
|
||||
{
|
||||
workflowList.Load(br,new OperationDiscoveryService(workflowList));
|
||||
try
|
||||
{
|
||||
Console.WriteLine($"Converting {file}");
|
||||
var f = File.OpenRead(file);
|
||||
WorkflowList list = new WorkflowList();
|
||||
list.Load(new BinaryReader(f),new OperationDiscoveryService(list));
|
||||
list.SaveJSON(Path.GetFileNameWithoutExtension(file)+".jhrcp");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Error processing file {file}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user