Example #1
0
 private void OnSelectedPasswordFieldChanged(object sender, Field oldField, Field newField)
 {
 }
Example #2
0
        /// <summary>
        /// Creates a new password for this <see cref="Category"/>.
        /// </summary>
        /// <returns>The new  <see cref="T:PasswordSafe.Data.Biz.Category"/></returns>
        public Password CreatePassword()
        {
            Password newPassword = new Password(this, 0, "New Password");

            short order = 0;
            foreach (TemplateField tempField in this.Fields)
            {
                Field field = new Field(newPassword, 0, tempField.Name, tempField.Type, null, order++);
                newPassword.Fields.Add(field);
            }

            this.Passwords.Add(newPassword);
            return newPassword;
        }
Example #3
0
 /// <summary>
 /// Adds a new <see cref="Field"/> to the password.
 /// </summary>
 /// <param name="type">The type of the new <see cref="Field"/></param>
 /// <param name="name">The name of the new <see cref="T:Field"/></param>
 public void AddField(FieldType type, string name)
 {
     Field field = new Field(this, 0, name, type, null, (short)Fields.Count);
     this.Fields.Add(field);
 }