Esempio n. 1
0
 private void TcPasswordsOnRemovePassword(object sender, PasswordEventArgs e)
 {
     e.Success = MessageBox.Show(this, "Вы действительно хотите удалить пароль?", "Подтверждение", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes;
 }
        public void RemovePassword()
        {
            var tab = SelectedTab;
            if (tab == null)
                return;

            var password = tab.SelectedPassword;
            if (password == null)
                return;

            var args = new PasswordEventArgs(password);

            if (OnRemovePassword != null)
                OnRemovePassword(this, args);

            if (!args.Success)
                return;

            Document.Passwords.Remove(password);
            tab.UpdatePasswords();
        }
Esempio n. 3
0
 private void TcPasswordsOnEditPassword(object sender, PasswordEventArgs e)
 {
     e.Success = EditPasswordForm.Execute(this, _config.RootElement, e.Password);
 }