docs: fix anchors
This commit is contained in:
parent
869d16fa02
commit
a125addd2e
56
README.md
56
README.md
@ -30,15 +30,14 @@ BitTorrent: `TYVZSykaVT1nKZnz9hjDgBRNB9VavU1bpW`
|
||||
|
||||
## Index
|
||||
|
||||
- [Introduction](#introduction)
|
||||
- [How to Start](#how-to-start)
|
||||
- [Quick Start](#quick-start)
|
||||
- [Message Handling](#message-handling)
|
||||
* [Example #0 - System Calls](#add-some-system-calls-example-0---system-calls)
|
||||
* [Example #1 - Simple text messages](#lets-start-with-text-messages-example-1---simple-test)
|
||||
* [Example #2 - Button test](#now-some-buttons-example-2---button-test)
|
||||
* [Example #3 - Progress Bar control](#now-some-controls-example-3---progress-bar-test)
|
||||
* [Example #4 - Registration Formular](#registration-example-example-4---registration-form-test)
|
||||
- [Quick start](#quick-start)
|
||||
- [Simplified builder](#simplified-builder)
|
||||
- [Features](#features)
|
||||
* [System calls & bot commands](#system-calls--bot-commands)
|
||||
* [Text messages handling](#text-messages)
|
||||
* [Buttons](#buttons)
|
||||
* [Custom controls](#custom-controls)
|
||||
* [Forms advanced](#forms-advanced)
|
||||
- [Special Forms](#forms)
|
||||
* [AlertDialog](#alert-dialog)
|
||||
* [AutoCleanForm](#autocleanform)
|
||||
@ -71,12 +70,12 @@ BitTorrent: `TYVZSykaVT1nKZnz9hjDgBRNB9VavU1bpW`
|
||||
* [IgnoreState](#ignorestate)
|
||||
- [Navigation and NavigationController (v4.0.0)](#navigation-and-navigationcontroller)
|
||||
* [As of Now](#as-of-now)
|
||||
* [How to use](#how-to-use-)
|
||||
* [Usage](#usage)
|
||||
- [Examples](#examples)
|
||||
|
||||
---
|
||||
|
||||
## How to start
|
||||
## Quick start
|
||||
|
||||
First of all, create a new empty dotnet console project and paste some code:
|
||||
|
||||
@ -164,7 +163,7 @@ var form = new TestForm();
|
||||
await this.NavigateTo(form);
|
||||
```
|
||||
|
||||
## Quick Start:
|
||||
## Simplified builder
|
||||
|
||||
When migrating from a previous version or starting completely new, all these options can be a bit overwhelming.
|
||||
There's a function called `QuickStart` that simplifies building a bit.
|
||||
@ -178,6 +177,8 @@ var bot = BotBaseBuilder
|
||||
bot.Start();
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
### System calls & bot commands
|
||||
|
||||
Using BotFather you can add *Commands* to your bot. The user will see them as popups in a dialog.
|
||||
@ -227,11 +228,10 @@ bot.BotCommand += async (s, en) =>
|
||||
break;
|
||||
|
||||
case "/params":
|
||||
String m = en.Parameters.DefaultIfEmpty("").Aggregate((a, b) => a + " and " + b);
|
||||
string m = en.Parameters.DefaultIfEmpty("").Aggregate((a, b) => a + " and " + b);
|
||||
await en.Device.Send("Your parameters are " + m, replyTo: en.Device.LastMessage);
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
await bot.UploadBotCommands()
|
||||
@ -288,7 +288,6 @@ public class SimpleForm : AutoCleanForm
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### Buttons
|
||||
@ -474,11 +473,11 @@ Registration forms have never been so easy.
|
||||
```csharp
|
||||
public class PerForm : AutoCleanForm
|
||||
{
|
||||
public String EMail { get; set; }
|
||||
public string EMail { get; set; }
|
||||
|
||||
public String Firstname { get; set; }
|
||||
public string Firstname { get; set; }
|
||||
|
||||
public String Lastname { get; set; }
|
||||
public string Lastname { get; set; }
|
||||
|
||||
public async override Task Load(MessageResult message)
|
||||
{
|
||||
@ -895,7 +894,8 @@ public interface IStateForm
|
||||
|
||||
### Attributes
|
||||
|
||||
If you don't want to implement the `IStateForm` interface, because there are maybe *just* one or two properties you want to
|
||||
If you don't want to implement the `IStateForm` interface, because there are maybe *just* one or two properties you want
|
||||
to
|
||||
keep and restore, use the following attributes.
|
||||
|
||||
#### SaveState
|
||||
@ -918,7 +918,6 @@ class and it will not get serialized, even if it implements IStateForm or the Sa
|
||||
[IgnoreState]
|
||||
public class Registration : STForm
|
||||
{
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
@ -942,7 +941,8 @@ details and latest matches.
|
||||
|
||||
After the matches, you want to maybe switch to different teams and take a look at their statistics and matches.
|
||||
|
||||
At some point, you *just* want to get back to the first team so like on Android you're clicking the "back" button multiple
|
||||
At some point, you *just* want to get back to the first team so like on Android you're clicking the "back" button
|
||||
multiple
|
||||
times.
|
||||
|
||||
This can become really complicated, when not having some controller below which handle these "Push/Pop" calls.
|
||||
@ -985,8 +985,10 @@ When you want to go back one Form on the stack use `PopAsync`:
|
||||
await this.NavigationController.PopAsync();
|
||||
```
|
||||
|
||||
**Notice**: *By default the `NavigationController` has `ForceCleanupOnLastPop` enabled, which means that when the stack is
|
||||
again at 1 (due to `PopAsync` or `PopToRootAsync` calls) it will replace the controller automatically with the root form you
|
||||
**Notice**: *By default the `NavigationController` has `ForceCleanupOnLastPop` enabled, which means that when the stack
|
||||
is
|
||||
again at 1 (due to `PopAsync` or `PopToRootAsync` calls) it will replace the controller automatically with the root form
|
||||
you
|
||||
have given to the constructor at the beginning.*
|
||||
|
||||
## Examples
|
||||
@ -1007,11 +1009,3 @@ Will delete Join and Leave messages automatically in groups.
|
||||
Example using minimal dotnet console template with EntityFramework and Dependency Injection.
|
||||
|
||||
- [Examples/EFCore/](Examples/EFCore/)
|
||||
|
||||
---
|
||||
|
||||
I will add more notes to it soon, so stay tuned.
|
||||
|
||||
Warm regards
|
||||
|
||||
Florian Dahn
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user