Adding Init method to controls
This commit is contained in:
parent
0202fc29a8
commit
dc8cb81284
@ -28,6 +28,14 @@ namespace TelegramBotBase.Base
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Enabled { get; set; } = true;
|
public bool Enabled { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get invoked when control will be added to a form and invoked.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public virtual void Init()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public virtual async Task Load(MessageResult result)
|
public virtual async Task Load(MessageResult result)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -394,6 +394,8 @@ namespace TelegramBotBase.Form
|
|||||||
control.ID = this.Controls.Count + 1;
|
control.ID = this.Controls.Count + 1;
|
||||||
control.Device = this.Device;
|
control.Device = this.Device;
|
||||||
this.Controls.Add(control);
|
this.Controls.Add(control);
|
||||||
|
|
||||||
|
control.Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user