Specifies the type of a mask.
Namespace:
Aspose.Tasks
Assembly:
Aspose.Tasks (in Aspose.Tasks.dll) Version: 21.10
SyntaxPublic Enumeration MaskType
public enum class MaskType
Members
| Member name | Value | Description |
---|
| Null | 0 |
Indicates Null mask type.
|
| Numbers | 1 |
Indicates Numbers mask type.
|
| UpperCaseLetters | 2 |
Indicates UpperCaseLetters mask type.
|
| LowerCaseLetters | 3 |
Indicates LowerCaseLetters mask type.
|
| Characters | 4 |
Indicates Characters mask type.
|
| Val4 | 5 |
Indicates Lookup for Cost mask type.
|
| Val5 | 6 |
Indicates Lookup for Dates mask type.
|
| Val6 | 7 |
Indicates Lookup for Durations mask type.
|
| Val7 | 8 |
Indicates Lookup for Numbers mask type.
|
| Val8 | 9 |
Indicates Lookup for Flags mask type.
|
| Val9 | 10 |
Indicates Lookup for FinishDate mask type.
|
ExamplesShows how to work with outline mask collections.
var project = new Project(DataDir + "OutlineValues2010.mpp");
var outline = project.OutlineCodes[0];
if (outline.Masks.Count > 0)
{
if (!outline.Masks.IsReadOnly)
{
outline.Masks.Clear();
}
}
var mask = new OutlineMask();
mask.Type = MaskType.Characters;
var maskWrong = new OutlineMask();
maskWrong.Type = MaskType.Null;
outline.Masks.Add(mask);
outline.Masks.Insert(0, maskWrong);
var idx = outline.Masks.IndexOf(mask);
outline.Masks[idx].Length = 2;
var idxOfWrong = outline.Masks.IndexOf(maskWrong);
outline.Masks.RemoveAt(idxOfWrong);
foreach (var outlineMask in outline.Masks)
{
Console.WriteLine("Length: " + outlineMask.Length);
Console.WriteLine("Level: " + outlineMask.Level);
Console.WriteLine("Separator: " + outlineMask.Separator);
Console.WriteLine("Type: " + outlineMask.Type);
}
var otherProject = new Project(DataDir + "OutlineValues2010.mpp");
var otherOutline = otherProject.OutlineCodes[0];
var masks = new OutlineMask[outline.Masks.Count];
outline.Masks.CopyTo(masks, 0);
foreach (var maskToAdd in masks)
{
if (!otherOutline.Masks.Contains(maskToAdd))
{
otherOutline.Masks.Add(maskToAdd);
}
}
See Also