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
ファイルを表示 Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Property Type Description
m_oBackgroundWorker System.ComponentModel.BackgroundWorker

Public Methods

Method 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.

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
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

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

CloneVertexIntoSubgraph() protected method

protected CloneVertexIntoSubgraph ( IVertex oOriginalVertex, IGraph oSubgraph, Decimal decLevels ) : IVertex
oOriginalVertex IVertex
oSubgraph IGraph
decLevels Decimal
return IVertex

CreateAndSaveSubgraphImageInFolder() protected method

protected CreateAndSaveSubgraphImageInFolder ( IGraph oSubgraph, String sVertexName, CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs ) : void
oSubgraph IGraph
sVertexName String
oCreateSubgraphImagesAsyncArgs CreateSubgraphImagesAsyncArgs
return void

CreateAndSaveSubgraphImages() protected method

protected CreateAndSaveSubgraphImages ( IGraph oSubgraph, String sVertexName, CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs, TemporaryImages oThumbnailImages ) : void
oSubgraph IGraph
sVertexName String
oCreateSubgraphImagesAsyncArgs CreateSubgraphImagesAsyncArgs
oThumbnailImages TemporaryImages
return void

CreateAndSaveThumbnailImage() protected method

protected CreateAndSaveThumbnailImage ( IGraph oSubgraph, String sVertexName, CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs, TemporaryImages oThumbnailImages ) : void
oSubgraph IGraph
sVertexName String
oCreateSubgraphImagesAsyncArgs CreateSubgraphImagesAsyncArgs
oThumbnailImages TemporaryImages
return void

CreateGraphDrawingContext() protected method

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

CreateLayout() protected method

protected CreateLayout ( LayoutUserSettings oLayoutUserSettings ) : ILayout
oLayoutUserSettings LayoutUserSettings
return ILayout

CreateNodeXLVisual() protected method

protected CreateNodeXLVisual ( GeneralUserSettings oGeneralUserSettings ) : NodeXLVisual
oGeneralUserSettings GeneralUserSettings
return Smrf.NodeXL.Visualization.Wpf.NodeXLVisual

CreateSubgraph() protected method

protected CreateSubgraph ( IVertex oOriginalVertex, CreateSubgraphImagesAsyncArgs oCreateSubgraphImagesAsyncArgs ) : IGraph
oOriginalVertex IVertex
oCreateSubgraphImagesAsyncArgs CreateSubgraphImagesAsyncArgs
return IGraph

CreateSubgraphImage() protected method

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

CreateSubgraphImagesAsync() public method

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
return void

CreateSubgraphImagesInternal() protected method

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

SaveBitmap() protected method

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

SaveSubgraphImage() protected method

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

SubgraphImageCreator() public method

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

Property Details

m_oBackgroundWorker protected_oe property

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