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
{
@@ -321,24 +322,14 @@ namespace ROEditor
bool symFlg = false;
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
{
string clpBrd = Clipboard.GetText();
char[] chrAry = clpBrd.ToCharArray();
foreach (int chr in chrAry)
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
{
if (chr > 166)
string clpBrd = Clipboard.GetText();
if (clpBrd.Any(c => c > 166))
{
symFlg = true;
break;
MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
Clipboard.Clear();
}
else
{
symFlg = false;
}
}
if (symFlg == true)
{
MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
Clipboard.Clear();
}
}
}