Reformat code
This commit is contained in:
@@ -5,22 +5,19 @@ using VAR.WebFormsCore.Pages;
|
||||
|
||||
namespace VAR.WebFormsCore.TestWebApp;
|
||||
|
||||
public class FrmDefault: PageCommon
|
||||
public class FrmDefault : PageCommon
|
||||
{
|
||||
private readonly CTextBox _txtText = new() { ID = "txtText", CssClassExtra = "width150px", AllowEmpty = false };
|
||||
private readonly Button _btnTest = new() { ID = "btnTest", };
|
||||
private readonly Label _lblMessage = new() { ID = "lblMessage", };
|
||||
|
||||
|
||||
public FrmDefault()
|
||||
{
|
||||
MustBeAuthenticated = false;
|
||||
Init += FrmLogin_Init;
|
||||
}
|
||||
|
||||
private void FrmLogin_Init(object? sender, EventArgs e)
|
||||
{
|
||||
InitializeControls();
|
||||
}
|
||||
|
||||
private void FrmLogin_Init(object? sender, EventArgs e) { InitializeControls(); }
|
||||
|
||||
private void InitializeControls()
|
||||
{
|
||||
@@ -34,12 +31,9 @@ public class FrmDefault: PageCommon
|
||||
Controls.Add(FormUtils.CreateField(string.Empty, _btnTest));
|
||||
_btnTest.Text = MultiLang.GetLiteral("Test");
|
||||
_btnTest.Click += BtnTest_Click;
|
||||
|
||||
|
||||
Controls.Add(FormUtils.CreateField(string.Empty, _lblMessage));
|
||||
}
|
||||
|
||||
private void BtnTest_Click(object? sender, EventArgs e)
|
||||
{
|
||||
_lblMessage.Text = $"Hello World: {_txtText.Text}";
|
||||
}
|
||||
private void BtnTest_Click(object? sender, EventArgs e) { _lblMessage.Text = $"Hello World: {_txtText.Text}"; }
|
||||
}
|
||||
Reference in New Issue
Block a user