Files
PDFPatcher/App/Functions/PasswordEntryForm.cs
T
2022-01-06 09:08:16 +08:00

32 lines
752 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Windows.Forms;
namespace PDFPatcher
{
public partial class PasswordEntryForm : Form
{
public PasswordEntryForm(string sourceFile) {
InitializeComponent();
sourceFile = System.IO.Path.GetFileName(sourceFile);
Text += ":" + sourceFile;
_MessageLabel.Text = _MessageLabel.Text.Replace("PDF 文件", String.Concat("PDF 文件 ", sourceFile, " "));
}
/// <summary>
/// 获取密码框的文本。
/// </summary>
public string Password => _PasswordBox.Text;
private void _OkButton_Click(object sender, EventArgs e) {
DialogResult = DialogResult.OK;
Close();
}
private void _CancelButton_Click(object sender, EventArgs e) {
DialogResult = DialogResult.Cancel;
Close();
}
}
}