string GetPassword()
        {
            if (_DataSourceReferencePassword != null)
            {
                return(_DataSourceReferencePassword);
            }

            DataSourcePassword dlg = new DataSourcePassword();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                _DataSourceReferencePassword = dlg.PassPhrase;
            }

            return(_DataSourceReferencePassword);
        }
Exemple #2
0
        internal string GetPassword()
        {
            if (bGotPassword)
            {
                return(_DataSourceReferencePassword);
            }

            using (DataSourcePassword dlg = new DataSourcePassword())
            {
                DialogResult rc = dlg.ShowDialog();
                bGotPassword = true;
                if (rc == DialogResult.OK)
                {
                    _DataSourceReferencePassword = dlg.PassPhrase;
                }

                return(_DataSourceReferencePassword);
            }
        }