void ReleaseDesignerOutlets() { if (ButtonConfirm != null) { ButtonConfirm.Dispose(); ButtonConfirm = null; } if (TextFieldConfirmPassword != null) { TextFieldConfirmPassword.Dispose(); TextFieldConfirmPassword = null; } if (TextFieldEmail != null) { TextFieldEmail.Dispose(); TextFieldEmail = null; } if (TextFieldPassword != null) { TextFieldPassword.Dispose(); TextFieldPassword = null; } if (TextFieldUsername != null) { TextFieldUsername.Dispose(); TextFieldUsername = null; } }
private void Localize() { ButtonConfirm.SetTitle(Strings.SAVE_NEW_USER, UIControlState.Normal); TextFieldPassword.Placeholder = Strings.PASSWORD; TextFieldUsername.Placeholder = Strings.USERNAME; TextFieldConfirmPassword.Placeholder = Strings.CONFIRM_PASSWORD; Title = Strings.NEW_USER; }
public void TextBoxResistor_KeyDown(object sender, KeyEventArgs e) { // Touche Enter pressée if (e.KeyCode == Keys.Enter) { ButtonConfirm.PerformClick(); e.Handled = true; e.SuppressKeyPress = true; } }
protected override void OnInit(QFramework.IUIData uiData) { mData = uiData as AttendanceInstructionsPanelData ?? new AttendanceInstructionsPanelData(); BtnBack.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); Back(); }).AddTo(this); ButtonConfirm.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); Back(); }).AddTo(this); }
/// <summary> /// /// </summary> /// <param name="title">Advice Title</param> /// <param name="text">The message of the advice.</param> /// <param name="size">(1-3) Defaults to 0.</param> /// <param name="actionConfrim">Action when clicking Ok/Yes.</param> /// <param name="actionDeny">Action when clicking No. Will force a double button to appear instead of only the button Ok.</param> /// public void CreateAdvice(string title, string text, int size = 0, ButtonConfirm actionConfirm = null, ButtonDeny actionDeny = null) { //Determinar el tamaño de la caja de mensaje adviceComp.panel.gameObject.SetActive(true); AdviceBox usedBox = adviceComp.adviceBoxList[size]; usedBox.txtTitle.text = title; usedBox.txtAdvice.text = text; functionConfirm = actionConfirm; functionDeny = actionDeny; if (actionConfirm == null) { usedBox.buttonYes.gameObject.SetActive(false); usedBox.buttonNo.gameObject.SetActive(false); usedBox.buttonOk.gameObject.SetActive(true); } else { usedBox.buttonYes.gameObject.SetActive(true); usedBox.buttonNo.gameObject.SetActive(true); usedBox.buttonOk.gameObject.SetActive(false); } usedBox.buttonOk.onClick.RemoveAllListeners(); usedBox.buttonYes.onClick.RemoveAllListeners(); usedBox.buttonNo.onClick.RemoveAllListeners(); if (actionConfirm == null) { functionConfirm = () => { } } ; if (actionDeny == null) { functionDeny = () => { } } ; usedBox.buttonOk.onClick.AddListener(ButtonDoConfirm); usedBox.buttonYes.onClick.AddListener(ButtonDoConfirm); usedBox.buttonNo.onClick.AddListener(ButtonDoDeny); usedBox.obj.SetActive(true); }
public void CreateAdvice(string text, int size = 0, ButtonConfirm actionConfirm = null, ButtonDeny actionDeny = null) { CreateAdvice("Advice", text, size, actionConfirm, actionDeny); }