Aspose.Diagram.Examples.CSharp.Working_Shapes.Working_with_Shapes_Gluing.GetGluedConnectors.Run C# (CSharp) Метод

Run() публичный статический Метод

public static Run ( ) : void
Результат void
        public static void Run()
        {
            // ExStart:GetGluedConnectors
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_Shapes();

            // Call a Diagram class constructor to load the VSD diagram
            Diagram diagram = new Diagram(dataDir + "RetrieveShapeInfo.vsd");
            // Get shape by an ID
            Shape shape = diagram.Pages[0].Shapes.GetShape(90);
            // Get all glued 1D shapes
            long[] gluedShapeIds = shape.GluedShapes(GluedShapesFlags.GluedShapesAll1D, null, null);

            // Display shape ID and name
            foreach (long id in gluedShapeIds)
            {
                shape = diagram.Pages[0].Shapes.GetShape(id);
                Console.WriteLine("ID: " + shape.ID + "\t\t Name: " + shape.Name);
            }
            // ExEnd:GetGluedConnectors
        }
    }
GetGluedConnectors