BoxDiagrams.TextBox.OnKeyPress C# (CSharp) Метод

OnKeyPress() публичный Метод

public OnKeyPress ( KeyPressEventArgs e ) : void
e System.Windows.Forms.KeyPressEventArgs
Результат void
		public override void OnKeyPress(KeyPressEventArgs e)
		{
			e.Handled = true;
			char ch = e.KeyChar;
			if (ch >= 32 || ch == '\r') {
				if (ch == '\r') ch = '\n';
				UndoStack.Do(@do => {
					if (@do)
						this.Text += ch;
					else
						this.Text = this.Text.Left(this.Text.Length - 1);
				}, true);
			}
		}