Ejemplo n.º 1
0
 bool TextFieldEditingDidEnd(UITextField textField, UITextFieldDidEndEditingReason reason, string replacementString)
 {
     if (textField == _textField)
     {
         Delegate.TokenFieldShouldReturn(this);
     }
     return(false);
 }
Ejemplo n.º 2
0
 public void EditingEnded(UITextField textField, UITextFieldDidEndEditingReason reason)
 {
     if (textField == this.trailWidthTextField)
     {
         this.TrailWidthDidEndEditing(reason);
     }
     else if (textField == this.trailLengthTextField)
     {
         this.TrailLengthDidEndEditing(reason);
     }
 }
Ejemplo n.º 3
0
 public void EditingEnded(UITextField textField, UITextFieldDidEndEditingReason reason)
 {
     if (reason == UITextFieldDidEndEditingReason.Committed &&
         !string.IsNullOrEmpty(this.playerNameTextField.Text))
     {
         UserDefaults.Myself = new Player(this.playerNameTextField.Text);
     }
     else
     {
         this.playerNameTextField.Text = UserDefaults.Myself.Username;
     }
 }
Ejemplo n.º 4
0
        private void TrailLengthDidEndEditing(UITextFieldDidEndEditingReason reason)
        {
            if (!string.IsNullOrEmpty(this.trailLengthTextField.Text) &&
                int.TryParse(this.trailLengthTextField.Text, out int newValue))
            {
                UserDefaults.TrailLength = newValue;
            }
            else
            {
                UserDefaults.TrailLength = null;
            }

            this.ConfigureProjectileTrail();
        }
Ejemplo n.º 5
0
        private void TrailWidthDidEndEditing(UITextFieldDidEndEditingReason reason)
        {
            if (!string.IsNullOrEmpty(this.trailWidthTextField.Text) &&
                float.TryParse(this.trailWidthTextField.Text, out float newValue))
            {
                UserDefaults.TrailWidth = newValue; // value stored in unit ball size (1.0 as trail width equal to ball size)
            }
            else
            {
                UserDefaults.TrailWidth = null;
            }

            this.ConfigureProjectileTrail();
        }
Ejemplo n.º 6
0
            public void EditingEnded(UITextField textField, UITextFieldDidEndEditingReason reason)
            {
                EventHandler <UITextFieldEditingEndedEventArgs> handler = editingEnded1;

                if (handler != null)
                {
                    var args = new UITextFieldEditingEndedEventArgs(reason);
                    handler(textField, args);
                }
                else
                {
                    // if this is executed on iOS10 (or late) and only the old API is used then we'll raise the old event (if set)
                    EventHandler handler2 = editingEnded;
                    if (handler2 != null)
                    {
                        handler2(textField, EventArgs.Empty);
                    }
                }
            }
 void OnTextFieldEditingEnded(object sender, UITextFieldDidEndEditingReason reason)
 {
     if (!(sender is TextFieldView textFieldView) || reason != UITextFieldDidEndEditingReason.Committed)
     {
         return;
     }
     if (textFieldView == nameTextFieldView)
     {
         ViewModel.CurrentDeviceModel.Name = textFieldView.Text;
     }
     if (textFieldView == buildingTextFieldView)
     {
         ViewModel.CurrentDeviceModel.Location1 = textFieldView.Text;
     }
     if (textFieldView == floorTextFieldView)
     {
         ViewModel.CurrentDeviceModel.Location2 = textFieldView.Text;
     }
     if (textFieldView == roomTextFieldView)
     {
         ViewModel.CurrentDeviceModel.Location3 = textFieldView.Text;
     }
 }
Ejemplo n.º 8
0
 public UITextFieldEditingEndedEventArgs(UITextFieldDidEndEditingReason reason)
 {
     this.Reason = reason;
 }
 public override void EditingEnded(UITextField textField, UITextFieldDidEndEditingReason reason)
 {
 }