public void btnOk_Click(object sender, RoutedEventArgs e)
        {
            if (SkipPwdValidation)
            {
                this.DialogResult = true;
                return;
            }

            if (passwordBoxControl != null)
            {
                if (pbData.CheckMasterPassword(passwordBoxControl.Password))
                {
                    this.DialogResult = true;
                }
                else
                {
                    ErrorTextBox.Text = System.Windows.Application.Current.FindResource("MasterPasswordErrorMessage") as string;
                }
                //if (pbData.AuthenticateUser(pbData.ActiveUser, PwdBox.Password, out exist))
                //{
                //    this.DialogResult = true;
                //}
            }

            //Old code
            //var pass = PwdBox.Password;
            //if(pbData.PinEnabled())
            //{
            //    pass = pbData.GetMasterPwdFromPin(Pin.ToString());
            //}

            //Pin = null;

            //if (pbData.CheckMasterPassword(pass))
            //{
            //    this.DialogResult = true;
            //}
            //else
            //{
            //    //TODO
            //}
            //if (pbData.AuthenticateUser(pbData.ActiveUser, PwdBox.Password, out exist))
            //    this.DialogResult = true;
        }