Imports a set of GraphML files into a set of new NodeXL workbooks.
Call ImportGraphMLFilesAsync to import the GraphML files. Call CancelAsync to stop the import. Handle the and events to monitor the progress and completion of the importation.

If a file does not contain valid GraphML, it is skipped and added to an internal list of invalid files. After the importation completes, read the InvalidGraphMLFileNames property to retrieve the names of any invalid files.

Inheritance: Object
コード例 #1
0
        //*************************************************************************
        //  Constructor: ImportFromGraphMLFilesDialog()
        //
        /// <summary>
        /// Initializes a new instance of the <see
        /// cref="ImportFromGraphMLFilesDialog" /> class.
        /// </summary>
        //*************************************************************************

        public ImportFromGraphMLFilesDialog()
        {
            InitializeComponent();

            // Instantiate an object that saves and retrieves the user settings for
            // this dialog.  Note that the object automatically saves the settings
            // when the form closes.

            m_oImportFromGraphMLFilesDialogUserSettings =
                new ImportFromGraphMLFilesDialogUserSettings(this);

            m_oGraphMLFilesImporter = new GraphMLFilesImporter();

            m_oGraphMLFilesImporter.ImportationProgressChanged +=
                new ProgressChangedEventHandler(
                    GraphMLFilesImporter_ImportationProgressChanged);

            m_oGraphMLFilesImporter.ImportationCompleted +=
                new RunWorkerCompletedEventHandler(
                    GraphMLFilesImporter_ImportationCompleted);

            DoDataExchange(false);

            AssertValid();
        }
コード例 #2
0
    //*************************************************************************
    //  Constructor: ImportFromGraphMLFilesDialog()
    //
    /// <summary>
    /// Initializes a new instance of the <see
    /// cref="ImportFromGraphMLFilesDialog" /> class.
    /// </summary>
    //*************************************************************************

    public ImportFromGraphMLFilesDialog()
    {
        InitializeComponent();

        // Instantiate an object that saves and retrieves the user settings for
        // this dialog.  Note that the object automatically saves the settings
        // when the form closes.

        m_oImportFromGraphMLFilesDialogUserSettings =
            new ImportFromGraphMLFilesDialogUserSettings(this);

        m_oGraphMLFilesImporter = new GraphMLFilesImporter();

        m_oGraphMLFilesImporter.ImportationProgressChanged +=
            new ProgressChangedEventHandler(
                GraphMLFilesImporter_ImportationProgressChanged);

        m_oGraphMLFilesImporter.ImportationCompleted +=
            new RunWorkerCompletedEventHandler(
                GraphMLFilesImporter_ImportationCompleted);

        DoDataExchange(false);

        AssertValid();
    }