public override void OnClick(PVDragContext dc) { foreach (SMKeyboardKey key in Keys) { if (key.PaintedRect.Contains(dc.lastPoint)) { if (key.Pressed) { // send message about KeyChar pressed SMControl targetControl = Page.FindObjectWithAPIName(TargetControl); if (targetControl != null) { if (key.Key.Equals("#back")) { targetControl.ExecuteMessage("acceptBack"); } else if (key.Key.Equals("#enter")) { targetControl.ExecuteMessage("acceptEnter"); } else { targetControl.ExecuteMessage("acceptString", new GSString(key.Key)); } } } } key.Pressed = false; } base.OnClick(dc); }
private void UpdateHelpText(string text) { if (p_focusX >= 0 && p_focusX < p_xmax && p_focusY >= 0 && p_focusY < p_ymax) { SMControl c = Page.FindObjectWithAPIName(this.HelpTextControlName); if (c != null) { c.ExecuteMessage("setText", new GSString(text ?? p_array[p_focusX, p_focusY, 2])); } } }