private void MaskPassword() { lockTextChangedEvent = true; var previousSelectionStart = SelectionStart; var previousSelectionLength = SelectionLength; Text = PasswordHelper.Mask(UnmaskedConnectionString); SelectionStart = previousSelectionStart; SelectionLength = previousSelectionLength; lockTextChangedEvent = false; }
public IAutoCompleteStringWithPasswordsCollection GetAutoComplete() { var collection = new AutoCompleteStringWithPasswordsCollection(); var connectionStrings = _applicationDataService.GetApplicationData().History; foreach (var connectionString in connectionStrings) { var masked = _passwordHelper.Mask(connectionString); while (!collection.TryInsert(masked, connectionString)) { masked = _passwordHelper.AddGarble(masked); } } return(collection); }