Class ExtendedAttributeDefinition

Class ExtendedAttributeDefinition

Tên không gian: Aspose.Tasks Tổng hợp: Aspose.Tasks.dll (25.4.0)

Nó đại diện cho một định nghĩa thuộc tính mở rộng liên quan đến một dự án.

[ClassInterface(ClassInterfaceType.AutoDual)]
public class ExtendedAttributeDefinition

Inheritance

object ExtendedAttributeDefinition

Thành viên thừa kế

object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Properties

Alias

Nhận hoặc đặt alias của một trường tùy chỉnh.

public string Alias { get; set; }

Giá trị bất động sản

string

AppendNewValues

Nhận hoặc đặt một giá trị cho thấy liệu các giá trị mới được thêm vào một dự án sẽ tự động được thêm vào danh sách.

public bool AppendNewValues { get; set; }

Giá trị bất động sản

bool

Remarks

Hiện đang được hỗ trợ cho MSP 2003/2007 Xml và MSP 2003 mpp định dạng.

AutoRollDown

Nhận hoặc đặt một giá trị cho thấy liệu có được bật tự động xoay xuống các nhiệm vụ hay không.

public bool AutoRollDown { get; set; }

Giá trị bất động sản

bool

CalculationType

Nhận hoặc đặt loại tính toán của giá trị thuộc tính tùy chỉnh.

public CalculationType CalculationType { get; set; }

Giá trị bất động sản

CalculationType

CfType

Nhận được loại của một lĩnh vực tùy chỉnh.

public CustomFieldType CfType { get; }

Giá trị bất động sản

CustomFieldType

Default

Nhận hoặc đặt giá trị mặc định trong danh sách.

public string Default { get; set; }

Giá trị bất động sản

string

Remarks

Hiện đang được hỗ trợ cho MSP 2003/2007 Xml và MSP 2003 mpp định dạng.

DefaultGuid

Nhận hoặc đặt Hướng dẫn của mặc định tìm kiếm bảng nhập.

public string DefaultGuid { get; set; }

Giá trị bất động sản

string

ElementType

Nhận hoặc đặt attribute mở rộng được liên kếtvới một nhiệm vụ, một tài nguyên hoặc một nhiệm vụ.

public ElementType ElementType { get; set; }

Giá trị bất động sản

ElementType

FieldId

Gets hoặc sets tương ứng với ID dự án của một trường tùy chỉnh.Sử dụng biểu hiện string của một liên tục từ lớp Aspose.Tasks.ExtendedAttributeTask để xác định thuộc tính Aspose.Tasks.ExtendedAttributeDefinition.FieldId.

public string FieldId { get; set; }

Giá trị bất động sản

string

Examples

customFieldDefinition.FieldId = Aspose.Tasks.ExtendedAttributeTask.Number10.ToString("D");

Remarks

Cách thích hợp để thiết lập Aspose.Tasks.ExtendedAttributeDefinition.FieldId thuộc tính là để tạo Aspose.Tasks.ExtendedAttributeDefinitionSử dụng một trong những phương pháp nhà máy dành riêng như Aspose.Tasks.ExtendedAttributeDefinition.CreateTaskDefinition(Aspose.Tasks.ExtendedAttributeTask,System.String) hoặc Aspose.Tasks.ExtendedAttributeDefinition.CreateLookupTaskDefinition(Aspose.Tasks.CustomFieldType,Aspose.Tasks.ExtendedAttributeTask,System.String).

FieldName

Nhận được tên của một lĩnh vực tùy chỉnh.

public string FieldName { get; }

Giá trị bất động sản

string

Remarks

Không được thiết lập trực tiếp, thay vào đó tạo ExtendedAttributeDefinition bằng cách sử dụng các phương pháp nhà máy static được viết mạnh được gọi là Create*Definition().

Formula

Nhận hoặc đặt công thức mà Microsoft Project sử dụng để lưu trữ một trường nhiệm vụ tùy chỉnh.

public string Formula { get; set; }

Giá trị bất động sản

string

GraphicalIndicator

Nhận hoặc đặt một thông tin chỉ số đồ họa liên quan đến thuộc tính mở rộng.Có thể áp dụng cho định dạng MPP.

public GraphicalIndicatorsInfo GraphicalIndicator { get; set; }

Giá trị bất động sản

GraphicalIndicatorsInfo

Guid

Nhận hoặc đặt hướng dẫn của một lĩnh vực tùy chỉnh.

public string Guid { get; set; }

Giá trị bất động sản

string

Remarks

Hiện tại chỉ được hỗ trợ cho định dạng XML.

LookupUid

Nhận một Hướng dẫn của bảng tìm kiếm liên quan đến một trường tùy chỉnh.

public string LookupUid { get; }

Giá trị bất động sản

string

Remarks

Để tạo một trường tùy chỉnh với tìm kiếm, sử dụng một trong các phương pháp nhà máy: Aspose.Tasks.ExtendedAttributeDefinition.CreateLookupTaskDefinition(Aspose.Tasks.CustomFieldType,Aspose.Tasks.ExtendedAttributeTask,System.String) hoặc Aspose.Tasks.ExtendedAttributeDefinition.CreateLookupResourceDefinition(Aspose.Tasks.CustomFieldType,Aspose.Tasks.ExtendedAttributeResource,System.String).

MaxMultiValues

Nhận hoặc đặt số lượng tối đa các giá trị mà bạn có thể đặt trong danh sách lựa chọn.

public int MaxMultiValues { get; set; }

Giá trị bất động sản

int

Remarks

Hiện tại chỉ được hỗ trợ cho định dạng XML.

ParentProject

Nhận dự án mẹ cho trường hợp Aspose.Tasks.ExtendedAttributeDefinition.

public Project ParentProject { get; }

Giá trị bất động sản

Project

PhoneticsAlias

Nhận hoặc đặt phát âm âm của alias của một trường tùy chỉnh.

public string PhoneticsAlias { get; set; }

Giá trị bất động sản

string

Remarks

Hiện tại chỉ được hỗ trợ cho định dạng XML.

RestrictValues

Nhận hoặc đặt một giá trị cho thấy liệu các giá trị trường tùy chỉnh có bị hạn chế đối với các giá trị trong Aspose.Tasks.ExtendedAttributeDefinition.ValueList.

public bool RestrictValues { get; set; }

Giá trị bất động sản

bool

RollupType

Nhận hoặc đặt cách rollups được tính toán.

public RollupType RollupType { get; set; }

Giá trị bất động sản

RollupType

Remarks

Writing hiện chỉ được hỗ trợ cho định dạng XML.

SecondaryGuid

Nhận hoặc đặt hướng dẫn thứ cấp của thuộc tính mở rộng.

public string SecondaryGuid { get; set; }

Giá trị bất động sản

string

Remarks

Điều này là mới cho tài sản của MS Project 2010.

SecondaryPid

Nhận hoặc đặt PID thứ cấp của một trường tùy chỉnh.

public string SecondaryPid { get; set; }

Giá trị bất động sản

string

SummaryRowsCalculationType

Nhận hoặc đặt loại tính toán của giá trị thuộc tính tùy chỉnh cho các hàng tổng hợp.

public SummaryRowsCalculationType SummaryRowsCalculationType { get; set; }

Giá trị bất động sản

SummaryRowsCalculationType

UserDef

Nhận hoặc đặt một giá trị cho thấy nếu một trường tùy chỉnh được xác định bởi người dùng.

public bool UserDef { get; set; }

Giá trị bất động sản

bool

Remarks

Hiện tại chỉ được hỗ trợ cho định dạng XML.

ValueList

Nhận danh sách<Value> ValueList.

public List<value> ValueList { get; }

Giá trị bất động sản

List < Value >

Remarks

Khi các giá trị của các thuộc tính mở rộng được xác định như các thuộc tính của các yếu tố trong kế hoạch,chúng có thể được chỉ định bằng giá trị hoặc bằng tham chiếu đến các giá trị trong danh sách này.Các ứng dụng có thể chấp nhận đặt hàng của danh sách bằng cách đặt hàng được chỉ định ở đây.Hiện đang được hỗ trợ cho MSP 2003/2007 Xml và MSP 2003 mpp định dạng.Đừng thay đổi danh sách này trực tiếp. Sử dụng ExtendedAttributeDefinition.AddLookupValue/RemoveLookupValue phương pháp thay thế.

ValuelistSortOrder

Nhận hoặc đặt cách các danh sách giá trị được sắp xếp. giá trị là: 0 = giảm, 1 = tăng.

public int ValuelistSortOrder { get; set; }

Giá trị bất động sản

int

Remarks

Hiện đang được hỗ trợ cho MSP 2003/2007 Xml và MSP 2003 mpp định dạng.

Methods

AddLookupValue(Value)

Thêm một giá trị vào danh sách tìm kiếm nội bộ. Đây là một cách thích hợp để thao tác với Aspose.Tasks.ExtendedAttributeDefinition.ValueList.

public void AddLookupValue(Value value)

Parameters

value Value

Giá trị để thêm vào lookup.

Examples

Sử dụng mã này để thêm giá trị mới để tìm danh sách:taskTextAttr.AddLookupValue(new Value { Id = 1, Val = "Text value 1", Description = "Text value description 1" });

Remarks

Phương pháp này chỉ hoạt động cho các trường hợp Aspose.Tasks.ExtendedAttributeDefinitioncó Aspose.Tasks.ExtendedAttributeDefinition.CalculationType tương đương với Aspose.Tasks.CalculationType.Lookup.

CreateExtendedAttribute()

Tạo một thuộc tính mở rộng mới với ID trường tương đương với giá trị ID trường của đối tượng này.

public ExtendedAttribute CreateExtendedAttribute()

Returns

ExtendedAttribute

trả về trường hợp được tạo ra của lớp Aspose.Tasks.ExtendedAttribute với ID trường tương đương với giá trị ID trường của đối tượng này.

CreateExtendedAttribute(String)

Tạo một thuộc tính mở rộng mới với ID trường tương đương với giá trị ID trường của đối tượng này và giá trị văn bản cụ thể.

public ExtendedAttribute CreateExtendedAttribute(string textValue)

Parameters

textValue string

Giá trị văn bản cụ thể.

Returns

ExtendedAttribute

trả về trường hợp được tạo ra của lớp Aspose.Tasks.ExtendedAttribute với ID trường tương đương với giá trị ID trường của đối tượng này.

Exceptions

InvalidOperationException

Nếu hiện tại Aspose.Tasks.ExtendedAttributeDefinition.CfType không phải là ‘Thông tin’

CreateExtendedAttribute(Thập niên)

Tạo một thuộc tính mở rộng mới với ID trường tương đương với giá trị ID trường của đối tượng này và giá trị số cụ thể.

public ExtendedAttribute CreateExtendedAttribute(decimal numericValue)

Parameters

numericValue decimal

Giá trị số cụ thể.

Returns

ExtendedAttribute

trả về trường hợp được tạo ra của lớp Aspose.Tasks.ExtendedAttribute với ID trường tương đương với giá trị ID trường của đối tượng này.

Exceptions

InvalidOperationException

Nếu hiện tại Aspose.Tasks.ExtendedAttributeDefinition.CfType không phải là ‘Number’ hoặc ‘Cost’

CreateExtendedAttribute(DateTime)

Tạo một thuộc tính mở rộng mới với ID trường tương đương với giá trị ID trường của đối tượng này và giá trị ngày cụ thể.

public ExtendedAttribute CreateExtendedAttribute(DateTime dateTimeValue)

Parameters

dateTimeValue DateTime

Giá trị thời gian ngày cụ thể.

Returns

ExtendedAttribute

trả về trường hợp được tạo ra của lớp Aspose.Tasks.ExtendedAttribute với ID trường tương đương với giá trị ID trường của đối tượng này.

Exceptions

InvalidOperationException

Nếu hiện tại Aspose.Tasks.ExtendedAttributeDefinition.CfType không phải là ‘Ngày’, ‘Bắt đầu’ hoặc ‘Đã kết thúc’

CreateExtendedAttribute(Duration)

Tạo một thuộc tính mở rộng mới với ID trường tương đương với giá trị ID trường của đối tượng này và giá trị thời gian cụ thể.

public ExtendedAttribute CreateExtendedAttribute(Duration durationValue)

Parameters

durationValue Duration

Giá trị thời gian cụ thể.

Returns

ExtendedAttribute

trả về trường hợp được tạo ra của lớp Aspose.Tasks.ExtendedAttribute với ID trường tương đương với giá trị ID trường của đối tượng này.

Exceptions

InvalidOperationException

Nếu hiện tại Aspose.Tasks.ExtendedAttributeDefinition.CfType không phải là ‘Thời gian’

CreateExtendedAttribute(Bool)

Tạo một thuộc tính mở rộng mới với ID trường tương đương với giá trị ID trường của đối tượng này và giá trị lá cờ cụ thể.

public ExtendedAttribute CreateExtendedAttribute(bool flagValue)

Parameters

flagValue bool

Giá trị của lá cờ cụ thể.

Returns

ExtendedAttribute

trả về trường hợp được tạo ra của lớp Aspose.Tasks.ExtendedAttribute với ID trường tương đương với giá trị ID trường của đối tượng này.

Exceptions

InvalidOperationException

Nếu hiện tại Aspose.Tasks.ExtendedAttributeDefinition.CfType không phải là ‘Flag’

CreateExtendedAttribute(Value)

Tạo thuộc tính mở rộng mới liên kết với mục Aspose.Tasks.Value cụ thể.

public ExtendedAttribute CreateExtendedAttribute(Value lookupValue)

Parameters

lookupValue Value

Các mục Aspose.Tasks.Value được chỉ định.

Returns

ExtendedAttribute

trở lại tạo ra ví dụ của lớp Aspose.Tasks.ExtendedAttribute liên kết với mục Aspose.Tasks.Value cụ thể.

Examples

Sử dụng mã này để tạo Aspose.Tasks.ExtendedAttribute mới bằng cách sử dụng giá trị cụ thể:

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(ExtendedAttributeResource, dòng)

Phương pháp nhà máy tạo ra một định nghĩa thuộc tính mở rộng với lookup.It có Aspose.Tasks.ExtendedAttributeDefinition.CalculationType tương đương với Aspose.Tasks.CalculationType.Lookup và có thể được sử dụng trong Tài nguyên chỉ.Bạn cần phải xác định fieldId’ và alias’ khi gọi phương pháp này.Type trường được kết luận từ ID trường.

public static ExtendedAttributeDefinition CreateLookupResourceDefinition(ExtendedAttributeResource fieldId, string alias)

Parameters

fieldId ExtendedAttributeResource

ID trường Aspose.Tasks.ExtendedAttributeResource.

alias string

Hệ thống cụ thể.String alias

Returns

ExtendedAttributeDefinition

Ví dụ được tạo ra của lớp Aspose.Tasks.ExtendedAttributeDefinition với fieldId’ và alias’.

Examples

Sử dụng ví dụ này để tạo một định nghĩa trường tùy chỉnh cho một tài nguyên với tìm kiếm và sau đó điền vào nó với giá trị văn bản:

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, dòng)

Phương pháp nhà máy tạo ra một định nghĩa thuộc tính mở rộng với lookup.It có Aspose.Tasks.ExtendedAttributeDefinition.CalculationType tương đương với Aspose.Tasks.CalculationType.Lookup và có thể được sử dụng trong Tài nguyên chỉ.Bạn cần phải chỉ định customFieldType’, fieldId’ và alias’ khi gọi phương pháp này.

public static ExtendedAttributeDefinition CreateLookupResourceDefinition(CustomFieldType customFieldType, ExtendedAttributeResource fieldId, string alias)

Parameters

customFieldType CustomFieldType

Các loại Aspose.Tasks.CustomFieldType được chỉ định.

fieldId ExtendedAttributeResource

ID trường Aspose.Tasks.ExtendedAttributeResource.

alias string

Hệ thống cụ thể.String alias

Returns

ExtendedAttributeDefinition

Ví dụ được tạo ra của lớp Aspose.Tasks.ExtendedAttributeDefinition với cụ thể customFieldType’, fieldId’ và alias’.

Examples

Sử dụng ví dụ này để tạo một định nghĩa trường tùy chỉnh cho một tài nguyên với tìm kiếm và sau đó điền vào nó với giá trị văn bản:

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(ExtendedAttributeTask, string)

Phương pháp nhà máy tạo ra một định nghĩa thuộc tính mở rộng với lookup.It có Aspose.Tasks.ExtendedAttributeDefinition.CalculationType tương đương với Aspose.Tasks.CalculationType.Lookup và có thể được sử dụng trong Task chỉ.Bạn cần phải xác định fieldId’ và alias’ khi gọi phương pháp này.Type trường được kết luận từ ID trường.

public static ExtendedAttributeDefinition CreateLookupTaskDefinition(ExtendedAttributeTask fieldId, string alias)

Parameters

fieldId ExtendedAttributeTask

ID trường Aspose.Tasks.ExtendedAttributeTask được chỉ định.

alias string

Hệ thống cụ thể.String alias

Returns

ExtendedAttributeDefinition

Ví dụ được tạo ra của lớp Aspose.Tasks.ExtendedAttributeDefinition với fieldId’ và alias’.

Examples

Sử dụng ví dụ này để tạo một định nghĩa trường tùy chỉnh cho một nhiệm vụ với tìm kiếm và sau đó điền vào nó với giá trị văn bản:

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, dòng)

Phương pháp nhà máy tạo ra một định nghĩa thuộc tính mở rộng với lookup.It có Aspose.Tasks.ExtendedAttributeDefinition.CalculationType tương đương với Aspose.Tasks.CalculationType.Lookup và có thể được sử dụng trong Task chỉ.Bạn cần phải chỉ định customFieldType’, fieldId’ và alias’ khi gọi phương pháp này.

public static ExtendedAttributeDefinition CreateLookupTaskDefinition(CustomFieldType customFieldType, ExtendedAttributeTask fieldId, string alias)

Parameters

customFieldType CustomFieldType

Các loại Aspose.Tasks.CustomFieldType được chỉ định.

fieldId ExtendedAttributeTask

ID trường Aspose.Tasks.ExtendedAttributeTask được chỉ định.

alias string

Hệ thống cụ thể.String alias

Returns

ExtendedAttributeDefinition

Ví dụ được tạo ra của lớp Aspose.Tasks.ExtendedAttributeDefinition với cụ thể customFieldType’, fieldId’ và alias'.

Examples

Sử dụng ví dụ này để tạo một định nghĩa trường tùy chỉnh cho một nhiệm vụ với tìm kiếm và sau đó điền vào nó với giá trị văn bản:

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, dòng)

Phương pháp nhà máy tạo ra một định nghĩa thuộc tính mở rộng đơn giản, mà Microsoft Project hiển thị là “Không”.Nó có Aspose.Tasks.ExtendedAttributeDefinition.CalculationType tương đương với Aspose.Tasks.CalculationType.Không và có thể được sử dụng trong Tài nguyên chỉ.Bạn cần phải xác định customFieldType’, fieldId’ và alias’ khi gọi phương pháp này.

public static ExtendedAttributeDefinition CreateResourceDefinition(CustomFieldType customFieldType, ExtendedAttributeResource fieldId, string alias)

Parameters

customFieldType CustomFieldType

Các loại Aspose.Tasks.CustomFieldType được chỉ định.

fieldId ExtendedAttributeResource

ID trường Aspose.Tasks.ExtendedAttributeResource.

alias string

Hệ thống cụ thể.String alias

Returns

ExtendedAttributeDefinition

Ví dụ được tạo ra của lớp Aspose.Tasks.ExtendedAttributeDefinition với cụ thể customFieldType’, fieldId’ và alias'.

Examples

Sử dụng ví dụ này để tạo một định nghĩa trường văn bản tùy chỉnh:

var resourceTextAttr = ExtendedAttributeDefinition.CreateResourceDefinition(CustomFieldType.Text, ExtendedAttributeResource.Text27, "My custom field");
project.ExtendedAttributes.Add(resourceTextAttr);

CreateResourceDefinition(ExtendedAttributeResource, dòng)

Phương pháp nhà máy tạo ra một định nghĩa thuộc tính mở rộng đơn giản, mà Microsoft Project hiển thị như “Không”.Nó có Aspose.Tasks.ExtendedAttributeDefinition.CalculationType tương đương với Aspose.Tasks.CalculationType.Không và có thể được sử dụng trong Tài nguyên chỉ.Bạn cần phải xác định fieldId’ và alias’ khi gọi phương pháp này.Type trường được kết luận từ ID trường.

public static ExtendedAttributeDefinition CreateResourceDefinition(ExtendedAttributeResource fieldId, string alias)

Parameters

fieldId ExtendedAttributeResource

ID trường Aspose.Tasks.ExtendedAttributeResource.

alias string

Hệ thống cụ thể.String alias

Returns

ExtendedAttributeDefinition

Ví dụ được tạo ra của lớp Aspose.Tasks.ExtendedAttributeDefinition với fieldId’ và alias'.

Examples

Sử dụng ví dụ này để tạo một định nghĩa trường văn bản tùy chỉnh:

var resourceTextAttr = ExtendedAttributeDefinition.CreateResourceDefinition(ExtendedAttributeResource.Text27, "My custom field");
project.ExtendedAttributes.Add(resourceTextAttr);

CreateTaskDefinition(CustomFieldType, ExtendedAttributeTask, dòng)

Phương pháp nhà máy tạo ra một định nghĩa attribute mở rộng đơn giản, mà Microsoft Project hiển thị là “Không”.Nó có Aspose.Tasks.ExtendedAttributeDefinition.CalculationType tương đương với Aspose.Tasks.CalculationType.Không và có thể được sử dụng trong Task chỉ.Bạn cần phải xác định customFieldType’, fieldId’ và alias’ khi gọi phương pháp này.

public static ExtendedAttributeDefinition CreateTaskDefinition(CustomFieldType customFieldType, ExtendedAttributeTask fieldId, string alias)

Parameters

customFieldType CustomFieldType

Các loại Aspose.Tasks.CustomFieldType được chỉ định.

fieldId ExtendedAttributeTask

ID trường Aspose.Tasks.ExtendedAttributeTask được chỉ định.

alias string

Hệ thống cụ thể.String alias

Returns

ExtendedAttributeDefinition

Ví dụ được tạo ra của lớp Aspose.Tasks.ExtendedAttributeDefinition với cụ thể customFieldType’, fieldId’ và alias'.

Examples

Sử dụng ví dụ này để tạo một định nghĩa trường văn bản tùy chỉnh:

var taskTextAttr = ExtendedAttributeDefinition.CreateTaskDefinition(CustomFieldType.Text, ExtendedAttributeTask.Text27, "My custom field");
project.ExtendedAttributes.Add(taskTextAttr);

CreateTaskDefinition(ExtendedAttributeTask, string)

Phương pháp nhà máy tạo ra một định nghĩa attribute mở rộng đơn giản, mà Microsoft Project hiển thị như “Không”.Nó có Aspose.Tasks.ExtendedAttributeDefinition.CalculationType tương đương với Aspose.Tasks.CalculationType.Không và có thể được sử dụng trong Task chỉ.Bạn cần phải xác định fieldId’ và alias’ khi gọi phương pháp này.Type trường được kết luận từ ID trường.

public static ExtendedAttributeDefinition CreateTaskDefinition(ExtendedAttributeTask fieldId, string alias)

Parameters

fieldId ExtendedAttributeTask

ID trường Aspose.Tasks.ExtendedAttributeTask được chỉ định.

alias string

Hệ thống cụ thể.String alias

Returns

ExtendedAttributeDefinition

Ví dụ được tạo ra của lớp Aspose.Tasks.ExtendedAttributeDefinition với fieldId’ và alias'.

Examples

Sử dụng ví dụ này để tạo một định nghĩa trường văn bản tùy chỉnh:

var taskTextAttr = ExtendedAttributeDefinition.CreateTaskDefinition(ExtendedAttributeTask.Text27, "My custom field");
project.ExtendedAttributes.Add(taskTextAttr);

Equals(đối tượng)

Quay lại một lá cờ cho biết liệu trường hợp này có bằng đối tượng được chỉ định hay không.

public override bool Equals(object obj)

Parameters

obj object

đối tượng được chỉ định để so sánh với trường hợp này.

Returns

bool

một lá cờ chỉ ra liệu trường hợp này có bằng đối tượng được chỉ định hay không.

GetHashCode()

Quay lại mã hash cho ví dụ của lớp Aspose.Tasks.ExtendedAttributeDefinition.

public override int GetHashCode()

Returns

int

một mã hash cho đối tượng này.

RemoveLookupValue(Value)

Xóa một giá trị từ danh sách tìm kiếm nội bộ. Đây là một cách thích hợp để thao tác với Aspose.Tasks.ExtendedAttributeDefinition.ValueList.

public void RemoveLookupValue(Value value)

Parameters

value Value

Giá trị để loại bỏ từ lookup.

Remarks

Phương pháp này chỉ hoạt động cho các trường hợp Aspose.Tasks.ExtendedAttributeDefinitioncó Aspose.Tasks.ExtendedAttributeDefinition.CalculationType tương đương với Aspose.Tasks.CalculationType.Lookup.

 Tiếng Việt