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); }
//************************************************************************* // 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); }