예제 #1
0
    public CoreKeyboard AddButton(string text, CoreKeyboardButtonColor color, string payloadKey, string payloadValue)
    {
        var button = new CoreKeyboardButton
        {
            Title = text,
            Color = color
        };

        button.SetPayload(payloadKey, payloadValue);
        LastLine.Add(button);

        return(this);
    }
예제 #2
0
    public CoreKeyboard AddReturnToMenuButton(bool addNewLine = true)
    {
        if (addNewLine)
        {
            AddLine();
        }

        var button = new CoreKeyboardButton
        {
            Title = ReturnToMainMenuText,
            Color = CoreKeyboardButtonColor.Default
        };

        button.SetPayload("command", "start");
        LastLine.Add(button);

        return(this);
    }