Ejemplo n.º 1
0
    // HACK: should not create a form in a process object
    void ProvidePassword(PdfPasswordProviderArgs args)
    {
      using (PasswordForm form = new PasswordForm(this.path))
      {
        switch (form.ShowDialog())
        {
          case DialogResult.OK:
            args.Password = form.Password;
            break;

          case DialogResult.Cancel:
            args.Abort = true;
            break;
        }
      }
    }
        // HACK: should not create a form in a process object
        void ProvidePassword(PdfPasswordProviderArgs args)
        {
            using (PasswordForm form = new PasswordForm(this.path))
            {
                switch (form.ShowDialog())
                {
                case DialogResult.OK:
                    args.Password = form.Password;
                    break;

                case DialogResult.Cancel:
                    args.Abort = true;
                    break;
                }
            }
        }