📄 sendmail.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace ExcelObjectModelCS
{
/// <summary>
/// Summary description for SendMail.
/// </summary>
public class SendMail : System.Windows.Forms.Form
{
internal System.Windows.Forms.Button btnCancel;
internal System.Windows.Forms.Button btnOK;
internal System.Windows.Forms.CheckBox chkDownloadNew;
internal System.Windows.Forms.TextBox txtPassword;
internal System.Windows.Forms.Label Label2;
internal System.Windows.Forms.TextBox txtName;
internal System.Windows.Forms.Label Label1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public SendMail()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#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.btnCancel = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.chkDownloadNew = new System.Windows.Forms.CheckBox();
this.txtPassword = new System.Windows.Forms.TextBox();
this.Label2 = new System.Windows.Forms.Label();
this.txtName = new System.Windows.Forms.TextBox();
this.Label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(248, 32);
this.btnCancel.Name = "btnCancel";
this.btnCancel.TabIndex = 13;
this.btnCancel.Text = "Cancel";
//
// btnOK
//
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(248, 8);
this.btnOK.Name = "btnOK";
this.btnOK.TabIndex = 12;
this.btnOK.Text = "OK";
//
// chkDownloadNew
//
this.chkDownloadNew.Location = new System.Drawing.Point(80, 56);
this.chkDownloadNew.Name = "chkDownloadNew";
this.chkDownloadNew.Size = new System.Drawing.Size(144, 24);
this.chkDownloadNew.TabIndex = 11;
this.chkDownloadNew.Text = "Download new mail?";
//
// txtPassword
//
this.txtPassword.Location = new System.Drawing.Point(80, 32);
this.txtPassword.Name = "txtPassword";
this.txtPassword.PasswordChar = '*';
this.txtPassword.Size = new System.Drawing.Size(128, 20);
this.txtPassword.TabIndex = 10;
this.txtPassword.Text = "";
//
// Label2
//
this.Label2.Location = new System.Drawing.Point(8, 32);
this.Label2.Name = "Label2";
this.Label2.Size = new System.Drawing.Size(64, 23);
this.Label2.TabIndex = 9;
this.Label2.Text = "Password:";
this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtName
//
this.txtName.Location = new System.Drawing.Point(80, 8);
this.txtName.Name = "txtName";
this.txtName.Size = new System.Drawing.Size(128, 20);
this.txtName.TabIndex = 8;
this.txtName.Text = "";
//
// Label1
//
this.Label1.Location = new System.Drawing.Point(8, 8);
this.Label1.Name = "Label1";
this.Label1.Size = new System.Drawing.Size(64, 23);
this.Label1.TabIndex = 7;
this.Label1.Text = "Name:";
this.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// SendMail
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(328, 85);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.chkDownloadNew);
this.Controls.Add(this.txtPassword);
this.Controls.Add(this.Label2);
this.Controls.Add(this.txtName);
this.Controls.Add(this.Label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "SendMail";
this.Text = "Send Mail";
this.ResumeLayout(false);
}
#endregion
public string EmailName
{
get
{
return txtName.Text;
}
}
public string EmailPassword
{
get
{
return txtPassword.Text;
}
}
public bool DownloadNewMail
{
get
{
return chkDownloadNew.Checked;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -