コード例 #1
0
        public static void ClearDisplays(this IGraphSceneDisplayMesh <IVisual, IVisualEdge> mesh)
        {
            mesh.Displays
            .Where(d => d.Data != null)
            .ToArray()
            .ForEach(d => {
                mesh.ClearDisplaysOf(d.Data);
                mesh.RemoveScene(d.Data);
            });


            mesh.Scenes.ToArray().ForEach(s => mesh.RemoveScene(s));
        }
コード例 #2
0
        public static void RemoveBackGraph(this IGraphSceneDisplayMesh <IVisual, IVisualEdge> mesh, IThingGraph backGraph)
        {
            var backMesh = mesh.BackHandler <IThing, ILink> ();

            mesh.Displays
            .Join(backMesh.ScenesOfBackGraph(backGraph),
                  d => d.Data,
                  s => s, (d, s) => d)
            .ForEach(d => {
                mesh.ClearDisplaysOf(d.Data);
                mesh.RemoveScene(d.Data);
            });

            backMesh.ScenesOfBackGraph(backGraph).ToArray().ForEach(s => mesh.RemoveScene(s));
            backMesh.UnregisterBackGraph(backGraph);
        }