void ReleaseDesignerOutlets ()
		{
			if (txtField1 != null) {
				txtField1.Dispose ();
				txtField1 = null;
			}
		}
示例#2
0
        partial void DidEndOnExit(MonoTouch.UIKit.UITextField sender)
        {
            Recalculate();

            // hide keyboard
            sender.ResignFirstResponder();
        }
示例#3
0
 void ReleaseDesignerOutlets()
 {
     if (btnAcao != null)
     {
         btnAcao.Dispose();
         btnAcao = null;
     }
     if (btnProximaTela != null)
     {
         btnProximaTela.Dispose();
         btnProximaTela = null;
     }
     if (btnTerceiraTela != null)
     {
         btnTerceiraTela.Dispose();
         btnTerceiraTela = null;
     }
     if (lblMensagem != null)
     {
         lblMensagem.Dispose();
         lblMensagem = null;
     }
     if (txtTeste != null)
     {
         txtTeste.Dispose();
         txtTeste = null;
     }
 }
示例#4
0
 void ReleaseDesignerOutlets()
 {
     if (txtField1 != null)
     {
         txtField1.Dispose();
         txtField1 = null;
     }
 }
		void ReleaseDesignerOutlets ()
		{
			if (txtGroepGemeente != null) {
				txtGroepGemeente.Dispose ();
				txtGroepGemeente = null;
			}
			if (txtGroepNaam != null) {
				txtGroepNaam.Dispose ();
				txtGroepNaam = null;
			}
			if (txtLastName != null) {
				txtLastName.Dispose ();
				txtLastName = null;
			}
			if (txtStamNummer != null) {
				txtStamNummer.Dispose ();
				txtStamNummer = null;
			}
			if (txtVoornaam != null) {
				txtVoornaam.Dispose ();
				txtVoornaam = null;
			}
		}
示例#6
0
 public bool HideKeyboard(MonoTouch.UIKit.UITextField sender)
 {
     sender.ResignFirstResponder();
     return(true);
 }
示例#7
0
 public void EditingEnded(MonoTouch.UIKit.UITextField textField)
 {
     this.UserActivity.NeedsSave = true;
 }
        private void initInterface()
        {
            _progressHud = new MTMBProgressHUD (this.View);

            _txtServerHost = new UITextField {
                Frame = new RectangleF (20, 23, 280, 25)
            };
            _txtServerHost.Placeholder = "Server hostname";
            _txtServerHost.BorderStyle = UITextBorderStyle.RoundedRect;
            _txtServerHost.KeyboardType = UIKeyboardType.Url;
            _txtServerHost.AutocapitalizationType = UITextAutocapitalizationType.None;
            _txtServerHost.AutocorrectionType = UITextAutocorrectionType.No;
            _txtServerHost.ShouldReturn += (textField) => {
                textField.ResignFirstResponder();
                return true;
            };

            _txtServerPort = new UITextField {
                Frame = new RectangleF (20, 49, 65, 25)
            };
            _txtServerPort.Placeholder = "Port";
            _txtServerPort.BorderStyle = UITextBorderStyle.RoundedRect;
            _txtServerPort.KeyboardType = UIKeyboardType.NumberPad;
            _txtServerPort.AutocapitalizationType = UITextAutocapitalizationType.None;
            _txtServerPort.AutocorrectionType = UITextAutocorrectionType.No;
            _txtServerPort.ShouldReturn += (textField) => {
                textField.ResignFirstResponder();
                return true;
            };

            #if PLUS_VERSION
            _txtServerPassword = new UITextField {
                Frame = new RectangleF (85, 49, 215, 25)
            };
            _txtServerPassword.Placeholder = "Password (optional)";
            _txtServerPassword.BorderStyle = UITextBorderStyle.RoundedRect;
            _txtServerPassword.KeyboardType = UIKeyboardType.Default;
            _txtServerPassword.AutocapitalizationType = UITextAutocapitalizationType.None;
            _txtServerPassword.AutocorrectionType = UITextAutocorrectionType.No;
            _txtServerPassword.SecureTextEntry = true;
            _txtServerPassword.ShouldReturn += (textField) => {
                textField.ResignFirstResponder();
                return true;
            };
            #endif

            UILabel lblAutoConnect = new UILabel {
                Frame = new RectangleF (5, 82, 200, 17)
            };
            lblAutoConnect.TextAlignment = UITextAlignment.Right;
            lblAutoConnect.Text = "Auto-connect at startup";

            _swAutoConnect = new UISwitch {
                Frame = new RectangleF (250, 75, 49, 31)
            };

            _tvServers = new UITableView {
                Frame = new RectangleF (0, 111, UIScreen.MainScreen.Bounds.Width,
                    UIScreen.MainScreen.Bounds.Height - 160)
            };

            _rcRefreshControl = new UIRefreshControl();
            _rcRefreshControl.ValueChanged += (sender, e) => { doRefreshServers(); };
            _tvServers.AddSubview (_rcRefreshControl);

            #if PLUS_VERSION
            View.AddSubviews (new UIView[] { _txtServerHost, _txtServerPort, _txtServerPassword,
                lblAutoConnect, _swAutoConnect,
                _tvServers,
                _progressHud
            });
            #else
            View.AddSubviews (new UIView[] { _txtServerHost, _txtServerPort,
                lblAutoConnect, _swAutoConnect,
                _tvServers
            });
            #endif

            txtSH = _txtServerHost;
            txtSP = _txtServerPort;
            #if PLUS_VERSION
            txtPW = _txtServerPassword;
            #endif
        }