Table of Contents

Class OdfFormFieldCollection

Namespace
OdfKit.Text
Assembly
OdfKit.dll

Indexes text document form fields by name and safely fills their values. 提供文字文件表單欄位的名稱索引與安全填值 API。

public sealed class OdfFormFieldCollection
Inheritance
OdfFormFieldCollection
Inherited Members

Properties

this[string]

Gets the form field facade for the specified field name. 以欄位名稱取得表單欄位 facade。

public OdfFormField this[string key] { get; }

Parameters

key string

The field name. / 欄位名稱。

Property Value

OdfFormField

The field facade for the specified name; use Exists to determine whether the current document contains the field. / 指定名稱的欄位 facade;可透過 Exists 判斷目前文件是否包含該欄位。

Methods

Contains(string)

Determines whether a field with the specified name exists in the document. 判斷文件中是否存在指定名稱的欄位。

public bool Contains(string key)

Parameters

key string

The field name. / 欄位名稱。

Returns

bool

true if the field exists in the document; otherwise false. / 若文件中存在該欄位則為 true;否則為 false

TrySetValue(string, string?)

Attempts to write the specified value into a field. 嘗試將指定值寫入欄位。

public bool TrySetValue(string key, string? value)

Parameters

key string

The field name. / 欄位名稱。

value string

The value to write. / 要寫入的值。

Returns

bool

true if at least one field was found and updated; otherwise false. / 若找到並更新至少一個欄位則為 true;否則為 false