Fix typos.

This commit is contained in:
2023-05-27 22:13:40 +02:00
parent 95ae3f7bc4
commit f52d80e643
8 changed files with 35 additions and 22 deletions

View File

@@ -19,7 +19,7 @@ public class TestWebAppGlobalConfig : IGlobalConfig
return false;
}
public void UserUnauthenticate(HttpContext context)
public void UserDeauthenticate(HttpContext context)
{
}
}

View File

@@ -1,2 +1,17 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ID/@EntryIndexedValue">ID</s:String></wpf:ResourceDictionary>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FBuiltInTypes/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FDeconstructionDeclarations/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FElsewhere/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FSimpleTypes/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ID/@EntryIndexedValue">ID</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=abiword/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Childs/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Deauthenticate/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=mpkg/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=msvideo/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=msword/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=nosniff/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=opendocument/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Uncacheable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Validable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=weba/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@@ -9,19 +9,19 @@ namespace VAR.WebFormsCore.Code
{
#region HttpContext
public static string? GetRequestParm(this HttpContext context, string parm)
public static string GetRequestParameter(this HttpContext context, string parameter)
{
if (context.Request.Method == "POST")
{
foreach (string key in context.Request.Form.Keys)
{
if (string.IsNullOrEmpty(key) == false && key == parm) { return context.Request.Form[key]; }
if (string.IsNullOrEmpty(key) == false && key == parameter) { return context.Request.Form[key][0] ?? string.Empty; }
}
}
foreach (string key in context.Request.Query.Keys)
{
if (string.IsNullOrEmpty(key) == false && key == parm) { return context.Request.Query[key]; }
if (string.IsNullOrEmpty(key) == false && key == parameter) { return context.Request.Query[key][0] ?? string.Empty; }
}
return string.Empty;

View File

@@ -19,9 +19,7 @@ namespace VAR.WebFormsCore.Code
.SelectMany(x => x.GetTypes())
.FirstOrDefault(
x =>
x.IsAbstract == false &&
x.IsInterface == false &&
x.IsPublic &&
x is { IsAbstract: false, IsInterface: false, IsPublic: true } &&
iGlobalConfig.IsAssignableFrom(x)
);
if(foundGlobalConfig != null)
@@ -48,7 +46,7 @@ namespace VAR.WebFormsCore.Code
return false;
}
public void UserUnauthenticate(HttpContext context)
public void UserDeauthenticate(HttpContext context)
{
}
}

View File

@@ -14,6 +14,6 @@ namespace VAR.WebFormsCore.Code
List<string> AllowedExtensions { get; }
bool IsUserAuthenticated(HttpContext context);
void UserUnauthenticate(HttpContext context);
void UserDeauthenticate(HttpContext context);
}
}

View File

@@ -13,7 +13,7 @@ namespace VAR.WebFormsCore.Controls
private HiddenField? _hidSize;
private const string CssClassBase = "textbox";
private const string CssClassBase = "textBox";
private string _cssClassExtra = "";
private bool _allowEmpty = true;
@@ -85,7 +85,7 @@ namespace VAR.WebFormsCore.Controls
public CTextBox()
{
Init += CTextBox_Init;
PreRender += CTextbox_PreRender;
PreRender += CTextBox_PreRender;
}
private void CTextBox_Init(object? sender, EventArgs e)
@@ -100,7 +100,7 @@ namespace VAR.WebFormsCore.Controls
Controls.Add(_hidSize);
}
string strCfgName = $"{this.ClientID}_cfg";
string strCfgName = $"{ClientID}_cfg";
Dictionary<string, object> cfg = new()
{
{"txtContent", _txtContent.ClientID}, {"hidSize", _hidSize?.ClientID ?? string.Empty}, {"keepSize", _keepSize},
@@ -115,7 +115,7 @@ namespace VAR.WebFormsCore.Controls
}
}
private void CTextbox_PreRender(object? sender, EventArgs e)
private void CTextBox_PreRender(object? sender, EventArgs e)
{
_txtContent.CssClass = CssClassBase;
if (string.IsNullOrEmpty(_cssClassExtra) == false)
@@ -125,10 +125,10 @@ namespace VAR.WebFormsCore.Controls
if (Page?.IsPostBack == true && (_allowEmpty == false && IsEmpty()) || _markedInvalid)
{
_txtContent.CssClass += " textboxInvalid";
_txtContent.CssClass += " textBoxInvalid";
}
_txtContent.Attributes.Add("onchange", "ElementRemoveClass(this, 'textboxInvalid');");
_txtContent.Attributes.Add("onchange", "ElementRemoveClass(this, 'textBoxInvalid');");
if (string.IsNullOrEmpty(_placeHolder) == false)
{

View File

@@ -70,7 +70,7 @@ namespace VAR.WebFormsCore.Pages
{
if(Context != null)
{
GlobalConfig.Get().UserUnauthenticate(Context);
GlobalConfig.Get().UserDeauthenticate(Context);
}
if (MustBeAuthenticated) { Context?.Response.Redirect(GlobalConfig.Get().LoginHandler); }
}

View File

@@ -115,7 +115,7 @@ h3 {
font-size: 12px;
}
.textbox {
.textBox {
background: white;
border: solid 1px rgba(0, 0, 0, 0.5);
border-radius: 5px;
@@ -126,23 +126,23 @@ h3 {
box-shadow: inset 0 -2px 5px rgba(255, 255, 255, 1), inset 0 2px 5px rgba(128, 128, 128, 1);
}
.textbox:focus {
.textBox:focus {
border: solid 1px black;
box-shadow: 0 0 10px rgba(255, 255, 255, 0.5), inset 0 -2px 5px rgba(255, 255, 255, 1), inset 0 2px 5px rgba(0, 0, 0, 0.5);
}
textarea.textbox {
textarea.textBox {
height: 64px;
resize: vertical;
min-height: 21px;
}
.textboxInvalid {
.textBoxInvalid {
box-shadow: 0 0 10px rgba(255, 0, 0, 1), inset 0 -2px 5px rgba(255, 255, 255, 1), inset 0 2px 5px rgba(0, 0, 0, 0.5);
border: solid 1px rgb(255, 0, 0);
}
.textboxInvalid:focus {
.textBoxInvalid:focus {
box-shadow: 0 0 10px rgba(255, 0, 0, 1), inset 0 -2px 5px rgba(255, 255, 255, 1), inset 0 2px 5px rgba(0, 0, 0, 0.5);
border: solid 1px black;
}