public void EnableProtection(bool bEnable) { if (m_tbPassword == null) { Debug.Assert(false); return; } if (!MonoWorkarounds.IsRequired(5795)) { if (bEnable) { FontUtil.AssignDefault(m_tbPassword); } else { FontUtil.SetDefaultFont(m_tbPassword); FontUtil.AssignDefaultMono(m_tbPassword, true); } } if (m_tbPassword.UseSystemPasswordChar == bEnable) { return; } m_tbPassword.UseSystemPasswordChar = bEnable; ShowCurrentPassword(-1, -1); }
public void EnableProtection(bool bEnable) { if (m_tbPassword == null) { Debug.Assert(false); return; } if (bEnable) { FontUtil.AssignDefault(m_tbPassword); } else { FontUtil.SetDefaultFont(m_tbPassword); FontUtil.AssignDefaultMono(m_tbPassword, true); } if (m_tbPassword.UseSystemPasswordChar == bEnable) { return; } m_tbPassword.UseSystemPasswordChar = bEnable; ShowCurrentPassword(m_tbPassword.SelectionStart, m_tbPassword.SelectionLength); }
public virtual void EnableProtection(bool bEnable) { if (bEnable == this.UseSystemPasswordChar) { return; } if (!MonoWorkarounds.IsRequired(5795)) { FontUtil.SetDefaultFont(this); if (bEnable) { FontUtil.AssignDefault(this); } else { FontUtil.AssignDefaultMono(this, true); } } this.UseSystemPasswordChar = bEnable; ShowCurrentText(-1, -1); }