From ae6be999347f397f5968b9cbd75595db957381fa Mon Sep 17 00:00:00 2001 From: Zakharov_Rostislav Date: Mon, 21 Oct 2024 12:02:15 +0400 Subject: [PATCH] fix(lab1) : fix LimitedText component --- ComponentLibrary1/ComponentLibrary1.csproj | 1 + ComponentLibrary1/limited_text/LimitedText.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ComponentLibrary1/ComponentLibrary1.csproj b/ComponentLibrary1/ComponentLibrary1.csproj index 5a87b6b..8d6e7ea 100644 --- a/ComponentLibrary1/ComponentLibrary1.csproj +++ b/ComponentLibrary1/ComponentLibrary1.csproj @@ -6,6 +6,7 @@ true enable True + $(VersionPrefix)1.0.1 diff --git a/ComponentLibrary1/limited_text/LimitedText.cs b/ComponentLibrary1/limited_text/LimitedText.cs index 0fd20ab..ab95d72 100644 --- a/ComponentLibrary1/limited_text/LimitedText.cs +++ b/ComponentLibrary1/limited_text/LimitedText.cs @@ -87,10 +87,11 @@ namespace ComponentLibrary1 { return; } - if (value.Length >= Min && value.Length <= Max) + if (value.Length < Min || value.Length > Max) { return; } + textBox.Text = value; } }