📄 passdialog.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace cryptprov
{
public partial class PassDialog : Form
{
public PassDialog()
{
InitializeComponent();
}
public string Passcode
{
get
{ return textBox1.Text; }
}
private void button2_Click(object sender, EventArgs e)
{
if (textBox1.Text.Length <= 1)
MessageBox.Show("密码长度无效!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
else
{
this.DialogResult = DialogResult.OK;
this.Close();
}
}
private void button1_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
private void PassDialog_FormClosing(object sender, FormClosingEventArgs e)
{
if (this.DialogResult != DialogResult.OK)
this.DialogResult=DialogResult.Cancel;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -