📄 frmconf.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using System.Text;
using System.Security.Cryptography;
namespace SkyMail
{
/// <summary>
/// FrmConf 的摘要说明。
/// </summary>
public class FrmConf : System.Windows.Forms.Form
{
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TextBox textBox8;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.TreeView treeView1;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.TextBox Txtname;
private System.Windows.Forms.NumericUpDown Numtimeout;
private System.Windows.Forms.TextBox Txtusername;
private System.Windows.Forms.TextBox Txtsmtpport;
private System.Windows.Forms.TextBox Txtsmtpname;
private System.Windows.Forms.TextBox Txtpop3name;
private System.Windows.Forms.TextBox Txtuserpwd;
private System.Windows.Forms.CheckBox Chkbak;
private System.Windows.Forms.TextBox Txtemail;
private System.Windows.Forms.TextBox Txtpop3port;
private System.Windows.Forms.CheckBox Chksmtplogin;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public FrmConf()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.label14 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.Txtname = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.Numtimeout = new System.Windows.Forms.NumericUpDown();
this.label8 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.Txtusername = new System.Windows.Forms.TextBox();
this.Txtsmtpport = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.Txtsmtpname = new System.Windows.Forms.TextBox();
this.Txtpop3name = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.Txtuserpwd = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.Chkbak = new System.Windows.Forms.CheckBox();
this.label2 = new System.Windows.Forms.Label();
this.Txtemail = new System.Windows.Forms.TextBox();
this.Txtpop3port = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.Chksmtplogin = new System.Windows.Forms.CheckBox();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.button6 = new System.Windows.Forms.Button();
this.textBox8 = new System.Windows.Forms.TextBox();
this.button5 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.treeView1 = new System.Windows.Forms.TreeView();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.Numtimeout)).BeginInit();
this.tabPage2.SuspendLayout();
this.SuspendLayout();
//
// tabControl1
//
this.tabControl1.Controls.AddRange(new System.Windows.Forms.Control[] {
this.tabPage1,
this.tabPage2});
this.tabControl1.Location = new System.Drawing.Point(8, 8);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(432, 304);
this.tabControl1.TabIndex = 40;
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
//
// tabPage1
//
this.tabPage1.Controls.AddRange(new System.Windows.Forms.Control[] {
this.label14,
this.label13,
this.Txtname,
this.label12,
this.Numtimeout,
this.label8,
this.button1,
this.button2,
this.Txtusername,
this.Txtsmtpport,
this.label4,
this.Txtsmtpname,
this.Txtpop3name,
this.label6,
this.Txtuserpwd,
this.label5,
this.label3,
this.Chkbak,
this.label2,
this.Txtemail,
this.Txtpop3port,
this.label1,
this.label7,
this.Chksmtplogin});
this.tabPage1.Location = new System.Drawing.Point(4, 21);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(424, 279);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "基本信息";
//
// label14
//
this.label14.Location = new System.Drawing.Point(48, 72);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(296, 23);
this.label14.TabIndex = 47;
this.label14.Text = "(以上两项作为发送邮件署名的依据)";
//
// label13
//
this.label13.Location = new System.Drawing.Point(170, 216);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(24, 23);
this.label13.TabIndex = 46;
this.label13.Text = "分";
//
// Txtname
//
this.Txtname.Location = new System.Drawing.Point(120, 16);
this.Txtname.Name = "Txtname";
this.Txtname.Size = new System.Drawing.Size(216, 21);
this.Txtname.TabIndex = 45;
this.Txtname.Text = "";
//
// label12
//
this.label12.Location = new System.Drawing.Point(48, 24);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(64, 23);
this.label12.TabIndex = 44;
this.label12.Text = "显示名称";
//
// Numtimeout
//
this.Numtimeout.Location = new System.Drawing.Point(120, 210);
this.Numtimeout.Maximum = new System.Decimal(new int[] {
5,
0,
0,
0});
this.Numtimeout.Minimum = new System.Decimal(new int[] {
1,
0,
0,
0});
this.Numtimeout.Name = "Numtimeout";
this.Numtimeout.Size = new System.Drawing.Size(40, 21);
this.Numtimeout.TabIndex = 43;
this.Numtimeout.Value = new System.Decimal(new int[] {
1,
0,
0,
0});
//
// label8
//
this.label8.Location = new System.Drawing.Point(48, 216);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(72, 23);
this.label8.TabIndex = 39;
this.label8.Text = "服务器超时";
//
// button1
//
this.button1.Location = new System.Drawing.Point(264, 240);
this.button1.Name = "button1";
this.button1.TabIndex = 32;
this.button1.Text = "取消";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(176, 240);
this.button2.Name = "button2";
this.button2.TabIndex = 33;
this.button2.Text = "确定";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// Txtusername
//
this.Txtusername.Location = new System.Drawing.Point(120, 152);
this.Txtusername.Name = "Txtusername";
this.Txtusername.Size = new System.Drawing.Size(88, 21);
this.Txtusername.TabIndex = 26;
this.Txtusername.Text = "";
//
// Txtsmtpport
//
this.Txtsmtpport.Location = new System.Drawing.Point(304, 96);
this.Txtsmtpport.Name = "Txtsmtpport";
this.Txtsmtpport.Size = new System.Drawing.Size(32, 21);
this.Txtsmtpport.TabIndex = 31;
this.Txtsmtpport.Text = "25";
//
// label4
//
this.label4.Location = new System.Drawing.Point(216, 160);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(32, 12);
this.label4.TabIndex = 23;
this.label4.Text = "密码";
//
// Txtsmtpname
//
this.Txtsmtpname.Location = new System.Drawing.Point(120, 96);
this.Txtsmtpname.Name = "Txtsmtpname";
this.Txtsmtpname.Size = new System.Drawing.Size(128, 21);
this.Txtsmtpname.TabIndex = 30;
this.Txtsmtpname.Text = "";
//
// Txtpop3name
//
this.Txtpop3name.Location = new System.Drawing.Point(120, 128);
this.Txtpop3name.Name = "Txtpop3name";
this.Txtpop3name.Size = new System.Drawing.Size(128, 21);
this.Txtpop3name.TabIndex = 24;
this.Txtpop3name.Text = "";
//
// label6
//
this.label6.Location = new System.Drawing.Point(264, 104);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(32, 23);
this.label6.TabIndex = 29;
this.label6.Text = "端口";
//
// Txtuserpwd
//
this.Txtuserpwd.Location = new System.Drawing.Point(248, 152);
this.Txtuserpwd.Name = "Txtuserpwd";
this.Txtuserpwd.PasswordChar = '*';
this.Txtuserpwd.Size = new System.Drawing.Size(88, 21);
this.Txtuserpwd.TabIndex = 27;
this.Txtuserpwd.Text = "";
//
// label5
//
this.label5.Location = new System.Drawing.Point(48, 104);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(72, 23);
this.label5.TabIndex = 28;
this.label5.Text = "SMTP服务器";
//
// label3
//
this.label3.Location = new System.Drawing.Point(48, 160);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(56, 16);
this.label3.TabIndex = 22;
this.label3.Text = "帐 户 名";
//
// Chkbak
//
this.Chkbak.Location = new System.Drawing.Point(48, 184);
this.Chkbak.Name = "Chkbak";
this.Chkbak.Size = new System.Drawing.Size(176, 24);
this.Chkbak.TabIndex = 37;
this.Chkbak.Text = "在服务器上保留邮件备份";
//
// label2
//
this.label2.Location = new System.Drawing.Point(264, 128);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(32, 13);
this.label2.TabIndex = 21;
this.label2.Text = "端口";
//
// Txtemail
//
this.Txtemail.Location = new System.Drawing.Point(120, 40);
this.Txtemail.Name = "Txtemail";
this.Txtemail.Size = new System.Drawing.Size(216, 21);
this.Txtemail.TabIndex = 36;
this.Txtemail.Text = "";
//
// Txtpop3port
//
this.Txtpop3port.Location = new System.Drawing.Point(304, 128);
this.Txtpop3port.Name = "Txtpop3port";
this.Txtpop3port.Size = new System.Drawing.Size(32, 21);
this.Txtpop3port.TabIndex = 25;
this.Txtpop3port.Text = "110";
//
// label1
//
this.label1.Location = new System.Drawing.Point(48, 128);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(72, 15);
this.label1.TabIndex = 20;
this.label1.Text = "POP3服务器";
//
// label7
//
this.label7.Location = new System.Drawing.Point(48, 48);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(80, 16);
this.label7.TabIndex = 35;
this.label7.Text = "邮件地址";
//
// Chksmtplogin
//
this.Chksmtplogin.Location = new System.Drawing.Point(240, 184);
this.Chksmtplogin.Name = "Chksmtplogin";
this.Chksmtplogin.TabIndex = 34;
this.Chksmtplogin.Text = "SMTP用户验证";
//
// tabPage2
//
this.tabPage2.Controls.AddRange(new System.Windows.Forms.Control[] {
this.button6,
this.textBox8,
this.button5,
this.button3,
this.treeView1});
this.tabPage2.Location = new System.Drawing.Point(4, 21);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(424, 279);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "其他POP3帐户";
this.tabPage2.Visible = false;
this.tabPage2.Click += new System.EventHandler(this.tabPage2_Click);
//
// button6
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -