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
|
## Index
|
||||||
|
|
||||||
- [Introduction](#introduction)
|
- [Quick start](#quick-start)
|
||||||
- [How to Start](#how-to-start)
|
- [Simplified builder](#simplified-builder)
|
||||||
- [Quick Start](#quick-start)
|
- [Features](#features)
|
||||||
- [Message Handling](#message-handling)
|
* [System calls & bot commands](#system-calls--bot-commands)
|
||||||
* [Example #0 - System Calls](#add-some-system-calls-example-0---system-calls)
|
* [Text messages handling](#text-messages)
|
||||||
* [Example #1 - Simple text messages](#lets-start-with-text-messages-example-1---simple-test)
|
* [Buttons](#buttons)
|
||||||
* [Example #2 - Button test](#now-some-buttons-example-2---button-test)
|
* [Custom controls](#custom-controls)
|
||||||
* [Example #3 - Progress Bar control](#now-some-controls-example-3---progress-bar-test)
|
* [Forms advanced](#forms-advanced)
|
||||||
* [Example #4 - Registration Formular](#registration-example-example-4---registration-form-test)
|
|
||||||
- [Special Forms](#forms)
|
- [Special Forms](#forms)
|
||||||
* [AlertDialog](#alert-dialog)
|
* [AlertDialog](#alert-dialog)
|
||||||
* [AutoCleanForm](#autocleanform)
|
* [AutoCleanForm](#autocleanform)
|
||||||
@ -71,12 +70,12 @@ BitTorrent: `TYVZSykaVT1nKZnz9hjDgBRNB9VavU1bpW`
|
|||||||
* [IgnoreState](#ignorestate)
|
* [IgnoreState](#ignorestate)
|
||||||
- [Navigation and NavigationController (v4.0.0)](#navigation-and-navigationcontroller)
|
- [Navigation and NavigationController (v4.0.0)](#navigation-and-navigationcontroller)
|
||||||
* [As of Now](#as-of-now)
|
* [As of Now](#as-of-now)
|
||||||
* [How to use](#how-to-use-)
|
* [Usage](#usage)
|
||||||
- [Examples](#examples)
|
- [Examples](#examples)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## How to start
|
## Quick start
|
||||||
|
|
||||||
First of all, create a new empty dotnet console project and paste some code:
|
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);
|
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.
|
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.
|
There's a function called `QuickStart` that simplifies building a bit.
|
||||||
@ -178,6 +177,8 @@ var bot = BotBaseBuilder
|
|||||||
bot.Start();
|
bot.Start();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
### System calls & bot commands
|
### System calls & bot commands
|
||||||
|
|
||||||
Using BotFather you can add *Commands* to your bot. The user will see them as popups in a dialog.
|
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;
|
break;
|
||||||
|
|
||||||
case "/params":
|
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);
|
await en.Device.Send("Your parameters are " + m, replyTo: en.Device.LastMessage);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
await bot.UploadBotCommands()
|
await bot.UploadBotCommands()
|
||||||
@ -288,7 +288,6 @@ public class SimpleForm : AutoCleanForm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Buttons
|
### Buttons
|
||||||
@ -474,11 +473,11 @@ Registration forms have never been so easy.
|
|||||||
```csharp
|
```csharp
|
||||||
public class PerForm : AutoCleanForm
|
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)
|
public async override Task Load(MessageResult message)
|
||||||
{
|
{
|
||||||
@ -895,7 +894,8 @@ public interface IStateForm
|
|||||||
|
|
||||||
### Attributes
|
### 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.
|
keep and restore, use the following attributes.
|
||||||
|
|
||||||
#### SaveState
|
#### SaveState
|
||||||
@ -918,7 +918,6 @@ class and it will not get serialized, even if it implements IStateForm or the Sa
|
|||||||
[IgnoreState]
|
[IgnoreState]
|
||||||
public class Registration : STForm
|
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.
|
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.
|
times.
|
||||||
|
|
||||||
This can become really complicated, when not having some controller below which handle these "Push/Pop" calls.
|
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();
|
await this.NavigationController.PopAsync();
|
||||||
```
|
```
|
||||||
|
|
||||||
**Notice**: *By default the `NavigationController` has `ForceCleanupOnLastPop` enabled, which means that when the stack is
|
**Notice**: *By default the `NavigationController` has `ForceCleanupOnLastPop` enabled, which means that when the stack
|
||||||
again at 1 (due to `PopAsync` or `PopToRootAsync` calls) it will replace the controller automatically with the root form you
|
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.*
|
have given to the constructor at the beginning.*
|
||||||
|
|
||||||
## Examples
|
## 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.
|
Example using minimal dotnet console template with EntityFramework and Dependency Injection.
|
||||||
|
|
||||||
- [Examples/EFCore/](Examples/EFCore/)
|
- [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