Table of Contents

Class ListDialog

Namespace
SampSharp.Entities.SAMP
Assembly
SampSharp.OpenMp.Entities.dll

Represents a dialog with a list of selectable rows.

public class ListDialog : IDialog<ListDialogResponse>, IDialog, IEnumerable<ListDialogRow>, IEnumerable
Inheritance
ListDialog
Implements
Inherited Members

Constructors

ListDialog(string, string?, string?)

Represents a dialog with a list of selectable rows.

public ListDialog(string caption, string? button1, string? button2 = null)

Parameters

caption string

The caption.

button1 string

The text on the left button.

button2 string

The text on the right button. If the value is null, the right button is hidden.

Properties

Button1

Gets or sets the text on the left button of this list dialog.

public string? Button1 { get; set; }

Property Value

string

Button2

Gets or sets the text on the right button of this list dialog. If the value is null, the right button is hidden.

public string? Button2 { get; set; }

Property Value

string

Caption

Gets or sets the caption of this list dialog.

public string? Caption { get; set; }

Property Value

string

Rows

Gets the rows of this dialog.

public ListDialogRowCollection Rows { get; }

Property Value

ListDialogRowCollection

Methods

Add(ListDialogRow)

Adds the specified row to the list.

public void Add(ListDialogRow row)

Parameters

row ListDialogRow

The row to add.

Exceptions

ArgumentNullException

Thrown if row is null.

Add(string)

Adds a row to the list with the specified text.

public void Add(string text)

Parameters

text string

The text of the row to add.

Exceptions

ArgumentNullException

Thrown if text is null.

Add(string, object?)

Adds a row to the list with the specified text and tag.

public void Add(string text, object? tag)

Parameters

text string

The text of the row to add.

tag object

The tag of the row to add. The tag can be used so associate data with this row which can be used retrieved when the user responds to the dialog.

Exceptions

ArgumentNullException

Thrown if text is null.

GetEnumerator()

Returns an enumerator that iterates through the rows of this list dialog.

public IEnumerator<ListDialogRow> GetEnumerator()

Returns

IEnumerator<ListDialogRow>

The enumerator that can be used to iterate through the rows of this list dialog.