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}"; }
|
||||
}
|
||||
@@ -4,9 +4,5 @@ namespace VAR.WebFormsCore.TestWebApp;
|
||||
|
||||
public static class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
DefaultMain.WebFormCoreMain(args);
|
||||
}
|
||||
|
||||
public static void Main(string[] args) { DefaultMain.WebFormCoreMain(args); }
|
||||
}
|
||||
@@ -15,12 +15,7 @@ public class TestWebAppGlobalConfig : IGlobalConfig
|
||||
public List<string> AllowedExtensions { get; } = new()
|
||||
{ ".png", ".jpg", ".jpeg", ".gif", ".ico", ".wav", ".mp3", ".ogg", ".mp4", ".webm", ".webp", ".mkv", ".avi" };
|
||||
|
||||
public bool IsUserAuthenticated(IWebContext context)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public bool IsUserAuthenticated(IWebContext context) { return false; }
|
||||
|
||||
public void UserDeauthenticate(IWebContext context)
|
||||
{
|
||||
}
|
||||
public void UserDeauthenticate(IWebContext context) { }
|
||||
}
|
||||
@@ -6,8 +6,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\VAR.WebFormsCore.AspNetCore\VAR.WebFormsCore.AspNetCore.csproj" />
|
||||
<ProjectReference Include="..\VAR.WebFormsCore\VAR.WebFormsCore.csproj" />
|
||||
<ProjectReference Include="..\VAR.WebFormsCore.AspNetCore\VAR.WebFormsCore.AspNetCore.csproj"/>
|
||||
<ProjectReference Include="..\VAR.WebFormsCore\VAR.WebFormsCore.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user