C2022-003-Change-Textboxes-to-RTF-3

This commit is contained in:
2026-01-29 19:38:04 -05:00
parent 77c6298067
commit 35eb05432b
8 changed files with 36 additions and 144 deletions

View File

@@ -77,6 +77,7 @@ using System.Xml.Schema;
using System.Text;
using ROFields;
using RODBInterface;
using System.Linq;
namespace ROEditor
{
@@ -594,31 +595,15 @@ namespace ROEditor
}
private void txtBox_KeyDown(object sender, KeyEventArgs e)
{
bool symFlg = false;
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
{
string clpBrd = Clipboard.GetText();
char[] chrAry = clpBrd.ToCharArray();
foreach (int chr in chrAry)
{
if (chr > 166)
{
symFlg = true;
break;
}
else
{
symFlg = false;
}
}
if (symFlg == true)
if (clpBrd.Any(c => c > 166))
{
MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
Clipboard.Clear();
}
}
}
}
}