C2022-003-Change-Textboxes-to-RTF-3
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user