private void InputKey(Keyboard.Key key) { if (key == Keyboard.Key.BackSpace && text.DisplayedString.Length > 0) { text.DisplayedString = text.DisplayedString.Substring(0, text.DisplayedString.Length - 1); return; } if (key == Keyboard.Key.Enter) { InputInformation = false; EndWrite?.Invoke(this); return; } if (key != Keyboard.Key.BackSpace && text.DisplayedString.Length <= maxLenght) { text.DisplayedString += key.ToString(); } }
protected virtual void OnEndWrite(FileReadWriteEventArgs e) // Инициализатор события EndWrite. { EndWrite?.Invoke(this, e); }