📄 accountprop.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data.OleDb;
using System.Data;
namespace MyOutlook
{
/// <summary>
/// AccountProp 的摘要说明。
/// </summary>
public class AccountProp : System.Windows.Forms.Form
{
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPageIn;
private System.Windows.Forms.TabPage tabPageOut;
private System.Windows.Forms.TabPage tabPageMail;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cbbMailType;
private System.Windows.Forms.TextBox tbMailBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox tbInServer;
private System.Windows.Forms.TextBox tbInPort;
private System.Windows.Forms.CheckBox cbKeepMails;
private System.Windows.Forms.TextBox tbInPwd;
private System.Windows.Forms.TextBox tbInID;
private System.Windows.Forms.TextBox tbOutPwd;
private System.Windows.Forms.TextBox tbOutID;
private System.Windows.Forms.TextBox tbOutPort;
private System.Windows.Forms.CheckBox cbNeedVerify;
private System.Windows.Forms.TextBox tbOutServer;
private System.Windows.Forms.Button btnApply;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnOk;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
private frmMain mf;
private System.Windows.Forms.RadioButton rbtnOwn;
private System.Windows.Forms.RadioButton rbtnSame;
private System.Windows.Forms.GroupBox gbOutSettings;
private ListView lv;
//标记是否添加新记录
private bool newFlag = false;
private DataSet ds;
private System.Data.OleDb.OleDbDataAdapter da;
private System.Data.OleDb.OleDbCommand oleDbSelectCommand1;
private System.Data.OleDb.OleDbCommand oleDbInsertCommand1;
private System.Data.OleDb.OleDbCommand oleDbUpdateCommand1;
private System.Data.OleDb.OleDbCommand oleDbDeleteCommand1;
private System.Data.OleDb.OleDbConnection oleDbConnection1;
private DataTable dt;
public AccountProp(frmMain mf, ListView lv)
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
this.mf = mf;
this.lv = lv;
oleDbConnection1.Open();
ds = new DataSet();
da.Fill(ds, "MailAccounts");
dt = ds.Tables[0];
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPageMail = new System.Windows.Forms.TabPage();
this.cbbMailType = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.tbMailBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.tabPageIn = new System.Windows.Forms.TabPage();
this.tbInPort = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.cbKeepMails = new System.Windows.Forms.CheckBox();
this.tbInPwd = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.tbInID = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.tbInServer = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.tabPageOut = new System.Windows.Forms.TabPage();
this.gbOutSettings = new System.Windows.Forms.GroupBox();
this.rbtnOwn = new System.Windows.Forms.RadioButton();
this.rbtnSame = new System.Windows.Forms.RadioButton();
this.tbOutPwd = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.tbOutID = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.tbOutPort = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.cbNeedVerify = new System.Windows.Forms.CheckBox();
this.tbOutServer = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.btnApply = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.btnOk = new System.Windows.Forms.Button();
this.da = new System.Data.OleDb.OleDbDataAdapter();
this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbConnection1 = new System.Data.OleDb.OleDbConnection();
this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand();
this.tabControl1.SuspendLayout();
this.tabPageMail.SuspendLayout();
this.tabPageIn.SuspendLayout();
this.tabPageOut.SuspendLayout();
this.gbOutSettings.SuspendLayout();
this.SuspendLayout();
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPageMail);
this.tabControl1.Controls.Add(this.tabPageIn);
this.tabControl1.Controls.Add(this.tabPageOut);
this.tabControl1.Location = new System.Drawing.Point(10, 17);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(585, 362);
this.tabControl1.TabIndex = 0;
//
// tabPageMail
//
this.tabPageMail.Controls.Add(this.cbbMailType);
this.tabPageMail.Controls.Add(this.label2);
this.tabPageMail.Controls.Add(this.tbMailBox);
this.tabPageMail.Controls.Add(this.label1);
this.tabPageMail.Location = new System.Drawing.Point(4, 21);
this.tabPageMail.Name = "tabPageMail";
this.tabPageMail.Size = new System.Drawing.Size(577, 337);
this.tabPageMail.TabIndex = 2;
this.tabPageMail.Text = "邮箱设置";
//
// cbbMailType
//
this.cbbMailType.Enabled = false;
this.cbbMailType.Items.AddRange(new object[] {
"POP3"});
this.cbbMailType.Location = new System.Drawing.Point(106, 52);
this.cbbMailType.Name = "cbbMailType";
this.cbbMailType.Size = new System.Drawing.Size(145, 20);
this.cbbMailType.TabIndex = 3;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -