Exemplo n.º 1
0
        public override async Task Render(MessageResult message)
        {
            if (this.Value == null)
            {
                if (this.ShowBackButton)
                {
                    ButtonForm bf = new ButtonForm();
                    bf.AddButtonRow(new ButtonBase(BackLabel, "back"));
                    await this.Device.Send(this.Message, (ReplyMarkupBase)bf);

                    return;
                }

                await this.Device.Send(this.Message);

                return;
            }


            message.Handled = true;

            OnCompleted(new PromptDialogCompletedEventArgs()
            {
                Tag = this.Tag, Value = this.Value
            });

            await this.CloseForm();
        }
Exemplo n.º 2
0
        public override async Task Render(MessageResult message)
        {
            ButtonForm btn = new ButtonForm();

            var buttons = this.Buttons.Select(a => new ButtonBase(a.Text, CallbackData.Create("action", a.Value))).ToList();

            btn.AddButtonRow(buttons);

            await this.Device.Send(this.Message, btn);
        }
Exemplo n.º 3
0
        public override async Task Render(MessageResult message)
        {
            if (this.Value == null)
            {
                if (this.ShowBackButton)
                {
                    ButtonForm bf = new ButtonForm();
                    bf.AddButtonRow(new ButtonBase(BackLabel, "back"));
                    await this.Device.Send(this.Message, (ReplyMarkupBase)bf);

                    return;
                }

                await this.Device.Send(this.Message);

                return;
            }


            OnCompleted(new EventArgs());

            await this.CloseForm();
        }