Class ExtendedAttributeDefinition
名称: Aspose.Tasks 集合: Aspose.Tasks.dll (25.4.0)
代表与项目相关的扩展属性定义。
[ClassInterface(ClassInterfaceType.AutoDual)]
public class ExtendedAttributeDefinition
Inheritance
object ← ExtendedAttributeDefinition
继承人
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Properties
Alias
接收或设置一个自定义字段的标签。
public string Alias { get; set; }
财产价值
AppendNewValues
收到或设置一个值,表明是否新增到项目的值会自动添加到列表中。
public bool AppendNewValues { get; set; }
财产价值
Remarks
目前支持 MSP 2003/2007 Xml 和 MSP 2003 mpp 格式。
AutoRollDown
收到或设置一个值,表明是否已启用自动滚动到任务。
public bool AutoRollDown { get; set; }
财产价值
CalculationType
接收或设置所定义属性的值计算类型。
public CalculationType CalculationType { get; set; }
财产价值
CfType
得到一个定制的字段的类型。
public CustomFieldType CfType { get; }
财产价值
Default
收到或在列表中设置默认值。
public string Default { get; set; }
财产价值
Remarks
目前支持 MSP 2003/2007 Xml 和 MSP 2003 mpp 格式。
DefaultGuid
获取或设置默认搜索表输入的指南。
public string DefaultGuid { get; set; }
财产价值
ElementType
接收或设置扩展属性是相关的一个任务,一个资源或一个任务。
public ElementType ElementType { get; set; }
财产价值
FieldId
Gets 或 Set 符合自定义字段的项目 ID。从 Aspose.Tasks.ExtendedAttributeTask 类中使用序列代表,以指定 Aspose.Tasks.ExtendedAttributeDefinition.FieldId 属性。
public string FieldId { get; set; }
财产价值
Examples
customFieldDefinition.FieldId = Aspose.Tasks.ExtendedAttributeTask.Number10.ToString("D");
Remarks
设置 Aspose.Tasks.ExtendedAttributeDefinition.FieldId 属性是创建 Aspose.Tasks.ExtendedAttributeDefinition使用一个专门的工厂方法,如Aspose.Tasks.ExtendedAttributeDefinition.CreateTaskDefinition(Aspose.Tasks.ExtendedAttributeTask,System.String)或Aspose.Tasks.ExtendedAttributeDefinition.CreateLookupTaskDefinition(Aspose.Tasks.CustomFieldType,Aspose.Tasks.ExtendedAttributeTask,System.String)。
FieldName
得到一个定义字段的名称。
public string FieldName { get; }
财产价值
Remarks
它不应该直接设置,而不是使用强烈打字的静态工厂方法创建扩展AttributeDefinition()。
Formula
获取或设置 Microsoft Project 所使用的公式来定位自定义任务字段。
public string Formula { get; set; }
财产价值
GraphicalIndicator
收到或设置与扩展属性相关的图形指标信息。适用于MPP格式。
public GraphicalIndicatorsInfo GraphicalIndicator { get; set; }
财产价值
Guid
接收或设置一个定制字段的指南。
public string Guid { get; set; }
财产价值
Remarks
目前仅支持 XML 格式。
LookupUid
获取与定制字段相关的搜索表的指南。
public string LookupUid { get; }
财产价值
Remarks
要创建一个自定义的搜索字段,使用一个工厂方法:Aspose.Tasks.ExtendedAttributeDefinition.CreateLookupTaskDefinition(Aspose.Tasks.CustomFieldType,Aspose.Tasks.ExtendedAttributeTask,System.String)或Aspose.Tasks.ExtendedAttributeDefinition.CreateLookupResourceDefinition(Aspose.Tasks.CustomFieldType,Aspose.Tasks.ExtendedAttributeResource,System.String)。
MaxMultiValues
获取或设置您可以在选项列表中设置的最大值数量。
public int MaxMultiValues { get; set; }
财产价值
Remarks
目前仅支持 XML 格式。
ParentProject
收到 Aspose.Tasks.ExtendedAttributeDefinition 案例的母项目。
public Project ParentProject { get; }
财产价值
PhoneticsAlias
获取或设置一个定制字段的标签的语音发音。
public string PhoneticsAlias { get; set; }
财产价值
Remarks
目前仅支持 XML 格式。
RestrictValues
收到或设置一个值,表明是否定制字段值仅限于 Aspose.Tasks.ExtendedAttributeDefinition.ValueList 的值。
public bool RestrictValues { get; set; }
财产价值
RollupType
接收或设置路由计算的方式。
public RollupType RollupType { get; set; }
财产价值
Remarks
写作目前仅支持Xml格式。
SecondaryGuid
接收或设置延伸属性的次要指南。
public string SecondaryGuid { get; set; }
财产价值
Remarks
此分類上一篇: MS Project 2010 Property
SecondaryPid
接收或设置一个自定义字段的次要 PID。
public string SecondaryPid { get; set; }
财产价值
SummaryRowsCalculationType
接收或设置为总结行所定义属性值的计算类型。
public SummaryRowsCalculationType SummaryRowsCalculationType { get; set; }
财产价值
UserDef
收到或设置一个值,表明是否定义为用户定义的定义字段。
public bool UserDef { get; set; }
财产价值
Remarks
目前仅支持 XML 格式。
ValueList
获取列表<Value> ValueList。
public List<value> ValueList { get; }
财产价值
Remarks
当扩展属性的值被指定为图表中的元素属性时,它们可以通过值或参考列表中的值来定义。申请人可以通过在这里规定的订单来订购列表。目前支持 MSP 2003/2007 Xml 和 MSP 2003 mpp 格式。不要直接更改此列表. 使用 ExtendedAttributeDefinition.AddLookupValue/RemoveLookupValue 方法。
ValuelistSortOrder
获取或设置值列表的序列方式 值为: 0=下跌, 1=上涨。
public int ValuelistSortOrder { get; set; }
财产价值
Remarks
目前支持 MSP 2003/2007 Xml 和 MSP 2003 mpp 格式。
Methods
AddLookupValue(Value)
将值添加到内部搜索列表中,这是使用 Aspose.Tasks.ExtendedAttributeDefinition.ValueList 进行操作的最佳方式。
public void AddLookupValue(Value value)
Parameters
value
Value
添加到 lookup 的值。
Examples
使用此代码添加新值查看列表:taskTextAttr.AddLookupValue(new Value { Id = 1, Val = "Text value 1", Description = "Text value description 1" });
Remarks
此方法仅适用于 Aspose.Tasks.ExtendedAttributeDefinition 例子有 Aspose.Tasks.ExtendedAttributeDefinition.CalculationType等于 Aspose.Tasks.CalculationType.Lookup。
CreateExtendedAttribute()
创建一个新的扩展属性与该对象的字段 ID 值等同的字段 ID 值。
public ExtendedAttribute CreateExtendedAttribute()
Returns
返回创建的例子 Aspose.Tasks.ExtendedAttribute 类与该对象的 fieldID 值等同的字段ID。
CreateExtendedAttribute(线条)
创建一个新的扩展属性与该对象的字段 ID 值和指定文本值等同的字段 ID 值。
public ExtendedAttribute CreateExtendedAttribute(string textValue)
Parameters
textValue
string
具体的文本值。
Returns
返回创建的例子 Aspose.Tasks.ExtendedAttribute 类与该对象的 fieldID 值等同的字段ID。
Exceptions
如果当前的 Aspose.Tasks.ExtendedAttributeDefinition.CfType 不是“文本”
CreateExtendedAttribute(十数)
创建一个新的扩展属性与该对象的字段 ID 值和指定的数值等同的字段 ID 值。
public ExtendedAttribute CreateExtendedAttribute(decimal numericValue)
Parameters
numericValue
decimal
指定的数字值。
Returns
返回创建的例子 Aspose.Tasks.ExtendedAttribute 类与该对象的 fieldID 值等同的字段ID。
Exceptions
如果当前的 Aspose.Tasks.ExtendedAttributeDefinition.CfType 不是“数字”或“成本”
CreateExtendedAttribute(DateTime)
创建一个新的扩展属性与该对象的字段 ID 值和指定日期值等同的字段 ID 值。
public ExtendedAttribute CreateExtendedAttribute(DateTime dateTimeValue)
Parameters
dateTimeValue
DateTime
指定日期时间值。
Returns
返回创建的例子 Aspose.Tasks.ExtendedAttribute 类与该对象的 fieldID 值等同的字段ID。
Exceptions
如果当前的 Aspose.Tasks.ExtendedAttributeDefinition.CfType 不是“日期”,“开始”或“结束”
CreateExtendedAttribute(Duration)
创建一个新的扩展属性与该对象的字段 ID 值和指定寿命值等同的字段 ID 值。
public ExtendedAttribute CreateExtendedAttribute(Duration durationValue)
Parameters
durationValue
Duration
确定的寿命值。
Returns
返回创建的例子 Aspose.Tasks.ExtendedAttribute 类与该对象的 fieldID 值等同的字段ID。
Exceptions
如果当前的 Aspose.Tasks.ExtendedAttributeDefinition.CfType 不是“长度”
CreateExtendedAttribute(博尔)
创建一个新的扩展属性与该对象的字段 ID 值和指定的旗帜值等同的字段 ID 值。
public ExtendedAttribute CreateExtendedAttribute(bool flagValue)
Parameters
flagValue
bool
指定的旗帜值。
Returns
返回创建的例子 Aspose.Tasks.ExtendedAttribute 类与该对象的 fieldID 值等同的字段ID。
Exceptions
如果当前的 Aspose.Tasks.ExtendedAttributeDefinition.CfType 不是“旗”
CreateExtendedAttribute(Value)
创建新的扩展属性与指定的 Aspose.Tasks.Value 项目相关。
public ExtendedAttribute CreateExtendedAttribute(Value lookupValue)
Parameters
lookupValue
Value
指定的 Aspose.Tasks.Value 项目。
Returns
返回创建的例子的 Aspose.Tasks.ExtendedAttribute 类链接到指定的 Aspose.Tasks.Value 项目。
Examples
使用此代码创建新的 Aspose.Tasks.ExtendedAttribute 使用特定值:
taskTextAttr.AddLookupValue(value1);
taskTextAttr.AddLookupValue(value2);
var extendedAttribute = taskTextAttr.CreateExtendedAttribute(value2);
Remarks
lookupValue’ should be previously added to the Aspose.Tasks.ExtendedAttributeDefinition using Aspose.Tasks.ExtendedAttributeDefinition.AddLookupValue(Aspose.Tasks.Value) method.
CreateLookupResourceDefinition(延伸分配资源, string)
工厂方法创建一个扩展的属性定义与 lookup.It 具有 Aspose.Tasks.ExtendedAttributeDefinition.CalculationType 等于 Aspose.Tasks.CalculationType.Lookup 并且只能在资源中使用。
public static ExtendedAttributeDefinition CreateLookupResourceDefinition(ExtendedAttributeResource fieldId, string alias)
Parameters
fieldId
ExtendedAttributeResource
指定的 Aspose.Tasks.ExtendedAttributeResource 字段 ID。
alias
string
指定的 System.String alias。
Returns
创建 Aspose.Tasks.ExtendedAttributeDefinition 类与指定 fieldId’ 和
alias'.
Examples
使用此示例创建一个自定义的字段定义的资源与搜索,然后填写它与文本值:
var resourceTextAttr = ExtendedAttributeDefinition.CreateLookupResourceDefinition(ExtendedAttributeResource.Text27, "My custom field");
resourceTextAttr.AddLookupValue(new Value { Id = 1, Val = "Text value 1", Description = "Text value description 1" });
resourceTextAttr.AddLookupValue(new Value { Id = 2, Val = "Text value 2", Description = "Text value description 2" });
project.ExtendedAttributes.Add(resourceTextAttr);
CreateLookupResourceDefinition(CustomFieldType, ExtendedAttributeResource, 字符串)
工厂方法创建一个扩展的属性定义与 lookup.It 具有 Aspose.Tasks.ExtendedAttributeDefinition.CalculationType 等于 Aspose.Tasks.CalculationType.Lookup 并且只能在资源中使用。
public static ExtendedAttributeDefinition CreateLookupResourceDefinition(CustomFieldType customFieldType, ExtendedAttributeResource fieldId, string alias)
Parameters
customFieldType
CustomFieldType
指定的 Aspose.Tasks.CustomFieldType 类型。
fieldId
ExtendedAttributeResource
指定的 Aspose.Tasks.ExtendedAttributeResource 字段 ID。
alias
string
指定的 System.String alias。
Returns
创建 Aspose.Tasks.ExtendedAttributeDefinition 类与指定 customFieldType’,
fieldId’ 和
alias'.
Examples
使用此示例创建一个自定义的字段定义的资源与搜索,然后填写它与文本值:
var resourceTextAttr = ExtendedAttributeDefinition.CreateLookupResourceDefinition(CustomFieldType.Text, ExtendedAttributeResource.Text27, "My custom field");
resourceTextAttr.AddLookupValue(new Value { Id = 1, Val = "Text value 1", Description = "Text value description 1" });
resourceTextAttr.AddLookupValue(new Value { Id = 2, Val = "Text value 2", Description = "Text value description 2" });
project.ExtendedAttributes.Add(resourceTextAttr);
CreateLookupTaskDefinition(重定向, string)
工厂方法创建一个扩展的属性定义与 lookup.It 具有 Aspose.Tasks.ExtendedAttributeDefinition.CalculationType 等于 Aspose.Tasks.CalculationType.Lookup 并且只能在任务中使用。
public static ExtendedAttributeDefinition CreateLookupTaskDefinition(ExtendedAttributeTask fieldId, string alias)
Parameters
fieldId
ExtendedAttributeTask
指定 Aspose.Tasks.ExtendedAttributeTask 字段 ID。
alias
string
指定的 System.String alias。
Returns
创建 Aspose.Tasks.ExtendedAttributeDefinition 类与指定 fieldId’ 和
alias'.
Examples
使用此示例创建一个自定义的字段定义的任务与搜索,然后填写它与文本值:
var taskTextAttr = ExtendedAttributeDefinition.CreateLookupTaskDefinition(ExtendedAttributeTask.Text27, "My custom field");
taskTextAttr.AddLookupValue(new Value { Id = 1, Val = "Text value 1", Description = "Text value description 1" });
taskTextAttr.AddLookupValue(new Value { Id = 2, Val = "Text value 2", Description = "Text value description 2" });
project.ExtendedAttributes.Add(taskTextAttr);
CreateLookupTaskDefinition(CustomFieldType, ExtendedAttributeTask, 序列)
工厂方法创建一个扩展的属性定义与 lookup.It 具有 Aspose.Tasks.ExtendedAttributeDefinition.CalculationType 等于 Aspose.Tasks.CalculationType.Lookup 并且只能在任务中使用。
public static ExtendedAttributeDefinition CreateLookupTaskDefinition(CustomFieldType customFieldType, ExtendedAttributeTask fieldId, string alias)
Parameters
customFieldType
CustomFieldType
指定的 Aspose.Tasks.CustomFieldType 类型。
fieldId
ExtendedAttributeTask
指定 Aspose.Tasks.ExtendedAttributeTask 字段 ID。
alias
string
指定的 System.String alias。
Returns
创建 Aspose.Tasks.ExtendedAttributeDefinition 类与指定 customFieldType’,
fieldId’ 和
alias'.
Examples
使用此示例创建一个自定义的字段定义的任务与搜索,然后填写它与文本值:
var taskTextAttr = ExtendedAttributeDefinition.CreateLookupTaskDefinition(CustomFieldType.Text, ExtendedAttributeTask.Text27, "My custom field");
taskTextAttr.AddLookupValue(new Value { Id = 1, Val = "Text value 1", Description = "Text value description 1" });
taskTextAttr.AddLookupValue(new Value { Id = 2, Val = "Text value 2", Description = "Text value description 2" });
project.ExtendedAttributes.Add(taskTextAttr);
CreateResourceDefinition(CustomFieldType, ExtendedAttributeResource, 字符串)
工厂方法创建一个简单的扩展属性定义,微软项目显示为“没有”。它具有Aspose.Tasks.ExtendedAttributeDefinition.CalculationType等于Aspose.Tasks.CalculationType.None,并且只能在资源中使用。
public static ExtendedAttributeDefinition CreateResourceDefinition(CustomFieldType customFieldType, ExtendedAttributeResource fieldId, string alias)
Parameters
customFieldType
CustomFieldType
指定的 Aspose.Tasks.CustomFieldType 类型。
fieldId
ExtendedAttributeResource
指定的 Aspose.Tasks.ExtendedAttributeResource 字段 ID。
alias
string
指定的 System.String alias。
Returns
创建 Aspose.Tasks.ExtendedAttributeDefinition 类与指定 customFieldType’,
fieldId’ 和
alias'.
Examples
使用此示例创建自定义文本字段定义:
var resourceTextAttr = ExtendedAttributeDefinition.CreateResourceDefinition(CustomFieldType.Text, ExtendedAttributeResource.Text27, "My custom field");
project.ExtendedAttributes.Add(resourceTextAttr);
CreateResourceDefinition(延伸分配资源, string)
工厂方法创建一个简单的扩展属性定义,微软项目显示为“没有”。它有Aspose.Tasks.ExtendedAttributeDefinition.CalculationType等于Aspose.Tasks.CalculationType.None,并且只能在资源中使用。
public static ExtendedAttributeDefinition CreateResourceDefinition(ExtendedAttributeResource fieldId, string alias)
Parameters
fieldId
ExtendedAttributeResource
指定的 Aspose.Tasks.ExtendedAttributeResource 字段 ID。
alias
string
指定的 System.String alias。
Returns
创建 Aspose.Tasks.ExtendedAttributeDefinition 类与指定 fieldId’ 和
alias'.
Examples
使用此示例创建自定义文本字段定义:
var resourceTextAttr = ExtendedAttributeDefinition.CreateResourceDefinition(ExtendedAttributeResource.Text27, "My custom field");
project.ExtendedAttributes.Add(resourceTextAttr);
CreateTaskDefinition(CustomFieldType, ExtendedAttributeTask, 序列)
工厂方法创建一个简单的扩展属性定义,微软项目显示为“没有”。它具有Aspose.Tasks.ExtendedAttributeDefinition.CalculationType等于Aspose.Tasks.CalculationType.None,并且只能在任务中使用。
public static ExtendedAttributeDefinition CreateTaskDefinition(CustomFieldType customFieldType, ExtendedAttributeTask fieldId, string alias)
Parameters
customFieldType
CustomFieldType
指定的 Aspose.Tasks.CustomFieldType 类型。
fieldId
ExtendedAttributeTask
指定 Aspose.Tasks.ExtendedAttributeTask 字段 ID。
alias
string
指定的 System.String alias。
Returns
创建 Aspose.Tasks.ExtendedAttributeDefinition 类与指定 customFieldType’,
fieldId’ 和
alias'.
Examples
使用此示例创建自定义文本字段定义:
var taskTextAttr = ExtendedAttributeDefinition.CreateTaskDefinition(CustomFieldType.Text, ExtendedAttributeTask.Text27, "My custom field");
project.ExtendedAttributes.Add(taskTextAttr);
CreateTaskDefinition(重定向, string)
工厂方法创建一个简单的扩展属性定义,微软项目显示为“没有”。它有Aspose.Tasks.ExtendedAttributeDefinition.CalculationType等于Aspose.Tasks.CalculationType.None,并且只能在任务中使用。
public static ExtendedAttributeDefinition CreateTaskDefinition(ExtendedAttributeTask fieldId, string alias)
Parameters
fieldId
ExtendedAttributeTask
指定 Aspose.Tasks.ExtendedAttributeTask 字段 ID。
alias
string
指定的 System.String alias。
Returns
创建 Aspose.Tasks.ExtendedAttributeDefinition 类与指定 fieldId’ 和
alias'.
Examples
使用此示例创建自定义文本字段定义:
var taskTextAttr = ExtendedAttributeDefinition.CreateTaskDefinition(ExtendedAttributeTask.Text27, "My custom field");
project.ExtendedAttributes.Add(taskTextAttr);
Equals(对象)
返回指示这个例子是否相当于指定的对象的旗帜。
public override bool Equals(object obj)
Parameters
obj
object
指定的对象与这个例子相比。
Returns
表明此例是否相当于所指定的对象。
GetHashCode()
返回对 Aspose.Tasks.ExtendedAttributeDefinition 类的哈希代码。
public override int GetHashCode()
Returns
这个对象的Hash代码。
RemoveLookupValue(Value)
从内部搜索列表中删除值. 这是使用 Aspose.Tasks.ExtendedAttributeDefinition.ValueList 进行操作的最佳方式。
public void RemoveLookupValue(Value value)
Parameters
value
Value
值得从搜索中删除。
Remarks
此方法仅适用于 Aspose.Tasks.ExtendedAttributeDefinition 例子有 Aspose.Tasks.ExtendedAttributeDefinition.CalculationType等于 Aspose.Tasks.CalculationType.Lookup。