简体   繁体   English

MPXJ - 如何获取 MSP 字段列表

[英]MPXJ - how to get MSP Field List

We are using MPXJ v10.5.我们正在使用 MPXJ v10.5。 We are implementing with mpxj-for-csharp.dll.我们正在使用 mpxj-for-csharp.dll 实现。

We want to provide our users with a pick list of all of the default MSP Task Fields and also any user Custom Fields added.我们希望为我们的用户提供所有默认 MSP 任务字段以及添加的任何用户自定义字段的选择列表。 The the Field Name is all we need.字段名称就是我们所需要的。

We believe we have something working for the customfields (below - we could probably work with this) but cannot find anything equivalent for the MSP "Out of the Box" Task Fields.我们相信我们有一些适用于自定义字段的东西(如下 - 我们可能会使用它),但找不到任何与 MSP“开箱即用”任务字段等效的东西。

foreach(net.sf.mpxj.CustomField cf in file.CustomFields.ToIEnumerable())
{
     TextBox.AppendText("Alias: " + cf.Alias + " || " + cf.ToString());
}

Can anybody provide any suggestions for the Task fields?任何人都可以为任务字段提供任何建议吗?

Thank you.谢谢你。

MPXJ defines an enumeration for the fields provided by the main entities it works with: ProjectField , TaskField , ResourceField , AssignmentField . MPXJ 为它使用的主要实体提供的字段定义了一个枚举: ProjectFieldTaskFieldResourceFieldAssignmentField You can iterate through these enumerations using the values method, for example:您可以使用values方法遍历这些枚举,例如:

foreach (TaskField field in TaskField.values())
{
    Console.WriteLine(field.ToString());
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM