public static void ForEachContainer(int startId, System.Func <FlowWindow, string, string> each, string accumulate = "") { var window = FlowSystem.GetWindow(startId); if (window.IsContainer() == true) { accumulate += each(window, accumulate); var childs = window.attachItems; foreach (var child in childs) { FlowSystem.ForEachContainer(child.targetId, each, accumulate); } } }