Reformat code

This commit is contained in:
2023-06-01 04:17:16 +02:00
parent 23bfda2d75
commit ef92878cbd
53 changed files with 975 additions and 523 deletions

View File

@@ -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}"; }
}

View File

@@ -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); }
}

View File

@@ -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) { }
}

View File

@@ -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>