void IMdElementCtrl.Refresh()
        {
            if (m_MdElementEditor == null)
            {
                return;
            }

            if (m_MdElementEditor.GetEnabled(m_propname) == false)
            {
                this.Enabled = false;
                return;
            }

            m_httpBasicGPValue = m_MdElementEditor.GetValue(m_propname) as IHttpBasicGPValue;

            if (m_httpBasicGPValue == null)
            {
                return;
            }

            string authenticationString = m_httpBasicGPValue.EncodedUserNamePassWord;

            DecodeUserNamePassword(authenticationString);

            if (m_username != null)
            {
                txtUserName.Text = m_username;
            }

            if (m_password != null)
            {
                txtPassword.Text = m_password;
            }
        }
Example #2
0
        void IMdElementCtrl.Refresh()
        {
            try
            {
                if (m_MdElementEditor == null)
                {
                    return;
                }

                if (m_MdElementEditor.GetEnabled(m_propname) == false)
                {
                    this.Enabled = false;
                    return;
                }

                m_httpBasicGPValue = m_MdElementEditor.GetValue(m_propname) as IHttpBasicGPValue;

                if (m_httpBasicGPValue == null)
                {
                    return;
                }

                string authenticationString = m_httpBasicGPValue.EncodedUserNamePassWord;

                DecodeUserNamePassword(authenticationString);

                if (m_username != null)
                {
                    txtUserName.Text = m_username;
                }

                if (m_password != null)
                {
                    txtPassword.Text = m_password;
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex.Message);
                System.Diagnostics.Debug.WriteLine(ex.StackTrace);
            }
        }