/// <summary> /// Display a touch keyboard if the user touches the second password box. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ReEnterPasswordBox_TouchUp(object sender, TouchEventArgs e) { GUI.OnScreenKeyboard.OnScreenKeyboard keyboard = new GUI.OnScreenKeyboard.OnScreenKeyboard(GUI.OnScreenKeyboard.OnScreenKeyboard.InputType.PASSWORD, Window.GetWindow(this), ReEnterPasswordBox.Password); bool?dialogResult = keyboard.ShowDialog(); if (dialogResult != null && (bool)dialogResult) { ReEnterPasswordBox.Password = keyboard.GetResult(); } }
/// <summary> /// Display a touch keyboard if the user touches the username box. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void UsernameBox_TouchUp(object sender, TouchEventArgs e) { GUI.OnScreenKeyboard.OnScreenKeyboard keyboard = new GUI.OnScreenKeyboard.OnScreenKeyboard(GUI.OnScreenKeyboard.OnScreenKeyboard.InputType.TEXT, Window.GetWindow(this), UsernameBox.Text); bool?dialogResult = keyboard.ShowDialog(); if (dialogResult != null && (bool)dialogResult) { UsernameBox.Text = keyboard.GetResult(); UsernameBox.CaretIndex = UsernameBox.Text.Length; } }