⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 passwordform.cs

📁 用C#實現能產生PDF格式文件的源碼
💻 CS
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace PdfSharp.Explorer
{
  /// <summary>
  /// The password dialog.
  /// </summary>
  public class PasswordForm : System.Windows.Forms.Form
  {
    private System.Windows.Forms.Label lblMessage;
    private System.Windows.Forms.Label lblPassword;
    private System.Windows.Forms.TextBox tbxPassword;
    private System.Windows.Forms.Button btnOK;
    private System.Windows.Forms.Button btnCancel;
    private System.ComponentModel.Container components = null;

    public PasswordForm(string path)
    {
      InitializeComponent();
      this.lblMessage.Text = String.Format(this.lblMessage.Text, path);
    }

    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    protected override void Dispose(bool disposing)
    {
      if (disposing)
      {
        if (components != null)
          components.Dispose();
      }
      base.Dispose(disposing);
    }

    public string Password = "";

    #region Windows Form Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
      this.lblMessage = new System.Windows.Forms.Label();
      this.lblPassword = new System.Windows.Forms.Label();
      this.tbxPassword = new System.Windows.Forms.TextBox();
      this.btnOK = new System.Windows.Forms.Button();
      this.btnCancel = new System.Windows.Forms.Button();
      this.SuspendLayout();
      // 
      // lblMessage
      // 
      this.lblMessage.Location = new System.Drawing.Point(8, 8);
      this.lblMessage.Name = "lblMessage";
      this.lblMessage.Size = new System.Drawing.Size(388, 44);
      this.lblMessage.TabIndex = 0;
      this.lblMessage.Text = "\"{0}\" is protected. Enter a password to open the file.";
      // 
      // lblPassword
      // 
      this.lblPassword.Location = new System.Drawing.Point(88, 68);
      this.lblPassword.Name = "lblPassword";
      this.lblPassword.Size = new System.Drawing.Size(60, 16);
      this.lblPassword.TabIndex = 1;
      this.lblPassword.Text = "Password:";
      // 
      // tbxPassword
      // 
      this.tbxPassword.Location = new System.Drawing.Point(152, 64);
      this.tbxPassword.Name = "tbxPassword";
      this.tbxPassword.PasswordChar = '

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -