Simplified and removed unecessary Init Calls in Example Project
This commit is contained in:
parent
cbd162fd3b
commit
4577fe6901
@ -1,6 +1,9 @@
|
||||
|
||||
[](https://www.nuget.org/packages/TelegramBotBase/)
|
||||
|
||||
Telegram Group: [https://t.me/tgbotbase]
|
||||
|
||||
|
||||
Hey guys,
|
||||
|
||||
here we are. After some time and thoughts i give my TelegramBot framework to public.
|
||||
@ -95,8 +98,6 @@ Go ahead, create it, initialize it and navigate to it:
|
||||
```
|
||||
var tf = new TestForm();
|
||||
|
||||
await tf.Init();
|
||||
|
||||
await this.NavigateTo(tf);
|
||||
```
|
||||
|
||||
@ -134,7 +135,6 @@ Below we have 3 options.
|
||||
case "/form1":
|
||||
|
||||
var form1 = new TestForm();
|
||||
await form1.Init();
|
||||
|
||||
await en.Device.ActiveForm.NavigateTo(form1);
|
||||
|
||||
@ -142,7 +142,6 @@ Below we have 3 options.
|
||||
case "/form2":
|
||||
|
||||
var form2 = new TestForm2();
|
||||
await form2.Init();
|
||||
|
||||
await en.Device.ActiveForm.NavigateTo(form2);
|
||||
|
||||
@ -265,8 +264,6 @@ public class ButtonTestForm : AutoCleanForm
|
||||
|
||||
var st = new Start();
|
||||
|
||||
await st.Init();
|
||||
|
||||
await this.NavigateTo(st);
|
||||
|
||||
break;
|
||||
|
||||
@ -1,6 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@ -14,7 +14,7 @@ namespace TelegramBaseTest
|
||||
static void Main(string[] args)
|
||||
{
|
||||
|
||||
String APIKey = " ";
|
||||
String APIKey = "480896099:AAEtq_owUqRH62DR0gYc-ZWRI_TWl8El1YQ";
|
||||
|
||||
BotBase<Start> bb = new BotBase<Start>(APIKey);
|
||||
|
||||
@ -29,7 +29,6 @@ namespace TelegramBaseTest
|
||||
case "/form1":
|
||||
|
||||
var form1 = new TestForm();
|
||||
await form1.Init();
|
||||
|
||||
await en.Device.ActiveForm.NavigateTo(form1);
|
||||
|
||||
@ -37,7 +36,6 @@ namespace TelegramBaseTest
|
||||
case "/form2":
|
||||
|
||||
var form2 = new TestForm2();
|
||||
await form2.Init();
|
||||
|
||||
await en.Device.ActiveForm.NavigateTo(form2);
|
||||
|
||||
|
||||
@ -67,8 +67,12 @@
|
||||
<Compile Include="Tests\TestForm2.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="App.config">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="packages.config">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\TelegramBotBase\TelegramBotBase.csproj">
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.168
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TelegramBaseTest", "TelegramBaseTest\TelegramBaseTest.csproj", "{5817184C-0D59-4924-AC6C-6B943967811C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TelegramBotBase", "TelegramBotBase\TelegramBotBase.csproj", "{A61EDA27-CFDF-4BCB-B2D6-184F94904F2D}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E9AE1280-C1F3-4960-9D3D-D4F25142E838}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
README.md = README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -25,4 +30,7 @@ Global
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {4245F162-E263-45E0-A16A-ED5F411A4AFC}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user