C# Class Smrf.NodeXL.ExcelTemplate.GraphMLFilesImporter

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
Exibir arquivo Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Property Type Description
m_oBackgroundWorker System.ComponentModel.BackgroundWorker
m_oInvalidGraphMLFileNames List

Public Methods

Method Description
CancelAsync ( ) : void
GraphMLFilesImporter ( ) : System

Initializes a new instance of the GraphMLFilesImporter class.

ImportGraphMLFilesAsync ( String sourceFolderPath, String destinationFolderPath ) : void

Protected Methods

Method Description
BackgroundWorker_DoWork ( object sender, DoWorkEventArgs e ) : void
BackgroundWorker_ProgressChanged ( object sender, ProgressChangedEventArgs e ) : void
BackgroundWorker_RunWorkerCompleted ( object sender, RunWorkerCompletedEventArgs e ) : void
ImportGraphMLFilesInternal ( ImportGraphMLFilesAsyncArgs oImportGraphMLFilesAsyncArgs, BackgroundWorker oBackgroundWorker, DoWorkEventArgs oDoWorkEventArgs ) : void
OnXmlException ( String sGraphMLFileName, XmlException oXmlException ) : void

Private Methods

Method Description
AssertValid ( ) : void

Method Details

BackgroundWorker_DoWork() protected method

protected BackgroundWorker_DoWork ( object sender, DoWorkEventArgs e ) : void
sender object
e System.ComponentModel.DoWorkEventArgs
return void

BackgroundWorker_ProgressChanged() protected method

protected BackgroundWorker_ProgressChanged ( object sender, ProgressChangedEventArgs e ) : void
sender object
e System.ComponentModel.ProgressChangedEventArgs
return void

BackgroundWorker_RunWorkerCompleted() protected method

protected BackgroundWorker_RunWorkerCompleted ( object sender, RunWorkerCompletedEventArgs e ) : void
sender object
e System.ComponentModel.RunWorkerCompletedEventArgs
return void

CancelAsync() public method

public CancelAsync ( ) : void
return void

GraphMLFilesImporter() public method

Initializes a new instance of the GraphMLFilesImporter class.
public GraphMLFilesImporter ( ) : System
return System

ImportGraphMLFilesAsync() public method

public ImportGraphMLFilesAsync ( String sourceFolderPath, String destinationFolderPath ) : void
sourceFolderPath String
destinationFolderPath String
return void

ImportGraphMLFilesInternal() protected method

protected ImportGraphMLFilesInternal ( ImportGraphMLFilesAsyncArgs oImportGraphMLFilesAsyncArgs, BackgroundWorker oBackgroundWorker, DoWorkEventArgs oDoWorkEventArgs ) : void
oImportGraphMLFilesAsyncArgs ImportGraphMLFilesAsyncArgs
oBackgroundWorker System.ComponentModel.BackgroundWorker
oDoWorkEventArgs System.ComponentModel.DoWorkEventArgs
return void

OnXmlException() protected method

protected OnXmlException ( String sGraphMLFileName, XmlException oXmlException ) : void
sGraphMLFileName String
oXmlException System.Xml.XmlException
return void

Property Details

m_oBackgroundWorker protected_oe property

protected BackgroundWorker,System.ComponentModel m_oBackgroundWorker
return System.ComponentModel.BackgroundWorker

m_oInvalidGraphMLFileNames protected_oe property

protected List m_oInvalidGraphMLFileNames
return List