📄 mainform.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb;
namespace MyOutlook
{
/// <summary>
/// frmMain 的摘要说明。
/// </summary>
public class frmMain : System.Windows.Forms.Form
{
private System.Windows.Forms.Splitter splitter1;
private System.Windows.Forms.MenuItem miFile;
private System.Windows.Forms.MenuItem miSetup;
private System.Windows.Forms.TreeView tvBoxesList;
private System.Windows.Forms.ColumnHeader colSentTime;
private System.Windows.Forms.ColumnHeader colSentName;
private System.Windows.Forms.ColumnHeader colReceiveName;
private System.Windows.Forms.ColumnHeader colTitle;
private System.Windows.Forms.MainMenu mnuMain;
private System.Windows.Forms.ListView lvMailList;
private System.Windows.Forms.Panel pnlClient;
private System.Windows.Forms.Splitter splListPreview;
private System.Windows.Forms.Panel pnlPreview;
private System.Windows.Forms.RichTextBox rtbContent;
private System.Windows.Forms.Panel pnlLeft;
private System.Windows.Forms.StatusBar statusBar;
private System.Windows.Forms.ToolBar toolBar;
private System.Windows.Forms.MenuItem menuItem2;
private System.ComponentModel.IContainer components;
private System.Windows.Forms.MenuItem miAccountSetup;
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.ToolBarButton tbbtnNew;
private System.Windows.Forms.ToolBarButton tbbtnReceive;
private System.Windows.Forms.ToolBarButton tbbtnSend;
private System.Windows.Forms.MenuItem miReceiveAll;
private System.Windows.Forms.MenuItem miExit;
private System.Windows.Forms.ContextMenu cmAccounts;
internal System.Data.OleDb.OleDbConnection oledbcntMyOutLookDB;
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.OleDbDataAdapter oledbadpMailAccounts;
internal ArrayList accounts;
private System.Windows.Forms.MenuItem miLine;
internal Hashtable mails;
private MailStore ms;
private System.Windows.Forms.MenuItem miNew;
private System.Data.OleDb.OleDbDataAdapter oledbadpMails;
private System.Data.OleDb.OleDbCommand oleDbSelectCommand2;
private System.Data.OleDb.OleDbCommand oleDbInsertCommand2;
private System.Data.OleDb.OleDbCommand oleDbUpdateCommand2;
private System.Data.OleDb.OleDbCommand oleDbDeleteCommand2;
private System.Windows.Forms.MenuItem miDelete;
private System.Windows.Forms.ToolBarButton tbbtnDelete;
private string curMailBox="";
public frmMain()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
accounts = new ArrayList();
//
// 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.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmMain));
this.mnuMain = new System.Windows.Forms.MainMenu();
this.miFile = new System.Windows.Forms.MenuItem();
this.miNew = new System.Windows.Forms.MenuItem();
this.miDelete = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.miExit = new System.Windows.Forms.MenuItem();
this.miSetup = new System.Windows.Forms.MenuItem();
this.miAccountSetup = new System.Windows.Forms.MenuItem();
this.statusBar = new System.Windows.Forms.StatusBar();
this.toolBar = new System.Windows.Forms.ToolBar();
this.tbbtnNew = new System.Windows.Forms.ToolBarButton();
this.tbbtnReceive = new System.Windows.Forms.ToolBarButton();
this.cmAccounts = new System.Windows.Forms.ContextMenu();
this.miReceiveAll = new System.Windows.Forms.MenuItem();
this.miLine = new System.Windows.Forms.MenuItem();
this.tbbtnSend = new System.Windows.Forms.ToolBarButton();
this.tbbtnDelete = new System.Windows.Forms.ToolBarButton();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.pnlClient = new System.Windows.Forms.Panel();
this.pnlLeft = new System.Windows.Forms.Panel();
this.pnlPreview = new System.Windows.Forms.Panel();
this.rtbContent = new System.Windows.Forms.RichTextBox();
this.splListPreview = new System.Windows.Forms.Splitter();
this.lvMailList = new System.Windows.Forms.ListView();
this.colSentName = new System.Windows.Forms.ColumnHeader();
this.colReceiveName = new System.Windows.Forms.ColumnHeader();
this.colTitle = new System.Windows.Forms.ColumnHeader();
this.colSentTime = new System.Windows.Forms.ColumnHeader();
this.splitter1 = new System.Windows.Forms.Splitter();
this.tvBoxesList = new System.Windows.Forms.TreeView();
this.oledbcntMyOutLookDB = new System.Data.OleDb.OleDbConnection();
this.oledbadpMailAccounts = new System.Data.OleDb.OleDbDataAdapter();
this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand();
this.oledbadpMails = new System.Data.OleDb.OleDbDataAdapter();
this.oleDbDeleteCommand2 = new System.Data.OleDb.OleDbCommand();
this.oleDbInsertCommand2 = new System.Data.OleDb.OleDbCommand();
this.oleDbSelectCommand2 = new System.Data.OleDb.OleDbCommand();
this.oleDbUpdateCommand2 = new System.Data.OleDb.OleDbCommand();
this.pnlClient.SuspendLayout();
this.pnlLeft.SuspendLayout();
this.pnlPreview.SuspendLayout();
this.SuspendLayout();
//
// mnuMain
//
this.mnuMain.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.miFile,
this.miSetup});
//
// miFile
//
this.miFile.Index = 0;
this.miFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.miNew,
this.miDelete,
this.menuItem2,
this.miExit});
this.miFile.Text = "邮件(&M)";
//
// miNew
//
this.miNew.Index = 0;
this.miNew.Text = "新建(&N)";
this.miNew.Click += new System.EventHandler(this.miNew_Click);
//
// miDelete
//
this.miDelete.Index = 1;
this.miDelete.Text = "删除(&D)";
this.miDelete.Click += new System.EventHandler(this.miDelete_Click);
//
// menuItem2
//
this.menuItem2.Index = 2;
this.menuItem2.Text = "-";
//
// miExit
//
this.miExit.Index = 3;
this.miExit.Text = "退出(&X)";
this.miExit.Click += new System.EventHandler(this.miExit_Click);
//
// miSetup
//
this.miSetup.Index = 1;
this.miSetup.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.miAccountSetup});
this.miSetup.Text = "设置(&S)";
//
// miAccountSetup
//
this.miAccountSetup.Index = 0;
this.miAccountSetup.Text = "邮箱设置(&M)";
this.miAccountSetup.Click += new System.EventHandler(this.miAccountSetup_Click);
//
// statusBar
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -