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
Text
获取按钮的文本元素。
public IElement Text { get; }
Property Value
Theme
获取按钮的主题。
public ButtonTheme? Theme { get; }
Property Value
Type
获取元素的类型。
public ElementType Type { get; }
Property Value
Value
获取按钮的值。
public string? Value { get; }
Property Value
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
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
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
ButtonElementright
ButtonElement
Returns
- bool
如果两个 ButtonElement 相等,则为
true
;否则为false
。
operator !=(ButtonElement?, ButtonElement?)
判定两个 ButtonElement 是否不相等。
public static bool operator !=(ButtonElement? left, ButtonElement? right)
Parameters
left
ButtonElementright
ButtonElement
Returns
- bool
如果两个 ButtonElement 不相等,则为
true
;否则为false
。