コード例 #1
0
 private void AddUserTxt_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == Convert.ToChar(Keys.Enter))
     {
         AddUserBtn.PerformClick();
     }
 }
コード例 #2
0
        void ReleaseDesignerOutlets()
        {
            if (AddUserBtn != null)
            {
                AddUserBtn.Dispose();
                AddUserBtn = null;
            }

            if (btnCancel != null)
            {
                btnCancel.Dispose();
                btnCancel = null;
            }

            if (ContentView != null)
            {
                ContentView.Dispose();
                ContentView = null;
            }

            if (HeaderView != null)
            {
                HeaderView.Dispose();
                HeaderView = null;
            }

            if (lblPasswordError != null)
            {
                lblPasswordError.Dispose();
                lblPasswordError = null;
            }

            if (lblTitle != null)
            {
                lblTitle.Dispose();
                lblTitle = null;
            }

            if (mainScrollView != null)
            {
                mainScrollView.Dispose();
                mainScrollView = null;
            }

            if (txtAddressLine1 != null)
            {
                txtAddressLine1.Dispose();
                txtAddressLine1 = null;
            }

            if (txtCity != null)
            {
                txtCity.Dispose();
                txtCity = null;
            }

            if (txtName != null)
            {
                txtName.Dispose();
                txtName = null;
            }

            if (txtPassword != null)
            {
                txtPassword.Dispose();
                txtPassword = null;
            }

            if (txtPhone != null)
            {
                txtPhone.Dispose();
                txtPhone = null;
            }

            if (txtStreetLine2 != null)
            {
                txtStreetLine2.Dispose();
                txtStreetLine2 = null;
            }

            if (txtZipcode != null)
            {
                txtZipcode.Dispose();
                txtZipcode = null;
            }
        }