Ejemplo n.º 1
0
        protected override void ButtonsInitializer()
        {
            if (BlacklistEnabled)
            {
                foreach (var label in Labels)
                {
                    string sign = string.Empty;
                    if (BlacklistedLabels.Exists(b => b.LabelId == label.LabelId))
                    {
                        sign = Emoji.RESTRICTION_SIGN;
                    }

                    var button = InitButton(InlineKeyboardType.CallbackData, $"{sign} {label.Name}", LabelButtonCommand,
                                            SelectedOption.None, label.LabelId);
                    LabelsListRowList.Add(new List <InlineKeyboardButton> {
                        button
                    });
                }
            }
            else
            {
                var useButton = InitButton(InlineKeyboardType.CallbackData, LabelListButtonCaption.UseBlacklist, UseBlacklistButtonCommand, SelectedOption.Option1);
                LabelsListRowList.Add(new List <InlineKeyboardButton> {
                    useButton
                });
            }
            BackLabelsListButton = InitButton(InlineKeyboardType.CallbackData, GeneralButtonCaption.Back, CallbackCommand.LABELS_LIST_BACK_COMMAND, SelectedOption.Option10);
        }
Ejemplo n.º 2
0
 protected override void ButtonsInitializer()
 {
     foreach (var label in Labels)
     {
         var button = InitButton(InlineKeyboardType.CallbackData, label.Name, LabelButtonCommand,
                                 SelectedOption.None, label.LabelId);
         LabelsListRowList.Add(new List <InlineKeyboardButton> {
             button
         });
     }
     BackLabelsListButton = InitButton(InlineKeyboardType.CallbackData, GeneralButtonCaption.Back, CallbackCommand.LABELS_LIST_BACK_COMMAND, SelectedOption.Option10);
 }