Table of Contents

Class ButtonElement

Namespace
Kook
Assembly
Kook.Net.Core.dll

按钮元素,可用于 IModule 中。

public class ButtonElement : IElement, IEquatable<ButtonElement>, IEquatable<IElement>
Inheritance
ButtonElement
Implements
Inherited Members
Extension Methods

Properties

Click

获取按钮被点击时触发的事件类型。

public ButtonClickEventType? Click { get; }

Property Value

ButtonClickEventType?

Text

获取按钮的文本元素。

public IElement Text { get; }

Property Value

IElement

Theme

获取按钮的主题。

public ButtonTheme? Theme { get; }

Property Value

ButtonTheme?

Type

获取元素的类型。

public ElementType Type { get; }

Property Value

ElementType

Value

获取按钮的值。

public string? Value { get; }

Property Value

string

Methods

Equals(ButtonElement?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(ButtonElement? buttonElement)

Parameters

buttonElement ButtonElement

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Operators

operator ==(ButtonElement?, ButtonElement?)

判定两个 ButtonElement 是否相等。

public static bool operator ==(ButtonElement? left, ButtonElement? right)

Parameters

left ButtonElement
right ButtonElement

Returns

bool

如果两个 ButtonElement 相等,则为 true;否则为 false

operator !=(ButtonElement?, ButtonElement?)

判定两个 ButtonElement 是否不相等。

public static bool operator !=(ButtonElement? left, ButtonElement? right)

Parameters

left ButtonElement
right ButtonElement

Returns

bool

如果两个 ButtonElement 不相等,则为 true;否则为 false