OutlineCodeDefinition Class

Represents an outline code definition.
Inheritance Hierarchy
SystemObject
  Aspose.TasksOutlineCodeDefinition

Namespace:  Aspose.Tasks
Assembly:  Aspose.Tasks (in Aspose.Tasks.dll) Version: 21.10
Syntax
public class OutlineCodeDefinition

The OutlineCodeDefinition type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleOutlineCodeDefinition
Initializes a new instance of the OutlineCodeDefinition class.
Properties
  NameDescription
Public propertyCode exampleAlias
Gets or sets the alias of a custom outline code.
Public propertyCode exampleAllLevelsRequired
Gets or sets a value indicating whether the new codes must have all levels. Not available for Enterprise Codes.
Public propertyCode exampleEnterprise
Gets or sets a value indicating whether a custom outline code is an enterprise custom outline code.
Public propertyCode exampleEnterpriseOutlineCodeAlias
Gets or sets a reference to another custom field for which this outline code definition is an alias.
Public propertyCode exampleFieldId
Gets or sets the field number of an outline code.
Public propertyCode exampleFieldName
Gets or sets the name of a custom outline code.
Public propertyCode exampleGuid
Gets or sets the Guid of an outline code.
Public propertyCode exampleLeafOnly
Gets or sets a value indicating whether the values specified in this outline code field must be leaf values.
Public propertyCode exampleMasks
Gets the OutlineMaskCollection object. The table of entries that define the outline code mask. Read-only OutlineMaskCollection instance.
Public propertyCode exampleOnlyTableValuesAllowed
Gets or sets a value indicating whether the values specified must come from values table.
Public propertyCode examplePhoneticAlias
Gets or sets the phonetic pronunciation of the alias of the custom outline code.
Public propertyCode exampleResourceSubstitutionEnabled
Gets or sets a value indicating whether the custom outline code can be used by the Resource Substitution Wizard in Microsoft Project.
Public propertyCode exampleShowIndent
Gets or sets a value indicating whether the indents of this outline code must be shown.
Public propertyCode exampleValues
Gets OutlineValueCollection object. The values of the table associated with this outline code.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Examples
Shows how to work with outline code definitions.
var project = new Project(DataDir + "OutlineValues2010.mpp");

// create a new outline code definition
var outline = new OutlineCodeDefinition();

// set the field number of an outline code
outline.FieldId = ExtendedAttributeTask.OutlineCode7.ToString("D");

// set the name of a custom outline code
outline.FieldName = "Outline Code1";

// set the Guid of an outline code
outline.Guid = "e6afac06-0d86-4359-a96c-db705e3d2ca8";

// set a value indicating whether the values specified in this outline code field must be leaf values
outline.LeafOnly = false;

// set the alias of a custom outline code
outline.Alias = "My Outline Code";

// set the phonetic pronunciation of the alias of the custom outline code
outline.PhoneticAlias = "Outline Code";

// set a value indicating whether the new codes must have all levels. Not available for Enterprise Codes.
outline.AllLevelsRequired = true;

// set a value indicating whether a custom outline code is an enterprise custom outline code
outline.Enterprise = false;

// set a reference to another custom field for which this outline code definition is an alias
outline.EnterpriseOutlineCodeAlias = 0;

// add an outline mask
var mask = new OutlineMask();
mask.Type = MaskType.Characters;
outline.Masks.Add(mask);

// set a value indicating whether the values specified must come from values table
outline.OnlyTableValuesAllowed = false;

// set a value indicating whether the custom outline code can be used
// by the Resource Substitution Wizard in Microsoft Project
outline.ResourceSubstitutionEnabled = false;

// set a value indicating whether the indents of this outline code must be shown.
outline.ShowIndent = false;

project.OutlineCodes.Add(outline);

var value = new OutlineValue();
value.Value = "Text value 1";
value.ValueId = 1;
value.Type = OutlineValueType.Text;
value.Description = "Text value descr 1";
outline.Values.Add(value);

// ...
See Also