private void NativeControl_TextChanged(object sender, TextChangedEventArgs e) { TextChangedAction?.Invoke(e); }
public static void CreateTextBox(ref TextBox txt, Point location, int width, string startValue, int maxLength, BorderStyle style, TextChangedAction action) { txt = new TextBox { Text = startValue, Location = location, Width = width, BorderStyle = style, MaxLength = maxLength }; if (action != null) { txt.TextChanged += (object sender, EventArgs e) => action(); } GameObject.GameToRun.Controls.Add(txt); }