ResourceViewColumn Class |
Namespace: Aspose.Tasks.Visualization
The ResourceViewColumn type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | ResourceViewColumn(Int32, Field) |
Initializes a new instance of the ResourceViewColumn class.
|
![]() ![]() | ResourceViewColumn(String, Int32, ResourceToColumnTextConverter) |
Initializes a new instance of the ResourceViewColumn class.
|
![]() ![]() | ResourceViewColumn(String, Int32, ResourceToColumnTextConverter, Field) |
Initializes a new instance of the ResourceViewColumn class.
|
Name | Description | |
---|---|---|
![]() ![]() | Field |
Column field.
Field.
(Overrides ViewColumnField.) |
![]() ![]() | Name |
Gets the column name.
(Inherited from ViewColumn.) |
![]() ![]() | StringAlignment |
Gets or sets alignment of the text (can be one of the values of the StringAlignment enumeration).
(Inherited from ViewColumn.) |
![]() ![]() | TextStyleModificationCallback |
Gets or sets the callback which can be used to customize the appearance of the column's cells.
(Inherited from ViewColumn.) |
![]() ![]() | Width |
Gets the column width.
(Inherited from ViewColumn.) |
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() ![]() | GetColumnText |
Converts current resource to the column text.
|
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
var project = new Project(DataDir + "Project2.mpp"); var resource = project.Resources.GetById(1); var options = new PdfSaveOptions(); var columns = new List<ViewColumn> { new ResourceViewColumn(100, Field.ResourceName), new ResourceViewColumn(100, Field.ResourceActualWork), new ResourceViewColumn(100, Field.ResourceCost), new ResourceViewColumn( "Resource Cost2", 80, delegate(Resource res) { return res.Get(Rsc.Cost).ToString(CultureInfo.InvariantCulture); }), new ResourceViewColumn( "Resource Cost2", 80, delegate(Resource res) { return res.Get(Rsc.Cost).ToString(CultureInfo.InvariantCulture); }, Field.ResourceCost2) }; // iterate over columns foreach (var column in columns) { var col = (ResourceViewColumn)column; Console.WriteLine("Column Name: " + col.Name); Console.WriteLine("Column Field: " + col.Field); Console.WriteLine("Column Text: " + col.GetColumnText(resource)); Console.WriteLine(); } options.View = new ProjectView(columns); options.PresentationFormat = PresentationFormat.ResourceUsage; project.Save(OutDir + "WorkWithAssignmentViewColumn_out.pdf", options);