-
-
Notifications
You must be signed in to change notification settings - Fork 42
/
PerStep.cs
41 lines (30 loc) · 947 Bytes
/
PerStep.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System.Threading.Tasks;
using TelegramBotBase.Base;
using TelegramBotBase.Example.Tests.Register.Steps;
using TelegramBotBase.Form;
namespace TelegramBotBase.Example.Tests.Register;
public class PerStep : AutoCleanForm
{
public override async Task Action(MessageResult message)
{
await message.ConfirmAction();
switch (message.RawData)
{
case "start":
var step1 = new Step1();
await NavigateTo(step1);
break;
case "back":
var start = new Start();
await NavigateTo(start);
break;
}
}
public override async Task Render(MessageResult message)
{
var bf = new ButtonForm();
bf.AddButtonRow(new ButtonBase("Goto Step 1", "start"));
bf.AddButtonRow(new ButtonBase("Back", "back"));
await Device.Send("Register Steps", bf);
}
}