From 3a309baeaea5bc83512cebb38f0218afcb992300 Mon Sep 17 00:00:00 2001 From: Florian Dahn Date: Sun, 14 Jul 2019 23:14:37 +0200 Subject: [PATCH] Update README.md --- README.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 45463f7..257a9f1 100644 --- a/README.md +++ b/README.md @@ -230,7 +230,7 @@ On every input the user is sending back to the bot the Action event gets raised. ### Lets start with text messages (Example #1 - Simple Test) - + ``` public class SimpleForm : AutoCleanForm @@ -285,6 +285,7 @@ public class SimpleForm : AutoCleanForm I using a different base class (AutoCleanForm) I created for a better "feeling" inside the bot which will delete "old" messages from this form. You have some settings within this class to manage when messages should be getting deleted. + ``` public class ButtonTestForm : AutoCleanForm @@ -362,6 +363,8 @@ public class ButtonTestForm : AutoCleanForm btn.AddButtonRow(new ButtonBase("Button 3", new CallbackData("a", "button3").Serialize()), new ButtonBase("Button 4", new CallbackData("a", "button4").Serialize())); + btn.AddButtonRow(new ButtonBase("Google.com", "google", "https://www.google.com"), new ButtonBase("Telegram", "telegram", "https://telegram.org/")); + btn.AddButtonRow(new ButtonBase("Back", new CallbackData("a", "back").Serialize())); await this.Device.Send("Click a button", btn); @@ -377,6 +380,8 @@ public class ButtonTestForm : AutoCleanForm Sometimes it makes sense to show the end user a type of progressbar or status. For this i tried to make a simple control, which is useful for some situations. Maybe, if i got more ideas, i will add other "controls" in the future. + + ``` public class ProgressTest : AutoCleanForm @@ -511,6 +516,14 @@ public override async Task Closed() I read it a lot in different Telegram groups that some developers are searching for easy solutions to create context based apps. For this is my project an ideal solution here. To give you an example about the possiblities, i added into the Test project an example for a registration form. + + + + + + + + ``` public class PerForm : AutoCleanForm @@ -633,6 +646,8 @@ For now we have the following: ### Alert Dialog + + ``` var fto = new TestForm2(); @@ -646,11 +661,11 @@ await this.NavigateTo(ad); ### AutoCleanForm - +No example yet ### Prompt Dialog -No example yet + #### Without Eventhandler (pre-init of form necessary)