Table of Contents

Class OdfDatabaseFormDesigner

Namespace
OdfKit.Database
Assembly
OdfKit.dll

Represents the form designer for an ODB database, used to model form properties and common controls. 表示 ODB 資料庫的表單設計器,用於建模表單屬性與常用控制項。

報表內容(LibreOffice Base「使用嚮導建立報表」產生的型式)應改用 TextDocument 搭配 AddDatabaseDisplayField(string, string, string?)AddDatabaseNextField(string, string?) 建立為獨立文件,再透過 AddReport(string, string?) 的 href 參照機制連結至 .odb 套件。 不存在官方 OASIS ODF 報表結構 schema(先前版本的 DefineReportStructure 使用了虛構的 urn:oasis:names:tc:opendocument:xmlns:report:1.0 命名空間,已移除)。

public sealed class OdfDatabaseFormDesigner
Inheritance
OdfDatabaseFormDesigner
Inherited Members

Constructors

OdfDatabaseFormDesigner(OdfDocument)

Initializes a new instance of the OdfDatabaseFormDesigner class. 初始化 OdfDatabaseFormDesigner 類別的新執行個體。

public OdfDatabaseFormDesigner(OdfDocument document)

Parameters

document OdfDocument

The ODF sub-document on which to design the form. / 要進行表單設計的 ODF 子文件。

Exceptions

ArgumentNullException

When document is null. / 當 documentnull 時擲出。

Methods

AddButton(string, string)

Short overload of AddButton that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddButton 多載。

public OdfNode AddButton(string name, string label)

Parameters

name string
label string

Returns

OdfNode

AddButton(string, string, string?)

Short overload of AddButton that accepts name, label, and value; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 value;其餘可選參數使用預設值並轉呼叫最長 AddButton 多載。

public OdfNode AddButton(string name, string label, string? value)

Parameters

name string
label string
value string

Returns

OdfNode

AddButton(string, string, string?, OdfLength?)

Short overload of AddButton that accepts name, label, value, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value 與 x;其餘可選參數使用預設值並轉呼叫最長 AddButton 多載。

public OdfNode AddButton(string name, string label, string? value, OdfLength? x)

Parameters

name string
label string
value string
x OdfLength?

Returns

OdfNode

AddButton(string, string, string?, OdfLength?, OdfLength?)

Short overload of AddButton that accepts name, label, value, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddButton 多載。

public OdfNode AddButton(string name, string label, string? value, OdfLength? x, OdfLength? y)

Parameters

name string
label string
value string
x OdfLength?
y OdfLength?

Returns

OdfNode

AddButton(string, string, string?, OdfLength?, OdfLength?, OdfLength?)

Short overload of AddButton that accepts name, label, value, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddButton 多載。

public OdfNode AddButton(string name, string label, string? value, OdfLength? x, OdfLength? y, OdfLength? width)

Parameters

name string
label string
value string
x OdfLength?
y OdfLength?
width OdfLength?

Returns

OdfNode

AddButton(string, string, string?, OdfLength?, OdfLength?, OdfLength?, OdfLength?)

Adds a button control (form:button). 新增按鈕控制項(form:button)。

public OdfNode AddButton(string name, string label, string? value, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)

Parameters

name string

The control name. / 控制項名稱。

label string

The text displayed on the button. / 按鈕上顯示的文字。

value string

The button value or action command. / 按鈕的值或動作命令。

x OdfLength?

The X-axis position. / X 軸座標位置。

y OdfLength?

The Y-axis position. / Y 軸座標位置。

width OdfLength?

The control width. / 控制項寬度。

height OdfLength?

The control height. / 控制項高度。

Returns

OdfNode

The OdfNode node representing the added button. / 代表新增的按鈕 OdfNode 節點。

AddCheckBox(string, string)

Short overload of AddCheckBox that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddCheckBox 多載。

public OdfNode AddCheckBox(string name, string label)

Parameters

name string
label string

Returns

OdfNode

AddCheckBox(string, string, bool)

Short overload of AddCheckBox that accepts name, label, and isChecked; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 isChecked;其餘可選參數使用預設值並轉呼叫最長 AddCheckBox 多載。

public OdfNode AddCheckBox(string name, string label, bool isChecked)

Parameters

name string
label string
isChecked bool

Returns

OdfNode

AddCheckBox(string, string, bool, OdfLength?)

Short overload of AddCheckBox that accepts name, label, isChecked, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、isChecked 與 x;其餘可選參數使用預設值並轉呼叫最長 AddCheckBox 多載。

public OdfNode AddCheckBox(string name, string label, bool isChecked, OdfLength? x)

Parameters

name string
label string
isChecked bool
x OdfLength?

Returns

OdfNode

AddCheckBox(string, string, bool, OdfLength?, OdfLength?)

Short overload of AddCheckBox that accepts name, label, isChecked, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、isChecked、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddCheckBox 多載。

public OdfNode AddCheckBox(string name, string label, bool isChecked, OdfLength? x, OdfLength? y)

Parameters

name string
label string
isChecked bool
x OdfLength?
y OdfLength?

Returns

OdfNode

AddCheckBox(string, string, bool, OdfLength?, OdfLength?, OdfLength?)

Short overload of AddCheckBox that accepts name, label, isChecked, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、isChecked、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddCheckBox 多載。

public OdfNode AddCheckBox(string name, string label, bool isChecked, OdfLength? x, OdfLength? y, OdfLength? width)

Parameters

name string
label string
isChecked bool
x OdfLength?
y OdfLength?
width OdfLength?

Returns

OdfNode

AddCheckBox(string, string, bool, OdfLength?, OdfLength?, OdfLength?, OdfLength?)

Adds a checkbox control (form:checkbox). 新增核取方塊控制項(form:checkbox)。

public OdfNode AddCheckBox(string name, string label, bool isChecked, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)

Parameters

name string

The control name. / 控制項名稱。

label string

The displayed label text. / 顯示的標籤文字。

isChecked bool

The default checked state. / 預設勾選狀態。

x OdfLength?

The X-axis position. / X 軸座標位置。

y OdfLength?

The Y-axis position. / Y 軸座標位置。

width OdfLength?

The control width. / 控制項寬度。

height OdfLength?

The control height. / 控制項高度。

Returns

OdfNode

The OdfNode node representing the added checkbox. / 代表新增的核取方塊 OdfNode 節點。

AddComboBox(string, string)

Short overload of AddComboBox that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddComboBox 多載。

public OdfNode AddComboBox(string name, string label)

Parameters

name string
label string

Returns

OdfNode

AddComboBox(string, string, IEnumerable<string>?)

Short overload of AddComboBox that accepts name, label, and items; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 items;其餘可選參數使用預設值並轉呼叫最長 AddComboBox 多載。

public OdfNode AddComboBox(string name, string label, IEnumerable<string>? items)

Parameters

name string
label string
items IEnumerable<string>

Returns

OdfNode

AddComboBox(string, string, IEnumerable<string>?, OdfLength?)

Short overload of AddComboBox that accepts name, label, items, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、items 與 x;其餘可選參數使用預設值並轉呼叫最長 AddComboBox 多載。

public OdfNode AddComboBox(string name, string label, IEnumerable<string>? items, OdfLength? x)

Parameters

name string
label string
items IEnumerable<string>
x OdfLength?

Returns

OdfNode

AddComboBox(string, string, IEnumerable<string>?, OdfLength?, OdfLength?)

Short overload of AddComboBox that accepts name, label, items, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、items、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddComboBox 多載。

public OdfNode AddComboBox(string name, string label, IEnumerable<string>? items, OdfLength? x, OdfLength? y)

Parameters

name string
label string
items IEnumerable<string>
x OdfLength?
y OdfLength?

Returns

OdfNode

AddComboBox(string, string, IEnumerable<string>?, OdfLength?, OdfLength?, OdfLength?)

Short overload of AddComboBox that accepts name, label, items, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、items、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddComboBox 多載。

public OdfNode AddComboBox(string name, string label, IEnumerable<string>? items, OdfLength? x, OdfLength? y, OdfLength? width)

Parameters

name string
label string
items IEnumerable<string>
x OdfLength?
y OdfLength?
width OdfLength?

Returns

OdfNode

AddComboBox(string, string, IEnumerable<string>?, OdfLength?, OdfLength?, OdfLength?, OdfLength?)

Adds an editable combo box control (form:combobox). 新增可編輯下拉組合方塊控制項(form:combobox)。

public OdfNode AddComboBox(string name, string label, IEnumerable<string>? items, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)

Parameters

name string

The control name. / 控制項名稱。

label string

The label text. / 標籤文字。

items IEnumerable<string>

The list of options for the combo box. / 下拉選單的選項清單。

x OdfLength?

The X-axis position. / X 軸座標位置。

y OdfLength?

The Y-axis position. / Y 軸座標位置。

width OdfLength?

The control width. / 控制項寬度。

height OdfLength?

The control height. / 控制項高度。

Returns

OdfNode

The OdfNode node representing the added combo box. / 代表新增的組合方塊 OdfNode 節點。

AddDateField(string, string)

Short overload of AddDateField that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddDateField 多載。

public OdfNode AddDateField(string name, string label)

Parameters

name string
label string

Returns

OdfNode

AddDateField(string, string, DateTime?)

Short overload of AddDateField that accepts name, label, and value; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 value;其餘可選參數使用預設值並轉呼叫最長 AddDateField 多載。

public OdfNode AddDateField(string name, string label, DateTime? value)

Parameters

name string
label string
value DateTime?

Returns

OdfNode

AddDateField(string, string, DateTime?, OdfLength?)

Short overload of AddDateField that accepts name, label, value, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value 與 x;其餘可選參數使用預設值並轉呼叫最長 AddDateField 多載。

public OdfNode AddDateField(string name, string label, DateTime? value, OdfLength? x)

Parameters

name string
label string
value DateTime?
x OdfLength?

Returns

OdfNode

AddDateField(string, string, DateTime?, OdfLength?, OdfLength?)

Short overload of AddDateField that accepts name, label, value, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddDateField 多載。

public OdfNode AddDateField(string name, string label, DateTime? value, OdfLength? x, OdfLength? y)

Parameters

name string
label string
value DateTime?
x OdfLength?
y OdfLength?

Returns

OdfNode

AddDateField(string, string, DateTime?, OdfLength?, OdfLength?, OdfLength?)

Short overload of AddDateField that accepts name, label, value, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddDateField 多載。

public OdfNode AddDateField(string name, string label, DateTime? value, OdfLength? x, OdfLength? y, OdfLength? width)

Parameters

name string
label string
value DateTime?
x OdfLength?
y OdfLength?
width OdfLength?

Returns

OdfNode

AddDateField(string, string, DateTime?, OdfLength?, OdfLength?, OdfLength?, OdfLength?)

Adds a date input control (form:date). 新增日期輸入控制項(form:date)。

public OdfNode AddDateField(string name, string label, DateTime? value, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)

Parameters

name string

The control name. / 控制項名稱。

label string

The label text. / 標籤文字。

value DateTime?

The default date. / 預設日期。

x OdfLength?

The X-axis position. / X 軸座標位置。

y OdfLength?

The Y-axis position. / Y 軸座標位置。

width OdfLength?

The control width. / 控制項寬度。

height OdfLength?

The control height. / 控制項高度。

Returns

OdfNode

The OdfNode node representing the added date input. / 代表新增的日期輸入 OdfNode 節點。

AddGroupBox(string, string)

Short overload of AddGroupBox that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddGroupBox 多載。

public OdfNode AddGroupBox(string name, string label)

Parameters

name string
label string

Returns

OdfNode

AddGroupBox(string, string, OdfLength?)

Short overload of AddGroupBox that accepts name, label, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 x;其餘可選參數使用預設值並轉呼叫最長 AddGroupBox 多載。

public OdfNode AddGroupBox(string name, string label, OdfLength? x)

Parameters

name string
label string
x OdfLength?

Returns

OdfNode

AddGroupBox(string, string, OdfLength?, OdfLength?)

Short overload of AddGroupBox that accepts name, label, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddGroupBox 多載。

public OdfNode AddGroupBox(string name, string label, OdfLength? x, OdfLength? y)

Parameters

name string
label string
x OdfLength?
y OdfLength?

Returns

OdfNode

AddGroupBox(string, string, OdfLength?, OdfLength?, OdfLength?)

Short overload of AddGroupBox that accepts name, label, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddGroupBox 多載。

public OdfNode AddGroupBox(string name, string label, OdfLength? x, OdfLength? y, OdfLength? width)

Parameters

name string
label string
x OdfLength?
y OdfLength?
width OdfLength?

Returns

OdfNode

AddGroupBox(string, string, OdfLength?, OdfLength?, OdfLength?, OdfLength?)

Adds a group box control (form:frame), used to group related controls under a title. 新增群組框控制項(form:frame),用於以標題群組相關控制項。

public OdfNode AddGroupBox(string name, string label, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)

Parameters

name string

The control name. / 控制項名稱。

label string

The group box title text. / 群組框標題文字。

x OdfLength?

The X-axis position. / X 軸座標位置。

y OdfLength?

The Y-axis position. / Y 軸座標位置。

width OdfLength?

The control width. / 控制項寬度。

height OdfLength?

The control height. / 控制項高度。

Returns

OdfNode

The OdfNode node representing the added group box. / 代表新增的群組框 OdfNode 節點。

AddLabel(string, string)

Short overload of AddLabel that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddLabel 多載。

public OdfNode AddLabel(string name, string label)

Parameters

name string
label string

Returns

OdfNode

AddLabel(string, string, OdfLength?)

Short overload of AddLabel that accepts name, label, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 x;其餘可選參數使用預設值並轉呼叫最長 AddLabel 多載。

public OdfNode AddLabel(string name, string label, OdfLength? x)

Parameters

name string
label string
x OdfLength?

Returns

OdfNode

AddLabel(string, string, OdfLength?, OdfLength?)

Short overload of AddLabel that accepts name, label, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddLabel 多載。

public OdfNode AddLabel(string name, string label, OdfLength? x, OdfLength? y)

Parameters

name string
label string
x OdfLength?
y OdfLength?

Returns

OdfNode

AddLabel(string, string, OdfLength?, OdfLength?, OdfLength?)

Short overload of AddLabel that accepts name, label, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddLabel 多載。

public OdfNode AddLabel(string name, string label, OdfLength? x, OdfLength? y, OdfLength? width)

Parameters

name string
label string
x OdfLength?
y OdfLength?
width OdfLength?

Returns

OdfNode

AddLabel(string, string, OdfLength?, OdfLength?, OdfLength?, OdfLength?)

Adds a fixed text label control (form:fixed-text). 新增文字標籤控制項(form:fixed-text)。

public OdfNode AddLabel(string name, string label, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)

Parameters

name string

The control name. / 控制項名稱。

label string

The text displayed by the label. / 標籤顯示的文字。

x OdfLength?

The X-axis position. / X 軸座標位置。

y OdfLength?

The Y-axis position. / Y 軸座標位置。

width OdfLength?

The control width. / 控制項寬度。

height OdfLength?

The control height. / 控制項高度。

Returns

OdfNode

The OdfNode node representing the added label. / 代表新增的標籤 OdfNode 節點。

AddListBox(string, string)

Short overload of AddListBox that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddListBox 多載。

public OdfNode AddListBox(string name, string label)

Parameters

name string
label string

Returns

OdfNode

AddListBox(string, string, IEnumerable<string>?)

Short overload of AddListBox that accepts name, label, and items; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 items;其餘可選參數使用預設值並轉呼叫最長 AddListBox 多載。

public OdfNode AddListBox(string name, string label, IEnumerable<string>? items)

Parameters

name string
label string
items IEnumerable<string>

Returns

OdfNode

AddListBox(string, string, IEnumerable<string>?, OdfLength?)

Short overload of AddListBox that accepts name, label, items, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、items 與 x;其餘可選參數使用預設值並轉呼叫最長 AddListBox 多載。

public OdfNode AddListBox(string name, string label, IEnumerable<string>? items, OdfLength? x)

Parameters

name string
label string
items IEnumerable<string>
x OdfLength?

Returns

OdfNode

AddListBox(string, string, IEnumerable<string>?, OdfLength?, OdfLength?)

Short overload of AddListBox that accepts name, label, items, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、items、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddListBox 多載。

public OdfNode AddListBox(string name, string label, IEnumerable<string>? items, OdfLength? x, OdfLength? y)

Parameters

name string
label string
items IEnumerable<string>
x OdfLength?
y OdfLength?

Returns

OdfNode

AddListBox(string, string, IEnumerable<string>?, OdfLength?, OdfLength?, OdfLength?)

Short overload of AddListBox that accepts name, label, items, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、items、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddListBox 多載。

public OdfNode AddListBox(string name, string label, IEnumerable<string>? items, OdfLength? x, OdfLength? y, OdfLength? width)

Parameters

name string
label string
items IEnumerable<string>
x OdfLength?
y OdfLength?
width OdfLength?

Returns

OdfNode

AddListBox(string, string, IEnumerable<string>?, OdfLength?, OdfLength?, OdfLength?, OdfLength?)

Adds a list box control (form:listbox). 新增下拉式清單控制項(form:listbox)。

public OdfNode AddListBox(string name, string label, IEnumerable<string>? items, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)

Parameters

name string

The control name. / 控制項名稱。

label string

The label text. / 標籤文字。

items IEnumerable<string>

The list of options for the list box. / 下拉選單的選項清單。

x OdfLength?

The X-axis position. / X 軸座標位置。

y OdfLength?

The Y-axis position. / Y 軸座標位置。

width OdfLength?

The control width. / 控制項寬度。

height OdfLength?

The control height. / 控制項高度。

Returns

OdfNode

The OdfNode node representing the added list box. / 代表新增的下拉選單 OdfNode 節點。

AddNumericField(string, string)

Short overload of AddNumericField that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddNumericField 多載。

public OdfNode AddNumericField(string name, string label)

Parameters

name string
label string

Returns

OdfNode

AddNumericField(string, string, double?)

Short overload of AddNumericField that accepts name, label, and value; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 value;其餘可選參數使用預設值並轉呼叫最長 AddNumericField 多載。

public OdfNode AddNumericField(string name, string label, double? value)

Parameters

name string
label string
value double?

Returns

OdfNode

AddNumericField(string, string, double?, OdfLength?)

Short overload of AddNumericField that accepts name, label, value, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value 與 x;其餘可選參數使用預設值並轉呼叫最長 AddNumericField 多載。

public OdfNode AddNumericField(string name, string label, double? value, OdfLength? x)

Parameters

name string
label string
value double?
x OdfLength?

Returns

OdfNode

AddNumericField(string, string, double?, OdfLength?, OdfLength?)

Short overload of AddNumericField that accepts name, label, value, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddNumericField 多載。

public OdfNode AddNumericField(string name, string label, double? value, OdfLength? x, OdfLength? y)

Parameters

name string
label string
value double?
x OdfLength?
y OdfLength?

Returns

OdfNode

AddNumericField(string, string, double?, OdfLength?, OdfLength?, OdfLength?)

Short overload of AddNumericField that accepts name, label, value, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddNumericField 多載。

public OdfNode AddNumericField(string name, string label, double? value, OdfLength? x, OdfLength? y, OdfLength? width)

Parameters

name string
label string
value double?
x OdfLength?
y OdfLength?
width OdfLength?

Returns

OdfNode

AddNumericField(string, string, double?, OdfLength?, OdfLength?, OdfLength?, OdfLength?)

Adds a numeric input control (form:number). 新增數值輸入控制項(form:number)。

public OdfNode AddNumericField(string name, string label, double? value, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)

Parameters

name string

The control name. / 控制項名稱。

label string

The label text. / 標籤文字。

value double?

The default numeric value. / 預設數值。

x OdfLength?

The X-axis position. / X 軸座標位置。

y OdfLength?

The Y-axis position. / Y 軸座標位置。

width OdfLength?

The control width. / 控制項寬度。

height OdfLength?

The control height. / 控制項高度。

Returns

OdfNode

The OdfNode node representing the added numeric input. / 代表新增的數值輸入 OdfNode 節點。

AddRadioButton(string, string)

Short overload of AddRadioButton that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddRadioButton 多載。

public OdfNode AddRadioButton(string name, string label)

Parameters

name string
label string

Returns

OdfNode

AddRadioButton(string, string, bool)

Short overload of AddRadioButton that accepts name, label, and isSelected; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 isSelected;其餘可選參數使用預設值並轉呼叫最長 AddRadioButton 多載。

public OdfNode AddRadioButton(string name, string label, bool isSelected)

Parameters

name string
label string
isSelected bool

Returns

OdfNode

AddRadioButton(string, string, bool, OdfLength?)

Short overload of AddRadioButton that accepts name, label, isSelected, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、isSelected 與 x;其餘可選參數使用預設值並轉呼叫最長 AddRadioButton 多載。

public OdfNode AddRadioButton(string name, string label, bool isSelected, OdfLength? x)

Parameters

name string
label string
isSelected bool
x OdfLength?

Returns

OdfNode

AddRadioButton(string, string, bool, OdfLength?, OdfLength?)

Short overload of AddRadioButton that accepts name, label, isSelected, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、isSelected、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddRadioButton 多載。

public OdfNode AddRadioButton(string name, string label, bool isSelected, OdfLength? x, OdfLength? y)

Parameters

name string
label string
isSelected bool
x OdfLength?
y OdfLength?

Returns

OdfNode

AddRadioButton(string, string, bool, OdfLength?, OdfLength?, OdfLength?)

Short overload of AddRadioButton that accepts name, label, isSelected, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、isSelected、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddRadioButton 多載。

public OdfNode AddRadioButton(string name, string label, bool isSelected, OdfLength? x, OdfLength? y, OdfLength? width)

Parameters

name string
label string
isSelected bool
x OdfLength?
y OdfLength?
width OdfLength?

Returns

OdfNode

AddRadioButton(string, string, bool, OdfLength?, OdfLength?, OdfLength?, OdfLength?)

Adds a radio button control (form:radio). 新增單選按鈕控制項(form:radio)。

public OdfNode AddRadioButton(string name, string label, bool isSelected, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)

Parameters

name string

The control name; radio buttons in the same group should share the same name. / 控制項名稱;同一群組內的單選按鈕應使用相同名稱。

label string

The displayed label text. / 顯示的標籤文字。

isSelected bool

The default selected state. / 預設選取狀態。

x OdfLength?

The X-axis position. / X 軸座標位置。

y OdfLength?

The Y-axis position. / Y 軸座標位置。

width OdfLength?

The control width. / 控制項寬度。

height OdfLength?

The control height. / 控制項高度。

Returns

OdfNode

The OdfNode node representing the added radio button. / 代表新增的單選按鈕 OdfNode 節點。

AddTextBox(string, string)

Short overload of AddTextBox that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddTextBox 多載。

public OdfNode AddTextBox(string name, string label)

Parameters

name string
label string

Returns

OdfNode

AddTextBox(string, string, string?)

Short overload of AddTextBox that accepts name, label, and defaultValue; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 defaultValue;其餘可選參數使用預設值並轉呼叫最長 AddTextBox 多載。

public OdfNode AddTextBox(string name, string label, string? defaultValue)

Parameters

name string
label string
defaultValue string

Returns

OdfNode

AddTextBox(string, string, string?, OdfLength?)

Short overload of AddTextBox that accepts name, label, defaultValue, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、defaultValue 與 x;其餘可選參數使用預設值並轉呼叫最長 AddTextBox 多載。

public OdfNode AddTextBox(string name, string label, string? defaultValue, OdfLength? x)

Parameters

name string
label string
defaultValue string
x OdfLength?

Returns

OdfNode

AddTextBox(string, string, string?, OdfLength?, OdfLength?)

Short overload of AddTextBox that accepts name, label, defaultValue, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、defaultValue、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddTextBox 多載。

public OdfNode AddTextBox(string name, string label, string? defaultValue, OdfLength? x, OdfLength? y)

Parameters

name string
label string
defaultValue string
x OdfLength?
y OdfLength?

Returns

OdfNode

AddTextBox(string, string, string?, OdfLength?, OdfLength?, OdfLength?)

Short overload of AddTextBox that accepts name, label, defaultValue, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、defaultValue、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddTextBox 多載。

public OdfNode AddTextBox(string name, string label, string? defaultValue, OdfLength? x, OdfLength? y, OdfLength? width)

Parameters

name string
label string
defaultValue string
x OdfLength?
y OdfLength?
width OdfLength?

Returns

OdfNode

AddTextBox(string, string, string?, OdfLength?, OdfLength?, OdfLength?, OdfLength?)

Adds a text box control (form:text). 新增文字框控制項(form:text)。

public OdfNode AddTextBox(string name, string label, string? defaultValue, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)

Parameters

name string

The control name. / 控制項名稱。

label string

The label text. / 標籤文字。

defaultValue string

The default text content. / 預設文字內容。

x OdfLength?

The X-axis position. / X 軸座標位置。

y OdfLength?

The Y-axis position. / Y 軸座標位置。

width OdfLength?

The control width. / 控制項寬度。

height OdfLength?

The control height. / 控制項高度。

Returns

OdfNode

The OdfNode node representing the added text box. / 代表新增的文字框 OdfNode 節點。

AddTimeField(string, string)

Short overload of AddTimeField that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddTimeField 多載。

public OdfNode AddTimeField(string name, string label)

Parameters

name string
label string

Returns

OdfNode

AddTimeField(string, string, TimeSpan?)

Short overload of AddTimeField that accepts name, label, and value; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 value;其餘可選參數使用預設值並轉呼叫最長 AddTimeField 多載。

public OdfNode AddTimeField(string name, string label, TimeSpan? value)

Parameters

name string
label string
value TimeSpan?

Returns

OdfNode

AddTimeField(string, string, TimeSpan?, OdfLength?)

Short overload of AddTimeField that accepts name, label, value, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value 與 x;其餘可選參數使用預設值並轉呼叫最長 AddTimeField 多載。

public OdfNode AddTimeField(string name, string label, TimeSpan? value, OdfLength? x)

Parameters

name string
label string
value TimeSpan?
x OdfLength?

Returns

OdfNode

AddTimeField(string, string, TimeSpan?, OdfLength?, OdfLength?)

Short overload of AddTimeField that accepts name, label, value, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddTimeField 多載。

public OdfNode AddTimeField(string name, string label, TimeSpan? value, OdfLength? x, OdfLength? y)

Parameters

name string
label string
value TimeSpan?
x OdfLength?
y OdfLength?

Returns

OdfNode

AddTimeField(string, string, TimeSpan?, OdfLength?, OdfLength?, OdfLength?)

Short overload of AddTimeField that accepts name, label, value, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddTimeField 多載。

public OdfNode AddTimeField(string name, string label, TimeSpan? value, OdfLength? x, OdfLength? y, OdfLength? width)

Parameters

name string
label string
value TimeSpan?
x OdfLength?
y OdfLength?
width OdfLength?

Returns

OdfNode

AddTimeField(string, string, TimeSpan?, OdfLength?, OdfLength?, OdfLength?, OdfLength?)

Adds a time input control (form:time). 新增時間輸入控制項(form:time)。

public OdfNode AddTimeField(string name, string label, TimeSpan? value, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)

Parameters

name string

The control name. / 控制項名稱。

label string

The label text. / 標籤文字。

value TimeSpan?

The default time. / 預設時間。

x OdfLength?

The X-axis position. / X 軸座標位置。

y OdfLength?

The Y-axis position. / Y 軸座標位置。

width OdfLength?

The control width. / 控制項寬度。

height OdfLength?

The control height. / 控制項高度。

Returns

OdfNode

The OdfNode node representing the added time input. / 代表新增的時間輸入 OdfNode 節點。

SetControlEvent(OdfNode, string, string)

Short overload of SetControlEvent that accepts controlNode, eventName, and macroName; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 controlNode、eventName 與 macroName;其餘可選參數使用預設值並轉呼叫最長 SetControlEvent 多載。

public void SetControlEvent(OdfNode controlNode, string eventName, string macroName)

Parameters

controlNode OdfNode
eventName string
macroName string

SetControlEvent(OdfNode, string, string, string)

Binds an event listener to a control (office:event-listenersscript:event-listener). 為控制項繫結一個事件監聽器(office:event-listenersscript:event-listener)。

public void SetControlEvent(OdfNode controlNode, string eventName, string macroName, string language)

Parameters

controlNode OdfNode

The control node to bind the event to. / 要繫結事件的控制項節點。

eventName string

The event name (e.g. form:approveaction). / 事件名稱(例如 form:approveaction)。

macroName string

The macro name or location. / 巨集名稱或位置。

language string

The macro language, defaulting to ooo:script. / 巨集語言,預設為 ooo:script

Exceptions

ArgumentNullException

When controlNode is null. / 當 controlNodenull 時擲出。

ArgumentException

When eventName or macroName is blank. / 當 eventNamemacroName 為空白時擲出。

SetControlMaxLength(OdfNode, int)

Sets the maximum character length allowed for input in a control (corresponding to form:max-length). 設定控制項允許輸入的最大字元長度(對應 form:max-length)。

public void SetControlMaxLength(OdfNode controlNode, int maxLength)

Parameters

controlNode OdfNode

The control node. / 控制項節點。

maxLength int

The maximum character length; 0 means unlimited. / 最大字元長度;0 表示不限制。

Exceptions

ArgumentNullException

When controlNode is null. / 當 controlNodenull 時擲出。

ArgumentOutOfRangeException

When maxLength is negative. / 當 maxLength 為負數時擲出。

SetControlRequired(OdfNode, bool)

Sets whether a control is required (corresponding to form:input-required). 設定控制項是否為必填(對應 form:input-required)。

public void SetControlRequired(OdfNode controlNode, bool required)

Parameters

controlNode OdfNode

The control node. / 控制項節點。

required bool

Whether the control is required. / 是否必填。

Exceptions

ArgumentNullException

When controlNode is null. / 當 controlNodenull 時擲出。