protected void SendOnSubmit() { if (onEndEdit != null) { onEndEdit.Invoke(m_Text); } }
private void ForwardClicked(object o, EventArgs e) { PaymentMethod selectedPaymentMethod = PaymentMethod.CARD_ONLINE; switch (choiceList.SelectedItem?.ToString()) { case "Картой online": selectedPaymentMethod = PaymentMethod.CARD_ONLINE; break; case "Картой при получении": selectedPaymentMethod = PaymentMethod.CARD_UPON_RECEIPT; break; case "Наличными при получении": selectedPaymentMethod = PaymentMethod.CASH_UPON_RECEIPT; break; } if (choiceList.SelectedItem == null) { selectedPaymentMethod = PaymentMethod.NOT_SELECTED; } SubmitEvent?.Invoke(selectedPaymentMethod); }
private void Update() { if (_canText) { foreach (char c in Input.inputString) { if (c == '\b') // has backspace/delete been pressed? { if (_submittedString.Length != 0) { _submittedString = _submittedString.Substring(0, _submittedString.Length - 1); UpdateText(); } } else if ((c == '\n') || (c == '\r')) // enter/return { OnSubmit.Invoke(_submittedString); _submittedString = ""; UpdateText(); DisableTexting(); } else { _submittedString += c; UpdateText(); _sample.text = ""; } } } }
public void SubmitClicked(object o, EventArgs e) { if (string.IsNullOrEmpty(address.Text)) { address.PlaceholderColor = Color.Red; return; } if (string.IsNullOrEmpty(street.Text)) { street.PlaceholderColor = Color.Red; return; } if (string.IsNullOrEmpty(house.Text)) { house.PlaceholderColor = Color.Red; return; } if (string.IsNullOrEmpty(entrance.Text)) { entrance.PlaceholderColor = Color.Red; return; } if (string.IsNullOrEmpty(floor.Text)) { floor.PlaceholderColor = Color.Red; return; } if (string.IsNullOrEmpty(flat.Text)) { flat.PlaceholderColor = Color.Red; return; } if (string.IsNullOrEmpty(name.Text)) { name.PlaceholderColor = Color.Red; return; } if (string.IsNullOrEmpty(surname.Text)) { surname.PlaceholderColor = Color.Red; return; } if (string.IsNullOrEmpty(email.Text)) { email.PlaceholderColor = Color.Red; return; } if (string.IsNullOrEmpty(phoneNumber.Text)) { phoneNumber.PlaceholderColor = Color.Red; return; } Buyer buyer = new Buyer(address.Text, street.Text, house.Text, building.Text, entrance.Text, floor.Text, flat.Text, name.Text, surname.Text, email.Text, phoneNumber.Text, comment.Text); SubmitEvent?.Invoke(buyer); }
void Update() { if (isEnabled) { if (Input.GetButtonDown("Fire1")) { OnSubmit.Invoke(); } } }
/// <summary> /// OnUpdateSelected event. /// </summary> /// <param name="eventData">Event data.</param> public virtual void OnUpdateSelected(BaseEventData eventData) { if (Input.GetKeyDown(KeyCode.LeftArrow)) { var axisEvent = new AxisEventData(EventSystem.current) { moveDir = MoveDirection.Left, }; OnMoveEvent.Invoke(axisEvent); return; } if (Input.GetKeyDown(KeyCode.RightArrow)) { var axisEvent = new AxisEventData(EventSystem.current) { moveDir = MoveDirection.Right, }; OnMoveEvent.Invoke(axisEvent); return; } if (Input.GetKeyDown(KeyCode.UpArrow)) { var axisEvent = new AxisEventData(EventSystem.current) { moveDir = MoveDirection.Up, }; OnMoveEvent.Invoke(axisEvent); return; } if (Input.GetKeyDown(KeyCode.DownArrow)) { var axisEvent = new AxisEventData(EventSystem.current) { moveDir = MoveDirection.Down, }; OnMoveEvent.Invoke(axisEvent); return; } if (Input.GetKeyDown(KeyCode.Tab) || Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.KeypadEnter)) { var isEnter = Input.GetKey(KeyCode.Return) || Input.GetKey(KeyCode.KeypadEnter); var isShift = Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift); if (!(isEnter && isShift)) { OnSubmitEvent.Invoke(eventData, isEnter); } return; } }
private void Button_Click_1(object sender, RoutedEventArgs e) { if (this.grid_Root.BindingGroup.CommitEdit()) { if (this.SubmitEvent != null) { SubmitEvent.Invoke(this); } } else { MessageBox.Show("请填写正确的数据"); } }
private void button1_Click(object sender, RoutedEventArgs e) { BindingExpression b = this.textBox2.GetBindingExpression(TextBox.TextProperty); b.UpdateSource(); if (CommonHelper.GetUIElementError(this)) { MessageBox.Show("请输入正确的数据"); return; } if (SubmitEvent != null) { SubmitEvent.Invoke(this); } }
//确定 private void Button_Click_1(object sender, RoutedEventArgs e) { BindingGroup bg = this.grid_Root.BindingGroup; foreach (var item in bg.BindingExpressions) { item.UpdateSource(); } if (CommonHelper.GetUIElementError(this)) { MessageBox.Show("请输入正确的数据"); return; } if (this.SubmitEvent != null) { SubmitEvent.Invoke(this); } }
private void _onInputEndEdit(string inputText) { userName = inputText; var clr = ColorUtility.ToHtmlStringRGBA(m_NameColor); string colorInput = $"<color=#{clr}>{inputText}</color>"; string welcomeWords = string.Format(m_WelcomeTemplateWords, colorInput); OnInputEndEdit.Invoke(welcomeWords); if (!m_WelcomeWords) { return; } if (m_WelcomeWords.IsShow) { m_WelcomeWords.Hide(); } if (string.IsNullOrWhiteSpace(inputText)) { return; } m_WelcomeWords.SetWelcomeWords(welcomeWords); m_WelcomeWords.Show(); }
public virtual void OnUpdateSelected(BaseEventData eventData) { if (Input.GetKeyDown(KeyCode.LeftArrow)) { var axisEvent = new AxisEventData(EventSystem.current); axisEvent.moveDir = MoveDirection.Left; OnMoveEvent.Invoke(axisEvent); return; } if (Input.GetKeyDown(KeyCode.RightArrow)) { var axisEvent = new AxisEventData(EventSystem.current); axisEvent.moveDir = MoveDirection.Right; OnMoveEvent.Invoke(axisEvent); return; } if (Input.GetKeyDown(KeyCode.UpArrow)) { var axisEvent = new AxisEventData(EventSystem.current); axisEvent.moveDir = MoveDirection.Up; OnMoveEvent.Invoke(axisEvent); return; } if (Input.GetKeyDown(KeyCode.DownArrow)) { var axisEvent = new AxisEventData(EventSystem.current); axisEvent.moveDir = MoveDirection.Down; OnMoveEvent.Invoke(axisEvent); return; } //if (Input.GetKeyDown(KeyCode.Tab)) if (Input.GetKeyDown(KeyCode.Tab) || Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.KeypadEnter)) { OnSubmitEvent.Invoke(eventData); return; } }
private void Submit_Click(object sender, EventArgs e) { SubmitEvent?.Invoke(this.nameTextBox.Text); Close(); }
private void OK_Click(object sender, EventArgs e) { SubmitEvent?.Invoke(this.citizendList.SelectedIndices.Cast <int>().Where(x => x != currentIndex).ToList(), currentIndex); Close(); }
public void Submit() { StartGame.Invoke(noOfPlayers); }
private void InvokeEndEditEvent(string text) { OnEndEdit?.Invoke(text); onEndEditUnityEvent.Invoke(text); }
public void Submit() { m_OnClick.Invoke(); RemoveAllListeners(); }
public void Submit() { StartGameBoard.Invoke(csvBoardStrings[currentEditionNo]); StartGameCards.Invoke(csvCardStrings[currentEditionNo]); }