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

This commit is contained in:
2026-01-28 14:47:00 -05:00
parent 0ae45eb918
commit 77c6298067
9 changed files with 295 additions and 20 deletions

View File

@@ -1311,6 +1311,32 @@ 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)
{
MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
Clipboard.Clear();
}
}
}
#region Windows Form Designer generated code
/// <summary>
@@ -1375,6 +1401,7 @@ namespace ROEditor
this.tbRetVal.Size = new System.Drawing.Size(464, 22);
this.tbRetVal.TabIndex = 4;
this.tbRetVal.Text = "textBox1";
this.tbRetVal.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
//
// tbMenuVal
//
@@ -1383,6 +1410,7 @@ namespace ROEditor
this.tbMenuVal.Size = new System.Drawing.Size(464, 22);
this.tbMenuVal.TabIndex = 5;
this.tbMenuVal.Text = "textBox1";
this.tbMenuVal.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
//
// lblGroupText
//