C# Class Smrf.NodeXL.ExcelTemplate.SubgraphImageCreator

Creates images of a subgraph for each of a graph's vertices and saves the images to disk.
Call CreateSubgraphImagesAsync to create the images. Call CancelAsync to stop the creation of images. Handle the and events to monitor the progress and completion of image creation.
Inheritance: Object
Afficher le fichier Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Свойство Type Description
m_oBackgroundWorker System.ComponentModel.BackgroundWorker

Méthodes publiques

Méthode Description
CancelAsync ( ) : void
CreateSubgraphImagesAsync ( IGraph graph, ICollection selectedVertices, Decimal levels, System.Boolean saveToFolder, String folder, Size imageSizePx, ImageFormat imageFormat, System.Boolean createThumbnails, Size thumbnailSizePx, System.Boolean selectedVerticesOnly, System.Boolean selectVertex, System.Boolean selectIncidentEdges, GeneralUserSettings generalUserSettings, LayoutUserSettings layoutUserSettings ) : void
SubgraphImageCreator ( ) : System

Initializes a new instance of the SubgraphImageCreator class.

Méthodes protégées

Méthode Description
BackgroundWorker_DoWork ( object sender, DoWorkEventArgs e ) : void
BackgroundWorker_ProgressChanged ( object sender, ProgressChangedEventArgs e ) : void
BackgroundWorker_RunWorkerCompleted ( object sender, RunWorkerCompletedEventArgs e ) : void
CloneVertexIntoSubgraph ( IVertex oOriginalVertex, IGraph oSubgraph, Decimal decLevels ) : IVertex
CreateAndSaveSubgraphImageInFolder ( IGraph oSubgraph, String sVertexName, CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs ) : void
CreateAndSaveSubgraphImages ( IGraph oSubgraph, String sVertexName, CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs, TemporaryImages oThumbnailImages ) : void
CreateAndSaveThumbnailImage ( IGraph oSubgraph, String sVertexName, CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs, TemporaryImages oThumbnailImages ) : void
CreateGraphDrawingContext ( Rectangle oSubgraphRectangle, GeneralUserSettings oGeneralUserSettings ) : GraphDrawingContext
CreateLayout ( LayoutUserSettings oLayoutUserSettings ) : ILayout
CreateNodeXLVisual ( GeneralUserSettings oGeneralUserSettings ) : NodeXLVisual
CreateSubgraph ( IVertex oOriginalVertex, CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs ) : IGraph
CreateSubgraphImage ( IGraph oSubgraph, CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs, Size oImageSizePx ) : Bitmap
CreateSubgraphImagesInternal ( CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs, BackgroundWorker oBackgroundWorker, DoWorkEventArgs oDoWorkEventArgs ) : void
SaveBitmap ( Bitmap oBitmap, String sFileNameWithPath, ImageFormat eImageFormat ) : void
SaveSubgraphImage ( Bitmap oBitmap, String sFolder, String sVertexName, CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs ) : String

Private Methods

Méthode Description
AssertValid ( ) : void

Method Details

BackgroundWorker_DoWork() protected méthode

protected BackgroundWorker_DoWork ( object sender, DoWorkEventArgs e ) : void
sender object
e System.ComponentModel.DoWorkEventArgs
Résultat void

BackgroundWorker_ProgressChanged() protected méthode

protected BackgroundWorker_ProgressChanged ( object sender, ProgressChangedEventArgs e ) : void
sender object
e System.ComponentModel.ProgressChangedEventArgs
Résultat void

BackgroundWorker_RunWorkerCompleted() protected méthode

protected BackgroundWorker_RunWorkerCompleted ( object sender, RunWorkerCompletedEventArgs e ) : void
sender object
e System.ComponentModel.RunWorkerCompletedEventArgs
Résultat void

CancelAsync() public méthode

public CancelAsync ( ) : void
Résultat void

CloneVertexIntoSubgraph() protected méthode

protected CloneVertexIntoSubgraph ( IVertex oOriginalVertex, IGraph oSubgraph, Decimal decLevels ) : IVertex
oOriginalVertex IVertex
oSubgraph IGraph
decLevels Decimal
Résultat IVertex

CreateAndSaveSubgraphImageInFolder() protected méthode

protected CreateAndSaveSubgraphImageInFolder ( IGraph oSubgraph, String sVertexName, CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs ) : void
oSubgraph IGraph
sVertexName String
oCreateSubgraphImagesAsyncArgs CreateSubgraphImagesAsyncArgs
Résultat void

CreateAndSaveSubgraphImages() protected méthode

protected CreateAndSaveSubgraphImages ( IGraph oSubgraph, String sVertexName, CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs, TemporaryImages oThumbnailImages ) : void
oSubgraph IGraph
sVertexName String
oCreateSubgraphImagesAsyncArgs CreateSubgraphImagesAsyncArgs
oThumbnailImages TemporaryImages
Résultat void

CreateAndSaveThumbnailImage() protected méthode

protected CreateAndSaveThumbnailImage ( IGraph oSubgraph, String sVertexName, CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs, TemporaryImages oThumbnailImages ) : void
oSubgraph IGraph
sVertexName String
oCreateSubgraphImagesAsyncArgs CreateSubgraphImagesAsyncArgs
oThumbnailImages TemporaryImages
Résultat void

CreateGraphDrawingContext() protected méthode

protected CreateGraphDrawingContext ( Rectangle oSubgraphRectangle, GeneralUserSettings oGeneralUserSettings ) : GraphDrawingContext
oSubgraphRectangle System.Drawing.Rectangle
oGeneralUserSettings GeneralUserSettings
Résultat Smrf.NodeXL.Visualization.Wpf.GraphDrawingContext

CreateLayout() protected méthode

protected CreateLayout ( LayoutUserSettings oLayoutUserSettings ) : ILayout
oLayoutUserSettings LayoutUserSettings
Résultat ILayout

CreateNodeXLVisual() protected méthode

protected CreateNodeXLVisual ( GeneralUserSettings oGeneralUserSettings ) : NodeXLVisual
oGeneralUserSettings GeneralUserSettings
Résultat Smrf.NodeXL.Visualization.Wpf.NodeXLVisual

CreateSubgraph() protected méthode

protected CreateSubgraph ( IVertex oOriginalVertex, CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs ) : IGraph
oOriginalVertex IVertex
oCreateSubgraphImagesAsyncArgs CreateSubgraphImagesAsyncArgs
Résultat IGraph

CreateSubgraphImage() protected méthode

protected CreateSubgraphImage ( IGraph oSubgraph, CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs, Size oImageSizePx ) : Bitmap
oSubgraph IGraph
oCreateSubgraphImagesAsyncArgs CreateSubgraphImagesAsyncArgs
oImageSizePx System.Drawing.Size
Résultat System.Drawing.Bitmap

CreateSubgraphImagesAsync() public méthode

public CreateSubgraphImagesAsync ( IGraph graph, ICollection selectedVertices, Decimal levels, System.Boolean saveToFolder, String folder, Size imageSizePx, ImageFormat imageFormat, System.Boolean createThumbnails, Size thumbnailSizePx, System.Boolean selectedVerticesOnly, System.Boolean selectVertex, System.Boolean selectIncidentEdges, GeneralUserSettings generalUserSettings, LayoutUserSettings layoutUserSettings ) : void
graph IGraph
selectedVertices ICollection
levels Decimal
saveToFolder System.Boolean
folder String
imageSizePx System.Drawing.Size
imageFormat System.Drawing.Imaging.ImageFormat
createThumbnails System.Boolean
thumbnailSizePx System.Drawing.Size
selectedVerticesOnly System.Boolean
selectVertex System.Boolean
selectIncidentEdges System.Boolean
generalUserSettings GeneralUserSettings
layoutUserSettings LayoutUserSettings
Résultat void

CreateSubgraphImagesInternal() protected méthode

protected CreateSubgraphImagesInternal ( CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs, BackgroundWorker oBackgroundWorker, DoWorkEventArgs oDoWorkEventArgs ) : void
oCreateSubgraphImagesAsyncArgs CreateSubgraphImagesAsyncArgs
oBackgroundWorker System.ComponentModel.BackgroundWorker
oDoWorkEventArgs System.ComponentModel.DoWorkEventArgs
Résultat void

SaveBitmap() protected méthode

protected SaveBitmap ( Bitmap oBitmap, String sFileNameWithPath, ImageFormat eImageFormat ) : void
oBitmap System.Drawing.Bitmap
sFileNameWithPath String
eImageFormat System.Drawing.Imaging.ImageFormat
Résultat void

SaveSubgraphImage() protected méthode

protected SaveSubgraphImage ( Bitmap oBitmap, String sFolder, String sVertexName, CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs ) : String
oBitmap System.Drawing.Bitmap
sFolder String
sVertexName String
oCreateSubgraphImagesAsyncArgs CreateSubgraphImagesAsyncArgs
Résultat String

SubgraphImageCreator() public méthode

Initializes a new instance of the SubgraphImageCreator class.
public SubgraphImageCreator ( ) : System
Résultat System

Property Details

m_oBackgroundWorker protected_oe property

protected BackgroundWorker,System.ComponentModel m_oBackgroundWorker
Résultat System.ComponentModel.BackgroundWorker