private KeyboardButton GetKeyboardButton(int rows, int cols, string bgColor, string label, string action, string imageUrl = null, bool silent = false, KeyboardActionTypeEnum actionType = KeyboardActionTypeEnum.Reply, InternalBrowser browser = null, OpenUrlTypeEnum openURLType = OpenUrlTypeEnum.Internal, TextSizeEnum textSize = TextSizeEnum.Regular, TextHorizontalAlignEnum textHAlign = TextHorizontalAlignEnum.Center, TextVerticalAlignEnum textVAlign = TextVerticalAlignEnum.Middle) { string bgndCol = bgColor, frameCol = bgColor; return(new KeyboardButton() { Columns = cols, Rows = rows, Text = $"<font color='#000000'>{label}</font>", TextSize = textSize, TextHorizontalAlign = textHAlign, TextVerticalAlign = textVAlign, ActionType = actionType, ActionBody = action, BackgroundColor = bgndCol, Silent = silent, InternalBrowser = browser, UrlOpenType = openURLType, TextShouldFit = true, Frame = new KeyboardButtonFrame() { BorderColor = frameCol, BorderWidth = 5, CornerRadius = 2 }, Image = imageUrl }); }
private KeyboardButton GetKeyboardButton(int cols, string bgColor, string label, string action, bool silent = false, KeyboardActionTypeEnum actionType = KeyboardActionTypeEnum.Reply, InternalBrowser browser = null, OpenUrlTypeEnum openURLType = OpenUrlTypeEnum.Internal, TextSizeEnum textSize = TextSizeEnum.Regular, TextHorizontalAlignEnum textHAlign = TextHorizontalAlignEnum.Center, TextVerticalAlignEnum textVAlign = TextVerticalAlignEnum.Middle) { return(GetKeyboardButton(1, cols, bgColor, label, action, null, silent, actionType, browser, openURLType, textSize, textHAlign, textVAlign)); }