internal class Program {
private static async Task Main (string[] args) {
const string filename = "example-sequence-1.atmpx";
using (var atmpx = Channel.Atmpx.Open (filename)) {
// load autosequence group.
var info = (await atmpx.GetAutoSequenceGroups ()).FirstOrDefault ();
var group = await atmpx.DownloadAutoSequenceGroup (info);
// access all autosequences contained in the group
foreach (var sequence in group.TreeView.GetAllAutoSequences ()) {
Console.WriteLine ($"Sequence = {sequence.Header.Name}");
}
// browse group tree
foreach (var node in group.TreeView.Children) {
switch (node) {
case FolderAutoSequenceTreeViewNode folder:
Console.WriteLine ($"Folder = {folder.Name} >> Has {folder.Children.Count} children.");
break;
case ValueAutoSequenceTreeViewNode sequenceNode:
Console.WriteLine ($"Sequence = {sequenceNode.AutoSequence.Header.Name}");
break;
case ShortcutAutoSequenceTreeViewNode shortcutNode:
Console.WriteLine ($"Shortcut sequence = {shortcutNode.AutoSequence.Header.Name}");
break;
}
}
}
}
}
C#