Пример #1
0
        OpenObject
        (
            String sFileName,
            out Object oObject
        )
        {
            Debug.Assert(!String.IsNullOrEmpty(sFileName));
            Debug.Assert(File.Exists(sFileName));
            AssertValid();

            oObject = null;

            // Use a graph adapter to create a graph from the file.

            IGraphAdapter oPajekGraphAdapter = new PajekGraphAdapter();

            oObject = oPajekGraphAdapter.LoadGraphFromFile(sFileName);
        }
Пример #2
0
        //*************************************************************************
        //  Method: OpenObject()
        //
        /// <summary>
        /// Opens a graph data file and creates a graph object from it.
        /// </summary>
        ///
        /// <param name="sFileName">
        /// File name to open, including a full path.
        /// </param>
        ///
        /// <param name="oObject">
        /// Where the new graph object get stored.
        /// </param>
        ///
        /// <remarks>
        /// This is called by the base-class ShowDialogAndOpenObject() method.
        /// </remarks>
        //*************************************************************************
        protected override void OpenObject(
            String sFileName,
            out Object oObject
            )
        {
            Debug.Assert( !String.IsNullOrEmpty(sFileName) );
            Debug.Assert( File.Exists(sFileName) );
            AssertValid();

            oObject = null;

            // Use a graph adapter to create a graph from the file.

            IGraphAdapter oPajekGraphAdapter = new PajekGraphAdapter();

            oObject = oPajekGraphAdapter.LoadGraphFromFile(sFileName);
        }